commit:     173d91fcccabe88ffdbd6d20a00b4e3838e1d889
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 21 14:57:48 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 21 17:11:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=173d91fc

www-client/firefox: re-order options

This will avoid overriding.

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 www-client/firefox/firefox-78.4.0.ebuild | 145 ++++++++++++++++---------------
 www-client/firefox/firefox-82.0.ebuild   | 145 ++++++++++++++++---------------
 2 files changed, 146 insertions(+), 144 deletions(-)

diff --git a/www-client/firefox/firefox-78.4.0.ebuild 
b/www-client/firefox/firefox-78.4.0.ebuild
index 81b19755fcf..b65d74d64aa 100644
--- a/www-client/firefox/firefox-78.4.0.ebuild
+++ b/www-client/firefox/firefox-78.4.0.ebuild
@@ -567,78 +567,7 @@ src_configure() {
        # Initialize MOZCONFIG
        mozconfig_add_options_ac '' --enable-application=browser
 
-       if use lto ; then
-               if use clang ; then
-                       # Upstream only supports lld when using clang
-                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
-
-                       mozconfig_add_options_ac '+lto' --enable-lto=cross
-               else
-                       # Linking only works when using ld.gold when LTO is 
enabled
-                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
-
-                       # ThinLTO is currently broken, see bmo#1644409
-                       mozconfig_add_options_ac '+lto' --enable-lto=full
-               fi
-
-               if use pgo ; then
-                       mozconfig_add_options_ac '+pgo' MOZ_PGO=1
-
-                       if use clang ; then
-                               # Used in build/pgo/profileserver.py
-                               export LLVM_PROFDATA="llvm-profdata"
-                       fi
-               fi
-       else
-               # Avoid auto-magic on linker
-               if use clang ; then
-                       # This is upstream's default
-                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
-               elif tc-ld-is-gold ; then
-                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
-               else
-                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
-               fi
-       fi
-
-       # LTO flag was handled via configure
-       filter-flags '-flto*'
-
-       mozconfig_use_enable debug
-       if use debug ; then
-               mozconfig_add_options_ac '+debug' --disable-optimize
-       else
-               if is-flag '-g*' ; then
-                       if use clang ; then
-                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
-                       else
-                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
-                       fi
-               else
-                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
-               fi
-
-               if is-flag '-O0' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
-               elif is-flag '-O4' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
-               elif is-flag '-O3' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
-               elif is-flag '-O1' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
-               elif is-flag '-Os' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
-               else
-                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
-               fi
-       fi
-
-       # Debug flag was handled via configure
-       filter-flags '-g*'
-
-       # Optimization flag was handled via configure
-       filter-flags '-O*'
-
+       # Set Gentoo defaults
        mozconfig_add_options_ac 'Gentoo default' \
                --allow-addon-sideload \
                --disable-cargo-incremental \
@@ -726,6 +655,78 @@ src_configure() {
                mozconfig_add_options_ac '' --enable-default-toolkit=cairo-gtk3
        fi
 
+       if use lto ; then
+               if use clang ; then
+                       # Upstream only supports lld when using clang
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+               else
+                       # Linking only works when using ld.gold when LTO is 
enabled
+                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
+
+                       # ThinLTO is currently broken, see bmo#1644409
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+               fi
+
+               if use pgo ; then
+                       mozconfig_add_options_ac '+pgo' MOZ_PGO=1
+
+                       if use clang ; then
+                               # Used in build/pgo/profileserver.py
+                               export LLVM_PROFDATA="llvm-profdata"
+                       fi
+               fi
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # This is upstream's default
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+               elif tc-ld-is-gold ; then
+                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
+               else
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+       fi
+
+       # LTO flag was handled via configure
+       filter-flags '-flto*'
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+       else
+               if is-flag '-g*' ; then
+                       if use clang ; then
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
+                       else
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
+                       fi
+               else
+                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
+               fi
+
+               if is-flag '-O0' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
+               elif is-flag '-O4' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
+               elif is-flag '-O3' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
+               elif is-flag '-O1' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
+               elif is-flag '-Os' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
+               else
+                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
+               fi
+       fi
+
+       # Debug flag was handled via configure
+       filter-flags '-g*'
+
+       # Optimization flag was handled via configure
+       filter-flags '-O*'
+
        # Modifications to better support ARM, bug #553364
        if use cpu_flags_arm_neon ; then
                mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon

diff --git a/www-client/firefox/firefox-82.0.ebuild 
b/www-client/firefox/firefox-82.0.ebuild
index 85f7a881473..7ccb7196075 100644
--- a/www-client/firefox/firefox-82.0.ebuild
+++ b/www-client/firefox/firefox-82.0.ebuild
@@ -567,78 +567,7 @@ src_configure() {
        # Initialize MOZCONFIG
        mozconfig_add_options_ac '' --enable-application=browser
 
-       if use lto ; then
-               if use clang ; then
-                       # Upstream only supports lld when using clang
-                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
-
-                       mozconfig_add_options_ac '+lto' --enable-lto=cross
-               else
-                       # Linking only works when using ld.gold when LTO is 
enabled
-                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
-
-                       # ThinLTO is currently broken, see bmo#1644409
-                       mozconfig_add_options_ac '+lto' --enable-lto=full
-               fi
-
-               if use pgo ; then
-                       mozconfig_add_options_ac '+pgo' MOZ_PGO=1
-
-                       if use clang ; then
-                               # Used in build/pgo/profileserver.py
-                               export LLVM_PROFDATA="llvm-profdata"
-                       fi
-               fi
-       else
-               # Avoid auto-magic on linker
-               if use clang ; then
-                       # This is upstream's default
-                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
-               elif tc-ld-is-gold ; then
-                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
-               else
-                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
-               fi
-       fi
-
-       # LTO flag was handled via configure
-       filter-flags '-flto*'
-
-       mozconfig_use_enable debug
-       if use debug ; then
-               mozconfig_add_options_ac '+debug' --disable-optimize
-       else
-               if is-flag '-g*' ; then
-                       if use clang ; then
-                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
-                       else
-                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
-                       fi
-               else
-                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
-               fi
-
-               if is-flag '-O0' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
-               elif is-flag '-O4' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
-               elif is-flag '-O3' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
-               elif is-flag '-O1' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
-               elif is-flag '-Os' ; then
-                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
-               else
-                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
-               fi
-       fi
-
-       # Debug flag was handled via configure
-       filter-flags '-g*'
-
-       # Optimization flag was handled via configure
-       filter-flags '-O*'
-
+       # Set Gentoo defaults
        mozconfig_add_options_ac 'Gentoo default' \
                --allow-addon-sideload \
                --disable-cargo-incremental \
@@ -726,6 +655,78 @@ src_configure() {
                mozconfig_add_options_ac '' --enable-default-toolkit=cairo-gtk3
        fi
 
+       if use lto ; then
+               if use clang ; then
+                       # Upstream only supports lld when using clang
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang and USE=lto" --enable-linker=lld
+
+                       mozconfig_add_options_ac '+lto' --enable-lto=cross
+               else
+                       # Linking only works when using ld.gold when LTO is 
enabled
+                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
+
+                       # ThinLTO is currently broken, see bmo#1644409
+                       mozconfig_add_options_ac '+lto' --enable-lto=full
+               fi
+
+               if use pgo ; then
+                       mozconfig_add_options_ac '+pgo' MOZ_PGO=1
+
+                       if use clang ; then
+                               # Used in build/pgo/profileserver.py
+                               export LLVM_PROFDATA="llvm-profdata"
+                       fi
+               fi
+       else
+               # Avoid auto-magic on linker
+               if use clang ; then
+                       # This is upstream's default
+                       mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+               elif tc-ld-is-gold ; then
+                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
+               else
+                       mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
+               fi
+       fi
+
+       # LTO flag was handled via configure
+       filter-flags '-flto*'
+
+       mozconfig_use_enable debug
+       if use debug ; then
+               mozconfig_add_options_ac '+debug' --disable-optimize
+       else
+               if is-flag '-g*' ; then
+                       if use clang ; then
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols=$(get-flag '-g*')
+                       else
+                               mozconfig_add_options_ac 'from CFLAGS' 
--enable-debug-symbols
+                       fi
+               else
+                       mozconfig_add_options_ac 'Gentoo default' 
--disable-debug-symbols
+               fi
+
+               if is-flag '-O0' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O0
+               elif is-flag '-O4' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O4
+               elif is-flag '-O3' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O3
+               elif is-flag '-O1' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-O1
+               elif is-flag '-Os' ; then
+                       mozconfig_add_options_ac "from CFLAGS" 
--enable-optimize=-Os
+               else
+                       mozconfig_add_options_ac "Gentoo default" 
--enable-optimize=-O2
+               fi
+       fi
+
+       # Debug flag was handled via configure
+       filter-flags '-g*'
+
+       # Optimization flag was handled via configure
+       filter-flags '-O*'
+
        # Modifications to better support ARM, bug #553364
        if use cpu_flags_arm_neon ; then
                mozconfig_add_options_ac '+cpu_flags_arm_neon' --with-fpu=neon

Reply via email to