java-osgi.eclass: [QA] add EAPI guard

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
Sam James
2021-06-20 23:14:08 +02:00
committed by David Seifert
parent 391ed9b1b8
commit 3aa0f2ef95
+11
View File
@@ -7,12 +7,21 @@
# @AUTHOR:
# Java maintainers <java@gentoo.org>
# @BLURB: Java OSGi eclass
# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass provides functionality which is used by packages that need to be
# OSGi compliant. This means that the generated jars will have special headers
# in their manifests. Currently this is used only by Eclipse-3.3 - later we
# could extend this so that Gentoo Java system would be fully OSGi compliant.
case ${EAPI:-0} in
[567]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_JAVA_OSGI_ECLASS} ]] ; then
_JAVA_OSGI_ECLASS=1
inherit java-utils-2
# @ECLASS-VARIABLE: _OSGI_T
@@ -275,3 +284,5 @@ java-osgi_dojar-fromfile() {
_java-osgi_makejar-fromfile "$@" "${versionRewriting}"
java-pkg_dojar "${_OSGI_T}/osgi/${jarName}"
}
fi