Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/mozilla-firefox: ChangeLog mozilla-firefox-3.0.2.ebuild mozilla-firefox-2.0.0.17.ebuild
Date: Wed, 24 Sep 2008 17:08:40
Message-Id: E1KiXqu-0003l7-Fs@stork.gentoo.org
1 armin76 08/09/24 17:08:36
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-3.0.2.ebuild
5 mozilla-firefox-2.0.0.17.ebuild
6 Log:
7 Version bump
8 (Portage version: 2.1.4.4)
9
10 Revision Changes Path
11 1.440 www-client/mozilla-firefox/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.440&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.440&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?r1=1.439&r2=1.440
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v
20 retrieving revision 1.439
21 retrieving revision 1.440
22 diff -u -r1.439 -r1.440
23 --- ChangeLog 9 Sep 2008 15:51:27 -0000 1.439
24 +++ ChangeLog 24 Sep 2008 17:08:35 -0000 1.440
25 @@ -1,6 +1,13 @@
26 # ChangeLog for www-client/mozilla-firefox
27 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.439 2008/09/09 15:51:27 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.440 2008/09/24 17:08:35 armin76 Exp $
30 +
31 +*mozilla-firefox-3.0.2 (24 Sep 2008)
32 +*mozilla-firefox-2.0.0.17 (24 Sep 2008)
33 +
34 + 24 Sep 2008; Raúl Porcel <armin76@g.o>
35 + +mozilla-firefox-2.0.0.17.ebuild, +mozilla-firefox-3.0.2.ebuild:
36 + Version bump
37
38 09 Sep 2008; Raúl Porcel <armin76@g.o>
39 mozilla-firefox-3.0.1.ebuild:
40
41
42
43 1.1 www-client/mozilla-firefox/mozilla-firefox-3.0.2.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: mozilla-firefox-3.0.2.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.2.ebuild,v 1.1 2008/09/24 17:08:35 armin76 Exp $
53 EAPI="1"
54 WANT_AUTOCONF="2.1"
55
56 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension
57 PATCH="${P}-patches-0.1"
58
59 LANGS="af ar be bn-IN ca cs da de el en-GB en-US es-AR es-ES eu fi fr fy-NL ga-IE gl gu-IN he hi-IN hu id it ja ka ko ku lt mk mn mr nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ro ru si sk sl sq sr sv-SE th tr uk zh-CN zh-TW"
60 NOSHORTLANGS="en-GB es-AR pt-BR zh-CN"
61
62 MY_PV=${PV/3/}
63
64 DESCRIPTION="Firefox Web Browser"
65 HOMEPAGE="http://www.mozilla.com/firefox"
66
67 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86"
68 SLOT="0"
69 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
70 IUSE="java mozdevelop bindist restrict-javascript iceweasel +xulrunner"
71
72 SRC_URI="mirror://gentoo/${P}.tar.bz2
73 http://dev.gentoo.org/~armin76/dist/${P}.tar.bz2
74 mirror://gentoo/${PATCH}.tar.bz2
75 http://dev.gentoo.org/~armin76/dist/${PATCH}.tar.bz2
76 iceweasel? ( mirror://gentoo/iceweasel-icons-3.0.tar.bz2 )
77 !xulrunner? ( mirror://gentoo/xulrunner-1.9${MY_PV}.tar.bz2 )"
78
79 # These are in
80 #
81 # http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/linux-i686/xpi/
82 #
83 # for i in $LANGS $SHORTLANGS; do wget $i.xpi -O ${P}-$i.xpi; done
84 for X in ${LANGS} ; do
85 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
86 SRC_URI="${SRC_URI}
87 linguas_${X/-/_}? ( http://dev.gentoo.org/~armin76/dist/${P}-xpi/${P}-${X}.xpi )"
88 fi
89 IUSE="${IUSE} linguas_${X/-/_}"
90 # english is handled internally
91 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
92 if [ "${X}" != "en-US" ]; then
93 SRC_URI="${SRC_URI}
94 linguas_${X%%-*}? ( http://dev.gentoo.org/~armin76/dist/${P}-xpi/${P}-${X}.xpi )"
95 fi
96 IUSE="${IUSE} linguas_${X%%-*}"
97 fi
98 done
99
100 RDEPEND="java? ( virtual/jre )
101 >=sys-devel/binutils-2.16.1
102 >=dev-libs/nss-3.12
103 >=dev-libs/nspr-4.7.1
104 >=media-libs/lcms-1.17
105 >=app-text/hunspell-1.1.9
106 xulrunner? ( >=net-libs/xulrunner-1.9${MY_PV} )"
107
108 DEPEND="${RDEPEND}
109 dev-util/pkgconfig
110 java? ( >=dev-java/java-config-0.2.0 )"
111
112 PDEPEND="restrict-javascript? ( x11-plugins/noscript )"
113
114 S="${WORKDIR}/mozilla"
115
116 # Needed by src_compile() and src_install().
117 # Would do in pkg_setup but that loses the export attribute, they
118 # become pure shell variables.
119 export MOZ_CO_PROJECT=browser
120 export BUILD_OFFICIAL=1
121 export MOZILLA_OFFICIAL=1
122
123 linguas() {
124 local LANG SLANG
125 for LANG in ${LINGUAS}; do
126 if has ${LANG} en en_US; then
127 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
128 continue
129 elif has ${LANG} ${LANGS//-/_}; then
130 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
131 continue
132 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
133 for X in ${LANGS}; do
134 if [[ "${X}" == "${LANG}-"* ]] && \
135 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
136 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
137 continue 2
138 fi
139 done
140 fi
141 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
142 done
143 }
144
145 pkg_setup(){
146 if ! built_with_use x11-libs/cairo X; then
147 eerror "Cairo is not built with X useflag."
148 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
149 die "Cairo needs X"
150 fi
151
152 if ! built_with_use --missing true x11-libs/pango X; then
153 eerror "Pango is not built with X useflag."
154 eerror "Please add 'X' to your USE flags, and re-emerge pango."
155 die "Pango needs X"
156 fi
157
158 if ! use bindist && ! use iceweasel; then
159 elog "You are enabling official branding. You may not redistribute this build"
160 elog "to any users on your network or the internet. Doing so puts yourself into"
161 elog "a legal problem with Mozilla Foundation"
162 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
163
164 fi
165 }
166
167 src_unpack() {
168 ! use xulrunner && unpack xulrunner-1.9${MY_PV}.tar.bz2
169 unpack ${P}.tar.bz2 ${PATCH}.tar.bz2
170
171 if use iceweasel; then
172 unpack iceweasel-icons-3.0.tar.bz2
173
174 cp -r iceweaselicons/browser mozilla/
175 fi
176
177 linguas
178 for X in ${linguas}; do
179 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
180 done
181 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
182 einfo "Selected language packs (first will be default): ${linguas}"
183 fi
184
185 # Remove the patches we don't need
186 use xulrunner && rm "${WORKDIR}"/patch/*noxul* || rm "${WORKDIR}"/patch/*xulonly*
187
188 # Apply our patches
189 cd "${S}" || die "cd failed"
190 EPATCH_SUFFIX="patch" \
191 EPATCH_FORCE="yes" \
192 epatch "${WORKDIR}"/patch
193
194 if use iceweasel; then
195 sed -i -e "s|Minefield|Iceweasel|" browser/locales/en-US/chrome/branding/brand.* \
196 browser/branding/nightly/configure.sh
197 fi
198
199 eautoreconf
200
201 # We need to re-patch this because autoreconf overwrites it
202 epatch "${WORKDIR}"/patch/000_flex-configure-LANG.patch
203 }
204
205 src_compile() {
206 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
207 MEXTENSIONS="default,typeaheadfind"
208
209 ####################################
210 #
211 # mozconfig, CFLAGS and CXXFLAGS setup
212 #
213 ####################################
214
215 mozconfig_init
216 mozconfig_config
217
218 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
219 mozconfig_annotate '' --disable-mailnews
220 mozconfig_annotate 'broken' --disable-mochitest
221 mozconfig_annotate 'broken' --disable-crashreporter
222 mozconfig_annotate '' --enable-system-hunspell
223 #mozconfig_annotate '' --enable-system-sqlite
224 mozconfig_annotate '' --enable-image-encoder=all
225 mozconfig_annotate '' --enable-canvas
226 mozconfig_annotate '' --with-system-nspr
227 mozconfig_annotate '' --with-system-nss
228 mozconfig_annotate '' --enable-system-lcms
229 mozconfig_annotate '' --enable-oji --enable-mathml
230 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
231
232 # Other ff-specific settings
233 #mozconfig_use_enable mozdevelop jsd
234 #mozconfig_use_enable mozdevelop xpctools
235 mozconfig_use_extension mozdevelop venkman
236 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
237 if use xulrunner; then
238 # Add xulrunner variable
239 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-1.9
240 fi
241
242 if ! use bindist && ! use iceweasel; then
243 mozconfig_annotate '' --enable-official-branding
244 fi
245
246 # Finalize and report settings
247 mozconfig_final
248
249 # -fstack-protector breaks us
250 if gcc-version ge 4 1; then
251 gcc-specs-ssp && append-flags -fno-stack-protector
252 else
253 gcc-specs-ssp && append-flags -fno-stack-protector-all
254 fi
255 filter-flags -fstack-protector -fstack-protector-all
256
257 ####################################
258 #
259 # Configure and build
260 #
261 ####################################
262
263 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
264 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
265 econf || die
266
267 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
268 # to econf, but the quotes cause configure to fail.
269 sed -i -e \
270 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
271 "${S}"/config/autoconf.mk \
272 "${S}"/toolkit/content/buildconfig.html
273
274 # Should the build use multiprocessing? Not enabled by default, as it tends to break
275 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
276 emake ${jobs} || die
277 }
278
279 pkg_preinst() {
280 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
281
282 einfo "Removing old installs with some really ugly code. It potentially"
283 einfo "eliminates any problems during the install, however suggestions to"
284 einfo "replace this are highly welcome. Send comments and suggestions to"
285 einfo "mozilla@g.o."
286 rm -rf "${ROOT}"${MOZILLA_FIVE_HOME}
287 }
288
289 src_install() {
290 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
291
292 emake DESTDIR="${D}" install || die "emake install failed"
293 rm "${D}"/usr/bin/firefox
294
295 linguas
296 for X in ${linguas}; do
297 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
298 done
299
300 use xulrunner && prefs=preferences || prefs=pref
301 cp "${FILESDIR}"/gentoo-default-prefs.js "${D}"${MOZILLA_FIVE_HOME}/defaults/${prefs}/all-gentoo.js
302
303 local LANG=${linguas%% *}
304 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
305 elog "Setting default locale to ${LANG}"
306 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
307 ${MOZILLA_FIVE_HOME}/defaults/${prefs}/firefox.js \
308 ${MOZILLA_FIVE_HOME}/defaults/${prefs}/firefox-l10n.js || \
309 die "sed failed to change locale"
310 fi
311
312 # Install icon and .desktop for menu entry
313 if use iceweasel; then
314 newicon "${S}"/browser/base/branding/icon48.png iceweasel-icon.png
315 newmenu "${FILESDIR}"/icon/iceweasel.desktop \
316 mozilla-firefox-3.0.desktop
317 elif ! use bindist; then
318 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
319 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
320 mozilla-firefox-3.0.desktop
321 else
322 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
323 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
324 mozilla-firefox-3.0.desktop
325 sed -i -e "s/Bon Echo/Minefield/" "${D}"/usr/share/applications/mozilla-firefox-3.0.desktop
326 fi
327
328 if use xulrunner; then
329 # Create /usr/bin/firefox
330 cat <<EOF >"${D}"/usr/bin/firefox
331 #!/bin/sh
332 export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"
333 exec "${MOZILLA_FIVE_HOME}"/firefox "\$@"
334 EOF
335 fperms 0755 /usr/bin/firefox
336
337 dosym /usr/$(get_libdir)/xulrunner-1.9/defaults/autoconfig \
338 ${MOZILLA_FIVE_HOME}/defaults/autoconfig
339 else
340 # Create /usr/bin/firefox
341 make_wrapper firefox "${MOZILLA_FIVE_HOME}/firefox"
342
343 # Add vendor
344 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
345 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
346 fi
347
348 }
349
350 pkg_postinst() {
351 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
352
353 ewarn "All the packages built against ${PN} won't compile,"
354 ewarn "if after installing firefox 3.0 you get some blockers,"
355 ewarn "please add 'xulrunner' to your USE-flags."
356
357 # Update mimedb for the new .desktop file
358 fdo-mime_desktop_database_update
359 }
360
361
362
363 1.1 www-client/mozilla-firefox/mozilla-firefox-2.0.0.17.ebuild
364
365 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0.0.17.ebuild?rev=1.1&view=markup
366 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0.0.17.ebuild?rev=1.1&content-type=text/plain
367
368 Index: mozilla-firefox-2.0.0.17.ebuild
369 ===================================================================
370 # Copyright 1999-2008 Gentoo Foundation
371 # Distributed under the terms of the GNU General Public License v2
372 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0.0.17.ebuild,v 1.1 2008/09/24 17:08:35 armin76 Exp $
373
374 WANT_AUTOCONF="2.1"
375
376 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
377
378 PATCH="${PN}-2.0.0.15-patches-0.1"
379 LANGS="af ar be bg ca cs da de el en-GB en-US es-AR es-ES eu fi fr fy-NL ga-IE gu-IN he hu it ja ka ko ku lt mk mn nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ro ru sk sl sv-SE tr uk zh-CN zh-TW"
380 NOSHORTLANGS="en-GB es-AR pt-BR zh-TW"
381
382 DESCRIPTION="Firefox Web Browser"
383 HOMEPAGE="http://www.mozilla.com/firefox"
384
385 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
386 SLOT="0"
387 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
388 IUSE="java mozdevelop bindist xforms restrict-javascript filepicker iceweasel"
389
390 MOZ_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PV}"
391 SRC_URI="${MOZ_URI}/source/firefox-${PV}-source.tar.bz2
392 mirror://gentoo/${PATCH}.tar.bz2
393 iceweasel? ( mirror://gentoo/iceweasel-icons-2.0.0.11.tar.bz2 )"
394
395 # These are in
396 #
397 # http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/linux-i686/xpi/
398 #
399 # for i in $LANGS $SHORTLANGS; do wget $i.xpi -O ${P}-$i.xpi; done
400 for X in ${LANGS} ; do
401 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
402 SRC_URI="${SRC_URI}
403 linguas_${X/-/_}? ( http://dev.gentoo.org/~armin76/dist/${P}-xpi/${P}-${X}.xpi )"
404 fi
405 IUSE="${IUSE} linguas_${X/-/_}"
406 # english is handled internally
407 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
408 if [ "${X}" != "en-US" ]; then
409 SRC_URI="${SRC_URI}
410 linguas_${X%%-*}? ( http://dev.gentoo.org/~armin76/dist/${P}-xpi/${P}-${X}.xpi )"
411 fi
412 IUSE="${IUSE} linguas_${X%%-*}"
413 fi
414 done
415
416 RDEPEND="java? ( virtual/jre )
417 >=www-client/mozilla-launcher-1.55
418 >=sys-devel/binutils-2.16.1
419 >=dev-libs/nss-3.11.8
420 >=dev-libs/nspr-4.6.8"
421
422 DEPEND="${RDEPEND}
423 java? ( >=dev-java/java-config-0.2.0 )"
424
425 PDEPEND="restrict-javascript? ( x11-plugins/noscript )"
426
427 S="${WORKDIR}/mozilla"
428
429 # Needed by src_compile() and src_install().
430 # Would do in pkg_setup but that loses the export attribute, they
431 # become pure shell variables.
432 export MOZ_CO_PROJECT=browser
433 export BUILD_OFFICIAL=1
434 export MOZILLA_OFFICIAL=1
435
436 linguas() {
437 local LANG SLANG
438 for LANG in ${LINGUAS}; do
439 if has ${LANG} en en_US; then
440 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
441 continue
442 elif has ${LANG} ${LANGS//-/_}; then
443 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
444 continue
445 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
446 for X in ${LANGS}; do
447 if [[ "${X}" == "${LANG}-"* ]] && \
448 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
449 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
450 continue 2
451 fi
452 done
453 fi
454 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
455 done
456 }
457
458 pkg_setup(){
459 if ! built_with_use x11-libs/cairo X; then
460 eerror "Cairo is not built with X useflag."
461 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
462 die "Cairo needs X"
463 fi
464
465 if ! built_with_use --missing true x11-libs/pango X; then
466 eerror "Pango is not built with X useflag."
467 eerror "Please add 'X' to your USE flags, and re-emerge pango."
468 die "Pango needs X"
469 fi
470
471 if ! use bindist && ! use iceweasel; then
472 elog "You are enabling official branding. You may not redistribute this build"
473 elog "to any users on your network or the internet. Doing so puts yourself into"
474 elog "a legal problem with Mozilla Foundation"
475 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
476
477 fi
478
479 use moznopango && warn_mozilla_launcher_stub
480 }
481
482 src_unpack() {
483 unpack firefox-${PV}-source.tar.bz2 ${PATCH}.tar.bz2
484
485 if use iceweasel; then
486 unpack iceweasel-icons-2.0.0.11.tar.bz2
487
488 cp -r iceweaselicons/browser mozilla/
489 fi
490
491 linguas
492 for X in ${linguas}; do
493 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
494 done
495 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
496 einfo "Selected language packs (first will be default): ${linguas}"
497 fi
498
499 # Apply our patches
500 cd "${S}" || die "cd failed"
501 EPATCH_SUFFIX="patch" \
502 EPATCH_FORCE="yes" \
503 epatch "${WORKDIR}"/patch
504
505 if use filepicker; then
506 epatch "${FILESDIR}"/mozilla-filepicker.patch
507 fi
508
509 if use iceweasel; then
510 sed -i -e "s|Bon Echo|Iceweasel|" browser/locales/en-US/chrome/branding/brand.*
511 sed -i -e "s|BonEcho|Iceweasel|" configure.in
512 fi
513
514 #Don't strip extension
515 sed -i -e 's/STRIP_/#STRIP_/g' extensions/xforms/Makefile.in
516
517 eautoreconf
518 }
519
520 src_compile() {
521 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
522
523 mozconfig_init
524 mozconfig_config
525
526 mozconfig_annotate '' --enable-application=browser
527 mozconfig_annotate '' --enable-image-encoder=all
528 mozconfig_annotate '' --enable-canvas
529 mozconfig_annotate '' --with-system-nspr
530 mozconfig_annotate '' --with-system-nss
531
532 if use xforms; then
533 mozconfig_annotate '' --enable-extensions=default,xforms,schema-validation,typeaheadfind
534 else
535 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
536 fi
537
538 if use ia64; then
539 echo "ac_cv_visibility_pragma=no" >> "${S}/.mozconfig"
540 fi
541
542 if ! use bindist && ! use iceweasel; then
543 mozconfig_annotate '' --enable-official-branding
544 fi
545
546 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
547 # regardless of java setting.
548 mozconfig_annotate '' --enable-oji --enable-mathml
549
550 # Other ff-specific settings
551 mozconfig_use_enable mozdevelop jsd
552 mozconfig_use_enable mozdevelop xpctools
553 mozconfig_use_extension mozdevelop venkman
554 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
555
556 # Finalize and report settings
557 mozconfig_final
558
559 # -fstack-protector breaks us
560 if gcc-version ge 4 1; then
561 gcc-specs-ssp && append-flags -fno-stack-protector
562 else
563 gcc-specs-ssp && append-flags -fno-stack-protector-all
564 fi
565 filter-flags -fstack-protector -fstack-protector-all
566
567 ####################################
568 #
569 # Configure and build
570 #
571 ####################################
572
573 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
574 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
575 econf || die
576
577 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
578 # to econf, but the quotes cause configure to fail.
579 sed -i -e \
580 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
581 "${S}"/config/autoconf.mk \
582 "${S}"/toolkit/content/buildconfig.html
583
584 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
585 # requirements while compiling
586 edit_makefiles
587
588 # Should the build use multiprocessing? Not enabled by default, as it tends to break
589 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
590 emake ${jobs} || die
591 }
592
593 pkg_preinst() {
594 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
595
596 einfo "Removing old installs with some really ugly code. It potentially"
597 einfo "eliminates any problems during the install, however suggestions to"
598 einfo "replace this are highly welcome. Send comments and suggestions to"
599 einfo "mozilla@g.o."
600 rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}"
601 }
602
603 src_install() {
604 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
605
606 # Most of the installation happens here
607 dodir "${MOZILLA_FIVE_HOME}"
608 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
609
610 linguas
611 for X in ${linguas}; do
612 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
613 done
614
615 local LANG=${linguas%% *}
616 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
617 elog "Setting default locale to ${LANG}"
618 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
619 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox.js \
620 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox-l10n.js || \
621 die "sed failed to change locale"
622 fi
623
624 # Create /usr/bin/firefox
625 install_mozilla_launcher_stub firefox "${MOZILLA_FIVE_HOME}"
626
627 # Install icon and .desktop for menu entry
628 if use iceweasel; then
629 newicon "${S}"/browser/base/branding/icon48.png iceweasel-icon.png
630 newmenu "${FILESDIR}"/icon/iceweasel.desktop \
631 mozilla-firefox-2.0.desktop
632 elif ! use bindist; then
633 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
634 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
635 mozilla-firefox-2.0.desktop
636 else
637 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
638 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
639 mozilla-firefox-2.0.desktop
640 fi
641
642 # Fix icons to look the same everywhere
643 insinto "${MOZILLA_FIVE_HOME}"/icons
644 doins "${S}"/dist/branding/mozicon16.xpm
645 doins "${S}"/dist/branding/mozicon50.xpm
646
647 # Install files necessary for applications to build against firefox
648 einfo "Installing includes and idl files..."
649 cp -LfR "${S}"/dist/include "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
650 cp -LfR "${S}"/dist/idl "${D}"/"${MOZILLA_FIVE_HOME}" || die "cp failed"
651
652 # Dirty hack to get some applications using this header running
653 dosym "${MOZILLA_FIVE_HOME}"/include/necko/nsIURI.h \
654 "${MOZILLA_FIVE_HOME}"/include/nsIURI.h
655
656 # Install pkgconfig files
657 insinto /usr/"$(get_libdir)"/pkgconfig
658 doins "${S}"/build/unix/*.pc
659
660 insinto "${MOZILLA_FIVE_HOME}"/greprefs
661 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
662 insinto "${MOZILLA_FIVE_HOME}"/defaults/pref
663 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
664 }
665
666 pkg_postinst() {
667 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
668
669 # This should be called in the postinst and postrm of all the
670 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
671 # thunderbird-bin ebuilds.
672 update_mozilla_launcher_symlinks
673
674 # Update mimedb for the new .desktop file
675 fdo-mime_desktop_database_update
676
677 elog "Please remember to rebuild any packages that you have built"
678 elog "against Firefox. Some packages might be broken by the upgrade; if this"
679 elog "is the case, please search at http://bugs.gentoo.org and open a new bug"
680 elog "if one does not exist. Before filing any bugs, please move or remove"
681 elog " ~/.mozilla and test with a clean profile directory."
682 }
683
684 pkg_postrm() {
685 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
686
687 update_mozilla_launcher_symlinks
688 }