diff options
author | Sam James <sam@gentoo.org> | 2021-06-20 23:14:14 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-06-20 23:14:14 +0200 |
commit | 804eaace1c34611f40a6084b598e42f698bb2f4e (patch) | |
tree | cbb8c534924d9a2c775702818b3fb1c455071d47 /eclass/java-pkg-opt-2.eclass | |
parent | java-pkg-2.eclass: [QA] add EAPI guard (diff) | |
download | gentoo-804eaace1c34611f40a6084b598e42f698bb2f4e.tar.gz gentoo-804eaace1c34611f40a6084b598e42f698bb2f4e.tar.bz2 gentoo-804eaace1c34611f40a6084b598e42f698bb2f4e.zip |
java-pkg-opt-2.eclass: [QA] add EAPI guard
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/java-pkg-opt-2.eclass')
-rw-r--r-- | eclass/java-pkg-opt-2.eclass | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass index fa72421a0d77..7733fc7afd11 100644 --- a/eclass/java-pkg-opt-2.eclass +++ b/eclass/java-pkg-opt-2.eclass @@ -1,4 +1,4 @@ -# Copyright 2004-2015 Gentoo Foundation +# Copyright 2004-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-pkg-opt-2.eclass @@ -7,10 +7,21 @@ # @AUTHOR: # Thomas Matthijs <axxo@gentoo.org> # @BLURB: Eclass for package with optional Java support +# @SUPPORTED_EAPIS: 5 6 7 # @DESCRIPTION: # Inherit this eclass instead of java-pkg-2 if you only need optional Java # support. +case ${EAPI:-0} in + [567]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst + +if [[ -z ${_JAVA_PKG_OPT_2_ECLASS} ]] ; then +_JAVA_PKG_OPT_2_ECLASS=1 + inherit java-utils-2 # @ECLASS-VARIABLE: JAVA_PKG_OPT_USE @@ -24,11 +35,6 @@ RDEPEND="${DEPEND}" # See java-pkg-2.eclass for JAVA_PKG_IUSE documentation IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}" -case "${EAPI:-0}" in - 0|1) EXPORT_FUNCTIONS pkg_setup pkg_preinst ;; - *) EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst ;; -esac - # @FUNCTION: java-pkg-opt-2_pkg_setup # @DESCRIPTION: # default pkg_setup, wrapper for java-utils-2_pkg_init @@ -58,3 +64,5 @@ java-pkg-opt-2_src_prepare() { java-pkg-opt-2_pkg_preinst() { use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst } + +fi |