diff options
author | Florian Schmaus <flow@gentoo.org> | 2024-07-27 12:12:24 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2024-07-28 19:39:57 +0200 |
commit | 7eddfd1f9b69da3a97fb5b6b3781a6a31feaa59a (patch) | |
tree | cdbc216970b5266993f599af8cd29ef05307718c | |
parent | dev-python/shiboken6: Stabilize 6.7.2 arm64, #936832 (diff) | |
download | gentoo-7eddfd1f9b69da3a97fb5b6b3781a6a31feaa59a.tar.gz gentoo-7eddfd1f9b69da3a97fb5b6b3781a6a31feaa59a.tar.bz2 gentoo-7eddfd1f9b69da3a97fb5b6b3781a6a31feaa59a.zip |
java-utils-2.eclass: select java-config binary, prefer java-config over java-config-2
This prepares the eclass for the transition from /usr/bin/java-config-2
to /usr/bin/java-config.
Starting with dev-java/java-config-2.3.3, the java-config utility is
installed as java-config and the java-config-2 compatibility symlink
will only be installed if the 'compat' USE flag is enabled (currently
the default).
Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r-- | eclass/java-utils-2.eclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 8a062f2ad87e..559342068cc0 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -2723,7 +2723,13 @@ java-pkg_build-vm-from-handle() { fi for vm in ${JAVA_PKG_WANT_BUILD_VM}; do - if java-config-2 --select-vm=${vm} 2>/dev/null; then + local java_config + for java_config in java-config{,-2}; do + type -p ${java_config} >/dev/null && break + done + [[ -z ${java_config} ]] && die "No java-config binary in PATH" + + if ${java_config} --select-vm=${vm} 2>/dev/null; then echo ${vm} return 0 fi |