1 |
commit: f1aeff2704810fe99e3c46390bc6a0767c8324e4 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 10 00:04:50 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 10 21:49:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1aeff27 |
7 |
|
8 |
www-client/firefox: update patch set |
9 |
|
10 |
- MOZ_ENABLE_WAYLAND environment variable can now be used to control |
11 |
wayland usage |
12 |
|
13 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
14 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
15 |
|
16 |
www-client/firefox/Manifest | 1 + |
17 |
www-client/firefox/firefox-65.0-r1.ebuild | 666 ++++++++++++++++++++++++++++++ |
18 |
2 files changed, 667 insertions(+) |
19 |
|
20 |
diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest |
21 |
index 9ca27940d07..1ff8de51e9b 100644 |
22 |
--- a/www-client/firefox/Manifest |
23 |
+++ b/www-client/firefox/Manifest |
24 |
@@ -253,6 +253,7 @@ DIST firefox-65.0-nn-NO.xpi 460163 BLAKE2B 00402edc07e45fba1b76d48d55516266009d1 |
25 |
DIST firefox-65.0-or.xpi 479085 BLAKE2B 4bc9e04d4afbe2ef2c40d162054cb01c060a01fa9b44344d8546cd882bf7236b6190bafd774f7f77daeaf662f42cb16c7b9cd70ab17b3955ef6bfc4aa89531a1 SHA512 04bbda20452496445054b161239292562f95f4e2b37be4199c38395e26faba6873bfd4d2065f516d95c4c8f1fdf7854db11d9cc81adea06c861f256cf521c01b |
26 |
DIST firefox-65.0-pa-IN.xpi 510889 BLAKE2B b25427f9f2e3d57344f6af533a9cf831487728a50ec63591d6f5d1d684fac34f2ff0c025b04580d7c1c31e8e4011a5c5b857c22be20db9729a024e268e0ceb6c SHA512 ce8364a8534d3f5002a0a6075623cec39837e7df76d34e4cdcac5c560242926caae7385be20a2f73d1b1872292f3e66af8dc13c3e66af8b1a4ba3adc796a5720 |
27 |
DIST firefox-65.0-patches-01.tar.xz 13484 BLAKE2B 756d9e27a8df750dea4149ed8bb7821a05ccd3d4f2ccebe405cb704c0663e89643046153097089ba670fd0e4fbd9331ad1360960594c66ac82a06243bf35894d SHA512 bd93f5e00c7e637c1b5395812172e826034b0c71b8285b1daaa9992ec29e26c8a672bf3c16fbc3768f87450612b6cb10f51c201d405881bde40766ed6835c3e1 |
28 |
+DIST firefox-65.0-patches-02.tar.xz 14432 BLAKE2B 8c363071e04e2aad4d60ab9cb84f1a421e9c88c7679446ad6481f004939d79a54b53d30905576db438f975728266aac78391e9ee42c249275a104e83b58e3c6c SHA512 81f3fa5072791a39000bbe107b1759fd459c50606a5f9e649816152fd9f8867e0b0e24462ef96df9df901597cbe9cd3cfd8142685391e365cc6d7aeab18678a5 |
29 |
DIST firefox-65.0-pl.xpi 378829 BLAKE2B cf1d47d896011ac1d54add46c4c64e2051419a21fd779dc12ef15a104aade07b55ac1c8c4f2a5c22b47f61bb8fc065941b3a3a7dac43f8a603d6f434634ead03 SHA512 af8ceb2e5e488b79eec9335744702291392e190cc9b528e45587276729483d1b5acfea9ce39a7422c21ebd25689c80e111394476f8540cad5bec73bece0118c9 |
30 |
DIST firefox-65.0-pt-BR.xpi 463443 BLAKE2B a71f1900f432f3bd815ff85e03578228c096868995253c19aad2532d675a03d0e45764dc197093ceb3c27de025e2ce71c3d27ae8a410a8d6b3bafee6d4eb3a47 SHA512 983629b945431e8b2ae2e2a564f873bf0805bef1f27fccc609ceb16c5ef28be4aa9335a5c11d65b2970d02c7e4188e84a158a9daa06ef539ebe686bf870bde87 |
31 |
DIST firefox-65.0-pt-PT.xpi 475344 BLAKE2B 9d57896255fd4d6048732f8e06f15eab8ccbd3ae6c8a7dd1fcdc599692b77cbb373d9996e1acf4bccbc4632a6e2a356330d0a795d55b8dad46d524cf202870b6 SHA512 8e4c49c65e71102c98ba38fd6c8cad53f66e256f4de1750cf2d68d9145a8633878c96504250370538e5d231364dd510ba8f05042f78b0c8f231017b879ad3d13 |
32 |
|
33 |
diff --git a/www-client/firefox/firefox-65.0-r1.ebuild b/www-client/firefox/firefox-65.0-r1.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..68ba5674066 |
36 |
--- /dev/null |
37 |
+++ b/www-client/firefox/firefox-65.0-r1.ebuild |
38 |
@@ -0,0 +1,666 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI="6" |
43 |
+VIRTUALX_REQUIRED="pgo" |
44 |
+WANT_AUTOCONF="2.1" |
45 |
+MOZ_ESR="" |
46 |
+ |
47 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
48 |
+PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)' |
49 |
+ |
50 |
+# This list can be updated with scripts/get_langs.sh from the mozilla overlay |
51 |
+MOZ_LANGS=( ach af an ar as ast az bg bn-BD bn-IN br bs ca cak cs cy da de dsb |
52 |
+el en en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy-NL ga-IE |
53 |
+gd gl gn gu-IN he hi-IN hr hsb hu hy-AM id is it ja ka kab kk km kn ko lij lt lv |
54 |
+mai mk ml mr ms nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq |
55 |
+sr sv-SE ta te th tr uk uz vi xh zh-CN zh-TW ) |
56 |
+ |
57 |
+# Convert the ebuild version to the upstream mozilla version, used by mozlinguas |
58 |
+MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI |
59 |
+MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI |
60 |
+MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI |
61 |
+ |
62 |
+if [[ ${MOZ_ESR} == 1 ]] ; then |
63 |
+ # ESR releases have slightly different version numbers |
64 |
+ MOZ_PV="${MOZ_PV}esr" |
65 |
+fi |
66 |
+ |
67 |
+# Patch version |
68 |
+PATCH="${PN}-65.0-patches-02" |
69 |
+MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" |
70 |
+ |
71 |
+inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils llvm \ |
72 |
+ mozcoreconf-v6 pax-utils xdg-utils autotools mozlinguas-v2 \ |
73 |
+ virtualx |
74 |
+ |
75 |
+DESCRIPTION="Firefox Web Browser" |
76 |
+HOMEPAGE="https://www.mozilla.com/firefox" |
77 |
+ |
78 |
+KEYWORDS="~amd64 ~x86" |
79 |
+ |
80 |
+SLOT="0" |
81 |
+LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
82 |
+IUSE="bindist clang dbus debug eme-free geckodriver +gmp-autoupdate hardened hwaccel |
83 |
+ jack lto neon pgo pulseaudio +screenshot selinux startup-notification |
84 |
+ +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-sqlite |
85 |
+ +system-libvpx +system-webp test wayland wifi" |
86 |
+RESTRICT="!bindist? ( bindist )" |
87 |
+ |
88 |
+PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c,whissi}/mozilla/patchsets/${PATCH}.tar.xz ) |
89 |
+SRC_URI="${SRC_URI} |
90 |
+ ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz |
91 |
+ ${PATCH_URIS[@]}" |
92 |
+ |
93 |
+CDEPEND=" |
94 |
+ >=dev-libs/nss-3.41 |
95 |
+ >=dev-libs/nspr-4.19 |
96 |
+ >=app-text/hunspell-1.5.4:* |
97 |
+ dev-libs/atk |
98 |
+ dev-libs/expat |
99 |
+ >=x11-libs/cairo-1.10[X] |
100 |
+ >=x11-libs/gtk+-2.18:2 |
101 |
+ >=x11-libs/gtk+-3.4.0:3 |
102 |
+ x11-libs/gdk-pixbuf |
103 |
+ >=x11-libs/pango-1.22.0 |
104 |
+ >=media-libs/libpng-1.6.35:0=[apng] |
105 |
+ >=media-libs/mesa-10.2:* |
106 |
+ media-libs/fontconfig |
107 |
+ >=media-libs/freetype-2.4.10 |
108 |
+ kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) |
109 |
+ virtual/freedesktop-icon-theme |
110 |
+ dbus? ( >=sys-apps/dbus-0.60 |
111 |
+ >=dev-libs/dbus-glib-0.72 ) |
112 |
+ startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
113 |
+ >=x11-libs/pixman-0.19.2 |
114 |
+ >=dev-libs/glib-2.26:2 |
115 |
+ >=sys-libs/zlib-1.2.3 |
116 |
+ >=virtual/libffi-3.0.10:= |
117 |
+ virtual/ffmpeg |
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-harfbuzz? ( >=media-libs/harfbuzz-1.4.2:0= >=media-gfx/graphite2-1.3.9-r1 ) |
126 |
+ system-icu? ( >=dev-libs/icu-60.2:= ) |
127 |
+ system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
128 |
+ system-libevent? ( >=dev-libs/libevent-2.0:0= ) |
129 |
+ system-libvpx? ( >=media-libs/libvpx-1.7.0:0=[postproc] ) |
130 |
+ system-sqlite? ( >=dev-db/sqlite-3.25.3:3[secure-delete,debug=] ) |
131 |
+ system-webp? ( >=media-libs/libwebp-1.0.1:0= ) |
132 |
+ wifi? ( kernel_linux? ( >=sys-apps/dbus-0.60 |
133 |
+ >=dev-libs/dbus-glib-0.72 |
134 |
+ net-misc/networkmanager ) ) |
135 |
+ jack? ( virtual/jack ) |
136 |
+ selinux? ( sec-policy/selinux-mozilla )" |
137 |
+ |
138 |
+RDEPEND="${CDEPEND} |
139 |
+ jack? ( virtual/jack ) |
140 |
+ pulseaudio? ( || ( media-sound/pulseaudio |
141 |
+ >=media-sound/apulse-0.1.9 ) ) |
142 |
+ selinux? ( sec-policy/selinux-mozilla )" |
143 |
+ |
144 |
+DEPEND="${CDEPEND} |
145 |
+ app-arch/zip |
146 |
+ app-arch/unzip |
147 |
+ >=dev-util/cbindgen-0.6.7 |
148 |
+ >=net-libs/nodejs-8.11.0 |
149 |
+ >=sys-devel/binutils-2.30 |
150 |
+ sys-apps/findutils |
151 |
+ >=sys-devel/llvm-4.0.1 |
152 |
+ >=sys-devel/clang-4.0.1 |
153 |
+ clang? ( |
154 |
+ >=sys-devel/llvm-4.0.1[gold] |
155 |
+ >=sys-devel/lld-4.0.1 |
156 |
+ ) |
157 |
+ pulseaudio? ( media-sound/pulseaudio ) |
158 |
+ >=virtual/cargo-1.30.0 |
159 |
+ >=virtual/rust-1.30.0 |
160 |
+ wayland? ( >=x11-libs/gtk+-3.11:3[wayland] ) |
161 |
+ amd64? ( >=dev-lang/yasm-1.1 virtual/opengl ) |
162 |
+ x86? ( >=dev-lang/yasm-1.1 virtual/opengl )" |
163 |
+ |
164 |
+REQUIRED_USE="wifi? ( dbus ) |
165 |
+ pgo? ( lto )" |
166 |
+ |
167 |
+S="${WORKDIR}/firefox-${PV%_*}" |
168 |
+ |
169 |
+QA_PRESTRIPPED="usr/lib*/${PN}/firefox" |
170 |
+ |
171 |
+BUILD_OBJ_DIR="${S}/ff" |
172 |
+ |
173 |
+# allow GMP_PLUGIN_LIST to be set in an eclass or |
174 |
+# overridden in the enviromnent (advanced hackers only) |
175 |
+if [[ -z $GMP_PLUGIN_LIST ]] ; then |
176 |
+ GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) |
177 |
+fi |
178 |
+ |
179 |
+llvm_check_deps() { |
180 |
+ has_version "sys-devel/clang:${LLVM_SLOT}" |
181 |
+} |
182 |
+ |
183 |
+pkg_setup() { |
184 |
+ moz_pkgsetup |
185 |
+ |
186 |
+ # Avoid PGO profiling problems due to enviroment leakage |
187 |
+ # These should *always* be cleaned up anyway |
188 |
+ unset DBUS_SESSION_BUS_ADDRESS \ |
189 |
+ DISPLAY \ |
190 |
+ ORBIT_SOCKETDIR \ |
191 |
+ SESSION_MANAGER \ |
192 |
+ XDG_SESSION_COOKIE \ |
193 |
+ XAUTHORITY |
194 |
+ |
195 |
+ if ! use bindist ; then |
196 |
+ einfo |
197 |
+ elog "You are enabling official branding. You may not redistribute this build" |
198 |
+ elog "to any users on your network or the internet. Doing so puts yourself into" |
199 |
+ elog "a legal problem with Mozilla Foundation." |
200 |
+ elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag." |
201 |
+ fi |
202 |
+ |
203 |
+ addpredict /proc/self/oom_score_adj |
204 |
+ |
205 |
+ llvm_pkg_setup |
206 |
+} |
207 |
+ |
208 |
+pkg_pretend() { |
209 |
+ # Ensure we have enough disk space to compile |
210 |
+ if use pgo || use debug || use test ; then |
211 |
+ CHECKREQS_DISK_BUILD="8G" |
212 |
+ else |
213 |
+ CHECKREQS_DISK_BUILD="4G" |
214 |
+ fi |
215 |
+ |
216 |
+ check-reqs_pkg_setup |
217 |
+} |
218 |
+ |
219 |
+src_unpack() { |
220 |
+ unpack ${A} |
221 |
+ |
222 |
+ # Unpack language packs |
223 |
+ mozlinguas_src_unpack |
224 |
+} |
225 |
+ |
226 |
+src_prepare() { |
227 |
+ eapply "${WORKDIR}/firefox" |
228 |
+ |
229 |
+ # Allow user to apply any additional patches without modifing ebuild |
230 |
+ eapply_user |
231 |
+ |
232 |
+ # Enable gnomebreakpad |
233 |
+ if use debug ; then |
234 |
+ sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
235 |
+ "${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
236 |
+ fi |
237 |
+ |
238 |
+ # Drop -Wl,--as-needed related manipulation for ia64 as it causes ld sefgaults, bug #582432 |
239 |
+ if use ia64 ; then |
240 |
+ sed -i \ |
241 |
+ -e '/^OS_LIBS += no_as_needed/d' \ |
242 |
+ -e '/^OS_LIBS += as_needed/d' \ |
243 |
+ "${S}"/widget/gtk/mozgtk/gtk2/moz.build \ |
244 |
+ "${S}"/widget/gtk/mozgtk/gtk3/moz.build \ |
245 |
+ || die "sed failed to drop --as-needed for ia64" |
246 |
+ fi |
247 |
+ |
248 |
+ # Ensure that our plugins dir is enabled as default |
249 |
+ sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ |
250 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" |
251 |
+ sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ |
252 |
+ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" |
253 |
+ |
254 |
+ # Fix sandbox violations during make clean, bug 372817 |
255 |
+ sed -e "s:\(/no-such-file\):${T}\1:g" \ |
256 |
+ -i "${S}"/config/rules.mk \ |
257 |
+ -i "${S}"/nsprpub/configure{.in,} \ |
258 |
+ || die |
259 |
+ |
260 |
+ # Don't exit with error when some libs are missing which we have in |
261 |
+ # system. |
262 |
+ sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ |
263 |
+ -i "${S}"/browser/installer/Makefile.in || die |
264 |
+ |
265 |
+ # Don't error out when there's no files to be removed: |
266 |
+ sed 's@\(xargs rm\)$@\1 -f@' \ |
267 |
+ -i "${S}"/toolkit/mozapps/installer/packager.mk || die |
268 |
+ |
269 |
+ # Keep codebase the same even if not using official branding |
270 |
+ sed '/^MOZ_DEV_EDITION=1/d' \ |
271 |
+ -i "${S}"/browser/branding/aurora/configure.sh || die |
272 |
+ |
273 |
+ # rustfmt, a tool to format Rust code, is optional and not required to build Firefox. |
274 |
+ # However, when available, an unsupported version can cause problems, bug #669548 |
275 |
+ sed -i -e "s@check_prog('RUSTFMT', add_rustup_path('rustfmt')@check_prog('RUSTFMT', add_rustup_path('rustfmt_do_not_use')@" \ |
276 |
+ "${S}"/build/moz.configure/rust.configure || die |
277 |
+ |
278 |
+ # Autotools configure is now called old-configure.in |
279 |
+ # This works because there is still a configure.in that happens to be for the |
280 |
+ # shell wrapper configure script |
281 |
+ eautoreconf old-configure.in |
282 |
+ |
283 |
+ # Must run autoconf in js/src |
284 |
+ cd "${S}"/js/src || die |
285 |
+ eautoconf old-configure.in |
286 |
+} |
287 |
+ |
288 |
+src_configure() { |
289 |
+ MEXTENSIONS="default" |
290 |
+ # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) |
291 |
+ # Note: These are for Gentoo Linux use ONLY. For your own distribution, please |
292 |
+ # get your own set of keys. |
293 |
+ _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
294 |
+ |
295 |
+ # Add information about TERM to output (build.log) to aid debugging |
296 |
+ # blessings problems |
297 |
+ if [[ -n "${TERM}" ]] ; then |
298 |
+ einfo "TERM is set to: \"${TERM}\"" |
299 |
+ else |
300 |
+ einfo "TERM is unset." |
301 |
+ fi |
302 |
+ |
303 |
+ if use clang && ! tc-is-clang ; then |
304 |
+ # Force clang |
305 |
+ einfo "Enforcing the use of clang due to USE=clang ..." |
306 |
+ CC=${CHOST}-clang |
307 |
+ CXX=${CHOST}-clang++ |
308 |
+ strip-unsupported-flags |
309 |
+ elif ! use clang && ! tc-is-gcc ; then |
310 |
+ # Force gcc |
311 |
+ einfo "Enforcing the use of gcc due to USE=-clang ..." |
312 |
+ CC=${CHOST}-gcc |
313 |
+ CXX=${CHOST}-g++ |
314 |
+ strip-unsupported-flags |
315 |
+ fi |
316 |
+ |
317 |
+ #################################### |
318 |
+ # |
319 |
+ # mozconfig, CFLAGS and CXXFLAGS setup |
320 |
+ # |
321 |
+ #################################### |
322 |
+ |
323 |
+ mozconfig_init |
324 |
+ # common config components |
325 |
+ mozconfig_annotate 'system_libs' \ |
326 |
+ --with-system-zlib \ |
327 |
+ --with-system-bz2 |
328 |
+ |
329 |
+ # Must pass release in order to properly select linker |
330 |
+ mozconfig_annotate 'Enable by Gentoo' --enable-release |
331 |
+ |
332 |
+ # Don't let user's LTO flags clash with upstream's flags |
333 |
+ filter-flags -flto* |
334 |
+ |
335 |
+ if use lto ; then |
336 |
+ local show_old_compiler_warning= |
337 |
+ |
338 |
+ if use clang ; then |
339 |
+ # At this stage CC is adjusted and the following check will |
340 |
+ # will work |
341 |
+ if [[ $(clang-major-version) -lt 7 ]] ; then |
342 |
+ show_old_compiler_warning=1 |
343 |
+ fi |
344 |
+ |
345 |
+ # Upstream only supports lld when using clang |
346 |
+ mozconfig_annotate "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld |
347 |
+ else |
348 |
+ if [[ $(gcc-major-version) -lt 8 ]] ; then |
349 |
+ show_old_compiler_warning=1 |
350 |
+ fi |
351 |
+ |
352 |
+ # Linking only works when using ld.gold when LTO is enabled |
353 |
+ mozconfig_annotate "forcing ld=gold due to USE=lto" --enable-linker=gold |
354 |
+ fi |
355 |
+ |
356 |
+ if [[ -n "${show_old_compiler_warning}" ]] ; then |
357 |
+ # Checking compiler's major version uses CC variable. Because we allow |
358 |
+ # user to control used compiler via USE=clang flag, we cannot use |
359 |
+ # initial value. So this is the earliest stage where we can do this check |
360 |
+ # because pkg_pretend is not called in the main phase function sequence |
361 |
+ # environment saving is not guaranteed so we don't know if we will have |
362 |
+ # correct compiler until now. |
363 |
+ ewarn "" |
364 |
+ ewarn "USE=lto requires up-to-date compiler (>=gcc-8 or >=clang-7)." |
365 |
+ ewarn "You are on your own -- expect build failures. Don't file bugs using that unsupported configuration!" |
366 |
+ ewarn "" |
367 |
+ sleep 5 |
368 |
+ fi |
369 |
+ |
370 |
+ mozconfig_annotate '+lto' --enable-lto=thin |
371 |
+ |
372 |
+ if use pgo ; then |
373 |
+ mozconfig_annotate '+pgo' MOZ_PGO=1 |
374 |
+ fi |
375 |
+ else |
376 |
+ # Avoid auto-magic on linker |
377 |
+ if use clang ; then |
378 |
+ # This is upstream's default |
379 |
+ mozconfig_annotate "forcing ld=lld due to USE=clang" --enable-linker=lld |
380 |
+ elif tc-ld-is-gold ; then |
381 |
+ mozconfig_annotate "linker is set to gold" --enable-linker=gold |
382 |
+ else |
383 |
+ mozconfig_annotate "linker is set to bfd" --enable-linker=bfd |
384 |
+ fi |
385 |
+ fi |
386 |
+ |
387 |
+ # It doesn't compile on alpha without this LDFLAGS |
388 |
+ use alpha && append-ldflags "-Wl,--no-relax" |
389 |
+ |
390 |
+ # Add full relro support for hardened |
391 |
+ if use hardened ; then |
392 |
+ append-ldflags "-Wl,-z,relro,-z,now" |
393 |
+ mozconfig_use_enable hardened hardening |
394 |
+ fi |
395 |
+ |
396 |
+ # Modifications to better support ARM, bug 553364 |
397 |
+ if use neon ; then |
398 |
+ mozconfig_annotate '' --with-fpu=neon |
399 |
+ |
400 |
+ if ! tc-is-clang ; then |
401 |
+ # thumb options aren't supported when using clang, bug 666966 |
402 |
+ mozconfig_annotate '' --with-thumb=yes |
403 |
+ mozconfig_annotate '' --with-thumb-interwork=no |
404 |
+ fi |
405 |
+ fi |
406 |
+ if [[ ${CHOST} == armv*h* ]] ; then |
407 |
+ mozconfig_annotate '' --with-float-abi=hard |
408 |
+ if ! use system-libvpx ; then |
409 |
+ sed -i -e "s|softfp|hard|" \ |
410 |
+ "${S}"/media/libvpx/moz.build |
411 |
+ fi |
412 |
+ fi |
413 |
+ |
414 |
+ mozconfig_use_enable !bindist official-branding |
415 |
+ |
416 |
+ mozconfig_use_enable debug |
417 |
+ mozconfig_use_enable debug tests |
418 |
+ if ! use debug ; then |
419 |
+ mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols |
420 |
+ else |
421 |
+ mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols |
422 |
+ fi |
423 |
+ # These are enabled by default in all mozilla applications |
424 |
+ mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr |
425 |
+ mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr |
426 |
+ mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include \ |
427 |
+ --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) |
428 |
+ mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
429 |
+ mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
430 |
+ mozconfig_annotate '' --disable-crashreporter |
431 |
+ mozconfig_annotate 'Gentoo default' --with-system-png |
432 |
+ mozconfig_annotate '' --enable-system-ffi |
433 |
+ mozconfig_annotate '' --disable-gconf |
434 |
+ mozconfig_annotate '' --with-intl-api |
435 |
+ mozconfig_annotate '' --enable-system-pixman |
436 |
+ # Instead of the standard --build= and --host=, mozilla uses --host instead |
437 |
+ # of --build, and --target intstead of --host. |
438 |
+ # Note, mozilla also has --build but it does not do what you think it does. |
439 |
+ # Set both --target and --host as mozilla uses python to guess values otherwise |
440 |
+ mozconfig_annotate '' --target="${CHOST}" |
441 |
+ mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" |
442 |
+ if use system-libevent ; then |
443 |
+ mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr |
444 |
+ fi |
445 |
+ |
446 |
+ if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then |
447 |
+ mozconfig_annotate '' --enable-rust-simd |
448 |
+ fi |
449 |
+ |
450 |
+ # skia has no support for big-endian platforms |
451 |
+ if [[ $(tc-endian) == "big" ]] ; then |
452 |
+ mozconfig_annotate 'big endian target' --disable-skia |
453 |
+ else |
454 |
+ mozconfig_annotate '' --enable-skia |
455 |
+ fi |
456 |
+ |
457 |
+ # use the gtk3 toolkit (the only one supported at this point) |
458 |
+ # TODO: Will this result in automagic dependency on x11-libs/gtk+[wayland]? |
459 |
+ mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3 |
460 |
+ |
461 |
+ mozconfig_use_enable startup-notification |
462 |
+ mozconfig_use_enable system-sqlite |
463 |
+ mozconfig_use_with system-harfbuzz |
464 |
+ mozconfig_use_with system-harfbuzz system-graphite2 |
465 |
+ mozconfig_use_with system-icu |
466 |
+ mozconfig_use_with system-jpeg |
467 |
+ mozconfig_use_with system-libvpx |
468 |
+ mozconfig_use_with system-webp |
469 |
+ mozconfig_use_enable pulseaudio |
470 |
+ # force the deprecated alsa sound code if pulseaudio is disabled |
471 |
+ if use kernel_linux && ! use pulseaudio ; then |
472 |
+ mozconfig_annotate '-pulseaudio' --enable-alsa |
473 |
+ fi |
474 |
+ |
475 |
+ # Disable built-in ccache support to avoid sandbox violation, #665420 |
476 |
+ # Use FEATURES=ccache instead! |
477 |
+ mozconfig_annotate '' --without-ccache |
478 |
+ sed -i -e 's/ccache_stats = None/return None/' \ |
479 |
+ python/mozbuild/mozbuild/controller/building.py || \ |
480 |
+ die "Failed to disable ccache stats call" |
481 |
+ |
482 |
+ mozconfig_use_enable dbus |
483 |
+ |
484 |
+ mozconfig_use_enable wifi necko-wifi |
485 |
+ |
486 |
+ mozconfig_use_enable geckodriver |
487 |
+ |
488 |
+ # enable JACK, bug 600002 |
489 |
+ mozconfig_use_enable jack |
490 |
+ |
491 |
+ # Enable/Disable eme support |
492 |
+ use eme-free && mozconfig_annotate '+eme-free' --disable-eme |
493 |
+ |
494 |
+ # Setup api key for location services |
495 |
+ echo -n "${_google_api_key}" > "${S}"/google-api-key |
496 |
+ mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key" |
497 |
+ |
498 |
+ mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
499 |
+ |
500 |
+ # disable webrtc for now, bug 667642 |
501 |
+ use arm && mozconfig_annotate 'broken on arm' --disable-webrtc |
502 |
+ |
503 |
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1423822 |
504 |
+ # bug #669382 #676908 |
505 |
+ mozconfig_annotate 'elf-hack is broken' --disable-elf-hack |
506 |
+ |
507 |
+ echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig |
508 |
+ echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig |
509 |
+ |
510 |
+ # Finalize and report settings |
511 |
+ mozconfig_final |
512 |
+ |
513 |
+ # workaround for funky/broken upstream configure... |
514 |
+ SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ |
515 |
+ ./mach configure || die |
516 |
+} |
517 |
+ |
518 |
+src_compile() { |
519 |
+ local _virtx= |
520 |
+ if use pgo ; then |
521 |
+ _virtx=virtx |
522 |
+ |
523 |
+ # Reset and cleanup environment variables used by GNOME/XDG |
524 |
+ gnome2_environment_reset |
525 |
+ |
526 |
+ addpredict /root |
527 |
+ addpredict /etc/gconf |
528 |
+ fi |
529 |
+ |
530 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS} -O" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 ${_virtx} \ |
531 |
+ ./mach build --verbose || die |
532 |
+} |
533 |
+ |
534 |
+src_install() { |
535 |
+ cd "${BUILD_OBJ_DIR}" || die |
536 |
+ |
537 |
+ # Pax mark xpcshell for hardened support, only used for startupcache creation. |
538 |
+ pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell |
539 |
+ |
540 |
+ # Add our default prefs for firefox |
541 |
+ cp "${FILESDIR}"/gentoo-default-prefs.js-2 \ |
542 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
543 |
+ || die |
544 |
+ |
545 |
+ # set dictionary path, to use system hunspell |
546 |
+ echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ |
547 |
+ >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die |
548 |
+ |
549 |
+ # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it |
550 |
+ if use system-harfbuzz ; then |
551 |
+ echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ |
552 |
+ >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die |
553 |
+ fi |
554 |
+ |
555 |
+ # force cairo as the canvas renderer on platforms without skia support |
556 |
+ if [[ $(tc-endian) == "big" ]] ; then |
557 |
+ echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ |
558 |
+ >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die |
559 |
+ echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ |
560 |
+ >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die |
561 |
+ fi |
562 |
+ |
563 |
+ # Augment this with hwaccel prefs |
564 |
+ if use hwaccel ; then |
565 |
+ cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ |
566 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
567 |
+ || die |
568 |
+ fi |
569 |
+ |
570 |
+ if ! use screenshot ; then |
571 |
+ echo "pref(\"extensions.screenshots.disabled\", true);" >> \ |
572 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
573 |
+ || die |
574 |
+ fi |
575 |
+ |
576 |
+ echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ |
577 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
578 |
+ || die |
579 |
+ |
580 |
+ local plugin |
581 |
+ use gmp-autoupdate || use eme-free || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
582 |
+ echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
583 |
+ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
584 |
+ || die |
585 |
+ done |
586 |
+ |
587 |
+ cd "${S}" |
588 |
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ |
589 |
+ DESTDIR="${D}" ./mach install || die |
590 |
+ |
591 |
+ if use geckodriver ; then |
592 |
+ cp "${BUILD_OBJ_DIR}"/dist/bin/geckodriver "${ED%/}"${MOZILLA_FIVE_HOME} || die |
593 |
+ pax-mark m "${ED%/}"${MOZILLA_FIVE_HOME}/geckodriver |
594 |
+ |
595 |
+ dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver |
596 |
+ fi |
597 |
+ |
598 |
+ # Install language packs |
599 |
+ MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install |
600 |
+ |
601 |
+ local size sizes icon_path icon name |
602 |
+ if use bindist ; then |
603 |
+ sizes="16 32 48" |
604 |
+ icon_path="${S}/browser/branding/aurora" |
605 |
+ # Firefox's new rapid release cycle means no more codenames |
606 |
+ # Let's just stick with this one... |
607 |
+ icon="aurora" |
608 |
+ name="Aurora" |
609 |
+ |
610 |
+ # Override preferences to set the MOZ_DEV_EDITION defaults, since we |
611 |
+ # don't define MOZ_DEV_EDITION to avoid profile debaucles. |
612 |
+ # (source: browser/app/profile/firefox.js) |
613 |
+ cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <<PROFILE_EOF |
614 |
+pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/"); |
615 |
+sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@×××××××.org"); |
616 |
+sticky_pref("browser.devedition.theme.enabled", true); |
617 |
+sticky_pref("devtools.theme", "dark"); |
618 |
+PROFILE_EOF |
619 |
+ |
620 |
+ else |
621 |
+ sizes="16 22 24 32 48 64 128 256" |
622 |
+ icon_path="${S}/browser/branding/official" |
623 |
+ icon="${PN}" |
624 |
+ name="Mozilla Firefox" |
625 |
+ fi |
626 |
+ |
627 |
+ # Disable built-in auto-update because we update firefox through package manager |
628 |
+ insinto ${MOZILLA_FIVE_HOME}/distribution/ |
629 |
+ newins "${FILESDIR}"/disable-auto-update.policy.json policies.json |
630 |
+ |
631 |
+ # Install icons and .desktop for menu entry |
632 |
+ for size in ${sizes}; do |
633 |
+ insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
634 |
+ newins "${icon_path}/default${size}.png" "${icon}.png" |
635 |
+ done |
636 |
+ # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
637 |
+ newicon "${icon_path}/default48.png" "${icon}.png" |
638 |
+ newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" |
639 |
+ sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
640 |
+ "${ED}/usr/share/applications/${PN}.desktop" || die |
641 |
+ |
642 |
+ # Add StartupNotify=true bug 237317 |
643 |
+ if use startup-notification ; then |
644 |
+ echo "StartupNotify=true"\ |
645 |
+ >> "${ED}/usr/share/applications/${PN}.desktop" \ |
646 |
+ || die |
647 |
+ fi |
648 |
+ |
649 |
+ # Don't install llvm-symbolizer from sys-devel/llvm package |
650 |
+ [[ -f "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] && \ |
651 |
+ rm "${ED%/}${MOZILLA_FIVE_HOME}/llvm-symbolizer" |
652 |
+ |
653 |
+ # firefox and firefox-bin are identical |
654 |
+ rm "${ED%/}"${MOZILLA_FIVE_HOME}/firefox-bin || die |
655 |
+ dosym firefox ${MOZILLA_FIVE_HOME}/firefox-bin |
656 |
+ |
657 |
+ # Required in order to use plugins and even run firefox on hardened. |
658 |
+ pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,plugin-container} |
659 |
+} |
660 |
+ |
661 |
+pkg_preinst() { |
662 |
+ gnome2_icon_savelist |
663 |
+ |
664 |
+ # if the apulse libs are available in MOZILLA_FIVE_HOME then apulse |
665 |
+ # doesn't need to be forced into the LD_LIBRARY_PATH |
666 |
+ if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then |
667 |
+ einfo "APULSE found - Generating library symlinks for sound support" |
668 |
+ local lib |
669 |
+ pushd "${ED}"${MOZILLA_FIVE_HOME} &>/dev/null || die |
670 |
+ for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do |
671 |
+ # a quickpkg rolled by hand will grab symlinks as part of the package, |
672 |
+ # so we need to avoid creating them if they already exist. |
673 |
+ if [[ ! -L ${lib##*/} ]] ; then |
674 |
+ ln -s "${lib}" ${lib##*/} || die |
675 |
+ fi |
676 |
+ done |
677 |
+ popd &>/dev/null || die |
678 |
+ fi |
679 |
+} |
680 |
+ |
681 |
+pkg_postinst() { |
682 |
+ gnome2_icon_cache_update |
683 |
+ xdg_desktop_database_update |
684 |
+ |
685 |
+ if ! use gmp-autoupdate && ! use eme-free ; then |
686 |
+ elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" |
687 |
+ elog "installing into new profiles:" |
688 |
+ local plugin |
689 |
+ for plugin in "${GMP_PLUGIN_LIST[@]}"; do elog "\t ${plugin}" ; done |
690 |
+ elog |
691 |
+ fi |
692 |
+ |
693 |
+ if use pulseaudio && has_version ">=media-sound/apulse-0.1.9" ; then |
694 |
+ elog "Apulse was detected at merge time on this system and so it will always be" |
695 |
+ elog "used for sound. If you wish to use pulseaudio instead please unmerge" |
696 |
+ elog "media-sound/apulse." |
697 |
+ elog |
698 |
+ fi |
699 |
+} |
700 |
+ |
701 |
+pkg_postrm() { |
702 |
+ gnome2_icon_cache_update |
703 |
+ xdg_desktop_database_update |
704 |
+} |