commit: 6348971361f4b9dc3432ace5f146b000e9fb0cac
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 1 18:23:05 2022 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Feb 1 18:23:05 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63489713
toolchain.eclass: canonical variable ordering
Signed-off-by: David Seifert <soap <AT> gentoo.org>
eclass/toolchain.eclass | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 741b6dfbbcc7..495a305ed83e 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -7,6 +7,15 @@
# @SUPPORTED_EAPIS: 7 8
# @BLURB: Common code for sys-devel/gcc ebuilds
+case ${EAPI} in
+ 7) inherit eutils ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_TOOLCHAIN_ECLASS} ]]; then
+_TOOLCHAIN_ECLASS=1
+
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
@@ -30,15 +39,6 @@ fi
FEATURES=${FEATURES/multilib-strict/}
-case ${EAPI} in
- 7) inherit eutils ;;
- 8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
- src_compile src_test src_install pkg_postinst pkg_postrm
-
#---->> globals <<----
export CTARGET=${CTARGET:-${CHOST}}
@@ -2322,6 +2322,11 @@ toolchain_death_notice() {
fi
}
+fi
+
+EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
+ src_compile src_test src_install pkg_postinst pkg_postrm
+
# Note [implicitly enabled flags]
# -------------------------------
# Usually configure-based packages handle explicit feature requests