1 |
commit: abb7121f7cd90a11534c53c24b25bfe2e6f86594 |
2 |
Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 31 22:56:32 2015 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 31 22:56:32 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=abb7121f |
7 |
|
8 |
Firefox-44.0_beta4 yes the libevent dep is real. We should not be |
9 |
introducing beta packages blindly to the users as done with |
10 |
libevent-2.1.5 |
11 |
|
12 |
eclass/mozconfig-v6.44.eclass | 285 +++++++++++++++++++ |
13 |
www-client/firefox/Manifest | 2 + |
14 |
www-client/firefox/firefox-44.0_beta4.ebuild | 393 +++++++++++++++++++++++++++ |
15 |
3 files changed, 680 insertions(+) |
16 |
|
17 |
diff --git a/eclass/mozconfig-v6.44.eclass b/eclass/mozconfig-v6.44.eclass |
18 |
new file mode 100644 |
19 |
index 0000000..fce86f0 |
20 |
--- /dev/null |
21 |
+++ b/eclass/mozconfig-v6.44.eclass |
22 |
@@ -0,0 +1,285 @@ |
23 |
+# Copyright 1999-2015 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Id$ |
26 |
+# |
27 |
+# @ECLASS: mozconfig-v6.40.eclass |
28 |
+# @MAINTAINER: |
29 |
+# mozilla team <mozilla@g.o> |
30 |
+# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 |
31 |
+# @DESCRIPTION: |
32 |
+# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) |
33 |
+# to provide a single common place for the common mozilla engine compoments. |
34 |
+# |
35 |
+# The eclass provides all common dependencies as well as common use flags. |
36 |
+# |
37 |
+# Some use flags which may be optional in particular mozilla packages can be |
38 |
+# supported through setting eclass variables. |
39 |
+# |
40 |
+# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3, |
41 |
+# and so ebuilds inheriting this eclass do not need to inherit that. |
42 |
+ |
43 |
+inherit multilib flag-o-matic toolchain-funcs mozcoreconf-v3 |
44 |
+ |
45 |
+case ${EAPI} in |
46 |
+ 0|1|2|3|4) die "EAPI=${EAPI} not supported" |
47 |
+esac |
48 |
+ |
49 |
+# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI |
50 |
+# @DESCRIPTION: |
51 |
+# Set this variable before the inherit line, when an ebuild needs to provide |
52 |
+# optional necko-wifi support via IUSE="wifi". Currently this would include |
53 |
+# ebuilds for firefox, and potentially seamonkey. |
54 |
+# |
55 |
+# Leave the variable UNSET if necko-wifi support should not be available. |
56 |
+# Set the variable to "enabled" if the use flag should be enabled by default. |
57 |
+# Set the variable to any value if the use flag should exist but not be default-enabled. |
58 |
+ |
59 |
+# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT |
60 |
+# @DESCRIPTION: |
61 |
+# Set this variable before the inherit line, when an ebuild needs to provide |
62 |
+# optional necko-wifi support via IUSE="jit". Currently this would include |
63 |
+# ebuilds for firefox, and potentially seamonkey. |
64 |
+# |
65 |
+# Leave the variable UNSET if optional jit support should not be available. |
66 |
+# Set the variable to "enabled" if the use flag should be enabled by default. |
67 |
+# Set the variable to any value if the use flag should exist but not be default-enabled. |
68 |
+ |
69 |
+# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 |
70 |
+# @DESCRIPTION: |
71 |
+# Set this variable before the inherit line, when an ebuild can provide |
72 |
+# optional gtk3 support via IUSE="gtk3". Currently this would include |
73 |
+# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. |
74 |
+# |
75 |
+# Leave the variable UNSET if gtk3 support should not be available. |
76 |
+# Set the variable to "enabled" if the use flag should be enabled by default. |
77 |
+# Set the variable to any value if the use flag should exist but not be default-enabled. |
78 |
+ |
79 |
+# use-flags common among all mozilla ebuilds |
80 |
+IUSE="${IUSE} dbus debug +gstreamer gstreamer-0 +jemalloc3 neon pulseaudio selinux startup-notification system-cairo |
81 |
+ system-icu system-jpeg system-libevent system-sqlite system-libvpx" |
82 |
+ |
83 |
+# some notes on deps: |
84 |
+# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 |
85 |
+# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau |
86 |
+ |
87 |
+RDEPEND=">=app-text/hunspell-1.2 |
88 |
+ dev-libs/atk |
89 |
+ dev-libs/expat |
90 |
+ >=dev-libs/libevent-1.4.7 |
91 |
+ >=x11-libs/cairo-1.10[X] |
92 |
+ >=x11-libs/gtk+-2.18:2 |
93 |
+ x11-libs/gdk-pixbuf |
94 |
+ >=x11-libs/pango-1.22.0 |
95 |
+ >=media-libs/libpng-1.6.17:0=[apng] |
96 |
+ >=media-libs/mesa-10.2:* |
97 |
+ media-libs/fontconfig |
98 |
+ >=media-libs/freetype-2.4.10 |
99 |
+ kernel_linux? ( media-libs/alsa-lib ) |
100 |
+ pulseaudio? ( media-sound/pulseaudio ) |
101 |
+ virtual/freedesktop-icon-theme |
102 |
+ dbus? ( >=sys-apps/dbus-0.60 |
103 |
+ >=dev-libs/dbus-glib-0.72 ) |
104 |
+ startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
105 |
+ >=dev-libs/glib-2.26:2 |
106 |
+ >=sys-libs/zlib-1.2.3 |
107 |
+ >=virtual/libffi-3.0.10 |
108 |
+ gstreamer? ( |
109 |
+ >=media-libs/gstreamer-1.4.5:1.0 |
110 |
+ >=media-libs/gst-plugins-base-1.4.5:1.0 |
111 |
+ >=media-libs/gst-plugins-good-1.4.5:1.0 |
112 |
+ >=media-plugins/gst-plugins-libav-1.4.5:1.0 |
113 |
+ ) |
114 |
+ gstreamer-0? ( |
115 |
+ >=media-libs/gstreamer-0.10.25:0.10 |
116 |
+ media-plugins/gst-plugins-meta:0.10[ffmpeg] |
117 |
+ ) |
118 |
+ x11-libs/libX11 |
119 |
+ x11-libs/libXcomposite |
120 |
+ x11-libs/libXdamage |
121 |
+ x11-libs/libXext |
122 |
+ x11-libs/libXfixes |
123 |
+ x11-libs/libXrender |
124 |
+ x11-libs/libXt |
125 |
+ system-cairo? ( >=x11-libs/cairo-1.12[X,xcb] >=x11-libs/pixman-0.19.2 ) |
126 |
+ system-icu? ( >=dev-libs/icu-51.1:= ) |
127 |
+ system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
128 |
+ system-libevent? ( =dev-libs/libevent-2.0* ) |
129 |
+ system-sqlite? ( >=dev-db/sqlite-3.9.1:3[secure-delete,debug=] ) |
130 |
+ system-libvpx? ( >=media-libs/libvpx-1.3.0:0=[postproc] ) |
131 |
+" |
132 |
+ |
133 |
+if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
134 |
+ if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then |
135 |
+ IUSE+=" +gtk3" |
136 |
+ else |
137 |
+ IUSE+=" gtk3" |
138 |
+ fi |
139 |
+ RDEPEND+=" |
140 |
+ gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" |
141 |
+fi |
142 |
+if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then |
143 |
+ if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then |
144 |
+ IUSE+=" +wifi" |
145 |
+ else |
146 |
+ IUSE+=" wifi" |
147 |
+ fi |
148 |
+ RDEPEND+=" |
149 |
+ wifi? ( |
150 |
+ kernel_linux? ( >=sys-apps/dbus-0.60 |
151 |
+ >=dev-libs/dbus-glib-0.72 |
152 |
+ net-misc/networkmanager ) |
153 |
+ )" |
154 |
+fi |
155 |
+if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then |
156 |
+ if [[ ${MOZCONFIG_OPTIONAL_JIT} = "enabled" ]]; then |
157 |
+ IUSE+=" +jit" |
158 |
+ else |
159 |
+ IUSE+=" jit" |
160 |
+ fi |
161 |
+fi |
162 |
+ |
163 |
+DEPEND="app-arch/zip |
164 |
+ app-arch/unzip |
165 |
+ >=sys-devel/binutils-2.16.1 |
166 |
+ ${RDEPEND}" |
167 |
+ |
168 |
+RDEPEND+=" |
169 |
+ selinux? ( sec-policy/selinux-mozilla )" |
170 |
+ |
171 |
+# only one of gstreamer and gstreamer-0 can be enabled at a time, so set REQUIRED_USE to signify this |
172 |
+REQUIRED_USE="?? ( gstreamer gstreamer-0 )" |
173 |
+ |
174 |
+# @FUNCTION: mozconfig_config |
175 |
+# @DESCRIPTION: |
176 |
+# Set common configure options for mozilla packages. |
177 |
+# Call this within src_configure() phase, after mozconfig_init |
178 |
+# |
179 |
+# Example: |
180 |
+# |
181 |
+# inherit mozconfig-v5.33 |
182 |
+# |
183 |
+# src_configure() { |
184 |
+# mozconfig_init |
185 |
+# mozconfig_config |
186 |
+# # ... misc ebuild-unique settings via calls to |
187 |
+# # ... mozconfig_{annotate,use_with,use_enable} |
188 |
+# mozconfig_final |
189 |
+# } |
190 |
+ |
191 |
+mozconfig_config() { |
192 |
+ # Migrated from mozcoreconf-2 |
193 |
+ mozconfig_annotate 'system_libs' \ |
194 |
+ --with-system-zlib \ |
195 |
+ --enable-pango \ |
196 |
+ --enable-svg \ |
197 |
+ --with-system-bz2 |
198 |
+ |
199 |
+ if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
200 |
+ mozconfig_annotate 'gtk3 use flag' --enable-default-toolkit=$(usex gtk3 cairo-gtk3 cairo-gtk2) |
201 |
+ else |
202 |
+ mozconfig_annotate '' --enable-default-toolkit=cairo-gtk2 |
203 |
+ fi |
204 |
+ |
205 |
+ if has bindist ${IUSE}; then |
206 |
+ mozconfig_use_enable !bindist official-branding |
207 |
+ if [[ ${PN} == firefox ]] && use bindist ; then |
208 |
+ mozconfig_annotate '' --with-branding=browser/branding/aurora |
209 |
+ fi |
210 |
+ fi |
211 |
+ |
212 |
+ mozconfig_use_enable debug |
213 |
+ mozconfig_use_enable debug tests |
214 |
+ |
215 |
+ if ! use debug ; then |
216 |
+ mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols |
217 |
+ else |
218 |
+ mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols |
219 |
+ fi |
220 |
+ |
221 |
+ mozconfig_use_enable startup-notification |
222 |
+ |
223 |
+ if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then |
224 |
+ # wifi pulls in dbus so manage both here |
225 |
+ mozconfig_use_enable wifi necko-wifi |
226 |
+ if use kernel_linux && use wifi && ! use dbus; then |
227 |
+ echo "Enabling dbus support due to wifi request" |
228 |
+ mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus |
229 |
+ else |
230 |
+ mozconfig_use_enable dbus |
231 |
+ fi |
232 |
+ else |
233 |
+ mozconfig_use_enable dbus |
234 |
+ mozconfig_annotate 'disabled' --disable-necko-wifi |
235 |
+ fi |
236 |
+ |
237 |
+ # These are forced-on for webm support |
238 |
+ mozconfig_annotate 'required' --enable-ogg |
239 |
+ mozconfig_annotate 'required' --enable-wave |
240 |
+ |
241 |
+ if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then |
242 |
+ mozconfig_use_enable jit ion |
243 |
+ fi |
244 |
+ |
245 |
+ # These are enabled by default in all mozilla applications |
246 |
+ mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr |
247 |
+ mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr |
248 |
+ mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir) |
249 |
+ if use system-libevent; then |
250 |
+ mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr |
251 |
+ fi |
252 |
+ mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
253 |
+ mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
254 |
+ mozconfig_annotate 'Gentoo default' --enable-system-hunspell |
255 |
+ mozconfig_annotate '' --disable-gnomeui |
256 |
+ mozconfig_annotate '' --enable-gio |
257 |
+ mozconfig_annotate '' --disable-crashreporter |
258 |
+ mozconfig_annotate 'Gentoo default' --with-system-png |
259 |
+ mozconfig_annotate '' --enable-system-ffi |
260 |
+ mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold |
261 |
+ mozconfig_annotate 'Gentoo default' --disable-skia |
262 |
+ mozconfig_annotate '' --disable-gconf |
263 |
+ |
264 |
+ # Use jemalloc unless libc is not glibc >= 2.4 |
265 |
+ # at this time the minimum glibc in the tree is 2.9 so we should be safe. |
266 |
+ if use elibc_glibc && use jemalloc3; then |
267 |
+ # We must force-enable jemalloc 3 via .mozconfig |
268 |
+ echo "export MOZ_JEMALLOC3=1" >> "${S}"/.mozconfig || die |
269 |
+ mozconfig_annotate '' --enable-jemalloc |
270 |
+ mozconfig_annotate '' --enable-replace-malloc |
271 |
+ fi |
272 |
+ |
273 |
+ mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" |
274 |
+ mozconfig_annotate '' --build="${CTARGET:-${CHOST}}" |
275 |
+ |
276 |
+ if use gstreamer ; then |
277 |
+ mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0 |
278 |
+ elif use gstreamer-0 ; then |
279 |
+ mozconfig_annotate '+gstreamer-0' --enable-gstreamer=0.10 |
280 |
+ else |
281 |
+ mozconfig_annotate '' --disable-gstreamer |
282 |
+ fi |
283 |
+ mozconfig_use_enable pulseaudio |
284 |
+ |
285 |
+ mozconfig_use_enable system-cairo |
286 |
+ mozconfig_use_enable system-sqlite |
287 |
+ mozconfig_use_with system-jpeg |
288 |
+ mozconfig_use_with system-icu |
289 |
+ mozconfig_use_with system-icu intl-api |
290 |
+ mozconfig_use_with system-libvpx |
291 |
+ |
292 |
+ # Modifications to better support ARM, bug 553364 |
293 |
+ if use neon ; then |
294 |
+ mozconfig_annotate '' --with-fpu=neon |
295 |
+ mozconfig_annotate '' --with-thumb=yes |
296 |
+ mozconfig_annotate '' --with-thumb-interwork=no |
297 |
+ fi |
298 |
+ if [[ ${CHOST} == armv* ]] ; then |
299 |
+ mozconfig_annotate '' --with-float-abi=hard |
300 |
+ mozconfig_annotate '' --enable-skia |
301 |
+ |
302 |
+ if ! use system-libvpx ; then |
303 |
+ sed -i -e "s|softfp|hard|" \ |
304 |
+ "${S}"/media/libvpx/moz.build |
305 |
+ fi |
306 |
+ fi |
307 |
+} |
308 |
|
309 |
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest |
310 |
index 8f5a83e..9b62bcf 100644 |
311 |
--- a/www-client/firefox/Manifest |
312 |
+++ b/www-client/firefox/Manifest |
313 |
@@ -79,3 +79,5 @@ DIST firefox-43.0-xh.xpi 458719 SHA256 f48562863c31cd8ec05cb0e79323fbd4b0c8426e7 |
314 |
DIST firefox-43.0-zh-CN.xpi 493639 SHA256 73c74a35f7862f6e583d2fd9edb6fcd3e565c564977897896761e2ba153e1b54 SHA512 1298691174e95bd79dfa24602dec4d7cb5228e9544bdf404215ac4bbee1de7230b6c9989cf8305956d23136c10470a0779233124b3f3b5ffc695230bf43301d0 WHIRLPOOL a6674405f7ec161391b7876d8f1168db2719d653411dfdd17c2373560dee243914565343c3d3d48587b7b4d07dd3edc9443385a2d5fe78e2b454961c068f6e60 |
315 |
DIST firefox-43.0-zh-TW.xpi 485317 SHA256 488fb84380b3729e2c78c2bb5c9d4046988f4c457727ac19c9458f92f1fe72fb SHA512 e5a32805e3e68b54b3ebe19f5b1dc9a606df232cdc7df301a57d6ba39ab6d69347c27480c2162e30cbdcf1601364c47f3811398751ab4f63f94763772212bbbd WHIRLPOOL 2273baf3e84b7f390a9c121a125902dcf1d625ebf4b96451f78642f16dd2e62b5abf4cda70a66daaec25d68e15e5bc1cd0cb460cde26f18c17008febf6198396 |
316 |
DIST firefox-43.0.source.tar.xz 175414296 SHA256 a5b16741dcce9344ca71e39e0efb0e7e1336ca5160cb9b6b12f8985f402d8fea SHA512 3ca37428d1b02ba2609ec526e86ab96563b403a03efde8439cbb4acdb282b5970ccb6a14266483c839389d59e07f6b0297314890ee04a669ba2d4b10bc4cb738 WHIRLPOOL 14d8d90452bf6d0e3965f0c8050d0dd4771f1a00a6cc68f6ae9e26334e5a2c5cad9fae92d51f0f677b07aea3120e75686655cbd5c6bcf7f0b5f84d9a1ca4553f |
317 |
+DIST firefox-44.0-patches-0.1.tar.xz 12308 SHA256 056bf890c8e17b0ffbbb9786a0903cfb7bf250390c6b3663b20dac9e1646c404 SHA512 9d3d62c157e117efadf897f849cb85102676e0549ca9fa6b84daa2be8e597ba90121c3b1f6a8e80e0d187a87d5ad746cd66b5eb074846d8637866c89f30924a4 WHIRLPOOL f9445f900f6042df8e36bb286553c4196f67e254c3eaf55195fd26f6c3e20edba7634d99d2259cbcc2645cd7bee57ce8ef20566c569847d51b48a03d5dbee893 |
318 |
+DIST firefox-44.0b4.source.tar.xz 182407048 SHA256 6b5b2ebcb94618747281a24fc3c6504b436bc3413283b77935484730bc21b9c5 SHA512 c9def31db89fc40295303a883b8c69bc62b796ed3604192e8945288b3edc1e49f93bea07f7c602992ad0a956cc3cf59e55ea5f3cb54b4faada0bbb7df0487e28 WHIRLPOOL 3f75dc7e87d6aa92a256b7acf1ef4e4326db7cf87c9f00db0765e65fb4e7bc19cd9b87bcefc291aed3b61796500506c4c005f00e1a248f3f52cd124dfb499913 |
319 |
|
320 |
diff --git a/www-client/firefox/firefox-44.0_beta4.ebuild b/www-client/firefox/firefox-44.0_beta4.ebuild |
321 |
new file mode 100644 |
322 |
index 0000000..50e7ce4 |
323 |
--- /dev/null |
324 |
+++ b/www-client/firefox/firefox-44.0_beta4.ebuild |
325 |
@@ -0,0 +1,393 @@ |
326 |
+# Copyright 1999-2015 Gentoo Foundation |
327 |
+# Distributed under the terms of the GNU General Public License v2 |
328 |
+# $Id$ |
329 |
+ |
330 |
+EAPI="5" |
331 |
+VIRTUALX_REQUIRED="pgo" |
332 |
+WANT_AUTOCONF="2.1" |
333 |
+MOZ_ESR="" |
334 |
+ |
335 |
+# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
336 |
+# No official support as of fetch time |
337 |
+# csb |
338 |
+MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs cy da de el en |
339 |
+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 |
340 |
+gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko lt lv mai mk ml mr |
341 |
+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 |
342 |
+th tr uk vi xh zh-CN zh-TW ) |
343 |
+ |
344 |
+# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
345 |
+MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
346 |
+MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
347 |
+MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
348 |
+ |
349 |
+if [[ ${MOZ_ESR} == 1 ]]; then |
350 |
+ # ESR releases have slightly version numbers |
351 |
+ MOZ_PV="${MOZ_PV}esr" |
352 |
+fi |
353 |
+ |
354 |
+# Patch version |
355 |
+PATCH="${PN}-44.0-patches-0.1" |
356 |
+MOZ_HTTP_URI="http://archive.mozilla.org/pub/${PN}/releases" |
357 |
+ |
358 |
+MOZCONFIG_OPTIONAL_GTK3=1 |
359 |
+MOZCONFIG_OPTIONAL_WIFI=1 |
360 |
+MOZCONFIG_OPTIONAL_JIT="enabled" |
361 |
+ |
362 |
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.44 multilib pax-utils fdo-mime autotools virtualx mozlinguas |
363 |
+ |
364 |
+DESCRIPTION="Firefox Web Browser" |
365 |
+HOMEPAGE="http://www.mozilla.com/firefox" |
366 |
+ |
367 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
368 |
+ |
369 |
+SLOT="0" |
370 |
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
371 |
+IUSE="bindist egl hardened +hwaccel +minimal pgo selinux +gmp-autoupdate test" |
372 |
+RESTRICT="!bindist? ( bindist )" |
373 |
+ |
374 |
+# More URIs appended below... |
375 |
+SRC_URI="${SRC_URI} |
376 |
+ https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz |
377 |
+ https://dev.gentoo.org/~axs/mozilla/patchsets/${PATCH}.tar.xz |
378 |
+ https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz" |
379 |
+ |
380 |
+ASM_DEPEND=">=dev-lang/yasm-1.1" |
381 |
+ |
382 |
+# Mesa 7.10 needed for WebGL + bugfixes |
383 |
+RDEPEND=" |
384 |
+ >=dev-libs/nss-3.20.1 |
385 |
+ >=dev-libs/nspr-4.10.10-r1 |
386 |
+ selinux? ( sec-policy/selinux-mozilla )" |
387 |
+ |
388 |
+DEPEND="${RDEPEND} |
389 |
+ pgo? ( |
390 |
+ >=sys-devel/gcc-4.5 ) |
391 |
+ amd64? ( ${ASM_DEPEND} |
392 |
+ virtual/opengl ) |
393 |
+ x86? ( ${ASM_DEPEND} |
394 |
+ virtual/opengl )" |
395 |
+ |
396 |
+# No source releases for alpha|beta |
397 |
+if [[ ${PV} =~ alpha ]]; then |
398 |
+ CHANGESET="8a3042764de7" |
399 |
+ SRC_URI="${SRC_URI} |
400 |
+ https://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.xz" |
401 |
+ S="${WORKDIR}/mozilla-aurora-${CHANGESET}" |
402 |
+else |
403 |
+ S="${WORKDIR}/firefox-${MOZ_PV}" |
404 |
+ SRC_URI="${SRC_URI} |
405 |
+ ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz" |
406 |
+fi |
407 |
+ |
408 |
+QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
409 |
+ |
410 |
+BUILD_OBJ_DIR="${S}/ff" |
411 |
+ |
412 |
+pkg_setup() { |
413 |
+ moz_pkgsetup |
414 |
+ |
415 |
+ # Avoid PGO profiling problems due to enviroment leakage |
416 |
+ # These should *always* be cleaned up anyway |
417 |
+ unset DBUS_SESSION_BUS_ADDRESS \ |
418 |
+ DISPLAY \ |
419 |
+ ORBIT_SOCKETDIR \ |
420 |
+ SESSION_MANAGER \ |
421 |
+ XDG_SESSION_COOKIE \ |
422 |
+ XAUTHORITY |
423 |
+ |
424 |
+ if ! use bindist; then |
425 |
+ einfo |
426 |
+ elog "You are enabling official branding. You may not redistribute this build" |
427 |
+ elog "to any users on your network or the internet. Doing so puts yourself into" |
428 |
+ elog "a legal problem with Mozilla Foundation" |
429 |
+ elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
430 |
+ fi |
431 |
+ |
432 |
+ if use pgo; then |
433 |
+ einfo |
434 |
+ ewarn "You will do a double build for profile guided optimization." |
435 |
+ ewarn "This will result in your build taking at least twice as long as before." |
436 |
+ fi |
437 |
+} |
438 |
+ |
439 |
+pkg_pretend() { |
440 |
+ # Ensure we have enough disk space to compile |
441 |
+ if use pgo || use debug || use test ; then |
442 |
+ CHECKREQS_DISK_BUILD="8G" |
443 |
+ else |
444 |
+ CHECKREQS_DISK_BUILD="4G" |
445 |
+ fi |
446 |
+ check-reqs_pkg_setup |
447 |
+} |
448 |
+ |
449 |
+src_unpack() { |
450 |
+ unpack ${A} |
451 |
+ |
452 |
+ # Unpack language packs |
453 |
+ mozlinguas_src_unpack |
454 |
+} |
455 |
+ |
456 |
+src_prepare() { |
457 |
+ # Apply our patches |
458 |
+ EPATCH_SUFFIX="patch" \ |
459 |
+ EPATCH_FORCE="yes" \ |
460 |
+ epatch "${WORKDIR}/firefox" |
461 |
+ |
462 |
+ # Allow user to apply any additional patches without modifing ebuild |
463 |
+ epatch_user |
464 |
+ |
465 |
+ # Enable gnomebreakpad |
466 |
+ if use debug ; then |
467 |
+ sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
468 |
+ "${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
469 |
+ fi |
470 |
+ |
471 |
+ # Ensure that our plugins dir is enabled as default |
472 |
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
473 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
474 |
+ sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
475 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
476 |
+ |
477 |
+ # Fix sandbox violations during make clean, bug 372817 |
478 |
+ sed -e "s:\(/no-such-file\):${T}\1:g" \ |
479 |
+ -i "${S}"/config/rules.mk \ |
480 |
+ -i "${S}"/nsprpub/configure{.in,} \ |
481 |
+ || die |
482 |
+ |
483 |
+ # Don't exit with error when some libs are missing which we have in |
484 |
+ # system. |
485 |
+ sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
486 |
+ -i "${S}"/browser/installer/Makefile.in || die |
487 |
+ |
488 |
+ # Don't error out when there's no files to be removed: |
489 |
+ sed 's@\(xargs rm\)$@\1 -f@' \ |
490 |
+ -i "${S}"/toolkit/mozapps/installer/packager.mk || die |
491 |
+ |
492 |
+ # Keep codebase the same even if not using official branding |
493 |
+ sed '/^MOZ_DEV_EDITION=1/d' \ |
494 |
+ -i "${S}"/browser/branding/aurora/configure.sh || die |
495 |
+ |
496 |
+ eautoreconf |
497 |
+ |
498 |
+ # Must run autoconf in js/src |
499 |
+ cd "${S}"/js/src || die |
500 |
+ eautoconf |
501 |
+ |
502 |
+ # Need to update jemalloc's configure |
503 |
+ cd "${S}"/memory/jemalloc/src || die |
504 |
+ WANT_AUTOCONF= eautoconf |
505 |
+} |
506 |
+ |
507 |
+src_configure() { |
508 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
509 |
+ MEXTENSIONS="default" |
510 |
+ # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) |
511 |
+ # Note: These are for Gentoo Linux use ONLY. For your own distribution, please |
512 |
+ # get your own set of keys. |
513 |
+ _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
514 |
+ |
515 |
+ #################################### |
516 |
+ # |
517 |
+ # mozconfig, CFLAGS and CXXFLAGS setup |
518 |
+ # |
519 |
+ #################################### |
520 |
+ |
521 |
+ mozconfig_init |
522 |
+ mozconfig_config |
523 |
+ |
524 |
+ # We want rpath support to prevent unneeded hacks on different libc variants |
525 |
+ append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}" |
526 |
+ |
527 |
+ # It doesn't compile on alpha without this LDFLAGS |
528 |
+ use alpha && append-ldflags "-Wl,--no-relax" |
529 |
+ |
530 |
+ # Add full relro support for hardened |
531 |
+ use hardened && append-ldflags "-Wl,-z,relro,-z,now" |
532 |
+ |
533 |
+ use egl && mozconfig_annotate 'Enable EGL as GL provider' --with-gl-provider=EGL |
534 |
+ |
535 |
+ # Setup api key for location services |
536 |
+ echo -n "${_google_api_key}" > "${S}"/google-api-key |
537 |
+ mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key" |
538 |
+ |
539 |
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
540 |
+ mozconfig_annotate '' --disable-mailnews |
541 |
+ |
542 |
+ # Other ff-specific settings |
543 |
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
544 |
+ |
545 |
+ # Allow for a proper pgo build |
546 |
+ if use pgo; then |
547 |
+ echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
548 |
+ fi |
549 |
+ |
550 |
+ echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig |
551 |
+ |
552 |
+ # Finalize and report settings |
553 |
+ mozconfig_final |
554 |
+ |
555 |
+ if [[ $(gcc-major-version) -lt 4 ]]; then |
556 |
+ append-cxxflags -fno-stack-protector |
557 |
+ fi |
558 |
+ |
559 |
+ # workaround for funky/broken upstream configure... |
560 |
+ emake -f client.mk configure |
561 |
+} |
562 |
+ |
563 |
+src_compile() { |
564 |
+ if use pgo; then |
565 |
+ addpredict /root |
566 |
+ addpredict /etc/gconf |
567 |
+ # Reset and cleanup environment variables used by GNOME/XDG |
568 |
+ gnome2_environment_reset |
569 |
+ |
570 |
+ # Firefox tries to use dri stuff when it's run, see bug 380283 |
571 |
+ shopt -s nullglob |
572 |
+ cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') |
573 |
+ if test -z "${cards}"; then |
574 |
+ cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') |
575 |
+ if test -n "${cards}"; then |
576 |
+ # Binary drivers seem to cause access violations anyway, so |
577 |
+ # let's use indirect rendering so that the device files aren't |
578 |
+ # touched at all. See bug 394715. |
579 |
+ export LIBGL_ALWAYS_INDIRECT=1 |
580 |
+ fi |
581 |
+ fi |
582 |
+ shopt -u nullglob |
583 |
+ addpredict "${cards}" |
584 |
+ |
585 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
586 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
587 |
+ Xemake -f client.mk profiledbuild || die "Xemake failed" |
588 |
+ else |
589 |
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
590 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \ |
591 |
+ emake -f client.mk realbuild |
592 |
+ fi |
593 |
+ |
594 |
+} |
595 |
+ |
596 |
+src_install() { |
597 |
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
598 |
+ DICTPATH="\"${EPREFIX}/usr/share/myspell\"" |
599 |
+ |
600 |
+ cd "${BUILD_OBJ_DIR}" || die |
601 |
+ |
602 |
+ # Pax mark xpcshell for hardened support, only used for startupcache creation. |
603 |
+ pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell |
604 |
+ |
605 |
+ # Add our default prefs for firefox |
606 |
+ cp "${FILESDIR}"/gentoo-default-prefs.js-1 \ |
607 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
608 |
+ || die |
609 |
+ |
610 |
+ # Augment this with hwaccel prefs |
611 |
+ if use hwaccel ; then |
612 |
+ cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ |
613 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
614 |
+ || die |
615 |
+ fi |
616 |
+ |
617 |
+ # Set default path to search for dictionaries. |
618 |
+ echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ |
619 |
+ >> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
620 |
+ || die |
621 |
+ |
622 |
+ echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
623 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
624 |
+ || die |
625 |
+ |
626 |
+ local plugin |
627 |
+ use gmp-autoupdate || for plugin in \ |
628 |
+ gmp-gmpopenh264 ; do |
629 |
+ echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
630 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
631 |
+ || die |
632 |
+ done |
633 |
+ |
634 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
635 |
+ emake DESTDIR="${D}" install |
636 |
+ |
637 |
+ # Install language packs |
638 |
+ mozlinguas_src_install |
639 |
+ |
640 |
+ local size sizes icon_path icon name |
641 |
+ if use bindist; then |
642 |
+ sizes="16 32 48" |
643 |
+ icon_path="${S}/browser/branding/aurora" |
644 |
+ # Firefox's new rapid release cycle means no more codenames |
645 |
+ # Let's just stick with this one... |
646 |
+ icon="aurora" |
647 |
+ name="Aurora" |
648 |
+ |
649 |
+ # Override preferences to set the MOZ_DEV_EDITION defaults, since we |
650 |
+ # don't define MOZ_DEV_EDITION to avoid profile debaucles. |
651 |
+ # (source: browser/app/profile/firefox.js) |
652 |
+ cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <<PROFILE_EOF |
653 |
+pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/"); |
654 |
+sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@×××××××.org"); |
655 |
+sticky_pref("browser.devedition.theme.enabled", true); |
656 |
+sticky_pref("devtools.theme", "dark"); |
657 |
+PROFILE_EOF |
658 |
+ |
659 |
+ else |
660 |
+ sizes="16 22 24 32 256" |
661 |
+ icon_path="${S}/browser/branding/official" |
662 |
+ icon="${PN}" |
663 |
+ name="Mozilla Firefox" |
664 |
+ fi |
665 |
+ |
666 |
+ # Install icons and .desktop for menu entry |
667 |
+ for size in ${sizes}; do |
668 |
+ insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
669 |
+ newins "${icon_path}/default${size}.png" "${icon}.png" |
670 |
+ done |
671 |
+ # The 128x128 icon has a different name |
672 |
+ insinto "/usr/share/icons/hicolor/128x128/apps" |
673 |
+ newins "${icon_path}/mozicon128.png" "${icon}.png" |
674 |
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
675 |
+ newicon "${icon_path}/content/icon48.png" "${icon}.png" |
676 |
+ newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
677 |
+ sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
678 |
+ "${ED}/usr/share/applications/${PN}.desktop" || die |
679 |
+ |
680 |
+ # Add StartupNotify=true bug 237317 |
681 |
+ if use startup-notification ; then |
682 |
+ echo "StartupNotify=true"\ |
683 |
+ >> "${ED}/usr/share/applications/${PN}.desktop" \ |
684 |
+ || die |
685 |
+ fi |
686 |
+ |
687 |
+ # Required in order to use plugins and even run firefox on hardened. |
688 |
+ if use jit; then |
689 |
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container} |
690 |
+ else |
691 |
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container |
692 |
+ fi |
693 |
+ |
694 |
+ if use minimal; then |
695 |
+ rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \ |
696 |
+ || die "Failed to remove sdk and headers" |
697 |
+ fi |
698 |
+ |
699 |
+ # very ugly hack to make firefox not sigbus on sparc |
700 |
+ # FIXME: is this still needed?? |
701 |
+ use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
702 |
+ -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \ |
703 |
+ || die "sparc sed failed"; } |
704 |
+} |
705 |
+ |
706 |
+pkg_preinst() { |
707 |
+ gnome2_icon_savelist |
708 |
+} |
709 |
+ |
710 |
+pkg_postinst() { |
711 |
+ # Update mimedb for the new .desktop file |
712 |
+ fdo-mime_desktop_database_update |
713 |
+ gnome2_icon_cache_update |
714 |
+} |
715 |
+ |
716 |
+pkg_postrm() { |
717 |
+ gnome2_icon_cache_update |
718 |
+} |