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: Wed, 30 Sep 2020 18:05:54
Message-Id: 1601489032.4a0df842c51213700d25686e1bc7f274bf257b4e.whissi@gentoo
1 commit: 4a0df842c51213700d25686e1bc7f274bf257b4e
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 30 16:55:14 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 30 18:03:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0df842
7
8 www-client/firefox: synchronize with mail-client/thunderbird
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 www-client/firefox/firefox-78.3.0.ebuild | 82 ++++++++++++++++++--------------
14 www-client/firefox/firefox-81.0.ebuild | 82 ++++++++++++++++++--------------
15 2 files changed, 94 insertions(+), 70 deletions(-)
16
17 diff --git a/www-client/firefox/firefox-78.3.0.ebuild b/www-client/firefox/firefox-78.3.0.ebuild
18 index a1d5ff8af43..f18a63b86e6 100644
19 --- a/www-client/firefox/firefox-78.3.0.ebuild
20 +++ b/www-client/firefox/firefox-78.3.0.ebuild
21 @@ -14,14 +14,14 @@ WANT_AUTOCONF="2.1"
22
23 VIRTUALX_REQUIRED="pgo"
24
25 -MOZ_ESR="1"
26 +MOZ_ESR=yes
27
28 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
29 MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
30 MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
31 MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
32
33 -if [[ ${MOZ_ESR} == 1 ]] ; then
34 +if [[ -n ${MOZ_ESR} ]] ; then
35 # ESR releases have slightly different version numbers
36 MOZ_PV="${MOZ_PV}esr"
37 fi
38 @@ -169,7 +169,7 @@ DEPEND="${CDEPEND}
39 amd64? ( virtual/opengl )
40 x86? ( virtual/opengl )"
41
42 -S="${WORKDIR}/firefox-${PV%_*}"
43 +S="${WORKDIR}/${PN}-${PV%_*}"
44
45 # Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or
46 # overridden in the enviromnent (advanced hackers only)
47 @@ -231,7 +231,7 @@ mozilla_set_globals() {
48 fi
49
50 SRC_URI+=" l10n_${xflag/[_@]/-}? ("
51 - SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-i686/xpi/${lang}.xpi -> ${PN}-${MOZ_PV}-${lang}.xpi"
52 + SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${PN}-${MOZ_PV}-${lang}.xpi"
53 SRC_URI+=" )"
54 IUSE+=" l10n_${xflag/[_@]/-}"
55 done
56 @@ -430,7 +430,7 @@ src_unpack() {
57 }
58
59 src_prepare() {
60 - use pgo && rm -v "${WORKDIR}"/firefox-patches/0033-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
61 + use pgo && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
62 eapply "${WORKDIR}/firefox-patches"
63
64 # Allow user to apply any additional patches without modifing ebuild
65 @@ -472,9 +472,6 @@ src_prepare() {
66 # Write API keys to disk
67 echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
68
69 - # Initialize .mozconfig
70 - cp browser/config/mozconfig .mozconfig || die
71 -
72 xdg_src_prepare
73 }
74
75 @@ -508,15 +505,15 @@ src_configure() {
76 # Set MOZILLA_FIVE_HOME
77 export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
78
79 - # Use the MOZILLA_FIVE_HOME for the rpath
80 - #append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
81 -
82 # python/mach/mach/mixin/process.py fails to detect SHELL
83 export SHELL="${EPREFIX}/bin/bash"
84
85 # Set MOZCONFIG
86 export MOZCONFIG="${S}/.mozconfig"
87
88 + # Initialize MOZCONFIG
89 + mozconfig_add_options_ac '' --enable-application=browser
90 +
91 if use lto ; then
92 if use clang ; then
93 # Upstream only supports lld when using clang
94 @@ -615,7 +612,7 @@ src_configure() {
95
96 # Set update channel
97 local update_channel=release
98 - [[ ${MOZ_ESR} == 1 ]] && update_channel=esr
99 + [[ -n ${MOZ_ESR} ]] && update_channel=esr
100 mozconfig_add_options_ac '' --update-channel=${update_channel}
101
102 if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
103 @@ -696,6 +693,24 @@ src_configure() {
104 fi
105 fi
106
107 + if use clang ; then
108 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
109 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
110 + # toolkit/moz.configure Elfhack section: target.cpu in ('arm', 'x86', 'x86_64')
111 + local disable_elf_hack=
112 + if use amd64 ; then
113 + disable_elf_hack=yes
114 + elif use x86 ; then
115 + disable_elf_hack=yes
116 + elif use arm ; then
117 + disable_elf_hack=yes
118 + fi
119 +
120 + if [[ -n ${disable_elf_hack} ]] ; then
121 + mozconfig_add_options_ac 'elf-hack is broken when using Clang' --disable-elf-hack
122 + fi
123 + fi
124 +
125 # Additional ARCH support
126 case "${ARCH}" in
127 arm | ppc64)
128 @@ -783,8 +798,8 @@ src_install() {
129 DESTDIR="${D}" ./mach install || die
130
131 # Upstream cannot ship symlink but we can (bmo#658850)
132 - rm "${ED}${MOZILLA_FIVE_HOME}/firefox-bin" || die
133 - dosym firefox ${MOZILLA_FIVE_HOME}/firefox-bin
134 + rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
135 + dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
136
137 # Don't install llvm-symbolizer from sys-devel/llvm package
138 if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
139 @@ -824,15 +839,6 @@ src_install() {
140 done
141 fi
142
143 - # Skia should be working by now ...
144 - ## Force cairo as the canvas renderer on platforms without skia support
145 - #if [[ $(tc-endian) == "big" ]] ; then
146 - # cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to force cairo for platform without skia support"
147 - # sticky_pref("gfx.canvas.azure.backends", "cairo");
148 - # sticky_pref("gfx.content.azure.backends", "cairo");
149 - # EOF
150 - #fi
151 -
152 # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it
153 if use system-harfbuzz ; then
154 cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref"
155 @@ -857,11 +863,14 @@ src_install() {
156 fi
157
158 # Install icons
159 + local icon_srcdir="${S}/browser/branding/official"
160 + local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg"
161 +
162 insinto /usr/share/icons/hicolor/symbolic/apps
163 - newins "${FILESDIR}/icon/firefox-symbolic.svg" ${PN}-symbolic.png
164 + newins "${icon_symbolic_file}" ${PN}-symbolic.svg
165
166 local icon size
167 - for icon in "${S}"/browser/branding/official/default*.png ; do
168 + for icon in "${icon_srcdir}"/default*.png ; do
169 size=${icon%.png}
170 size=${size##*/default}
171
172 @@ -873,6 +882,9 @@ src_install() {
173 done
174
175 # Install menus
176 + local wrapper_wayland="${PN}-wayland.sh"
177 + local wrapper_x11="${PN}-x11.sh"
178 + local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
179 local display_protocols="auto X11"
180 local icon="${PN}"
181 local name="Mozilla ${PN^}"
182 @@ -890,8 +902,8 @@ src_install() {
183
184 case ${display_protocol} in
185 Wayland)
186 - exec_command='firefox-wayland --name firefox-wayland'
187 - newbin "${FILESDIR}"/firefox-wayland.sh firefox-wayland
188 + exec_command="${PN}-wayland --name ${PN}-wayland"
189 + newbin "${FILESDIR}/${wrapper_wayland}" ${PN}-wayland
190 ;;
191 X11)
192 if ! use wayland ; then
193 @@ -900,17 +912,17 @@ src_install() {
194 continue
195 fi
196
197 - exec_command='firefox-x11 --name firefox-x11'
198 - newbin "${FILESDIR}"/firefox-x11.sh firefox-x11
199 + exec_command="${PN}-x11 --name ${PN}-x11"
200 + newbin "${FILESDIR}/${wrapper_x11}" ${PN}-x11
201 ;;
202 *)
203 app_name="${name}"
204 desktop_filename="${PN}.desktop"
205 - exec_command='firefox'
206 + exec_command="${PN}"
207 ;;
208 esac
209
210 - cp "${FILESDIR}/icon/${PN}-r2.desktop" "${WORKDIR}/${PN}.desktop-template" || die
211 + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
212
213 sed -i \
214 -e "s:@NAME@:${app_name}:" \
215 @@ -926,14 +938,14 @@ src_install() {
216
217 # Install generic wrapper script
218 rm "${ED}/usr/bin/${PN}" || die
219 - newbin "${FILESDIR}/firefox.sh" ${PN}
220 + newbin "${FILESDIR}/${PN}.sh" ${PN}
221
222 # Update wrapper
223 local wrapper
224 for wrapper in \
225 - "${ED}/usr/bin/firefox" \
226 - "${ED}/usr/bin/firefox-x11" \
227 - "${ED}/usr/bin/firefox-wayland" \
228 + "${ED}/usr/bin/${PN}" \
229 + "${ED}/usr/bin/${PN}-x11" \
230 + "${ED}/usr/bin/${PN}-wayland" \
231 ; do
232 [[ ! -f "${wrapper}" ]] && continue
233
234
235 diff --git a/www-client/firefox/firefox-81.0.ebuild b/www-client/firefox/firefox-81.0.ebuild
236 index c92df895d0b..c91fb64100d 100644
237 --- a/www-client/firefox/firefox-81.0.ebuild
238 +++ b/www-client/firefox/firefox-81.0.ebuild
239 @@ -14,14 +14,14 @@ WANT_AUTOCONF="2.1"
240
241 VIRTUALX_REQUIRED="pgo"
242
243 -MOZ_ESR=""
244 +MOZ_ESR=
245
246 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
247 MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
248 MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
249 MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
250
251 -if [[ ${MOZ_ESR} == 1 ]] ; then
252 +if [[ -n ${MOZ_ESR} ]] ; then
253 # ESR releases have slightly different version numbers
254 MOZ_PV="${MOZ_PV}esr"
255 fi
256 @@ -169,7 +169,7 @@ DEPEND="${CDEPEND}
257 amd64? ( virtual/opengl )
258 x86? ( virtual/opengl )"
259
260 -S="${WORKDIR}/firefox-${PV%_*}"
261 +S="${WORKDIR}/${PN}-${PV%_*}"
262
263 # Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or
264 # overridden in the enviromnent (advanced hackers only)
265 @@ -231,7 +231,7 @@ mozilla_set_globals() {
266 fi
267
268 SRC_URI+=" l10n_${xflag/[_@]/-}? ("
269 - SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-i686/xpi/${lang}.xpi -> ${P}-${lang}.xpi"
270 + SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${PN}-${MOZ_PV}-${lang}.xpi"
271 SRC_URI+=" )"
272 IUSE+=" l10n_${xflag/[_@]/-}"
273 done
274 @@ -430,7 +430,7 @@ src_unpack() {
275 }
276
277 src_prepare() {
278 - use pgo && rm -v "${WORKDIR}"/firefox-patches/0029-LTO-Only-enable-LTO-for-Rust-when-complete-build-use.patch
279 + use pgo && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
280 eapply "${WORKDIR}/firefox-patches"
281
282 # Allow user to apply any additional patches without modifing ebuild
283 @@ -472,9 +472,6 @@ src_prepare() {
284 # Write API keys to disk
285 echo -n "${MOZ_API_KEY_GOOGLE//gGaPi/}" > "${S}"/api-google.key || die
286
287 - # Initialize .mozconfig
288 - cp browser/config/mozconfig .mozconfig || die
289 -
290 xdg_src_prepare
291 }
292
293 @@ -508,15 +505,15 @@ src_configure() {
294 # Set MOZILLA_FIVE_HOME
295 export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
296
297 - # Use the MOZILLA_FIVE_HOME for the rpath
298 - #append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
299 -
300 # python/mach/mach/mixin/process.py fails to detect SHELL
301 export SHELL="${EPREFIX}/bin/bash"
302
303 # Set MOZCONFIG
304 export MOZCONFIG="${S}/.mozconfig"
305
306 + # Initialize MOZCONFIG
307 + mozconfig_add_options_ac '' --enable-application=browser
308 +
309 if use lto ; then
310 if use clang ; then
311 # Upstream only supports lld when using clang
312 @@ -615,7 +612,7 @@ src_configure() {
313
314 # Set update channel
315 local update_channel=release
316 - [[ ${MOZ_ESR} == 1 ]] && update_channel=esr
317 + [[ -n ${MOZ_ESR} ]] && update_channel=esr
318 mozconfig_add_options_ac '' --update-channel=${update_channel}
319
320 if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
321 @@ -696,6 +693,24 @@ src_configure() {
322 fi
323 fi
324
325 + if use clang ; then
326 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
327 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1483822
328 + # toolkit/moz.configure Elfhack section: target.cpu in ('arm', 'x86', 'x86_64')
329 + local disable_elf_hack=
330 + if use amd64 ; then
331 + disable_elf_hack=yes
332 + elif use x86 ; then
333 + disable_elf_hack=yes
334 + elif use arm ; then
335 + disable_elf_hack=yes
336 + fi
337 +
338 + if [[ -n ${disable_elf_hack} ]] ; then
339 + mozconfig_add_options_ac 'elf-hack is broken when using Clang' --disable-elf-hack
340 + fi
341 + fi
342 +
343 # Additional ARCH support
344 case "${ARCH}" in
345 arm | ppc64)
346 @@ -783,8 +798,8 @@ src_install() {
347 DESTDIR="${D}" ./mach install || die
348
349 # Upstream cannot ship symlink but we can (bmo#658850)
350 - rm "${ED}${MOZILLA_FIVE_HOME}/firefox-bin" || die
351 - dosym firefox ${MOZILLA_FIVE_HOME}/firefox-bin
352 + rm "${ED}${MOZILLA_FIVE_HOME}/${PN}-bin" || die
353 + dosym ${PN} ${MOZILLA_FIVE_HOME}/${PN}-bin
354
355 # Don't install llvm-symbolizer from sys-devel/llvm package
356 if [[ -f "${ED}${MOZILLA_FIVE_HOME}/llvm-symbolizer" ]] ; then
357 @@ -824,15 +839,6 @@ src_install() {
358 done
359 fi
360
361 - # Skia should be working by now ...
362 - ## Force cairo as the canvas renderer on platforms without skia support
363 - #if [[ $(tc-endian) == "big" ]] ; then
364 - # cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to force cairo for platform without skia support"
365 - # sticky_pref("gfx.canvas.azure.backends", "cairo");
366 - # sticky_pref("gfx.content.azure.backends", "cairo");
367 - # EOF
368 - #fi
369 -
370 # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it
371 if use system-harfbuzz ; then
372 cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref"
373 @@ -857,11 +863,14 @@ src_install() {
374 fi
375
376 # Install icons
377 + local icon_srcdir="${S}/browser/branding/official"
378 + local icon_symbolic_file="${FILESDIR}/icon/firefox-symbolic.svg"
379 +
380 insinto /usr/share/icons/hicolor/symbolic/apps
381 - newins "${FILESDIR}/icon/firefox-symbolic.svg" ${PN}-symbolic.png
382 + newins "${icon_symbolic_file}" ${PN}-symbolic.svg
383
384 local icon size
385 - for icon in "${S}"/browser/branding/official/default*.png ; do
386 + for icon in "${icon_srcdir}"/default*.png ; do
387 size=${icon%.png}
388 size=${size##*/default}
389
390 @@ -873,6 +882,9 @@ src_install() {
391 done
392
393 # Install menus
394 + local wrapper_wayland="${PN}-wayland.sh"
395 + local wrapper_x11="${PN}-x11.sh"
396 + local desktop_file="${FILESDIR}/icon/${PN}-r2.desktop"
397 local display_protocols="auto X11"
398 local icon="${PN}"
399 local name="Mozilla ${PN^}"
400 @@ -890,8 +902,8 @@ src_install() {
401
402 case ${display_protocol} in
403 Wayland)
404 - exec_command='firefox-wayland --name firefox-wayland'
405 - newbin "${FILESDIR}"/firefox-wayland.sh firefox-wayland
406 + exec_command="${PN}-wayland --name ${PN}-wayland"
407 + newbin "${FILESDIR}/${wrapper_wayland}" ${PN}-wayland
408 ;;
409 X11)
410 if ! use wayland ; then
411 @@ -900,17 +912,17 @@ src_install() {
412 continue
413 fi
414
415 - exec_command='firefox-x11 --name firefox-x11'
416 - newbin "${FILESDIR}"/firefox-x11.sh firefox-x11
417 + exec_command="${PN}-x11 --name ${PN}-x11"
418 + newbin "${FILESDIR}/${wrapper_x11}" ${PN}-x11
419 ;;
420 *)
421 app_name="${name}"
422 desktop_filename="${PN}.desktop"
423 - exec_command='firefox'
424 + exec_command="${PN}"
425 ;;
426 esac
427
428 - cp "${FILESDIR}/icon/${PN}-r2.desktop" "${WORKDIR}/${PN}.desktop-template" || die
429 + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die
430
431 sed -i \
432 -e "s:@NAME@:${app_name}:" \
433 @@ -926,14 +938,14 @@ src_install() {
434
435 # Install generic wrapper script
436 rm "${ED}/usr/bin/${PN}" || die
437 - newbin "${FILESDIR}/firefox.sh" ${PN}
438 + newbin "${FILESDIR}/${PN}.sh" ${PN}
439
440 # Update wrapper
441 local wrapper
442 for wrapper in \
443 - "${ED}/usr/bin/firefox" \
444 - "${ED}/usr/bin/firefox-x11" \
445 - "${ED}/usr/bin/firefox-wayland" \
446 + "${ED}/usr/bin/${PN}" \
447 + "${ED}/usr/bin/${PN}-x11" \
448 + "${ED}/usr/bin/${PN}-wayland" \
449 ; do
450 [[ ! -f "${wrapper}" ]] && continue