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: firefox-21.0.ebuild metadata.xml ChangeLog firefox-20.0.1.ebuild
Date: Tue, 28 May 2013 03:37:20
Message-Id: 20130528033714.BCD822171D@flycatcher.gentoo.org
1 anarchy 13/05/28 03:37:14
2
3 Modified: metadata.xml ChangeLog
4 Added: firefox-21.0.ebuild
5 Removed: firefox-20.0.1.ebuild
6 Log:
7 Security bump for ~arch users
8
9 (Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0xB4D088B4)
10
11 Revision Changes Path
12 1.12 www-client/firefox/metadata.xml
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?rev=1.12&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?rev=1.12&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/metadata.xml?r1=1.11&r2=1.12
17
18 Index: metadata.xml
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/metadata.xml,v
21 retrieving revision 1.11
22 retrieving revision 1.12
23 diff -u -r1.11 -r1.12
24 --- metadata.xml 16 Jan 2013 16:58:19 -0000 1.11
25 +++ metadata.xml 28 May 2013 03:37:14 -0000 1.12
26 @@ -12,6 +12,8 @@
27 <flag name="minimal"> Prevent sdk and headers from being installed</flag>
28 <flag name="pgo">Add support for profile-guided optimization using gcc-4.5,
29 for faster binaries. This option will double the compile time.</flag>
30 + <flag name="system-cairo">Use the system-wide <pkg>x11-libs/cairo</pkg>
31 + Use system cairo instead of bundled.</flag>
32 <flag name="system-jpeg">Use the system-wide <pkg>media-libs/libjpeg-turbo</pkg>
33 Use system jpeg instead of bundled.</flag>
34 <flag name="system-sqlite">Use the system-wide <pkg>dev-db/sqlite</pkg>
35
36
37
38 1.242 www-client/firefox/ChangeLog
39
40 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.242&view=markup
41 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.242&content-type=text/plain
42 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.241&r2=1.242
43
44 Index: ChangeLog
45 ===================================================================
46 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
47 retrieving revision 1.241
48 retrieving revision 1.242
49 diff -u -r1.241 -r1.242
50 --- ChangeLog 25 May 2013 20:47:44 -0000 1.241
51 +++ ChangeLog 28 May 2013 03:37:14 -0000 1.242
52 @@ -1,6 +1,12 @@
53 # ChangeLog for www-client/firefox
54 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
55 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.241 2013/05/25 20:47:44 ago Exp $
56 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.242 2013/05/28 03:37:14 anarchy Exp $
57 +
58 +*firefox-21.0 (28 May 2013)
59 +
60 + 28 May 2013; <anarchy@g.o> -firefox-20.0.1.ebuild,
61 + +firefox-21.0.ebuild:
62 + Security bump for ~arch users
63
64 25 May 2013; Agostino Sarubbo <ago@g.o> firefox-17.0.6.ebuild:
65 Stable for ppc64, wrt bug #469868
66
67
68
69 1.1 www-client/firefox/firefox-21.0.ebuild
70
71 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-21.0.ebuild?rev=1.1&view=markup
72 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-21.0.ebuild?rev=1.1&content-type=text/plain
73
74 Index: firefox-21.0.ebuild
75 ===================================================================
76 # Copyright 1999-2013 Gentoo Foundation
77 # Distributed under the terms of the GNU General Public License v2
78 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-21.0.ebuild,v 1.1 2013/05/28 03:37:14 anarchy Exp $
79
80 EAPI="3"
81 VIRTUALX_REQUIRED="pgo"
82 WANT_AUTOCONF="2.1"
83 MOZ_ESR=""
84
85 # This list can be updated with scripts/get_langs.sh from the mozilla overlay
86 MOZ_LANGS=(af ak ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de
87 el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr
88 fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko ku
89 lg lt lv mai mk ml mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro
90 ru si sk sl son sq sr sv-SE ta ta-LK te th tr uk vi zh-CN zh-TW zu )
91
92 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
93 MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
94 MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
95 MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
96
97 if [[ ${MOZ_ESR} == 1 ]]; then
98 # ESR releases have slightly version numbers
99 MOZ_PV="${MOZ_PV}esr"
100 fi
101
102 # Patch version
103 PATCH="${PN}-21.0-patches-0.1"
104 # Upstream ftp release URI that's used by mozlinguas.eclass
105 # We don't use the http mirror because it deletes old tarballs.
106 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
107
108 inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools virtualx mozlinguas
109
110 DESCRIPTION="Firefox Web Browser"
111 HOMEPAGE="http://www.mozilla.com/firefox"
112
113 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
114 SLOT="0"
115 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
116 IUSE="bindist gstreamer +jit +minimal pgo pulseaudio selinux system-cairo system-jpeg system-sqlite"
117
118 # More URIs appended below...
119 SRC_URI="${SRC_URI}
120 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
121 http://dev.gentoo.org/~nirbheek/mozilla/patchsets/${PATCH}.tar.xz"
122
123 ASM_DEPEND=">=dev-lang/yasm-1.1"
124
125 # Mesa 7.10 needed for WebGL + bugfixes
126 RDEPEND="
127 >=sys-devel/binutils-2.16.1
128 >=dev-libs/nss-3.14.3
129 >=dev-libs/nspr-4.9.6
130 >=dev-libs/glib-2.26:2
131 >=media-libs/mesa-7.10
132 >=media-libs/libpng-1.5.13[apng]
133 virtual/libffi
134 gstreamer? ( media-plugins/gst-plugins-meta:0.10[ffmpeg] )
135 system-cairo? ( >=x11-libs/cairo-1.10[X] )
136 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
137 system-sqlite? ( || (
138 >=dev-db/sqlite-3.7.16:3[secure-delete,debug=]
139 ~dev-db/sqlite-3.7.15.2[fts3,secure-delete,threadsafe,unlock-notify,debug=]
140 ) )
141 >=media-libs/libvpx-1.0.0
142 kernel_linux? ( media-libs/alsa-lib )
143 selinux? ( sec-policy/selinux-mozilla )"
144
145 DEPEND="${RDEPEND}
146 virtual/pkgconfig
147 pgo? (
148 >=sys-devel/gcc-4.5 )
149 amd64? ( ${ASM_DEPEND}
150 virtual/opengl )
151 x86? ( ${ASM_DEPEND}
152 virtual/opengl )"
153
154 # No source releases for alpha|beta
155 if [[ ${PV} =~ alpha ]]; then
156 CHANGESET="8a3042764de7"
157 SRC_URI="${SRC_URI}
158 http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
159 S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
160 elif [[ ${PV} =~ beta ]]; then
161 S="${WORKDIR}/mozilla-beta"
162 SRC_URI="${SRC_URI}
163 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
164 else
165 SRC_URI="${SRC_URI}
166 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
167 if [[ ${MOZ_ESR} == 1 ]]; then
168 S="${WORKDIR}/mozilla-esr${PV%%.*}"
169 else
170 S="${WORKDIR}/mozilla-release"
171 fi
172 fi
173
174 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
175
176 pkg_setup() {
177 moz_pkgsetup
178
179 # Avoid PGO profiling problems due to enviroment leakage
180 # These should *always* be cleaned up anyway
181 unset DBUS_SESSION_BUS_ADDRESS \
182 DISPLAY \
183 ORBIT_SOCKETDIR \
184 SESSION_MANAGER \
185 XDG_SESSION_COOKIE \
186 XAUTHORITY
187
188 if ! use bindist; then
189 einfo
190 elog "You are enabling official branding. You may not redistribute this build"
191 elog "to any users on your network or the internet. Doing so puts yourself into"
192 elog "a legal problem with Mozilla Foundation"
193 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
194 fi
195
196 if use pgo; then
197 einfo
198 ewarn "You will do a double build for profile guided optimization."
199 ewarn "This will result in your build taking at least twice as long as before."
200 fi
201
202 # Ensure we have enough disk space to compile
203 if use pgo || use debug || use test ; then
204 CHECKREQS_DISK_BUILD="8G"
205 else
206 CHECKREQS_DISK_BUILD="4G"
207 fi
208 check-reqs_pkg_setup
209 }
210
211 src_unpack() {
212 unpack ${A}
213
214 # Unpack language packs
215 mozlinguas_src_unpack
216 }
217
218 src_prepare() {
219 # Discard system cairo patch if support is not requested
220 if ! use system-cairo ; then
221 export EPATCH_EXCLUDE="6009_fix_system_cairo_support.patch"
222 fi
223 # Apply our patches
224 EPATCH_SUFFIX="patch" \
225 EPATCH_FORCE="yes" \
226 epatch "${WORKDIR}/firefox"
227
228 # Undefined reference fix
229 epatch "${FILESDIR}"/bug-846986.patch
230
231 # Allow user to apply any additional patches without modifing ebuild
232 epatch_user
233
234 # Enable gnomebreakpad
235 if use debug ; then
236 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
237 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
238 fi
239
240 # Ensure that are plugins dir is enabled as default
241 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
242 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
243 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
244 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
245
246 # Fix sandbox violations during make clean, bug 372817
247 sed -e "s:\(/no-such-file\):${T}\1:g" \
248 -i "${S}"/config/rules.mk \
249 -i "${S}"/js/src/config/rules.mk \
250 -i "${S}"/nsprpub/configure{.in,} \
251 || die
252
253 # Don't exit with error when some libs are missing which we have in
254 # system.
255 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
256 -i "${S}"/browser/installer/Makefile.in || die
257
258 # Don't error out when there's no files to be removed:
259 sed 's@\(xargs rm\)$@\1 -f@' \
260 -i "${S}"/toolkit/mozapps/installer/packager.mk || die
261
262 eautoreconf
263 }
264
265 src_configure() {
266 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
267 MEXTENSIONS="default"
268
269 ####################################
270 #
271 # mozconfig, CFLAGS and CXXFLAGS setup
272 #
273 ####################################
274
275 mozconfig_init
276 mozconfig_config
277
278 # It doesn't compile on alpha without this LDFLAGS
279 use alpha && append-ldflags "-Wl,--no-relax"
280
281 # We must force enable jemalloc 3 threw .mozconfig
282 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
283
284 mozconfig_annotate '' --enable-jemalloc
285 mozconfig_annotate '' --enable-replace-malloc
286 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
287 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
288 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
289 mozconfig_annotate '' --disable-gconf
290 mozconfig_annotate '' --disable-mailnews
291 mozconfig_annotate '' --with-system-png
292 mozconfig_annotate '' --enable-system-ffi
293
294 # Other ff-specific settings
295 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
296 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
297 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
298
299 mozconfig_use_enable gstreamer
300 mozconfig_use_enable pulseaudio
301 mozconfig_use_enable system-sqlite
302 mozconfig_use_with system-jpeg
303 # Feature is know to cause problems on hardened
304 mozconfig_use_enable jit methodjit
305 mozconfig_use_enable jit tracejit
306 mozconfig_use_enable jit ion
307 mozconfig_use_enable system-cairo
308
309 # Allow for a proper pgo build
310 if use pgo; then
311 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
312 fi
313
314 # Finalize and report settings
315 mozconfig_final
316
317 if [[ $(gcc-major-version) -lt 4 ]]; then
318 append-cxxflags -fno-stack-protector
319 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
320 if use amd64 || use x86; then
321 append-flags -mno-avx
322 fi
323 fi
324 }
325
326 src_compile() {
327 if use pgo; then
328 addpredict /root
329 addpredict /etc/gconf
330 # Reset and cleanup environment variables used by GNOME/XDG
331 gnome2_environment_reset
332
333 # Firefox tries to use dri stuff when it's run, see bug 380283
334 shopt -s nullglob
335 cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
336 if test -n "${cards}"; then
337 # FOSS drivers are fine
338 addpredict "${cards}"
339 else
340 cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
341 if test -n "${cards}"; then
342 # Binary drivers seem to cause access violations anyway, so
343 # let's use indirect rendering so that the device files aren't
344 # touched at all. See bug 394715.
345 export LIBGL_ALWAYS_INDIRECT=1
346 fi
347 fi
348 shopt -u nullglob
349
350 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
351 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
352 Xemake -f client.mk profiledbuild || die "Xemake failed"
353 else
354 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
355 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
356 emake -f client.mk || die "emake failed"
357 fi
358
359 }
360
361 src_install() {
362 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
363 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
364
365 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
366 local obj_dir="$(echo */config.log)"
367 obj_dir="${obj_dir%/*}"
368 cd "${S}/${obj_dir}"
369
370 # Pax mark xpcshell for hardened support, only used for startupcache creation.
371 pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
372
373 # Add our default prefs for firefox
374 cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
375 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
376
377 # Set default path to search for dictionaries.
378 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
379 >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
380
381 if ! use libnotify; then
382 echo "pref(\"browser.download.manager.showAlertOnComplete\", false);" \
383 >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
384 fi
385
386 echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
387 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
388
389 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
390 emake DESTDIR="${D}" install || die "emake install failed"
391
392 # Install language packs
393 mozlinguas_src_install
394
395 local size sizes icon_path icon name
396 if use bindist; then
397 sizes="16 32 48"
398 icon_path="${S}/browser/branding/aurora"
399 # Firefox's new rapid release cycle means no more codenames
400 # Let's just stick with this one...
401 icon="aurora"
402 name="Aurora"
403 else
404 sizes="16 22 24 32 256"
405 icon_path="${S}/browser/branding/official"
406 icon="${PN}"
407 name="Mozilla Firefox"
408 fi
409
410 # Install icons and .desktop for menu entry
411 for size in ${sizes}; do
412 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
413 newins "${icon_path}/default${size}.png" "${icon}.png" || die
414 done
415 # The 128x128 icon has a different name
416 insinto "/usr/share/icons/hicolor/128x128/apps"
417 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
418 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
419 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
420 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
421 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
422 "${ED}/usr/share/applications/${PN}.desktop" || die
423
424 # Add StartupNotify=true bug 237317
425 if use startup-notification ; then
426 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
427 fi
428
429 # Required in order to use plugins and even run firefox on hardened.
430 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
431
432 if use minimal; then
433 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
434 die "Failed to remove sdk and headers"
435 fi
436
437 # very ugly hack to make firefox not sigbus on sparc
438 # FIXME: is this still needed??
439 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
440 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
441 die "sparc sed failed"; }
442 }
443
444 pkg_preinst() {
445 gnome2_icon_savelist
446 }
447
448 pkg_postinst() {
449 # Update mimedb for the new .desktop file
450 fdo-mime_desktop_database_update
451 gnome2_icon_cache_update
452 }
453
454 pkg_postrm() {
455 gnome2_icon_cache_update
456 }