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>
This commit is contained in:
Sam James
2021-06-20 23:15:28 +02:00
committed by David Seifert
parent 2541f261a8
commit a79ecbc121
+6
View File
@@ -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