commit:     8bb76275c813bfeff07d46cd14faae560ea517e5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 21:15:04 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 21:15:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bb76275

portability.eclass: [QA] add EAPI guard

Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 eclass/portability.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index 3b085d6c4e7..1b3c3952f83 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -7,6 +7,12 @@
 # @AUTHOR:
 # Diego Pettenò <flamee...@gentoo.org>
 # @BLURB: This eclass is created to avoid using non-portable GNUisms inside 
ebuilds
+# @SUPPORTED_EAPIS: 5 6 7
+
+case ${EAPI:-0} in
+       [567]) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
 
 if [[ -z ${_PORTABILITY_ECLASS} ]]; then
 _PORTABILITY_ECLASS=1

Reply via email to