eclass/java-utils-2: Sync with Gentoo

It's from Gentoo commit e7bcf9b35099a85fed4fd6182b8949b02a7a15c7.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Flatcar Buildbot 2025-07-21 07:13:53 +00:00 committed by Mathieu Tortuyaux
parent a90c11c936
commit 0d3400b200
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -1,4 +1,4 @@
# Copyright 2004-2024 Gentoo Authors
# Copyright 2004-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: java-utils-2.eclass
@ -295,6 +295,13 @@ JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/com
# )
# @CODE
# @ECLASS_VARIABLE: JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK
# @PRE_INHERIT
# @DEFAULT_UNSET
# @DESCRIPTION:
# Helper variable to be used in packages which would otherwise have circular
# dependencies with dev-java/java-dep-check once this is forced to BDEPEND.
# @FUNCTION: java-pkg_doexamples
# @USAGE: [--subdir <subdir>] <file1/dir1> [<file2> ...]
# @DESCRIPTION:
@ -2996,6 +3003,16 @@ is-java-strict() {
return $?
}
# Avoid having to emerge them separately every time
if is-java-strict; then
# Needed for java-pkg_verify-classes
BDEPEND="${BDEPEND} dev-java/javatoolkit"
if [[ -z "${JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK}" ]]; then
# Needed for java-utils-2_pkg_preinst
BDEPEND="${BDEPEND} dev-java/java-dep-check:0" || die
fi
fi
# @FUNCTION: java-pkg_clean
# @DESCRIPTION:
# Java package cleaner function. This will remove all *.class and *.jar