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

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2024-09-07 22:36:32 +01:00
parent 7064b9d129
commit 8f5ed80e26

View File

@@ -17,14 +17,18 @@
# that have optional Java support. In addition you can inherit java-ant-2 for
# Ant-based packages.
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_JAVA_UTILS_2_ECLASS} ]] ; then
_JAVA_UTILS_2_ECLASS=1
case ${EAPI} in
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
# EAPI 7 has version functions built-in. Use eapi7-ver for all earlier EAPIs.
# Keep versionator inheritance in case consumers are using it implicitly.
[[ ${EAPI} == 6 ]] && inherit eapi7-ver eqawarn multilib versionator