summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:28 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:28 +0200
commita79ecbc121890ddb5bb3f0a060cf57ea751973dc (patch)
tree67f064dc8f54eec01e3a2381ab7b25ab00e8d69c
parentstardict.eclass: [QA] add EAPI guard, add basic eclassdoc (diff)
downloadgentoo-a79ecbc121890ddb5bb3f0a060cf57ea751973dc.tar.gz
gentoo-a79ecbc121890ddb5bb3f0a060cf57ea751973dc.tar.bz2
gentoo-a79ecbc121890ddb5bb3f0a060cf57ea751973dc.zip
toolchain-funcs.eclass: [QA] add EAPI guard
* Declare suppported EAPIs. * Add EAPI guard to prevent newer/older unsupported EAPIs from using this eclass when they've not been tested/eclass isn't adapted for it. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--eclass/toolchain-funcs.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 267cf5cfce34..6806bd0883bb 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -5,6 +5,7 @@
# @MAINTAINER:
# Toolchain Ninjas <toolchain@gentoo.org>
# @BLURB: functions to query common info about the toolchain
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# The toolchain-funcs aims to provide a complete suite of functions
# for gleaning useful information about the toolchain and to simplify
@@ -12,6 +13,11 @@
# in such a way that you can rely on the function always returning
# something sane.
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then
_TOOLCHAIN_FUNCS_ECLASS=1