summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2024-06-25 11:08:47 +0200
committerFlorian Schmaus <flow@gentoo.org>2024-06-26 08:23:12 +0200
commit67ffceb423d8517ad2911d289ec6e999862bd570 (patch)
treec477a926603ad5de45ac17ce8b75d312873a84b5
parentnet-misc/asterisk-g729: Stabilize 18.0.3.1.10 amd64, #934891 (diff)
downloadgentoo-67ffceb423d8517ad2911d289ec6e999862bd570.tar.gz
gentoo-67ffceb423d8517ad2911d289ec6e999862bd570.tar.bz2
gentoo-67ffceb423d8517ad2911d289ec6e999862bd570.zip
java-utils-2.eclass: add --runtime-only argument to java-pkg_getjars
Some packages only need the jar at runtime, not at compile time. For example https://bugs.gentoo.org/934659#c2 Bug: https://bugs.gentoo.org/934659 Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r--eclass/java-utils-2.eclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index adbc5242053a..3c2d190c4c15 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -1137,7 +1137,7 @@ java-pkg_jarfrom() {
}
# @FUNCTION: java-pkg_getjars
-# @USAGE: [--build-only] [--with-dependencies] <package1>[,<package2>...]
+# @USAGE: [--build-only] [--runtime-only] [--with-dependencies] <package1>[,<package2>...]
# @DESCRIPTION:
# Get the classpath provided by any number of packages
# Among other things, this can be passed to 'javac -classpath' or 'ant -lib'.
@@ -1157,6 +1157,7 @@ java-pkg_jarfrom() {
# Parameters:
# --build-only - makes the jar(s) not added into package.env DEPEND line.
# (assumed automatically when called inside src_test)
+# --runtime-only - marks the jar(s) not added into package.env RDEPEND line.
# --with-dependencies - get jars also from requested package's dependencies
# transitively.
# $1 - list of packages to get jars from
@@ -1165,6 +1166,7 @@ java-pkg_jarfrom() {
java-pkg_getjars() {
debug-print-function ${FUNCNAME} $*
+ local dep_constraint
local build_only=""
local deep=""
@@ -1173,6 +1175,9 @@ java-pkg_getjars() {
while [[ "${1}" == --* ]]; do
if [[ "${1}" = "--build-only" ]]; then
build_only="build"
+ dep_constraint="build"
+ elif [[ "${1}" = "--runtime-only" ]]; then
+ dep_constraint="runtime"
elif [[ "${1}" = "--with-dependencies" ]]; then
deep="--with-dependencies"
else
@@ -1191,7 +1196,7 @@ java-pkg_getjars() {
debug-print "${pkgs}:${jars}"
for pkg in ${pkgs//,/ }; do
- java-pkg_ensure-dep "${build_only}" "${pkg}"
+ java-pkg_ensure-dep "${dep_constraint}" "${pkg}"
done
for pkg in ${pkgs//,/ }; do
@@ -1808,7 +1813,6 @@ java-pkg_ant-tasks-depend() {
fi
}
-
# @FUNCTION: ejunit_
# @INTERNAL
# @DESCRIPTION: