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