Gentoo Archives: gentoo-commits

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