Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/firefox/
Date: Fri, 05 Feb 2021 18:34:02
Message-Id: 1612549837.251e9e8273884bcb5dabb972578183bc3d701614.whissi@gentoo
1 commit: 251e9e8273884bcb5dabb972578183bc3d701614
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 5 18:30:23 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 5 18:30:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=251e9e82
7
8 www-client/firefox: drop old
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 www-client/firefox/Manifest | 1 -
14 www-client/firefox/firefox-85.0.ebuild | 1120 --------------------------------
15 2 files changed, 1121 deletions(-)
16
17 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
18 index 7aaee2a4779..8a74ba95e3f 100644
19 --- a/www-client/firefox/Manifest
20 +++ b/www-client/firefox/Manifest
21 @@ -95,7 +95,6 @@ DIST firefox-78.7.0esr-zh-CN.xpi 564772 BLAKE2B 94633d16a271194dc7e0560419dfe69a
22 DIST firefox-78.7.0esr-zh-TW.xpi 564734 BLAKE2B 4484dda1ec861e9f38a465b2fb43c5ef96f2f688350c86a84825dbf6e3656a03391584bcd0f7cff532b77ac5cf6605e59b85b073af801038fe23c0f9e3ff6aa3 SHA512 852481db2a47a48c0c29153aef337e91d70aa0c25854026c76fbb47775d87e96b657555776c3f09f75925044e6ce90f99a419d43c6b4f9e9665b59f0ef49a6e2
23 DIST firefox-78.7.0esr.source.tar.xz 332849732 BLAKE2B 66e224021cbd15b6b625da3c0a98b05026f4f284afbef5299368a218c16da24cd05431ab82c52859b835baf63298ec832681fbc58b3bfe833e68dea1737c6dcb SHA512 afa37d2f6bbe04715d84a8964f75139042364501c358da98771115d7fe7d23788e95b6ff29d77c064a9cfcd208c1424924017ef2a72cbb79dbb45d6f365f030c
24 DIST firefox-78esr-patches-07.tar.xz 66156 BLAKE2B 8f69883432dcbd484b1fb15e3fde1630b1424e502ba78d9ec3cbe70cb2676a6876853d3477c8bfe35e92bca91b200e2d14543de1778d895676a52d2608109af2 SHA512 b4a01d3499002bd33a7fb45a1a80e9e73ba27a0986b6bfa43b3482dd8d82a686a14ae0c5e013402c8c8f359a642632a40bf4c362a0e83a1f53b453914f42e3a7
25 -DIST firefox-85-patches-01.tar.xz 23068 BLAKE2B 4e9532470c250ba05289ec215057162a780212d944046f01ab907eb6c0e3941b8016b1a2b81e1971dec52d84383fb103613629eb333d25072c6a76cdca56c8d9 SHA512 a995fda3e38238643270d126f96086c64bca6d8c96f7a3a5ef620730cf449613f2e0d8cc3e918d4f9daa996c25b252452de8e0219041f14bd52835ecf88018e1
26 DIST firefox-85-patches-02.tar.xz 26288 BLAKE2B fda7d7639f530df2d03e2af53a3ff1ebb5ee6b41cb5efe21256255d5a302369da55095ca0e39d2bfb2de527700dc6890286bfd2d1703fe44f2dd4b6cd8c6fcbd SHA512 77a2961c87753bb27937da7bbd2706054510a34c87d7ea68c0e490396a5ebf19cc85c7c507100249a0fb26c2d43a1c0bb3497226be025e4d4d43370d55273c15
27 DIST firefox-85.0-ach.xpi 461933 BLAKE2B d1f93af47591ee08750afc8bf85ab00eb5ef635bb9d42958db8f0895ed364c911eccc49a17c7e9d49011c1e8c3b8c09538aef85e204f0aa7f20f68f458a61464 SHA512 4b77fa937f9533651575a0deadf2be2973b1b472a21490483e2742455bedeabb6de287e1fb4d6cbfb37717dcba73c18628663839c0f6c45281f954a30b8d5dc8
28 DIST firefox-85.0-af.xpi 427614 BLAKE2B 66e9b75a14ad91cbc0658db0b7675851633e98341d821fb0cf38d65c403939ae59ece86abb4b669cf8900122ef3f7b6b165738317f0b9dc077456823740d5771 SHA512 90d1450f0c0dcdd77e99a661f8b9129c6dc385dd016099f44a94434fb92217dfe270cd982d01e095160cb2bd5870e16954b6b28160ae61379d94eaf400ce78a2
29
30 diff --git a/www-client/firefox/firefox-85.0.ebuild b/www-client/firefox/firefox-85.0.ebuild
31 deleted file mode 100644
32 index 85f345fe936..00000000000
33 --- a/www-client/firefox/firefox-85.0.ebuild
34 +++ /dev/null
35 @@ -1,1120 +0,0 @@
36 -# Copyright 1999-2021 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI="7"
40 -
41 -FIREFOX_PATCHSET="firefox-85-patches-01.tar.xz"
42 -
43 -LLVM_MAX_SLOT=11
44 -
45 -PYTHON_COMPAT=( python3_{7..9} )
46 -PYTHON_REQ_USE="ncurses,sqlite,ssl"
47 -
48 -WANT_AUTOCONF="2.1"
49 -
50 -VIRTUALX_REQUIRED="pgo"
51 -
52 -MOZ_ESR=
53 -
54 -MOZ_PV=${PV}
55 -MOZ_PV_SUFFIX=
56 -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
57 - MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
58 -
59 - # Convert the ebuild version to the upstream Mozilla version
60 - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
61 - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
62 - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
63 -fi
64 -
65 -if [[ -n ${MOZ_ESR} ]] ; then
66 - # ESR releases have slightly different version numbers
67 - MOZ_PV="${MOZ_PV}esr"
68 -fi
69 -
70 -MOZ_PN="${PN%-bin}"
71 -MOZ_P="${MOZ_PN}-${MOZ_PV}"
72 -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
73 -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
74 -
75 -inherit autotools check-reqs desktop flag-o-matic gnome2-utils llvm \
76 - multiprocessing pax-utils python-any-r1 toolchain-funcs \
77 - virtualx xdg
78 -
79 -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
80 -
81 -if [[ ${PV} == *_rc* ]] ; then
82 - MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
83 -fi
84 -
85 -PATCH_URIS=(
86 - https://dev.gentoo.org/~{axs,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
87 -)
88 -
89 -SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
90 - ${PATCH_URIS[@]}"
91 -
92 -DESCRIPTION="Firefox Web Browser"
93 -HOMEPAGE="https://www.mozilla.com/firefox"
94 -
95 -KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
96 -
97 -SLOT="0/$(ver_cut 1)"
98 -LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
99 -IUSE="+clang cpu_flags_arm_neon dbus debug eme-free geckodriver +gmp-autoupdate
100 - hardened hwaccel jack lto +openh264 pgo pulseaudio screencast selinux
101 - +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent
102 - +system-libvpx +system-webp wayland wifi"
103 -
104 -REQUIRED_USE="debug? ( !system-av1 )
105 - screencast? ( wayland )"
106 -
107 -BDEPEND="${PYTHON_DEPS}
108 - app-arch/unzip
109 - app-arch/zip
110 - >=dev-util/cbindgen-0.15.0
111 - >=net-libs/nodejs-10.22.1
112 - virtual/pkgconfig
113 - >=virtual/rust-1.47.0
114 - || (
115 - (
116 - sys-devel/clang:11
117 - sys-devel/llvm:11
118 - clang? (
119 - =sys-devel/lld-11*
120 - pgo? ( =sys-libs/compiler-rt-sanitizers-11*[profile] )
121 - )
122 - )
123 - (
124 - sys-devel/clang:10
125 - sys-devel/llvm:10
126 - clang? (
127 - =sys-devel/lld-10*
128 - pgo? ( =sys-libs/compiler-rt-sanitizers-10*[profile] )
129 - )
130 - )
131 - (
132 - sys-devel/clang:9
133 - sys-devel/llvm:9
134 - clang? (
135 - =sys-devel/lld-9*
136 - pgo? ( =sys-libs/compiler-rt-sanitizers-9*[profile] )
137 - )
138 - )
139 - )
140 - amd64? ( >=dev-lang/yasm-1.1 )
141 - x86? ( >=dev-lang/yasm-1.1 )
142 - !system-av1? (
143 - amd64? ( >=dev-lang/nasm-2.13 )
144 - x86? ( >=dev-lang/nasm-2.13 )
145 - )"
146 -
147 -CDEPEND="
148 - >=dev-libs/nss-3.60
149 - >=dev-libs/nspr-4.29
150 - dev-libs/atk
151 - dev-libs/expat
152 - >=x11-libs/cairo-1.10[X]
153 - >=x11-libs/gtk+-2.18:2
154 - >=x11-libs/gtk+-3.4.0:3[X]
155 - x11-libs/gdk-pixbuf
156 - >=x11-libs/pango-1.22.0
157 - >=media-libs/libpng-1.6.35:0=[apng]
158 - >=media-libs/mesa-10.2:*
159 - media-libs/fontconfig
160 - >=media-libs/freetype-2.4.10
161 - kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
162 - virtual/freedesktop-icon-theme
163 - >=x11-libs/pixman-0.19.2
164 - >=dev-libs/glib-2.26:2
165 - >=sys-libs/zlib-1.2.3
166 - >=dev-libs/libffi-3.0.10:=
167 - media-video/ffmpeg
168 - x11-libs/libX11
169 - x11-libs/libXcomposite
170 - x11-libs/libXdamage
171 - x11-libs/libXext
172 - x11-libs/libXfixes
173 - x11-libs/libXrender
174 - x11-libs/libXt
175 - dbus? (
176 - sys-apps/dbus
177 - dev-libs/dbus-glib
178 - )
179 - screencast? ( media-video/pipewire:0/0.3 )
180 - system-av1? (
181 - >=media-libs/dav1d-0.3.0:=
182 - >=media-libs/libaom-1.0.0:=
183 - )
184 - system-harfbuzz? (
185 - >=media-libs/harfbuzz-2.6.8:0=
186 - >=media-gfx/graphite2-1.3.13
187 - )
188 - system-icu? ( >=dev-libs/icu-67.1:= )
189 - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
190 - system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] )
191 - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] )
192 - system-webp? ( >=media-libs/libwebp-1.1.0:0= )
193 - wifi? (
194 - kernel_linux? (
195 - sys-apps/dbus
196 - dev-libs/dbus-glib
197 - net-misc/networkmanager
198 - )
199 - )
200 - jack? ( virtual/jack )
201 - selinux? ( sec-policy/selinux-mozilla )"
202 -
203 -RDEPEND="${CDEPEND}
204 - jack? ( virtual/jack )
205 - openh264? ( media-libs/openh264:*[plugin] )
206 - pulseaudio? (
207 - || (
208 - media-sound/pulseaudio
209 - >=media-sound/apulse-0.1.12-r4
210 - )
211 - )
212 - selinux? ( sec-policy/selinux-mozilla )"
213 -
214 -DEPEND="${CDEPEND}
215 - pulseaudio? (
216 - || (
217 - media-sound/pulseaudio
218 - >=media-sound/apulse-0.1.12-r4[sdk]
219 - )
220 - )
221 - wayland? ( >=x11-libs/gtk+-3.11:3[wayland] )
222 - amd64? ( virtual/opengl )
223 - x86? ( virtual/opengl )"
224 -
225 -S="${WORKDIR}/${PN}-${PV%_*}"
226 -
227 -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or
228 -# overridden in the enviromnent (advanced hackers only)
229 -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then
230 - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm )
231 -fi
232 -
233 -llvm_check_deps() {
234 - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
235 - ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
236 - return 1
237 - fi
238 -
239 - if use clang ; then
240 - if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
241 - ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
242 - return 1
243 - fi
244 -
245 - if use pgo ; then
246 - if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then
247 - ewarn "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
248 - return 1
249 - fi
250 - fi
251 - fi
252 -
253 - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
254 -}
255 -
256 -MOZ_LANGS=(
257 - ach af an ar ast az be bg bn br bs ca-valencia ca cak cs cy
258 - da de dsb el en-CA en-GB en-US eo es-AR es-CL es-ES es-MX et eu
259 - fa ff fi fr fy-NL ga-IE gd gl gn gu-IN he hi-IN hr hsb hu hy-AM
260 - ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my
261 - nb-NO ne-NP nl nn-NO oc pa-IN pl pt-BR pt-PT rm ro ru
262 - si sk sl son sq sr sv-SE ta te th tl tr trs uk ur uz vi
263 - xh zh-CN zh-TW
264 -)
265 -
266 -mozilla_set_globals() {
267 - # https://bugs.gentoo.org/587334
268 - local MOZ_TOO_REGIONALIZED_FOR_L10N=(
269 - fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE
270 - )
271 -
272 - local lang xflag
273 - for lang in "${MOZ_LANGS[@]}" ; do
274 - # en and en_US are handled internally
275 - if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then
276 - continue
277 - fi
278 -
279 - # strip region subtag if $lang is in the list
280 - if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then
281 - xflag=${lang%%-*}
282 - else
283 - xflag=${lang}
284 - fi
285 -
286 - SRC_URI+=" l10n_${xflag/[_@]/-}? ("
287 - SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${MOZ_P_DISTFILES}-${lang}.xpi"
288 - SRC_URI+=" )"
289 - IUSE+=" l10n_${xflag/[_@]/-}"
290 - done
291 -}
292 -mozilla_set_globals
293 -
294 -moz_clear_vendor_checksums() {
295 - debug-print-function ${FUNCNAME} "$@"
296 -
297 - if [[ ${#} -ne 1 ]] ; then
298 - die "${FUNCNAME} requires exact one argument"
299 - fi
300 -
301 - einfo "Clearing cargo checksums for ${1} ..."
302 -
303 - sed -i \
304 - -e 's/\("files":{\)[^}]*/\1/' \
305 - "${S}"/third_party/rust/${1}/.cargo-checksum.json \
306 - || die
307 -}
308 -
309 -moz_install_xpi() {
310 - debug-print-function ${FUNCNAME} "$@"
311 -
312 - if [[ ${#} -lt 2 ]] ; then
313 - die "${FUNCNAME} requires at least two arguments"
314 - fi
315 -
316 - local DESTDIR=${1}
317 - shift
318 -
319 - insinto "${DESTDIR}"
320 -
321 - local emid xpi_file xpi_tmp_dir
322 - for xpi_file in "${@}" ; do
323 - emid=
324 - xpi_tmp_dir=$(mktemp -d --tmpdir="${T}")
325 -
326 - # Unpack XPI
327 - unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die
328 -
329 - # Determine extension ID
330 - if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then
331 - emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf")
332 - [[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf"
333 - elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then
334 - emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' "${xpi_tmp_dir}/manifest.json")
335 - [[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json"
336 - else
337 - die "failed to determine extension id"
338 - fi
339 -
340 - einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..."
341 - newins "${xpi_file}" "${emid}.xpi"
342 - done
343 -}
344 -
345 -mozconfig_add_options_ac() {
346 - debug-print-function ${FUNCNAME} "$@"
347 -
348 - if [[ ${#} -lt 2 ]] ; then
349 - die "${FUNCNAME} requires at least two arguments"
350 - fi
351 -
352 - local reason=${1}
353 - shift
354 -
355 - local option
356 - for option in ${@} ; do
357 - echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG}
358 - done
359 -}
360 -
361 -mozconfig_add_options_mk() {
362 - debug-print-function ${FUNCNAME} "$@"
363 -
364 - if [[ ${#} -lt 2 ]] ; then
365 - die "${FUNCNAME} requires at least two arguments"
366 - fi
367 -
368 - local reason=${1}
369 - shift
370 -
371 - local option
372 - for option in ${@} ; do
373 - echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG}
374 - done
375 -}
376 -
377 -mozconfig_use_enable() {
378 - debug-print-function ${FUNCNAME} "$@"
379 -
380 - if [[ ${#} -lt 1 ]] ; then
381 - die "${FUNCNAME} requires at least one arguments"
382 - fi
383 -
384 - local flag=$(use_enable "${@}")
385 - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}"
386 -}
387 -
388 -mozconfig_use_with() {
389 - debug-print-function ${FUNCNAME} "$@"
390 -
391 - if [[ ${#} -lt 1 ]] ; then
392 - die "${FUNCNAME} requires at least one arguments"
393 - fi
394 -
395 - local flag=$(use_with "${@}")
396 - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}"
397 -}
398 -
399 -pkg_pretend() {
400 - if [[ ${MERGE_TYPE} != binary ]] ; then
401 - if use pgo ; then
402 - if ! has usersandbox $FEATURES ; then
403 - die "You must enable usersandbox as X server can not run as root!"
404 - fi
405 - fi
406 -
407 - # Ensure we have enough disk space to compile
408 - if use pgo || use lto || use debug ; then
409 - CHECKREQS_DISK_BUILD="13500M"
410 - else
411 - CHECKREQS_DISK_BUILD="6400M"
412 - fi
413 -
414 - check-reqs_pkg_pretend
415 - fi
416 -}
417 -
418 -pkg_setup() {
419 - if [[ ${MERGE_TYPE} != binary ]] ; then
420 - if use pgo ; then
421 - if ! has userpriv ${FEATURES} ; then
422 - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!"
423 - fi
424 - fi
425 -
426 - # Ensure we have enough disk space to compile
427 - if use pgo || use lto || use debug ; then
428 - CHECKREQS_DISK_BUILD="13500M"
429 - else
430 - CHECKREQS_DISK_BUILD="6400M"
431 - fi
432 -
433 - check-reqs_pkg_setup
434 -
435 - llvm_pkg_setup
436 -
437 - if use clang && use lto ; then
438 - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
439 - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
440 - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
441 -
442 - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
443 - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
444 - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
445 -
446 - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
447 - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
448 - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
449 - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
450 - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
451 - eerror " - Build ${CATEGORY}/${PN} without USE=lto"
452 - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
453 - fi
454 - fi
455 -
456 - python-any-r1_pkg_setup
457 -
458 - # Avoid PGO profiling problems due to enviroment leakage
459 - # These should *always* be cleaned up anyway
460 - unset \
461 - DBUS_SESSION_BUS_ADDRESS \
462 - DISPLAY \
463 - ORBIT_SOCKETDIR \
464 - SESSION_MANAGER \
465 - XAUTHORITY \
466 - XDG_CACHE_HOME \
467 - XDG_SESSION_COOKIE
468 -
469 - # Build system is using /proc/self/oom_score_adj, bug #604394
470 - addpredict /proc/self/oom_score_adj
471 -
472 - if ! mountpoint -q /dev/shm ; then
473 - # If /dev/shm is not available, configure is known to fail with
474 - # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py
475 - ewarn "/dev/shm is not mounted -- expect build failures!"
476 - fi
477 -
478 - # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
479 - # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
480 - # get your own set of keys.
481 - if [[ -z "${MOZ_API_KEY_GOOGLE+set}" ]] ; then
482 - MOZ_API_KEY_GOOGLE="AIzaSyDEAOvatFogGaPi0eTgsV_ZlEzx0ObmepsMzfAc"
483 - fi
484 -
485 - # Ensure we use C locale when building, bug #746215
486 - export LC_ALL=C
487 - fi
488 -}
489 -
490 -src_unpack() {
491 - local _lp_dir="${WORKDIR}/language_packs"
492 - local _src_file
493 -
494 - if [[ ! -d "${_lp_dir}" ]] ; then
495 - mkdir "${_lp_dir}" || die
496 - fi
497 -
498 - for _src_file in ${A} ; do
499 - if [[ ${_src_file} == *.xpi ]]; then
500 - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!"
501 - else
502 - unpack ${_src_file}
503 - fi
504 - done
505 -}
506 -
507 -src_prepare() {
508 - use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
509 - eapply "${WORKDIR}/firefox-patches"
510 -
511 - # Allow user to apply any additional patches without modifing ebuild
512 - eapply_user
513 -
514 - # Make LTO respect MAKEOPTS
515 - sed -i \
516 - -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
517 - "${S}"/build/moz.configure/lto-pgo.configure \
518 - || die "sed failed to set num_cores"
519 -
520 - # Make ICU respect MAKEOPTS
521 - sed -i \
522 - -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
523 - "${S}"/intl/icu_sources_data.py \
524 - || die "sed failed to set num_cores"
525 -
526 - # sed-in toolchain prefix
527 - sed -i \
528 - -e "s/objdump/${CHOST}-objdump/" \
529 - "${S}"/python/mozbuild/mozbuild/configure/check_debug_ranges.py \
530 - || die "sed failed to set toolchain prefix"
531 -
532 - sed -i \
533 - -e 's/ccache_stats = None/return None/' \
534 - "${S}"/python/mozbuild/mozbuild/controller/building.py \
535 - || die "sed failed to disable ccache stats call"
536 -
537 - einfo "Removing pre-built binaries ..."
538 - find "${S}"/third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
539 -
540 - # Clearing checksums where we have applied patches
541 - moz_clear_vendor_checksums target-lexicon-0.9.0
542 -
543 - # Create build dir
544 - BUILD_DIR="${WORKDIR}/${PN}_build"
545 - mkdir -p "${BUILD_DIR}" || die
546 -
547 - # Write API keys to disk
548 - echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
549 -
550 - xdg_src_prepare
551 -}
552 -
553 -src_configure() {
554 - # Show flags set at the beginning
555 - einfo "Current CFLAGS: ${CFLAGS}"
556 - einfo "Current CXXFLAGS: ${CXXFLAGS}"
557 - einfo "Current LDFLAGS: ${LDFLAGS}"
558 - einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
559 -
560 - local have_switched_compiler=
561 - if use clang && ! tc-is-clang ; then
562 - # Force clang
563 - einfo "Enforcing the use of clang due to USE=clang ..."
564 - have_switched_compiler=yes
565 - AR=llvm-ar
566 - CC=${CHOST}-clang
567 - CXX=${CHOST}-clang++
568 - NM=llvm-nm
569 - RANLIB=llvm-ranlib
570 - elif ! use clang && ! tc-is-gcc ; then
571 - # Force gcc
572 - have_switched_compiler=yes
573 - einfo "Enforcing the use of gcc due to USE=-clang ..."
574 - AR=gcc-ar
575 - CC=${CHOST}-gcc
576 - CXX=${CHOST}-g++
577 - NM=gcc-nm
578 - RANLIB=gcc-ranlib
579 - fi
580 -
581 - if [[ -n "${have_switched_compiler}" ]] ; then
582 - # Because we switched active compiler we have to ensure
583 - # that no unsupported flags are set
584 - strip-unsupported-flags
585 - fi
586 -
587 - # Ensure we use correct toolchain
588 - export HOST_CC="$(tc-getBUILD_CC)"
589 - export HOST_CXX="$(tc-getBUILD_CXX)"
590 - tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
591 -
592 - # Set MOZILLA_FIVE_HOME
593 - export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
594 -
595 - # python/mach/mach/mixin/process.py fails to detect SHELL
596 - export SHELL="${EPREFIX}/bin/bash"
597 -
598 - # Set MOZCONFIG
599 - export MOZCONFIG="${S}/.mozconfig"
600 -
601 - # Initialize MOZCONFIG
602 - mozconfig_add_options_ac '' --enable-application=browser
603 -
604 - # Set Gentoo defaults
605 - export MOZILLA_OFFICIAL=1
606 -
607 - mozconfig_add_options_ac 'Gentoo default' \
608 - --allow-addon-sideload \
609 - --disable-cargo-incremental \
610 - --disable-crashreporter \
611 - --disable-install-strip \
612 - --disable-strip \
613 - --disable-updater \
614 - --enable-official-branding \
615 - --enable-release \
616 - --enable-system-ffi \
617 - --enable-system-pixman \
618 - --host="${CBUILD:-${CHOST}}" \
619 - --libdir="${EPREFIX}/usr/$(get_libdir)" \
620 - --prefix="${EPREFIX}/usr" \
621 - --target="${CHOST}" \
622 - --without-ccache \
623 - --with-intl-api \
624 - --with-libclang-path="$(llvm-config --libdir)" \
625 - --with-system-nspr \
626 - --with-system-nss \
627 - --with-system-png \
628 - --with-system-zlib \
629 - --with-toolchain-prefix="${CHOST}-" \
630 - --with-unsigned-addon-scopes=app,system \
631 - --x-includes="${SYSROOT}${EPREFIX}/usr/include" \
632 - --x-libraries="${SYSROOT}${EPREFIX}/usr/$(get_libdir)"
633 -
634 - # Set update channel
635 - local update_channel=release
636 - [[ -n ${MOZ_ESR} ]] && update_channel=esr
637 - mozconfig_add_options_ac '' --update-channel=${update_channel}
638 -
639 - if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
640 - mozconfig_add_options_ac '' --enable-rust-simd
641 - fi
642 -
643 - if [[ -s "${S}/api-google.key" ]] ; then
644 - local key_origin="Gentoo default"
645 - if [[ $(cat "${S}/api-google.key" | md5sum | awk '{ print $1 }') != 709560c02f94b41f9ad2c49207be6c54 ]] ; then
646 - key_origin="User value"
647 - fi
648 -
649 - mozconfig_add_options_ac "${key_origin}" \
650 - --with-google-location-service-api-keyfile="${S}/api-google.key" \
651 - --with-google-safebrowsing-api-keyfile="${S}/api-google.key"
652 - else
653 - einfo "Building without Google API key ..."
654 - fi
655 -
656 - mozconfig_use_with system-av1
657 - mozconfig_use_with system-harfbuzz
658 - mozconfig_use_with system-harfbuzz system-graphite2
659 - mozconfig_use_with system-icu
660 - mozconfig_use_with system-jpeg
661 - mozconfig_use_with system-libevent system-libevent "${SYSROOT}${EPREFIX}/usr"
662 - mozconfig_use_with system-libvpx
663 - mozconfig_use_with system-webp
664 -
665 - mozconfig_use_enable dbus
666 -
667 - use eme-free && mozconfig_add_options_ac '+eme-free' --disable-eme
668 -
669 - mozconfig_use_enable geckodriver
670 -
671 - if use hardened ; then
672 - mozconfig_add_options_ac "+hardened" --enable-hardening
673 - append-ldflags "-Wl,-z,relro -Wl,-z,now"
674 - fi
675 -
676 - mozconfig_use_enable jack
677 -
678 - mozconfig_use_enable pulseaudio
679 - # force the deprecated alsa sound code if pulseaudio is disabled
680 - if use kernel_linux && ! use pulseaudio ; then
681 - mozconfig_add_options_ac '-pulseaudio' --enable-alsa
682 - fi
683 -
684 - mozconfig_use_enable wifi necko-wifi
685 -
686 - if use wayland ; then
687 - mozconfig_add_options_ac '+wayland' --enable-default-toolkit=cairo-gtk3-wayland
688 - else
689 - mozconfig_add_options_ac '' --enable-default-toolkit=cairo-gtk3
690 - fi
691 -
692 - if use lto ; then
693 - if use clang ; then
694 - # Upstream only supports lld when using clang
695 - mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld
696 -
697 - mozconfig_add_options_ac '+lto' --enable-lto=cross
698 - else
699 - # ThinLTO is currently broken, see bmo#1644409
700 - mozconfig_add_options_ac '+lto' --enable-lto=full
701 - fi
702 -
703 - if use pgo ; then
704 - mozconfig_add_options_ac '+pgo' MOZ_PGO=1
705 -
706 - if use clang ; then
707 - # Used in build/pgo/profileserver.py
708 - export LLVM_PROFDATA="llvm-profdata"
709 - fi
710 - fi
711 - else
712 - # Avoid auto-magic on linker
713 - if use clang ; then
714 - # This is upstream's default
715 - mozconfig_add_options_ac "forcing ld=lld due to USE=clang" --enable-linker=lld
716 - else
717 - mozconfig_add_options_ac "linker is set to bfd" --enable-linker=bfd
718 - fi
719 - fi
720 -
721 - # LTO flag was handled via configure
722 - filter-flags '-flto*'
723 -
724 - mozconfig_use_enable debug
725 - if use debug ; then
726 - mozconfig_add_options_ac '+debug' --disable-optimize
727 - else
728 - if is-flag '-g*' ; then
729 - if use clang ; then
730 - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols=$(get-flag '-g*')
731 - else
732 - mozconfig_add_options_ac 'from CFLAGS' --enable-debug-symbols
733 - fi
734 - else
735 - mozconfig_add_options_ac 'Gentoo default' --disable-debug-symbols
736 - fi
737 -
738 - if is-flag '-O0' ; then
739 - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O0
740 - elif is-flag '-O4' ; then
741 - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O4
742 - elif is-flag '-O3' ; then
743 - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O3
744 - elif is-flag '-O1' ; then
745 - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-O1
746 - elif is-flag '-Os' ; then
747 - mozconfig_add_options_ac "from CFLAGS" --enable-optimize=-Os
748 - else
749 - mozconfig_add_options_ac "Gentoo default" --enable-optimize=-O2
750 - fi
751 - fi
752 -
753 - # Debug flag was handled via configure
754 - filter-flags '-g*'
755 -
756 - # Optimization flag was handled via configure
757 - filter-flags '-O*'
758 -
759 - # Modifications to better support ARM, bug #553364
760 - if use cpu_flags_arm_neon ; then
761 - mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon
762 -
763 - if ! tc-is-clang ; then
764 - # thumb options aren't supported when using clang, bug 666966
765 - mozconfig_add_options_ac '+cpu_flags_arm_neon' \
766 - --with-thumb=yes \
767 - --with-thumb-interwork=no
768 - fi
769 - fi
770 -
771 - if [[ ${CHOST} == armv*h* ]] ; then
772 - mozconfig_add_options_ac 'CHOST=armv*h*' --with-float-abi=hard
773 -
774 - if ! use system-libvpx ; then
775 - sed -i \
776 - -e "s|softfp|hard|" \
777 - "${S}"/media/libvpx/moz.build \
778 - || die
779 - fi
780 - fi
781 -
782 - if use clang ; then
783 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
784 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
785 - # toolkit/moz.configure Elfhack section: target.cpu in ('arm', 'x86', 'x86_64')
786 - local disable_elf_hack=
787 - if use amd64 ; then
788 - disable_elf_hack=yes
789 - elif use x86 ; then
790 - disable_elf_hack=yes
791 - elif use arm ; then
792 - disable_elf_hack=yes
793 - fi
794 -
795 - if [[ -n ${disable_elf_hack} ]] ; then
796 - mozconfig_add_options_ac 'elf-hack is broken when using Clang' --disable-elf-hack
797 - fi
798 - elif tc-is-gcc ; then
799 - if ver_test $(gcc-fullversion) -ge 10 ; then
800 - einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
801 - append-cxxflags -fno-tree-loop-vectorize
802 - fi
803 - fi
804 -
805 - # Additional ARCH support
806 - case "${ARCH}" in
807 - arm)
808 - # Reduce the memory requirements for linking
809 - if use clang ; then
810 - # Nothing to do
811 - :;
812 - elif tc-ld-is-gold || use lto ; then
813 - append-ldflags -Wl,--no-keep-memory
814 - else
815 - append-ldflags -Wl,--no-keep-memory -Wl,--reduce-memory-overheads
816 - fi
817 - ;;
818 - esac
819 -
820 - if ! use elibc_glibc ; then
821 - mozconfig_add_options_ac '!elibc_glibc' --disable-jemalloc
822 - fi
823 -
824 - # Allow elfhack to work in combination with unstripped binaries
825 - # when they would normally be larger than 2GiB.
826 - append-ldflags "-Wl,--compress-debug-sections=zlib"
827 -
828 - # Make revdep-rebuild.sh happy; Also required for musl
829 - append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
830 -
831 - # Pass $MAKEOPTS to build system
832 - export MOZ_MAKE_FLAGS="${MAKEOPTS}"
833 -
834 - # Use system's Python environment
835 - export MACH_USE_SYSTEM_PYTHON=1
836 -
837 - # Disable notification when build system has finished
838 - export MOZ_NOSPAM=1
839 -
840 - # Portage sets XARGS environment variable to "xargs -r" by default which
841 - # breaks build system's check_prog() function which doesn't support arguments
842 - mozconfig_add_options_ac 'Gentoo default' "XARGS=${EPREFIX}/usr/bin/xargs"
843 -
844 - # Set build dir
845 - mozconfig_add_options_mk 'Gentoo default' "MOZ_OBJDIR=${BUILD_DIR}"
846 -
847 - # Show flags we will use
848 - einfo "Build CFLAGS: ${CFLAGS}"
849 - einfo "Build CXXFLAGS: ${CXXFLAGS}"
850 - einfo "Build LDFLAGS: ${LDFLAGS}"
851 - einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
852 -
853 - # Handle EXTRA_CONF and show summary
854 - local ac opt hash reason
855 -
856 - # Apply EXTRA_ECONF entries to $MOZCONFIG
857 - if [[ -n ${EXTRA_ECONF} ]] ; then
858 - IFS=\! read -a ac <<<${EXTRA_ECONF// --/\!}
859 - for opt in "${ac[@]}"; do
860 - mozconfig_add_options_ac "EXTRA_ECONF" --${opt#--}
861 - done
862 - fi
863 -
864 - echo
865 - echo "=========================================================="
866 - echo "Building ${PF} with the following configuration"
867 - grep ^ac_add_options "${MOZCONFIG}" | while read ac opt hash reason; do
868 - [[ -z ${hash} || ${hash} == \# ]] \
869 - || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}"
870 - printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}"
871 - done
872 - echo "=========================================================="
873 - echo
874 -
875 - ./mach configure || die
876 -}
877 -
878 -src_compile() {
879 - local virtx_cmd=
880 -
881 - if use pgo ; then
882 - virtx_cmd=virtx
883 -
884 - # Reset and cleanup environment variables used by GNOME/XDG
885 - gnome2_environment_reset
886 -
887 - addpredict /root
888 - fi
889 -
890 - local -x GDK_BACKEND=x11
891 -
892 - ${virtx_cmd} ./mach build --verbose \
893 - || die
894 -}
895 -
896 -src_install() {
897 - # xpcshell is getting called during install
898 - pax-mark m \
899 - "${BUILD_DIR}"/dist/bin/xpcshell \
900 - "${BUILD_DIR}"/dist/bin/${PN} \
901 - "${BUILD_DIR}"/dist/bin/plugin-container
902 -
903 - DESTDIR="${D}" ./mach install || die
904 -
905 - # Upstream cannot ship symlink but we can (bmo#658850)
906 - rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
907 - dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
908 -
909 - # Don't install llvm-symbolizer from sys-devel/llvm package
910 - if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
911 - rm -v "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" || die
912 - fi
913 -
914 - # Install policy (currently only used to disable application updates)
915 - insinto "${MOZILLA_FIVE_HOME}/distribution"
916 - newins "${FILESDIR}"/distribution.ini distribution.ini
917 - newins "${FILESDIR}"/disable-auto-update.policy.json policies.json
918 -
919 - # Install system-wide preferences
920 - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences"
921 - insinto "${PREFS_DIR}"
922 - newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
923 -
924 - local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js"
925 -
926 - # Set dictionary path to use system hunspell
927 - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref"
928 - pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell");
929 - EOF
930 -
931 - # Force hwaccel prefs if USE=hwaccel is enabled
932 - if use hwaccel ; then
933 - cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \
934 - >>"${GENTOO_PREFS}" \
935 - || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js"
936 - fi
937 -
938 - if ! use gmp-autoupdate ; then
939 - local plugin
940 - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do
941 - einfo "Disabling auto-update for ${plugin} plugin ..."
942 - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin"
943 - pref("media.${plugin}.autoupdate", false);
944 - EOF
945 - done
946 - fi
947 -
948 - # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it
949 - if use system-harfbuzz ; then
950 - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref"
951 - sticky_pref("gfx.font_rendering.graphite.enabled", true);
952 - EOF
953 - fi
954 -
955 - # Install language packs
956 - local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') )
957 - if [[ -n "${langpacks}" ]] ; then
958 - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}"
959 - fi
960 -
961 - # Install geckodriver
962 - if use geckodriver ; then
963 - einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..."
964 - pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver
965 - exeinto "${MOZILLA_FIVE_HOME}"
966 - doexe "${BUILD_DIR}"/dist/bin/geckodriver
967 -
968 - dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver
969 - fi
970 -
971 - # Install icons
972 - local icon_srcdir="${S}/browser/branding/official"
973 - local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg"
974 -
975 - insinto /usr/share/icons/hicolor/symbolic/apps
976 - newins "${icon_symbolic_file}" ${PN}-symbolic.svg
977 -
978 - local icon size
979 - for icon in "${icon_srcdir}"/default*.png ; do
980 - size=${icon%.png}
981 - size=${size##*/default}
982 -
983 - if [[ ${size} -eq 48 ]] ; then
984 - newicon "${icon}" ${PN}.png
985 - fi
986 -
987 - newicon -s ${size} "${icon}" ${PN}.png
988 - done
989 -
990 - # Install menus
991 - local wrapper_wayland="${PN}-wayland.sh"
992 - local wrapper_x11="${PN}-x11.sh"
993 - local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
994 - local display_protocols="auto X11"
995 - local icon="${PN}"
996 - local name="Mozilla ${MOZ_PN^}"
997 - local use_wayland="false"
998 -
999 - if use wayland ; then
1000 - display_protocols+=" Wayland"
1001 - use_wayland="true"
1002 - fi
1003 -
1004 - local app_name desktop_filename display_protocol exec_command
1005 - for display_protocol in ${display_protocols} ; do
1006 - app_name="${name} on ${display_protocol}"
1007 - desktop_filename="${PN}-${display_protocol,,}.desktop"
1008 -
1009 - case ${display_protocol} in
1010 - Wayland)
1011 - exec_command="${PN}-wayland --name ${PN}-wayland"
1012 - newbin "${FILESDIR}/${wrapper_wayland}" ${PN}-wayland
1013 - ;;
1014 - X11)
1015 - if ! use wayland ; then
1016 - # Exit loop here because there's no choice so
1017 - # we don't need wrapper/.desktop file for X11.
1018 - continue
1019 - fi
1020 -
1021 - exec_command="${PN}-x11 --name ${PN}-x11"
1022 - newbin "${FILESDIR}/${wrapper_x11}" ${PN}-x11
1023 - ;;
1024 - *)
1025 - app_name="${name}"
1026 - desktop_filename="${PN}.desktop"
1027 - exec_command="${PN}"
1028 - ;;
1029 - esac
1030 -
1031 - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
1032 -
1033 - sed -i \
1034 - -e "s:@NAME@:${app_name}:" \
1035 - -e "s:@EXEC@:${exec_command}:" \
1036 - -e "s:@ICON@:${icon}:" \
1037 - "${WORKDIR}/${PN}.desktop-template" \
1038 - || die
1039 -
1040 - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}"
1041 -
1042 - rm "${WORKDIR}/${PN}.desktop-template" || die
1043 - done
1044 -
1045 - # Install generic wrapper script
1046 - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}"
1047 - newbin "${FILESDIR}/${PN}.sh" ${PN}
1048 -
1049 - # Update wrapper
1050 - local wrapper
1051 - for wrapper in \
1052 - "${ED}/usr/bin/${PN}" \
1053 - "${ED}/usr/bin/${PN}-x11" \
1054 - "${ED}/usr/bin/${PN}-wayland" \
1055 - ; do
1056 - [[ ! -f "${wrapper}" ]] && continue
1057 -
1058 - sed -i \
1059 - -e "s:@PREFIX@:${EPREFIX}/usr:" \
1060 - -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \
1061 - -e "s:@APULSELIB_DIR@:${apulselib}:" \
1062 - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \
1063 - "${wrapper}" \
1064 - || die
1065 - done
1066 -}
1067 -
1068 -pkg_preinst() {
1069 - xdg_pkg_preinst
1070 -
1071 - # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse
1072 - # does not need to be forced into the LD_LIBRARY_PATH
1073 - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
1074 - einfo "APULSE found; Generating library symlinks for sound support ..."
1075 - local lib
1076 - pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die
1077 - for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do
1078 - # A quickpkg rolled by hand will grab symlinks as part of the package,
1079 - # so we need to avoid creating them if they already exist.
1080 - if [[ ! -L ${lib##*/} ]] ; then
1081 - ln -s "${lib}" ${lib##*/} || die
1082 - fi
1083 - done
1084 - popd &>/dev/null || die
1085 - fi
1086 -}
1087 -
1088 -pkg_postinst() {
1089 - xdg_pkg_postinst
1090 -
1091 - if ! use gmp-autoupdate ; then
1092 - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or"
1093 - elog "installing into new profiles:"
1094 - local plugin
1095 - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do
1096 - elog "\t ${plugin}"
1097 - done
1098 - elog
1099 - fi
1100 -
1101 - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then
1102 - elog "Apulse was detected at merge time on this system and so it will always be"
1103 - elog "used for sound. If you wish to use pulseaudio instead please unmerge"
1104 - elog "media-sound/apulse."
1105 - elog
1106 - fi
1107 -
1108 - local show_doh_information show_normandy_information
1109 -
1110 - if [[ -z "${REPLACING_VERSIONS}" ]] ; then
1111 - # New install; Tell user that DoH is disabled by default
1112 - show_doh_information=yes
1113 - show_normandy_information=yes
1114 - else
1115 - local replacing_version
1116 - for replacing_version in ${REPLACING_VERSIONS} ; do
1117 - if ver_test "${replacing_version}" -lt 70 ; then
1118 - # Tell user only once about our DoH default
1119 - show_doh_information=yes
1120 - fi
1121 -
1122 - if ver_test "${replacing_version}" -lt 74.0-r2 ; then
1123 - # Tell user only once about our Normandy default
1124 - show_normandy_information=yes
1125 - fi
1126 - done
1127 - fi
1128 -
1129 - if [[ -n "${show_doh_information}" ]] ; then
1130 - elog
1131 - elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):"
1132 - elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all"
1133 - elog "DNS traffic to Cloudflare by default is not a good idea and applications"
1134 - elog "should respect OS configured settings), \"network.trr.mode\" was set to 5"
1135 - elog "(\"Off by choice\") by default."
1136 - elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences."
1137 - fi
1138 -
1139 - # bug 713782
1140 - if [[ -n "${show_normandy_information}" ]] ; then
1141 - elog
1142 - elog "Upstream operates a service named Normandy which allows Mozilla to"
1143 - elog "push changes for default settings or even install new add-ons remotely."
1144 - elog "While this can be useful to address problems like 'Armagadd-on 2.0' or"
1145 - elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security"
1146 - elog "concerns prevail, which is why we have switched off the use of this"
1147 - elog "service by default."
1148 - elog
1149 - elog "To re-enable this service set"
1150 - elog
1151 - elog " app.normandy.enabled=true"
1152 - elog
1153 - elog "in about:config."
1154 - fi
1155 -}