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

ruby-utils.eclass: [QA] add EAPI guard

* Add EAPI inherit guard
* Declare supported EAPIs

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

 eclass/ruby-utils.eclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index e5752dca2d7..82e09cf49cb 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: ruby-utils.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Author: Hans de Graaff <gra...@gentoo.org>
 # @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby 
packages
+# @SUPPORTED_EAPIS: 5 6 7
 # @DESCRIPTION:
 # The ruby-utils eclass is designed to allow an easier installation of
 # Ruby scripts and bindings for non-ruby packages.
@@ -14,6 +15,10 @@
 # This eclass does not set any metadata variables nor export any phase
 # functions. It can be inherited safely.
 
+case ${EAPI:-0} in
+       [567]) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
 
 if [[ ! ${_RUBY_UTILS} ]]; then
 

Reply via email to