commit:     fabfe377fe7451c3a1f62d5e5cda837c63a583e2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  7 21:38:21 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 18:21:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fabfe377

ruby-utils.eclass: add global-scope ewarn for deprecated < EAPI 7

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

 eclass/ruby-utils.eclass | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index 789f57ce25f6..48a25114b396 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: ruby-utils.eclass
@@ -15,13 +15,17 @@
 # This eclass does not set any metadata variables nor export any phase
 # functions. It can be inherited safely.
 
-case ${EAPI:-0} in
-       [5678]) ;;
+if [[ ! ${_RUBY_UTILS} ]]; then
+
+case ${EAPI} in
+       5|6)
+               ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated 
EAPI ${EAPI}!"
+               ewarn "${CATEGORY}/${PF}: Support will be removed on 
2024-10-08. Please port to newer EAPI."
+               ;;
+       7|8) ;;
        *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_RUBY_UTILS} ]]; then
-
 # @ECLASS_VARIABLE: RUBY_TARGETS_PREFERENCE
 # @INTERNAL
 # @DESCRIPTION:

Reply via email to