public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Volkmar W. Pogatzki" <gentoo@pogatzki.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] java-utils-2.eclass: allow eant without java-ant-2_src_configure
Date: Wed, 19 Jun 2024 13:38:15 +0200	[thread overview]
Message-ID: <20240619113848.3216-1-gentoo@pogatzki.net> (raw)

Packages which can build without BSFIX need not inherit java-ant-2.  To
allow using eant without inheriting java-ant-2 we enhance the eant function
with a condition which controls calling java-ant-2_src_configure.

Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
---
 eclass/java-utils-2.eclass | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index adbc5242053a..2527819d7315 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -2029,13 +2029,23 @@ java-utils-2_pkg_preinst() {
 eant() {
 	debug-print-function ${FUNCNAME} $*

-	if [[ ${EBUILD_PHASE} = compile ]]; then
-		java-ant-2_src_configure
-	fi
+	if [[ ${!JAVA_PKG_BSFIX*} ]] \
+		|| [[ ${JAVA_ANT_BSFIX_EXTRA_ARGS} ]] \
+		|| [[ ${JAVA_ANT_CLASSPATH_TAGS} ]] \
+		|| [[ ${JAVA_ANT_JAVADOC_INPUT_DIRS} ]] \
+		|| [[ ${JAVA_ANT_REWRITE_CLASSPATH} ]] \
+		|| [[ ${EANT_BUILD_XML} ]] \
+		|| [[ ${!EANT_GENTOO_CLASSPATH*} ]] \
+		|| [[ ${EANT_TEST_GENTOO_CLASSPATH} ]]
+	then
+		if [[ ${EBUILD_PHASE} = compile ]]; then
+			java-ant-2_src_configure
+		fi

-	if ! has java-ant-2 ${INHERITED}; then
-		local msg="You should inherit java-ant-2 when using eant"
-		java-pkg_announce-qa-violation "${msg}"
+		if ! has java-ant-2 ${INHERITED}; then
+			local msg="You should inherit java-ant-2 when using eant"
+			java-pkg_announce-qa-violation "${msg}"
+		fi
 	fi

 	local antflags="-Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore"
--
2.41.0



                 reply	other threads:[~2024-06-19 11:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240619113848.3216-1-gentoo@pogatzki.net \
    --to=gentoo@pogatzki.net \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox