From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 172C015802E for ; Wed, 26 Jun 2024 06:24:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 47C702BC0AD; Wed, 26 Jun 2024 06:24:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2BD0E2BC0AD for ; Wed, 26 Jun 2024 06:24:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1DF9B335DEB for ; Wed, 26 Jun 2024 06:24:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 83F2B126B for ; Wed, 26 Jun 2024 06:24:23 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1719382992.67ffceb423d8517ad2911d289ec6e999862bd570.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/java-utils-2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 67ffceb423d8517ad2911d289ec6e999862bd570 X-VCS-Branch: master Date: Wed, 26 Jun 2024 06:24:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6c41b2e4-4335-43d0-afdb-1f0438a87bed X-Archives-Hash: ed491caa5b67913cb17d7228eec1e3a0 commit: 67ffceb423d8517ad2911d289ec6e999862bd570 Author: Florian Schmaus gentoo org> AuthorDate: Tue Jun 25 09:08:47 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Wed Jun 26 06:23:12 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67ffceb4 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 gentoo.org> eclass/java-utils-2.eclass | 10 +++++++--- 1 file 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] [,...] +# @USAGE: [--build-only] [--runtime-only] [--with-dependencies] [,...] # @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: