1 |
anarchy 14/05/01 13:27:03 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: firefox-29.0.ebuild firefox-24.5.0.ebuild |
5 |
Removed: firefox-28.0.ebuild |
6 |
Log: |
7 |
Security bump, bug #509050 |
8 |
|
9 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB4D088B4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.321 www-client/firefox/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.321&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.321&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.320&r2=1.321 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v |
21 |
retrieving revision 1.320 |
22 |
retrieving revision 1.321 |
23 |
diff -u -r1.320 -r1.321 |
24 |
--- ChangeLog 2 Apr 2014 14:03:36 -0000 1.320 |
25 |
+++ ChangeLog 1 May 2014 13:27:03 -0000 1.321 |
26 |
@@ -1,6 +1,13 @@ |
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.320 2014/04/02 14:03:36 axs Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.321 2014/05/01 13:27:03 anarchy Exp $ |
31 |
+ |
32 |
+*firefox-29.0 (01 May 2014) |
33 |
+*firefox-24.5.0 (01 May 2014) |
34 |
+ |
35 |
+ 01 May 2014; <anarchy@g.o> +firefox-24.5.0.ebuild, |
36 |
+ +firefox-29.0.ebuild, -firefox-28.0.ebuild: |
37 |
+ Security bump, bug #509050 |
38 |
|
39 |
02 Apr 2014; Ian Stakenvicius (_AxS_) <axs@g.o> firefox-28.0.ebuild: |
40 |
disable the forcing of ld.gold in the mozilla build system, bug 494364 |
41 |
|
42 |
|
43 |
|
44 |
1.1 www-client/firefox/firefox-29.0.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-29.0.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-29.0.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: firefox-29.0.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2014 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-29.0.ebuild,v 1.1 2014/05/01 13:27:03 anarchy Exp $ |
54 |
|
55 |
EAPI="5" |
56 |
VIRTUALX_REQUIRED="pgo" |
57 |
WANT_AUTOCONF="2.1" |
58 |
MOZ_ESR="" |
59 |
|
60 |
# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
61 |
MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en |
62 |
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 |
63 |
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 |
64 |
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 |
65 |
th tr uk vi xh zh-CN zh-TW zu ) |
66 |
|
67 |
# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
68 |
MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
69 |
MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
70 |
MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
71 |
|
72 |
if [[ ${MOZ_ESR} == 1 ]]; then |
73 |
# ESR releases have slightly version numbers |
74 |
MOZ_PV="${MOZ_PV}esr" |
75 |
fi |
76 |
|
77 |
# Patch version |
78 |
PATCH="${PN}-29.0-patches-0.1" |
79 |
# Upstream ftp release URI that's used by mozlinguas.eclass |
80 |
# We don't use the http mirror because it deletes old tarballs. |
81 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/" |
82 |
MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/" |
83 |
|
84 |
inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools virtualx mozlinguas |
85 |
|
86 |
DESCRIPTION="Firefox Web Browser" |
87 |
HOMEPAGE="http://www.mozilla.com/firefox" |
88 |
|
89 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
90 |
SLOT="0" |
91 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
92 |
IUSE="bindist gstreamer hardened +jit +minimal pgo pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite test" |
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.3.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}"/nsprpub/configure{.in,} \ |
223 |
|| die |
224 |
|
225 |
# Don't exit with error when some libs are missing which we have in |
226 |
# system. |
227 |
sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
228 |
-i "${S}"/browser/installer/Makefile.in || die |
229 |
|
230 |
# Don't error out when there's no files to be removed: |
231 |
sed 's@\(xargs rm\)$@\1 -f@' \ |
232 |
-i "${S}"/toolkit/mozapps/installer/packager.mk || die |
233 |
|
234 |
eautoreconf |
235 |
|
236 |
# Must run autoconf in js/src |
237 |
cd "${S}"/js/src || die |
238 |
eautoconf |
239 |
} |
240 |
|
241 |
src_configure() { |
242 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
243 |
MEXTENSIONS="default" |
244 |
|
245 |
#################################### |
246 |
# |
247 |
# mozconfig, CFLAGS and CXXFLAGS setup |
248 |
# |
249 |
#################################### |
250 |
|
251 |
mozconfig_init |
252 |
mozconfig_config |
253 |
|
254 |
# It doesn't compile on alpha without this LDFLAGS |
255 |
use alpha && append-ldflags "-Wl,--no-relax" |
256 |
|
257 |
# Add full relro support for hardened |
258 |
use hardened && append-ldflags "-Wl,-z,relro,-z,now" |
259 |
|
260 |
# We must force enable jemalloc 3 threw .mozconfig |
261 |
echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig || die |
262 |
|
263 |
mozconfig_annotate '' --enable-jemalloc |
264 |
mozconfig_annotate '' --enable-replace-malloc |
265 |
mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
266 |
mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
267 |
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
268 |
mozconfig_annotate '' --disable-gconf |
269 |
mozconfig_annotate '' --disable-mailnews |
270 |
mozconfig_annotate '' --with-system-png |
271 |
mozconfig_annotate '' --enable-system-ffi |
272 |
mozconfig_annotate '' --disable-gold |
273 |
|
274 |
# Other ff-specific settings |
275 |
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
276 |
mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" |
277 |
mozconfig_annotate '' --build="${CTARGET:-${CHOST}}" |
278 |
|
279 |
mozconfig_use_enable gstreamer |
280 |
mozconfig_use_enable pulseaudio |
281 |
mozconfig_use_enable system-cairo |
282 |
mozconfig_use_enable system-sqlite |
283 |
mozconfig_use_with system-jpeg |
284 |
mozconfig_use_with system-icu |
285 |
mozconfig_use_enable system-icu intl-api |
286 |
# Feature is know to cause problems on hardened |
287 |
mozconfig_use_enable jit ion |
288 |
|
289 |
# Allow for a proper pgo build |
290 |
if use pgo; then |
291 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
292 |
fi |
293 |
|
294 |
# Finalize and report settings |
295 |
mozconfig_final |
296 |
|
297 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
298 |
append-cxxflags -fno-stack-protector |
299 |
elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
300 |
if use amd64 || use x86; then |
301 |
append-flags -mno-avx |
302 |
fi |
303 |
fi |
304 |
} |
305 |
|
306 |
src_compile() { |
307 |
if use pgo; then |
308 |
addpredict /root |
309 |
addpredict /etc/gconf |
310 |
# Reset and cleanup environment variables used by GNOME/XDG |
311 |
gnome2_environment_reset |
312 |
|
313 |
# Firefox tries to use dri stuff when it's run, see bug 380283 |
314 |
shopt -s nullglob |
315 |
cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
316 |
if test -z "${cards}"; then |
317 |
cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') |
318 |
if test -n "${cards}"; then |
319 |
# Binary drivers seem to cause access violations anyway, so |
320 |
# let's use indirect rendering so that the device files aren't |
321 |
# touched at all. See bug 394715. |
322 |
export LIBGL_ALWAYS_INDIRECT=1 |
323 |
fi |
324 |
fi |
325 |
shopt -u nullglob |
326 |
addpredict "${cards}" |
327 |
|
328 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
329 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
330 |
Xemake -f client.mk profiledbuild || die "Xemake failed" |
331 |
else |
332 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
333 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
334 |
emake -f client.mk |
335 |
fi |
336 |
|
337 |
} |
338 |
|
339 |
src_install() { |
340 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
341 |
DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
342 |
|
343 |
# MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. |
344 |
local obj_dir="$(echo */config.log)" |
345 |
obj_dir="${obj_dir%/*}" |
346 |
cd "${S}/${obj_dir}" || die |
347 |
|
348 |
# Pax mark xpcshell for hardened support, only used for startupcache creation. |
349 |
pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell |
350 |
|
351 |
# Add our default prefs for firefox |
352 |
cp "${FILESDIR}"/gentoo-default-prefs.js-1 \ |
353 |
"${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
354 |
|| die |
355 |
|
356 |
# Set default path to search for dictionaries. |
357 |
echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
358 |
>> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
359 |
|| die |
360 |
|
361 |
if ! use libnotify; then |
362 |
echo "pref(\"browser.download.manager.showAlertOnComplete\", false);" \ |
363 |
>> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
364 |
|| die |
365 |
fi |
366 |
|
367 |
echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
368 |
"${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
369 |
|| die |
370 |
|
371 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
372 |
emake DESTDIR="${D}" install |
373 |
|
374 |
# Install language packs |
375 |
mozlinguas_src_install |
376 |
|
377 |
local size sizes icon_path icon name |
378 |
if use bindist; then |
379 |
sizes="16 32 48" |
380 |
icon_path="${S}/browser/branding/aurora" |
381 |
# Firefox's new rapid release cycle means no more codenames |
382 |
# Let's just stick with this one... |
383 |
icon="aurora" |
384 |
name="Aurora" |
385 |
else |
386 |
sizes="16 22 24 32 256" |
387 |
icon_path="${S}/browser/branding/official" |
388 |
icon="${PN}" |
389 |
name="Mozilla Firefox" |
390 |
fi |
391 |
|
392 |
# Install icons and .desktop for menu entry |
393 |
for size in ${sizes}; do |
394 |
insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
395 |
newins "${icon_path}/default${size}.png" "${icon}.png" |
396 |
done |
397 |
# The 128x128 icon has a different name |
398 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
399 |
newins "${icon_path}/mozicon128.png" "${icon}.png" |
400 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
401 |
newicon "${icon_path}/content/icon48.png" "${icon}.png" |
402 |
newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
403 |
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
404 |
"${ED}/usr/share/applications/${PN}.desktop" || die |
405 |
|
406 |
# Add StartupNotify=true bug 237317 |
407 |
if use startup-notification ; then |
408 |
echo "StartupNotify=true"\ |
409 |
>> "${ED}/usr/share/applications/${PN}.desktop" \ |
410 |
|| die |
411 |
fi |
412 |
|
413 |
# Required in order to use plugins and even run firefox on hardened. |
414 |
pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} |
415 |
|
416 |
if use minimal; then |
417 |
rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \ |
418 |
|| die "Failed to remove sdk and headers" |
419 |
fi |
420 |
|
421 |
# very ugly hack to make firefox not sigbus on sparc |
422 |
# FIXME: is this still needed?? |
423 |
use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
424 |
-i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \ |
425 |
|| die "sparc sed failed"; } |
426 |
} |
427 |
|
428 |
pkg_preinst() { |
429 |
gnome2_icon_savelist |
430 |
} |
431 |
|
432 |
pkg_postinst() { |
433 |
# Update mimedb for the new .desktop file |
434 |
fdo-mime_desktop_database_update |
435 |
gnome2_icon_cache_update |
436 |
} |
437 |
|
438 |
pkg_postrm() { |
439 |
gnome2_icon_cache_update |
440 |
} |
441 |
|
442 |
|
443 |
|
444 |
1.1 www-client/firefox/firefox-24.5.0.ebuild |
445 |
|
446 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-24.5.0.ebuild?rev=1.1&view=markup |
447 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-24.5.0.ebuild?rev=1.1&content-type=text/plain |
448 |
|
449 |
Index: firefox-24.5.0.ebuild |
450 |
=================================================================== |
451 |
# Copyright 1999-2014 Gentoo Foundation |
452 |
# Distributed under the terms of the GNU General Public License v2 |
453 |
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-24.5.0.ebuild,v 1.1 2014/05/01 13:27:03 anarchy Exp $ |
454 |
|
455 |
EAPI=5 |
456 |
VIRTUALX_REQUIRED="pgo" |
457 |
WANT_AUTOCONF="2.1" |
458 |
MOZ_ESR="1" |
459 |
|
460 |
# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
461 |
MOZ_LANGS=(af ak ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de |
462 |
el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr |
463 |
fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko ku |
464 |
lg lt lv mai mk ml mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro |
465 |
ru si sk sl son sq sr sv-SE ta ta-LK te th tr uk vi zh-CN zh-TW zu ) |
466 |
|
467 |
# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
468 |
MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
469 |
MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
470 |
MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
471 |
|
472 |
if [[ ${MOZ_ESR} == 1 ]]; then |
473 |
# ESR releases have slightly version numbers |
474 |
MOZ_PV="${MOZ_PV}esr" |
475 |
fi |
476 |
|
477 |
# Patch version |
478 |
PATCH="${PN}-24.0-patches-0.9" |
479 |
# Upstream ftp release URI that's used by mozlinguas.eclass |
480 |
# We don't use the http mirror because it deletes old tarballs. |
481 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/" |
482 |
MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/" |
483 |
|
484 |
inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools virtualx mozlinguas |
485 |
|
486 |
DESCRIPTION="Firefox Web Browser" |
487 |
HOMEPAGE="http://www.mozilla.com/firefox" |
488 |
|
489 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
490 |
SLOT="0" |
491 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
492 |
IUSE="bindist gstreamer +jit +minimal pgo pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite test" |
493 |
|
494 |
# More URIs appended below... |
495 |
SRC_URI="${SRC_URI} |
496 |
http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz |
497 |
http://dev.gentoo.org/~nirbheek/mozilla/patchsets/${PATCH}.tar.xz" |
498 |
|
499 |
ASM_DEPEND=">=dev-lang/yasm-1.1" |
500 |
|
501 |
# Mesa 7.10 needed for WebGL + bugfixes |
502 |
RDEPEND=" |
503 |
>=dev-libs/nss-3.16 |
504 |
>=dev-libs/nspr-4.10.4 |
505 |
>=dev-libs/glib-2.26:2 |
506 |
>=media-libs/mesa-7.10 |
507 |
>=media-libs/libpng-1.5.13[apng] |
508 |
virtual/libffi |
509 |
gstreamer? ( media-plugins/gst-plugins-meta:0.10[ffmpeg] ) |
510 |
pulseaudio? ( media-sound/pulseaudio ) |
511 |
system-cairo? ( >=x11-libs/cairo-1.12[X] ) |
512 |
system-icu? ( >=dev-libs/icu-51.1 ) |
513 |
system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
514 |
system-sqlite? ( >=dev-db/sqlite-3.7.17:3[secure-delete,debug=] ) |
515 |
>=media-libs/libvpx-1.0.0 |
516 |
kernel_linux? ( media-libs/alsa-lib ) |
517 |
selinux? ( sec-policy/selinux-mozilla )" |
518 |
|
519 |
DEPEND="${RDEPEND} |
520 |
>=sys-devel/binutils-2.16.1 |
521 |
virtual/pkgconfig |
522 |
pgo? ( |
523 |
>=sys-devel/gcc-4.5 ) |
524 |
amd64? ( ${ASM_DEPEND} |
525 |
virtual/opengl ) |
526 |
x86? ( ${ASM_DEPEND} |
527 |
virtual/opengl )" |
528 |
|
529 |
# No source releases for alpha|beta |
530 |
if [[ ${PV} =~ alpha ]]; then |
531 |
CHANGESET="8a3042764de7" |
532 |
SRC_URI="${SRC_URI} |
533 |
http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2" |
534 |
S="${WORKDIR}/mozilla-aurora-${CHANGESET}" |
535 |
elif [[ ${PV} =~ beta ]]; then |
536 |
S="${WORKDIR}/mozilla-beta" |
537 |
SRC_URI="${SRC_URI} |
538 |
${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2 |
539 |
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
540 |
else |
541 |
SRC_URI="${SRC_URI} |
542 |
${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2 |
543 |
${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
544 |
if [[ ${MOZ_ESR} == 1 ]]; then |
545 |
S="${WORKDIR}/mozilla-esr${PV%%.*}" |
546 |
else |
547 |
S="${WORKDIR}/mozilla-release" |
548 |
fi |
549 |
fi |
550 |
|
551 |
QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
552 |
|
553 |
pkg_setup() { |
554 |
moz_pkgsetup |
555 |
|
556 |
# Avoid PGO profiling problems due to enviroment leakage |
557 |
# These should *always* be cleaned up anyway |
558 |
unset DBUS_SESSION_BUS_ADDRESS \ |
559 |
DISPLAY \ |
560 |
ORBIT_SOCKETDIR \ |
561 |
SESSION_MANAGER \ |
562 |
XDG_SESSION_COOKIE \ |
563 |
XAUTHORITY |
564 |
|
565 |
if ! use bindist; then |
566 |
einfo |
567 |
elog "You are enabling official branding. You may not redistribute this build" |
568 |
elog "to any users on your network or the internet. Doing so puts yourself into" |
569 |
elog "a legal problem with Mozilla Foundation" |
570 |
elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
571 |
fi |
572 |
|
573 |
if use pgo; then |
574 |
einfo |
575 |
ewarn "You will do a double build for profile guided optimization." |
576 |
ewarn "This will result in your build taking at least twice as long as before." |
577 |
fi |
578 |
} |
579 |
|
580 |
pkg_pretend() { |
581 |
# Ensure we have enough disk space to compile |
582 |
if use pgo || use debug || use test ; then |
583 |
CHECKREQS_DISK_BUILD="8G" |
584 |
else |
585 |
CHECKREQS_DISK_BUILD="4G" |
586 |
fi |
587 |
check-reqs_pkg_setup |
588 |
} |
589 |
|
590 |
src_unpack() { |
591 |
unpack ${A} |
592 |
|
593 |
# Unpack language packs |
594 |
mozlinguas_src_unpack |
595 |
} |
596 |
|
597 |
src_prepare() { |
598 |
# Apply our patches |
599 |
EPATCH_SUFFIX="patch" \ |
600 |
EPATCH_FORCE="yes" \ |
601 |
epatch "${WORKDIR}/firefox" |
602 |
|
603 |
# Allow user to apply any additional patches without modifing ebuild |
604 |
epatch_user |
605 |
|
606 |
# Enable gnomebreakpad |
607 |
if use debug ; then |
608 |
sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
609 |
"${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
610 |
fi |
611 |
|
612 |
# Ensure that our plugins dir is enabled as default |
613 |
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
614 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
615 |
sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
616 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
617 |
|
618 |
# Fix sandbox violations during make clean, bug 372817 |
619 |
sed -e "s:\(/no-such-file\):${T}\1:g" \ |
620 |
-i "${S}"/config/rules.mk \ |
621 |
-i "${S}"/js/src/config/rules.mk \ |
622 |
-i "${S}"/nsprpub/configure{.in,} \ |
623 |
|| die |
624 |
|
625 |
# Don't exit with error when some libs are missing which we have in |
626 |
# system. |
627 |
sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
628 |
-i "${S}"/browser/installer/Makefile.in || die |
629 |
|
630 |
# Don't error out when there's no files to be removed: |
631 |
sed 's@\(xargs rm\)$@\1 -f@' \ |
632 |
-i "${S}"/toolkit/mozapps/installer/packager.mk || die |
633 |
|
634 |
eautoreconf |
635 |
|
636 |
# Must run autoconf in js/src |
637 |
cd "${S}"/js/src || die |
638 |
eautoconf |
639 |
} |
640 |
|
641 |
src_configure() { |
642 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
643 |
MEXTENSIONS="default" |
644 |
|
645 |
#################################### |
646 |
# |
647 |
# mozconfig, CFLAGS and CXXFLAGS setup |
648 |
# |
649 |
#################################### |
650 |
|
651 |
mozconfig_init |
652 |
mozconfig_config |
653 |
|
654 |
# It doesn't compile on alpha without this LDFLAGS |
655 |
use alpha && append-ldflags "-Wl,--no-relax" |
656 |
|
657 |
# We must force enable jemalloc 3 threw .mozconfig |
658 |
echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig |
659 |
|
660 |
mozconfig_annotate '' --enable-jemalloc |
661 |
mozconfig_annotate '' --enable-replace-malloc |
662 |
mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
663 |
mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
664 |
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
665 |
mozconfig_annotate '' --disable-gconf |
666 |
mozconfig_annotate '' --disable-mailnews |
667 |
mozconfig_annotate '' --with-system-png |
668 |
mozconfig_annotate '' --enable-system-ffi |
669 |
|
670 |
# Other ff-specific settings |
671 |
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
672 |
mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" |
673 |
mozconfig_annotate '' --build="${CTARGET:-${CHOST}}" |
674 |
|
675 |
mozconfig_use_enable gstreamer |
676 |
mozconfig_use_enable pulseaudio |
677 |
mozconfig_use_enable system-cairo |
678 |
mozconfig_use_enable system-sqlite |
679 |
mozconfig_use_with system-jpeg |
680 |
mozconfig_use_with system-icu |
681 |
mozconfig_use_enable system-icu intl-api |
682 |
# Feature is know to cause problems on hardened |
683 |
mozconfig_use_enable jit ion |
684 |
|
685 |
# Allow for a proper pgo build |
686 |
if use pgo; then |
687 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
688 |
fi |
689 |
|
690 |
# Finalize and report settings |
691 |
mozconfig_final |
692 |
|
693 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
694 |
append-cxxflags -fno-stack-protector |
695 |
elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
696 |
if use amd64 || use x86; then |
697 |
append-flags -mno-avx |
698 |
fi |
699 |
fi |
700 |
} |
701 |
|
702 |
src_compile() { |
703 |
if use pgo; then |
704 |
addpredict /root |
705 |
addpredict /etc/gconf |
706 |
# Reset and cleanup environment variables used by GNOME/XDG |
707 |
gnome2_environment_reset |
708 |
|
709 |
# Firefox tries to use dri stuff when it's run, see bug 380283 |
710 |
shopt -s nullglob |
711 |
cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
712 |
if test -z "${cards}"; then |
713 |
cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') |
714 |
if test -n "${cards}"; then |
715 |
# Binary drivers seem to cause access violations anyway, so |
716 |
# let's use indirect rendering so that the device files aren't |
717 |
# touched at all. See bug 394715. |
718 |
export LIBGL_ALWAYS_INDIRECT=1 |
719 |
fi |
720 |
fi |
721 |
shopt -u nullglob |
722 |
addpredict "${cards}" |
723 |
|
724 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
725 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
726 |
Xemake -f client.mk profiledbuild || die "Xemake failed" |
727 |
else |
728 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
729 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \ |
730 |
emake -f client.mk |
731 |
fi |
732 |
|
733 |
} |
734 |
|
735 |
src_install() { |
736 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
737 |
DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
738 |
|
739 |
# MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. |
740 |
local obj_dir="$(echo */config.log)" |
741 |
obj_dir="${obj_dir%/*}" |
742 |
cd "${S}/${obj_dir}" || die |
743 |
|
744 |
# Pax mark xpcshell for hardened support, only used for startupcache creation. |
745 |
pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell |
746 |
|
747 |
# Add our default prefs for firefox |
748 |
cp "${FILESDIR}"/gentoo-default-prefs.js-1 \ |
749 |
"${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
750 |
|| die |
751 |
|
752 |
# Set default path to search for dictionaries. |
753 |
echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
754 |
>> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
755 |
|| die |
756 |
|
757 |
if ! use libnotify; then |
758 |
echo "pref(\"browser.download.manager.showAlertOnComplete\", false);" \ |
759 |
>> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
760 |
|| die |
761 |
fi |
762 |
|
763 |
echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
764 |
"${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
765 |
|| die |
766 |
|
767 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
768 |
emake DESTDIR="${D}" install |
769 |
|
770 |
# Install language packs |
771 |
mozlinguas_src_install |
772 |
|
773 |
local size sizes icon_path icon name |
774 |
if use bindist; then |
775 |
sizes="16 32 48" |
776 |
icon_path="${S}/browser/branding/aurora" |
777 |
# Firefox's new rapid release cycle means no more codenames |
778 |
# Let's just stick with this one... |
779 |
icon="aurora" |
780 |
name="Aurora" |
781 |
else |
782 |
sizes="16 22 24 32 256" |
783 |
icon_path="${S}/browser/branding/official" |
784 |
icon="${PN}" |
785 |
name="Mozilla Firefox" |
786 |
fi |
787 |
|
788 |
# Install icons and .desktop for menu entry |
789 |
for size in ${sizes}; do |
790 |
insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
791 |
newins "${icon_path}/default${size}.png" "${icon}.png" |
792 |
done |
793 |
# The 128x128 icon has a different name |
794 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
795 |
newins "${icon_path}/mozicon128.png" "${icon}.png" |
796 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
797 |
newicon "${icon_path}/content/icon48.png" "${icon}.png" |
798 |
newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
799 |
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
800 |
"${ED}/usr/share/applications/${PN}.desktop" || die |
801 |
|
802 |
# Add StartupNotify=true bug 237317 |
803 |
if use startup-notification ; then |
804 |
echo "StartupNotify=true" \ |
805 |
>> "${ED}/usr/share/applications/${PN}.desktop" \ |
806 |
|| die |
807 |
fi |
808 |
|
809 |
# Required in order to use plugins and even run firefox on hardened. |
810 |
pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} |
811 |
|
812 |
if use minimal; then |
813 |
rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \ |
814 |
|| die "Failed to remove sdk and headers" |
815 |
fi |
816 |
|
817 |
# very ugly hack to make firefox not sigbus on sparc |
818 |
# FIXME: is this still needed?? |
819 |
use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
820 |
-i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \ |
821 |
|| die "sparc sed failed"; } |
822 |
} |
823 |
|
824 |
pkg_preinst() { |
825 |
gnome2_icon_savelist |
826 |
} |
827 |
|
828 |
pkg_postinst() { |
829 |
# Update mimedb for the new .desktop file |
830 |
fdo-mime_desktop_database_update |
831 |
gnome2_icon_cache_update |
832 |
} |
833 |
|
834 |
pkg_postrm() { |
835 |
gnome2_icon_cache_update |
836 |
} |