summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/java-pkg-2.eclass')
-rw-r--r--eclass/java-pkg-2.eclass17
1 files changed, 13 insertions, 4 deletions
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index 4b690be1375..362e5f47d66 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -7,10 +7,21 @@
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>
# @BLURB: Eclass for Java Packages
+# @SUPPORTED_EAPIS: 5 6 7
# @DESCRIPTION:
# This eclass should be inherited for pure Java packages, or by packages which
# need to use Java.
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst
+
+if [[ -z ${_JAVA_PKG_2_ECLASS} ]] ; then
+_JAVA_PKG_2_ECLASS=1
+
inherit java-utils-2
# @ECLASS-VARIABLE: JAVA_PKG_IUSE
@@ -35,10 +46,6 @@ if [[ ${CATEGORY} = dev-java && ${PN} = commons-* ]]; then
SRC_URI="mirror://apache/${PN/-///}/source/${P}-src.tar.gz"
fi
-case "${EAPI:-0}" in
- 0|1) EXPORT_FUNCTIONS pkg_setup src_compile pkg_preinst ;;
- *) EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst ;;
-esac
# @FUNCTION: java-pkg-2_pkg_setup
# @DESCRIPTION:
@@ -149,3 +156,5 @@ java-pkg-2_src_test() {
java-pkg-2_pkg_preinst() {
java-utils-2_pkg_preinst
}
+
+fi