Annotation of /trunk/todo/seamonkey/seamonkey-1.0.2-r1.smage2
Parent Directory | Revision Log
Revision 2580 -
(hide annotations)
(download)
Thu Jul 9 20:34:39 2009 UTC (15 years, 2 months ago) by niro
File size: 11827 byte(s)
Thu Jul 9 20:34:39 2009 UTC (15 years, 2 months ago) by niro
File size: 11827 byte(s)
-moved to 'todo'
1 | niro | 2 | # $Header: /magellan-cvs/smage/mozilla/mozilla-1.7.12-r3.smage2,v 1.6 2006/05/31 16:21:25 niro Exp $ |
2 | |||
3 | PNAME="seamonkey" | ||
4 | PVER="1.0.2" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="net-www" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="Mozilla all in one browser." | ||
11 | HOMEPAGE="http://www.mozilla.org/products/mozilla1x/" | ||
12 | |||
13 | DEPEND=">= virtual/glibc | ||
14 | >= virtual/x11 | ||
15 | >= sys-libs/zlib-1.2.1 | ||
16 | >= media-libs/libmng-1.0.5 | ||
17 | >= media-libs/fontconfig-2.2 | ||
18 | >= media-libs/libjpeg-6b | ||
19 | >= media-libs/libpng-1.2.8 | ||
20 | >= dev-libs/glib2-2.8 | ||
21 | >= dev-libs/expat-1.95.6 | ||
22 | >= dev-libs/libidl-0.8.4 | ||
23 | >= app-arch/zip-2.3 | ||
24 | >= app-arch/unzip-5.50 | ||
25 | >= x11-libs/pango-1.10 | ||
26 | >= x11-libs/gtk2+-2.8 | ||
27 | >= app-crypt/gnupg-1.2.4" | ||
28 | |||
29 | SDEPEND=">= dev-util/pkgconfig-0.15.0" | ||
30 | |||
31 | SRCFILE="${PNAME}-${PVER}-source.tar.bz2" | ||
32 | SRCDIR="${BUILDDIR}/mozilla" | ||
33 | |||
34 | SRC_ENIGMAIL="enigmail-0.94.0.tar.gz" | ||
35 | SRC_IPC="ipc-1.1.3.tar.gz" | ||
36 | SRCDIR="${BUILDDIR}/mozilla" | ||
37 | |||
38 | sminclude mozilla | ||
39 | |||
40 | SRC_URI=( | ||
41 | mirror://${PNAME}/${SRCFILE} | ||
42 | mirror://${PNAME}/${SRC_ENIGMAIL} | ||
43 | mirror://${PNAME}/${SRC_IPC} | ||
44 | mirror://${PNAME}/${PNAME}-1.7.5-stackgrowth.patch | ||
45 | mirror://${PNAME}/${PNAME}-1.3-fix-RAW-target.patch | ||
46 | mirror://${PNAME}/mozilla-1.7.3-4ft2.patch | ||
47 | mirror://${PNAME}/mozilla-rebuild-databases.pl | ||
48 | mirror://${PNAME}/google.src | ||
49 | mirror://${PNAME}/xft.js | ||
50 | "mirror://${PNAME}/icon/mozilla-icon.png icon" | ||
51 | "mirror://${PNAME}/icon/mozilla.desktop icon" | ||
52 | mirror://${PNAME}/${PNAME}-1.7.12-nss-gcc4.patch | ||
53 | mirror://${PNAME}/${PNAME}-1.7.12-amd64-compile.patch | ||
54 | mirror://${PNAME}/${PNAME}-1.7.12-amd64-gcc4-crash-fix.patch | ||
55 | ) | ||
56 | |||
57 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR | ||
58 | export MOZILLA_CLIENT=1 | ||
59 | export BUILD_OPT=1 | ||
60 | export NO_STATIC_LIB=1 | ||
61 | export USE_PTHREADS=1 | ||
62 | |||
63 | # now strip optimization from CFLAGS so it doesn't end up in the | ||
64 | # compile string | ||
65 | export CFLAGS="${CFLAGS/-O*/}" | ||
66 | export CXXFLAGS="${CFLAGS}" | ||
67 | |||
68 | # needed to build without warnings on gcc-3 | ||
69 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" | ||
70 | |||
71 | src_prepare() { | ||
72 | munpack ${SRCFILE} || die | ||
73 | |||
74 | # enigmail plugin | ||
75 | munpack ${SRC_ENIGMAIL} ${SRCDIR}/mailnews/extensions ||die | ||
76 | munpack ${SRC_IPC} ${SRCDIR}/extensions ||die | ||
77 | |||
78 | cd ${SRCDIR} | ||
79 | |||
80 | # fix stack growth logic | ||
81 | mpatch -Np0 ${PNAME}-1.7.5-stackgrowth.patch || die | ||
82 | |||
83 | # fix logic error when using RAW target | ||
84 | # <azarah@gentoo.org> (23 Feb 2003) | ||
85 | mpatch -Np1 ${PNAME}-1.3-fix-RAW-target.patch || die | ||
86 | |||
87 | # patch out ft caching code since the API changed between releases of | ||
88 | # freetype; this enables freetype-2.1.8+ compat. | ||
89 | # https://bugzilla.mozilla.org/show_bug.cgi?id=234035#c65 | ||
90 | mpatch -Np0 mozilla-1.7.3-4ft2.patch || die | ||
91 | |||
92 | # fix compilation with gcc4 | ||
93 | mpatch -Np1 ${PNAME}-1.7.12-nss-gcc4.patch || die | ||
94 | |||
95 | # x86_64 compile fixes | ||
96 | if [[ ${ARCH} = x86_64 ]] | ||
97 | then | ||
98 | mpatch -Np1 ${PNAME}-1.7.12-amd64-compile.patch || die | ||
99 | mpatch -Np1 ${PNAME}-1.7.12-amd64-gcc4-crash-fix.patch || die | ||
100 | fi | ||
101 | |||
102 | # branding the source with our tags | ||
103 | sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die | ||
104 | |||
105 | # fix scripts that call for /usr/local/bin/perl | ||
106 | sed -i -e '1s,usr/local/bin,usr/bin,' security/nss/cmd/smimetools/smime || die | ||
107 | |||
108 | WANT_AUTOCONF=2.1 autoconf || die | ||
109 | |||
110 | # rebuild makefiles | ||
111 | cd ${SRCDIR}/extensions/ipc || die | ||
112 | makemake || die | ||
113 | |||
114 | cd ${SRCDIR}/mailnews/extensions/enigmail || die | ||
115 | makemake2 || die | ||
116 | } | ||
117 | |||
118 | src_compile() { | ||
119 | cd ${SRCDIR} | ||
120 | |||
121 | # setup .mozconfig | ||
122 | : >.mozconfig || die | ||
123 | |||
124 | # set optimization level based on CFLAGS | ||
125 | if [[ ${ARCH} = x86_64 ]] | ||
126 | then | ||
127 | # opts may cause segfaults on 64bit arches | ||
128 | mozconf_add --enable-optimize=-O1 | ||
129 | export CFLAGS="${CFLAGS} -fPIC" | ||
130 | export CXXFLAGS="${CXXFLAGS} -fPIC" | ||
131 | else | ||
132 | mozconf_add --enable-optimize=-O2 | ||
133 | fi | ||
134 | |||
135 | # enable compat mode for plugins build with gcc2 | ||
136 | mozconf_add --enable-old-abi-compat-wrappers | ||
137 | |||
138 | # we don't need the installer | ||
139 | mozconf_add --disable-installer | ||
140 | |||
141 | # issue all warnings demanded by strict ANSI C | ||
142 | mozconf_add --disable-pedantic | ||
143 | |||
144 | # enable crypto support (Personal Security Manager) | ||
145 | mozconf_add --enable-crypto | ||
146 | |||
147 | # want system jpeg, pngm, zlib but the provided nspr should be used | ||
148 | mozconf_add --with-system-jpeg | ||
149 | mozconf_add --with-system-png | ||
150 | mozconf_add --with-system-zlib | ||
151 | mozconf_add --without-system-nspr | ||
152 | |||
153 | # enable gtk2 as default | ||
154 | mozconf_add --enable-default-toolkit=gtk2 | ||
155 | |||
156 | # ipv6 support | ||
157 | mozconf_add --enable-ipv6 | ||
158 | |||
159 | # want xinerama | ||
160 | mozconf_add --enable-xinerama | ||
161 | |||
162 | # no xprint | ||
163 | mozconf_add --disable-xprint | ||
164 | |||
165 | # want truetype fonts | ||
166 | mozconf_add --enable-freetype2 | ||
167 | mozconf_add --enable-freetypetest | ||
168 | |||
169 | # disable debug build && enable stripping | ||
170 | mozconf_add --disable-debug | ||
171 | mozconf_add --disable-tests | ||
172 | mozconf_add --enable-reorder | ||
173 | mozconf_add --enable-strip | ||
174 | mozconf_add --enable-strip-libs | ||
175 | |||
176 | if [[ ${ARCH} = i*86 ]] | ||
177 | then | ||
178 | # optimze build for x86 | ||
179 | mozconf_add --enable-elf-dynstr-gc | ||
180 | fi | ||
181 | |||
182 | # enable xft2 | ||
183 | mozconf_add --enable-xft | ||
184 | |||
185 | |||
186 | ######### | ||
187 | |||
188 | # enable default extensions | ||
189 | mozconf_add --enable-extensions=default | ||
190 | |||
191 | # both needed to build galeon | ||
192 | mozconf_add --enable-oji | ||
193 | mozconf_add --enable-mathml | ||
194 | |||
195 | # no develop | ||
196 | mozconf_add --disable-jsd | ||
197 | mozconf_add --disable-xpctools | ||
198 | mozconf_add --enable-extensions=-venkman | ||
199 | |||
200 | # no gnome-vfs | ||
201 | mozconf_add --disable-gnomevfs | ||
202 | mozconf_add --enable-extensions=-gnomevfs | ||
203 | |||
204 | # enable irc extension | ||
205 | mozconf_add --enable-extensions=irc | ||
206 | |||
207 | # enable xmlterm extension | ||
208 | mozconf_add --enable-extensions=xmlterm | ||
209 | |||
210 | # enable mozilla-calendar | ||
211 | mozconf_add --enable-calendar | ||
212 | |||
213 | # no ldap | ||
214 | mozconf_add --disable-ldap | ||
215 | mozconf_add --disable-ldap-experimental | ||
216 | |||
217 | # svg support; needs cairo | ||
218 | mozconf_add --disable-svg | ||
219 | mozconf_add --disable-svg-renderer-cairo | ||
220 | |||
221 | # were to go | ||
222 | mozconf_add --prefix=/usr/$(mlibdir)/mozilla | ||
223 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/seamonkey | ||
224 | |||
225 | # resolve multiple --enable-extensions down to one | ||
226 | rebuild_extension_list | ||
227 | |||
228 | # now run configure | ||
229 | ./configure || die | ||
230 | |||
231 | # removes extraneous CFLAGS | ||
232 | # to reduce RAM requirements while compiling | ||
233 | mozilla_remove_cflags || die | ||
234 | |||
235 | mmake || die | ||
236 | |||
237 | # build the NSS/SSL support | ||
238 | # fix #include problem | ||
239 | cd ${SRCDIR}/security/coreconf || die | ||
240 | echo 'INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm'\ | ||
241 | >>headers.mk | ||
242 | make || die | ||
243 | cd ${SRCDIR}/security/nss || die | ||
244 | make moz_import || die | ||
245 | make || die | ||
246 | |||
247 | # enigmail | ||
248 | cd ${SRCDIR}/extensions/ipc || die | ||
249 | make || die | ||
250 | |||
251 | cd ${SRCDIR}/mailnews/extensions/enigmail || die | ||
252 | make || die | ||
253 | } | ||
254 | |||
255 | src_install() { | ||
256 | cd ${SRCDIR} | ||
257 | |||
258 | # install, don't create tarball | ||
259 | install -d ${BINDIR}/usr/$(mlibdir) || die | ||
260 | cd ${SRCDIR}/xpinstall/packager | ||
261 | make MOZ_PKG_FORMAT="RAW" TAR_CREATE_FLAGS="-chf" > /dev/null || die | ||
262 | mv -f ${SRCDIR}/dist/mozilla ${BINDIR}/usr/$(mlibdir)/mozilla || die | ||
263 | |||
264 | # needed directories (must be run here or the move above breaks) | ||
265 | install -d ${BINDIR}/etc/env.d || die | ||
266 | install -d ${BINDIR}/usr/bin || die | ||
267 | install -d ${BINDIR}/usr/include || die | ||
268 | install -d ${BINDIR}/usr/$(mlibdir)/mozilla/include/{idl,nss} || die | ||
269 | install -d ${BINDIR}/usr/$(mlibdir)/mozilla/{icons,searchplugins} || die | ||
270 | install -d ${BINDIR}/usr/$(mlibdir)/pkgconfig || die | ||
271 | install -d ${BINDIR}/usr/share/{applications,pixmaps} || die | ||
272 | |||
273 | # copy the include and idl files | ||
274 | cd ${SRCDIR}/dist | ||
275 | cp -LfR include/* ${BINDIR}/usr/$(mlibdir)/mozilla/include || die | ||
276 | cp -LfR idl/* ${BINDIR}/usr/$(mlibdir)/mozilla/include/idl || die | ||
277 | ln -snf /usr/$(mlibdir)/mozilla/include ${BINDIR}/usr/include/mozilla || die | ||
278 | |||
279 | # install the development tools in /usr | ||
280 | mv ${BINDIR}/usr/$(mlibdir)/mozilla/{xpcshell,xpidl,xpt_dump,xpt_link} \ | ||
281 | ${BINDIR}/usr/bin || die | ||
282 | |||
283 | # install the NSS/SSL libs, headers and tools | ||
284 | # install the headers ('make install' do not work for headers ...) | ||
285 | if [ -d ${SRCDIR}/dist/public/nss ] | ||
286 | then | ||
287 | install -m0644 ${SRCDIR}/dist/public/nss/*.h \ | ||
288 | ${BINDIR}/usr/$(mlibdir)/mozilla/include/nss || die | ||
289 | fi | ||
290 | if [ -d ${SRCDIR}/dist/public/seccmd ] | ||
291 | then | ||
292 | install -m0644 ${SRCDIR}/dist/public/seccmd/*.h \ | ||
293 | ${BINDIR}/usr/$(mlibdir)/mozilla/include/nss || die | ||
294 | fi | ||
295 | if [ -d ${SRCDIR}/dist/public/security ] | ||
296 | then | ||
297 | install -m0644 ${SRCDIR}/dist/public/security/*.h \ | ||
298 | ${BINDIR}/usr/$(mlibdir)/mozilla/include/nss || die | ||
299 | fi | ||
300 | |||
301 | # these come with zlib ... | ||
302 | rm -f ${BINDIR}/usr/$(mlibdir)/mozilla/include/nss/{zconf.h,zlib.h} || die | ||
303 | |||
304 | cd ${SRCDIR}/security/nss | ||
305 | |||
306 | mkdir -p ${BUILDDIR}/nss/{bin,lib} | ||
307 | export SOURCE_BIN_DIR=${BUILDDIR}/nss/bin | ||
308 | export SOURCE_LIB_DIR=${BUILDDIR}/nss/lib | ||
309 | |||
310 | make install || die | ||
311 | # gets installed as symbolic links ... | ||
312 | cp -Lf ${BUILDDIR}/nss/bin/* ${BINDIR}/usr/bin || die | ||
313 | cp -Lf ${BUILDDIR}/nss/lib/* ${BINDIR}/usr/$(mlibdir)/mozilla || die | ||
314 | |||
315 | # need to unset these incase we want to rebuild, else the build | ||
316 | # gets newked. | ||
317 | unset SOURCE_LIB_DIR | ||
318 | unset SOURCE_BIN_DIR | ||
319 | |||
320 | cd ${SRCDIR}/build/unix | ||
321 | # fix mozilla-config and install it | ||
322 | sed -i -e "s|/usr/$(mlibdir)/mozilla-${PVER}|/usr/$(mlibdir)/mozilla|g" \ | ||
323 | -e "s|/usr/include/mozilla-${PVER}|/usr/$(mlibdir)/mozilla/include|g" \ | ||
324 | -e "s|/usr/share/idl/mozilla-${PVER}|/usr/$(mlibdir)/mozilla/idl|g" \ | ||
325 | -e "s|\(echo -L.*\)\($\)|\1 -Wl,-rpath,/usr/$(mlibdir)/mozilla\2|" \ | ||
326 | mozilla-config || die | ||
327 | |||
328 | install -m0755 -o root -g root mozilla-config \ | ||
329 | ${BINDIR}/usr/$(mlibdir)/mozilla || die | ||
330 | |||
331 | # fix pkgconfig files and install them | ||
332 | for x in *.pc; do | ||
333 | if [[ -f ${x} ]]; then | ||
334 | sed -i -e "s|^libdir=.*|libdir=/usr/$(mlibdir)/mozilla|" \ | ||
335 | -e "s|^includedir=.*|includedir=/usr/$(mlibdir)/mozilla/include|" \ | ||
336 | -e "s|^idldir=.*|idldir=/usr/$(mlibdir)/mozilla/idl|" \ | ||
337 | -e "s|\(Libs:.*\)\($\)|\1 -Wl,-rpath,\${libdir}\2|" \ | ||
338 | ${x} || die | ||
339 | install -m0644 ${x} ${BINDIR}/usr/$(mlibdir)/pkgconfig || die | ||
340 | fi | ||
341 | done | ||
342 | cd ${SRCDIR} | ||
343 | |||
344 | ln -snf /usr/$(mlibdir)/mozilla/mozilla ${BINDIR}/usr/bin/mozilla || die | ||
345 | |||
346 | # environment | ||
347 | echo "LDPATH=/usr/$(mlibdir)/mozilla | ||
348 | MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla | ||
349 | CONFIG_PROTECT=/usr/$(mlibdir)/mozilla/defaults/pref" \ | ||
350 | > ${BINDIR}/etc/env.d/10mozilla || die | ||
351 | |||
352 | # docs | ||
353 | minstalldocs LEGAL LICENSE README/mozilla/README* || die | ||
354 | |||
355 | # install rebuild script | ||
356 | install -m0755 -o root -g root \ | ||
357 | ${SOURCEDIR}/${PNAME}/mozilla-rebuild-databases.pl \ | ||
358 | ${BINDIR}/usr/$(mlibdir)/mozilla || die | ||
359 | # fix libdir | ||
360 | sed -e 's|/lib/|/'"$(mlibdir)"'/|g' \ | ||
361 | ${BINDIR}/usr/$(mlibdir)/mozilla/mozilla-rebuild-databases.pl || die | ||
362 | |||
363 | # update Google search plugin to use UTF8 charset ... | ||
364 | install -m0644 ${SOURCEDIR}/${PNAME}/google.src \ | ||
365 | ${BINDIR}/usr/$(mlibdir)/mozilla/searchplugins || die | ||
366 | |||
367 | if [[ -f "${BUILDDIR}/.xft" ]]; then | ||
368 | # We are using Xft, so change the default font | ||
369 | install -d ${BINDIR}/usr/$(mlibdir)/mozilla/defaults/pref || die | ||
370 | install -m0644 ${SOURCEDIR}/${PNAME}/xft.js \ | ||
371 | ${BINDIR}/usr/$(mlibdir)/mozilla/defaults/pref || die | ||
372 | fi | ||
373 | |||
374 | # fix icons to look the same everywhere | ||
375 | install -m0644 ${SRCDIR}/widget/src/gtk/mozicon16.xpm \ | ||
376 | ${BINDIR}/usr/$(mlibdir)/mozilla/icons || die | ||
377 | install -m0644 ${SRCDIR}/widget/src/gtk/mozicon50.xpm \ | ||
378 | ${BINDIR}/usr/$(mlibdir)/mozilla/icons || die | ||
379 | |||
380 | # install icon and .desktop for menu entry | ||
381 | install -m0644 ${SOURCEDIR}/${PNAME}/icon/mozilla-icon.png \ | ||
382 | ${BINDIR}/usr/share/pixmaps || die | ||
383 | install -m0644 ${SOURCEDIR}/${PNAME}/icon/mozilla.desktop \ | ||
384 | ${BINDIR}/usr/share/applications || die | ||
385 | |||
386 | # take care of non root execution | ||
387 | # (seems the problem is that not all files are readible by the user) | ||
388 | chmod -R g+r,o+r ${BINDIR}/usr/$(mlibdir)/mozilla || die | ||
389 | find ${BINDIR}/usr/$(mlibdir)/mozilla/ -type d -exec chmod 0755 {} \; || : | ||
390 | } | ||
391 | |||
392 | postinstall() { | ||
393 | # update environment; needed for REGXPCOM | ||
394 | env-rebuild | ||
395 | source ${MROOT}/etc/profile | ||
396 | |||
397 | # mozillas mozilla_five_home | ||
398 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla" | ||
399 | |||
400 | # register mozilla | ||
401 | echo "Registering Components and Chrome..." | ||
402 | ${MOZILLA_FIVE_HOME}/mozilla-rebuild-databases.pl | ||
403 | |||
404 | # fix permissions of component registry | ||
405 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat | ||
406 | |||
407 | # fix directory permissions | ||
408 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : | ||
409 | |||
410 | # fix permissions on chrome files | ||
411 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : | ||
412 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |