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