mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
eclass/java-pkg-opt-2: Sync with gentoo
It's from gentoo commit 52a0505f9cb31b0181a633dcbacf0b1c8b262cb3.
This commit is contained in:
parent
0baef1fe4b
commit
956b4f2558
@ -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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: java-pkg-opt-2.eclass
|
# @ECLASS: java-pkg-opt-2.eclass
|
||||||
@ -6,11 +6,21 @@
|
|||||||
# java@gentoo.org
|
# java@gentoo.org
|
||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Thomas Matthijs <axxo@gentoo.org>
|
# Thomas Matthijs <axxo@gentoo.org>
|
||||||
|
# @SUPPORTED_EAPIS: 5 6 7 8
|
||||||
|
# @PROVIDES: java-utils-2
|
||||||
# @BLURB: Eclass for package with optional Java support
|
# @BLURB: Eclass for package with optional Java support
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Inherit this eclass instead of java-pkg-2 if you only need optional Java
|
# Inherit this eclass instead of java-pkg-2 if you only need optional Java
|
||||||
# support.
|
# support.
|
||||||
|
|
||||||
|
case ${EAPI:-0} in
|
||||||
|
[5678]) ;;
|
||||||
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ -z ${_JAVA_PKG_OPT_2_ECLASS} ]] ; then
|
||||||
|
_JAVA_PKG_OPT_2_ECLASS=1
|
||||||
|
|
||||||
inherit java-utils-2
|
inherit java-utils-2
|
||||||
|
|
||||||
# @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
|
# @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
|
||||||
@ -24,11 +34,6 @@ RDEPEND="${DEPEND}"
|
|||||||
# See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
|
# See java-pkg-2.eclass for JAVA_PKG_IUSE documentation
|
||||||
IUSE="${JAVA_PKG_IUSE} ${JAVA_PKG_OPT_USE}"
|
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
|
# @FUNCTION: java-pkg-opt-2_pkg_setup
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# default pkg_setup, wrapper for java-utils-2_pkg_init
|
# default pkg_setup, wrapper for java-utils-2_pkg_init
|
||||||
@ -58,3 +63,7 @@ java-pkg-opt-2_src_prepare() {
|
|||||||
java-pkg-opt-2_pkg_preinst() {
|
java-pkg-opt-2_pkg_preinst() {
|
||||||
use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
|
use ${JAVA_PKG_OPT_USE} && java-utils-2_pkg_preinst
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user