Gentoo Archives: gentoo-commits

From: "Nirbheek Chauhan (nirbheek)" <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox: firefox-5.0-r2.ebuild metadata.xml ChangeLog firefox-3.6.12.ebuild firefox-5.0-r1.ebuild
Date: Wed, 06 Jul 2011 05:30:10
Message-Id: 20110706051418.46C082004B@flycatcher.gentoo.org
1 nirbheek 11/07/06 05:14:18
2
3 Modified: metadata.xml ChangeLog firefox-3.6.12.ebuild
4 Added: firefox-5.0-r2.ebuild
5 Removed: firefox-5.0-r1.ebuild
6 Log:
7 Always disable gconf, bug 360307, bug 373605 comment 15; add mesa dep for webgl, bug 373245; update the list of locales, bug 364659; add a use-flag to disable JIT, bug 367111. Refactor LINGUAS code to use bash arrays, remove unused patches, drop all keywords on vulnerable 3.6.12 except 'sparc'.
8
9 (Portage version: 2.2.0_alpha39_p14/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.5 www-client/firefox/metadata.xml
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?rev=1.5&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?rev=1.5&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?r1=1.4&r2=1.5
17
18 Index: metadata.xml
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/metadata.xml,v
21 retrieving revision 1.4
22 retrieving revision 1.5
23 diff -u -r1.4 -r1.5
24 --- metadata.xml 24 Jun 2011 09:55:00 -0000 1.4
25 +++ metadata.xml 6 Jul 2011 05:14:18 -0000 1.5
26 @@ -3,15 +3,16 @@
27 <pkgmetadata>
28 <herd>mozilla</herd>
29 <use>
30 - <flag name='custom-optimization'>Fine-tune custom compiler
31 + <flag name="custom-optimization">Fine-tune custom compiler
32 optimizations, setting this is not recommended.</flag>
33 - <flag name="gconf">Add support for setting of default browser using
34 - <pkg>gnome-base/gconf</pkg>. Useful only for GNOME 2 users.</flag>
35 <flag name="ipc">Use inter-process communication between tabs and plugins.
36 Allows for greater stability in case of plugin crashes</flag>
37 + <flag name="methodjit">Enable JIT for JavaScript using MethodJIT for faster
38 + JS performance. Hardened users can disable this USE-flag to use MPROTECT
39 + on grsecurity kernels.</flag>
40 <flag name="pgo">Add support for profile-guided optimization using gcc-4.5,
41 for faster binaries. This option will double the compile time.</flag>
42 - <flag name='system-sqlite'>Use the system-wide <pkg>dev-db/sqlite</pkg>
43 + <flag name="system-sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg>
44 installation with secure-delete enabled</flag>
45 <flag name="webm">Use system <pkg>media-libs/libvpx</pkg> for HTML5 WebM
46 video support.</flag>
47
48
49
50 1.79 www-client/firefox/ChangeLog
51
52 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.79&view=markup
53 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.79&content-type=text/plain
54 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.78&r2=1.79
55
56 Index: ChangeLog
57 ===================================================================
58 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
59 retrieving revision 1.78
60 retrieving revision 1.79
61 diff -u -r1.78 -r1.79
62 --- ChangeLog 27 Jun 2011 00:42:11 -0000 1.78
63 +++ ChangeLog 6 Jul 2011 05:14:18 -0000 1.79
64 @@ -1,6 +1,19 @@
65 # ChangeLog for www-client/firefox
66 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
67 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.78 2011/06/27 00:42:11 anarchy Exp $
68 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.79 2011/07/06 05:14:18 nirbheek Exp $
69 +
70 +*firefox-5.0-r2 (06 Jul 2011)
71 +
72 + 06 Jul 2011; Nirbheek Chauhan <nirbheek@g.o>
73 + -files/xulrunner-1.9.2-arm-fixes.patch, -files/firefox-3.0-solaris64.patch,
74 + -files/137-bz460917_reload_new_plugins-gentoo-update-3.6.4.patch,
75 + firefox-3.6.12.ebuild, -firefox-5.0-r1.ebuild, +firefox-5.0-r2.ebuild,
76 + -files/801-enable-x86_64-tracemonkey.patch,
77 + -files/fix_blocklist_support.patch, metadata.xml:
78 + Always disable gconf, bug 360307, bug 373605 comment 15; add mesa dep for
79 + webgl, bug 373245; update the list of locales, bug 364659; add a use-flag to
80 + disable JIT, bug 367111. Refactor LINGUAS code to use bash arrays, remove
81 + unused patches, drop all keywords on vulnerable 3.6.12 except 'sparc'.
82
83 *firefox-5.0-r1 (27 Jun 2011)
84
85
86
87
88 1.11 www-client/firefox/firefox-3.6.12.ebuild
89
90 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild?rev=1.11&view=markup
91 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild?rev=1.11&content-type=text/plain
92 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild?r1=1.10&r2=1.11
93
94 Index: firefox-3.6.12.ebuild
95 ===================================================================
96 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild,v
97 retrieving revision 1.10
98 retrieving revision 1.11
99 diff -u -r1.10 -r1.11
100 --- firefox-3.6.12.ebuild 21 Jun 2011 12:33:50 -0000 1.10
101 +++ firefox-3.6.12.ebuild 6 Jul 2011 05:14:18 -0000 1.11
102 @@ -1,6 +1,6 @@
103 # Copyright 1999-2011 Gentoo Foundation
104 # Distributed under the terms of the GNU General Public License v2
105 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild,v 1.10 2011/06/21 12:33:50 nirbheek Exp $
106 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-3.6.12.ebuild,v 1.11 2011/07/06 05:14:18 nirbheek Exp $
107 EAPI="3"
108 WANT_AUTOCONF="2.1"
109
110 @@ -22,7 +22,7 @@
111 DESCRIPTION="Firefox Web Browser"
112 HOMEPAGE="http://www.mozilla.com/firefox"
113
114 -KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
115 +KEYWORDS="sparc"
116 SLOT="0"
117 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
118 IUSE="+alsa bindist gnome +ipc java libnotify system-sqlite wifi"
119
120
121
122 1.1 www-client/firefox/firefox-5.0-r2.ebuild
123
124 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-5.0-r2.ebuild?rev=1.1&view=markup
125 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-5.0-r2.ebuild?rev=1.1&content-type=text/plain
126
127 Index: firefox-5.0-r2.ebuild
128 ===================================================================
129 # Copyright 1999-2011 Gentoo Foundation
130 # Distributed under the terms of the GNU General Public License v2
131 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-5.0-r2.ebuild,v 1.1 2011/07/06 05:14:18 nirbheek Exp $
132
133 EAPI="3"
134 VIRTUALX_REQUIRED="pgo"
135 WANT_AUTOCONF="2.1"
136
137 inherit flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension versionator python virtualx
138
139 MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
140 FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
141 FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
142 FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
143 CHANGESET="e56ecd8b3a68"
144 PATCH="${PN}-5.0-patches-0.6"
145
146 DESCRIPTION="Firefox Web Browser"
147 HOMEPAGE="http://www.mozilla.com/firefox"
148
149 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
150 SLOT="0"
151 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
152 IUSE="bindist +methodjit +ipc pgo system-sqlite +webm"
153
154 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
155 FTP_URI="ftp://ftp.mozilla.org/pub/firefox/releases/"
156 # More URIs appended below...
157 SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
158
159 ASM_DEPEND=">=dev-lang/yasm-1.1"
160
161 # Mesa 7.10 needed for WebGL + bugfixes
162 RDEPEND="
163 >=sys-devel/binutils-2.16.1
164 >=dev-libs/nss-3.12.9
165 >=dev-libs/nspr-4.8.7
166 >=dev-libs/glib-2.26
167 >=media-libs/mesa-7.10
168 media-libs/libpng[apng]
169 dev-libs/libffi
170 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
171 webm? ( media-libs/libvpx
172 media-libs/alsa-lib )"
173 # We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
174 DEPEND="${RDEPEND}
175 dev-util/pkgconfig
176 pgo? (
177 =dev-lang/python-2*[sqlite]
178 >=sys-devel/gcc-4.5 )
179 webm? ( x86? ( ${ASM_DEPEND} )
180 amd64? ( ${ASM_DEPEND} ) )"
181
182 # No source releases for alpha|beta
183 if [[ ${PV} =~ alpha ]]; then
184 SRC_URI="${SRC_URI}
185 http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2"
186 S="${WORKDIR}/mozilla-central"
187 elif [[ ${PV} =~ beta ]]; then
188 SRC_URI="${SRC_URI}
189 ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
190 S="${WORKDIR}/mozilla-beta"
191 else
192 SRC_URI="${SRC_URI}
193 ${REL_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
194 S="${WORKDIR}/mozilla-release"
195 fi
196
197 # No language packs for alphas
198 if ! [[ ${PV} =~ alpha|beta ]]; then
199 # This list can be updated with scripts/get_langs.sh from mozilla overlay
200 LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
201 en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he
202 hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
203 nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK
204 te th tr uk vi zh-CN zh-TW zu)
205
206 for X in "${LANGS[@]}" ; do
207 # en and en_US are handled internally
208 if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
209 SRC_URI="${SRC_URI}
210 linguas_${X/-/_}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
211 fi
212 IUSE="${IUSE} linguas_${X/-/_}"
213 # Install all the specific locale xpis if there's no generic locale xpi
214 # Example: there's no pt.xpi, so install all pt-*.xpi
215 if ! has ${X%%-*} "${LANGS[@]}"; then
216 SRC_URI="${SRC_URI}
217 linguas_${X%%-*}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
218 IUSE="${IUSE} linguas_${X%%-*}"
219 fi
220 done
221 fi
222
223 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
224
225 # TODO: Move all the linguas crap to an eclass
226 linguas() {
227 # Generate the list of language packs called "linguas"
228 # This list is used to install the xpi language packs
229 local LINGUA
230 for LINGUA in ${LINGUAS}; do
231 if has ${LINGUA} en en_US; then
232 # For mozilla products, en and en_US are handled internally
233 continue
234 # If this language is supported by ${P},
235 elif has ${LINGUA} "${LANGS[@]//-/_}"; then
236 # Add the language to linguas, if it isn't already there
237 has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
238 continue
239 # For each short LINGUA that isn't in LANGS,
240 # add *all* long LANGS to the linguas list
241 elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
242 for LANG in "${LANGS[@]}"; do
243 if [[ ${LANG} == ${LINGUA}-* ]]; then
244 has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
245 continue 2
246 fi
247 done
248 fi
249 ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
250 done
251 }
252
253 pkg_setup() {
254 moz_pkgsetup
255
256 # Avoid PGO profiling problems due to enviroment leakage
257 # These should *always* be cleaned up anyway
258 unset DBUS_SESSION_BUS_ADDRESS \
259 DISPLAY \
260 ORBIT_SOCKETDIR \
261 SESSION_MANAGER \
262 XDG_SESSION_COOKIE \
263 XAUTHORITY
264
265 if ! use bindist; then
266 einfo
267 elog "You are enabling official branding. You may not redistribute this build"
268 elog "to any users on your network or the internet. Doing so puts yourself into"
269 elog "a legal problem with Mozilla Foundation"
270 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
271 fi
272
273 if ! use methodjit; then
274 einfo
275 ewarn "You are disabling the method-based JIT in JägerMonkey."
276 ewarn "This will greatly slowdown JavaScript in ${PN}!"
277 fi
278
279 if use pgo; then
280 einfo
281 ewarn "You will do a double build for profile guided optimization."
282 ewarn "This will result in your build taking at least twice as long as before."
283 fi
284 }
285
286 src_unpack() {
287 unpack ${A}
288
289 linguas
290 for X in "${linguas[@]}"; do
291 # FIXME: Add support for unpacking xpis to portage
292 xpi_unpack "${P}-${X}.xpi"
293 done
294 }
295
296 src_prepare() {
297 # Apply our patches
298 EPATCH_EXCLUDE="5001_use_system_libffi.patch" \
299 EPATCH_SUFFIX="patch" \
300 EPATCH_FORCE="yes" \
301 epatch "${WORKDIR}"
302
303 # Allow user to apply any additional patches without modifing ebuild
304 epatch_user
305
306 # Enable gnomebreakpad
307 if use debug ; then
308 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
309 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
310 fi
311
312 # Disable gnomevfs extension
313 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
314 -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
315 || die "Failed to remove gnomevfs extension"
316
317 # Ensure that are plugins dir is enabled as default
318 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
319 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
320
321 # Fix sandbox violations during make clean, bug 372817
322 sed -e "s:\(/no-such-file\):${T}\1:g" \
323 -i "${S}"/config/rules.mk \
324 -i "${S}"/js/src/config/rules.mk \
325 -i "${S}"/nsprpub/configure{.in,} \
326 || die
327
328 eautoreconf
329
330 cd js/src
331 eautoreconf
332 }
333
334 src_configure() {
335 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
336 MEXTENSIONS="default"
337
338 ####################################
339 #
340 # mozconfig, CFLAGS and CXXFLAGS setup
341 #
342 ####################################
343
344 mozconfig_init
345 mozconfig_config
346
347 # It doesn't compile on alpha without this LDFLAGS
348 use alpha && append-ldflags "-Wl,--no-relax"
349
350 mozconfig_annotate '' --prefix=/usr
351 mozconfig_annotate '' --libdir=/usr/$(get_libdir)
352 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
353 mozconfig_annotate '' --disable-gconf
354 mozconfig_annotate '' --disable-mailnews
355 mozconfig_annotate '' --enable-canvas
356 mozconfig_annotate '' --enable-safe-browsing
357 mozconfig_annotate '' --with-system-png
358
359 # Other ff-specific settings
360 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
361
362 mozconfig_use_enable system-sqlite
363 mozconfig_use_enable methodjit
364
365 # Allow for a proper pgo build
366 if use pgo; then
367 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
368 fi
369
370 # Finalize and report settings
371 mozconfig_final
372
373 if [[ $(gcc-major-version) -lt 4 ]]; then
374 append-cxxflags -fno-stack-protector
375 fi
376
377 if use amd64 || use x86; then
378 append-flags -mno-avx
379 fi
380 }
381
382 src_compile() {
383 if use pgo; then
384 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
385 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
386 Xemake -f client.mk profiledbuild || die "Xemake failed"
387 else
388 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
389 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
390 emake -f client.mk || die "emake failed"
391 fi
392
393 }
394
395 src_install() {
396 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
397
398 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
399 local obj_dir="$(echo */config.log)"
400 obj_dir="${obj_dir%/*}"
401 cd "${S}/${obj_dir}"
402
403 # Add our default prefs for firefox + xulrunner
404 cp "${FILESDIR}"/gentoo-default-prefs.js \
405 "${S}/${obj_dir}/dist/bin/defaults/pref/all-gentoo.js" || die
406
407 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
408 emake DESTDIR="${D}" install || die "emake install failed"
409
410 linguas
411 for X in "${linguas[@]}"; do
412 xpi_install "${WORKDIR}/${P}-${X}"
413 done
414
415 local size sizes icon_path icon name
416 if use bindist; then
417 sizes="16 32 48"
418 icon_path="${S}/browser/branding/unofficial"
419 # Firefox's new rapid release cycle means no more codenames
420 # Let's just stick with this one...
421 icon="tumucumaque"
422 name="Tumucumaque"
423 else
424 sizes="16 22 24 32 256"
425 icon_path="${S}/other-licenses/branding/firefox"
426 icon="${PN}"
427 name="Mozilla Firefox"
428 fi
429
430 # Install icons and .desktop for menu entry
431 for size in ${sizes}; do
432 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
433 newins "${icon_path}/default${size}.png" "${icon}.png" || die
434 done
435 # The 128x128 icon has a different name
436 insinto "/usr/share/icons/hicolor/128x128/apps"
437 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
438 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
439 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
440 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
441 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
442 "${ED}/usr/share/applications/${PN}.desktop" || die
443
444 # Add StartupNotify=true bug 237317
445 if use startup-notification ; then
446 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
447 fi
448
449 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox-bin
450 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/plugin-container
451
452 # Plugins dir
453 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
454 || die "failed to symlink"
455
456 # very ugly hack to make firefox not sigbus on sparc
457 # FIXME: is this still needed??
458 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
459 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
460 die "sparc sed failed"; }
461 }
462
463 pkg_preinst() {
464 gnome2_icon_savelist
465 }
466
467 pkg_postinst() {
468 # Update mimedb for the new .desktop file
469 fdo-mime_desktop_database_update
470 gnome2_icon_cache_update
471 }
472
473 pkg_postrm() {
474 gnome2_icon_cache_update
475 }