commit:     93c765a9b349be736f86cb6ca823d8cf6220a335
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  7 21:39:09 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 18:21:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93c765a9

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

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

 eclass/wrapper.eclass | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/eclass/wrapper.eclass b/eclass/wrapper.eclass
index 8d3d273d81c6..a62bb51d0fe7 100644
--- a/eclass/wrapper.eclass
+++ b/eclass/wrapper.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: wrapper.eclass
@@ -7,15 +7,19 @@
 # @SUPPORTED_EAPIS: 5 6 7 8
 # @BLURB: create a shell wrapper script
 
+if [[ -z ${_WRAPPER_ECLASS} ]]; then
+_WRAPPER_ECLASS=1
+
 case ${EAPI} in
-       5|6|7|8) ;;
+       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 [[ -z ${_WRAPPER_ECLASS} ]]; then
-_WRAPPER_ECLASS=1
-
-# @FUNCTION: make_wrapper
+# FUNCTION: make_wrapper
 # @USAGE: <wrapper> <target> [chdir] [libpaths] [installpath]
 # @DESCRIPTION:
 # Create a shell wrapper script named wrapper in installpath

Reply via email to