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

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

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

 eclass/toolchain-funcs.eclass | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 5e36fa275dcd..66819996ea33 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -13,14 +13,18 @@
 # in such a way that you can rely on the function always returning
 # something sane.
 
+if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then
+_TOOLCHAIN_FUNCS_ECLASS=1
+
 case ${EAPI} in
-       6|7|8) ;;
+       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 ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then
-_TOOLCHAIN_FUNCS_ECLASS=1
-
 inherit multilib
 
 # tc-getPROG <VAR [search vars]> <default> [tuple]

Reply via email to