From 723700a3efb0db2a56e99b24f04e9d8a0c064dd2 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 20 Jun 2021 23:14:23 +0200 Subject: [PATCH] java-virtuals-2.eclass: [QA] add EAPI guard Signed-off-by: Sam James Signed-off-by: David Seifert --- eclass/java-virtuals-2.eclass | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/eclass/java-virtuals-2.eclass b/eclass/java-virtuals-2.eclass index 987ff448364e9..d511682c26aca 100644 --- a/eclass/java-virtuals-2.eclass +++ b/eclass/java-virtuals-2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: java-virtuals-2.eclass @@ -7,10 +7,21 @@ # @AUTHOR: # Original Author: Alistair John Bush # @BLURB: Java virtuals eclass +# @SUPPORTED_EAPIS: 5 6 # @DESCRIPTION: # To provide a default (and only) src_install function for ebuilds in the # java-virtuals category. +case ${EAPI:-0} in + [56]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_install + +if [[ -z ${_JAVA_VIRTUALS_2_ECLASS} ]] ; then +_JAVA_VIRTUALS_2_ECLASS=1 + inherit java-utils-2 DEPEND=">=dev-java/java-config-2.2.0-r3" @@ -18,8 +29,6 @@ RDEPEND="${DEPEND}" S="${WORKDIR}" -EXPORT_FUNCTIONS src_install - # @FUNCTION: java-virtuals-2_src_install # @DESCRIPTION: # default src_install @@ -52,3 +61,5 @@ java-virtuals-2_do_write() { echo "MULTI_PROVIDER=\"${JAVA_VIRTUAL_MULTI=FALSE}\"" } > "${JAVA_PKG_VIRTUAL_PROVIDER}" } + +fi