From: "Volkmar W. Pogatzki" <gentoo@pogatzki.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH 2/3] java-pkg-simple.eclass: respect JAVADOC_SRC_DIRS
Date: Sun, 31 Dec 2023 17:26:01 +0100 [thread overview]
Message-ID: <20231231162632.10228-2-gentoo@pogatzki.net> (raw)
In-Reply-To: <20231231162632.10228-1-gentoo@pogatzki.net>
This patch helps to avoid useless runs of ejavadoc in multi-jar
packages where java-pkg-simple_src_compile is called for each jar file.
JAVADOC_SRC_DIRS can be set in the ebuild in global scope and
"use doc && ejavadoc" be called at the end of src_compile. And it no
longer needs to build a useless "ignoreme.jar".
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
---
eclass/java-pkg-simple.eclass | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass
index 143efa707751..97bad414afb7 100644
--- a/eclass/java-pkg-simple.eclass
+++ b/eclass/java-pkg-simple.eclass
@@ -412,11 +412,15 @@ java-pkg-simple_src_compile() {
# javadoc
if has doc ${JAVA_PKG_IUSE} && use doc; then
- mkdir -p ${apidoc}
- ejavadoc -d ${apidoc} \
- -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \
- ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \
- @${sources} || die "javadoc failed"
+ if [[ ${JAVADOC_SRC_DIRS} ]]; then
+ einfo "JAVADOC_SRC_DIRS exists, you need to call ejavadoc separately"
+ else
+ mkdir -p ${apidoc}
+ ejavadoc -d ${apidoc} \
+ -encoding ${JAVA_ENCODING} -docencoding UTF-8 -charset UTF-8 \
+ ${classpath:+-classpath ${classpath}} ${JAVADOC_ARGS:- -quiet} \
+ @${sources} || die "javadoc failed"
+ fi
fi
# package
--
2.41.0
next prev parent reply other threads:[~2023-12-31 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-31 16:26 [gentoo-dev] [PATCH 1/3] java-utils-2.eclass: new JAVADOC_CLASSPATH, JAVADOC_SRC_DIRS Volkmar W. Pogatzki
2023-12-31 16:26 ` Volkmar W. Pogatzki [this message]
2023-12-31 16:26 ` [gentoo-dev] [PATCH 3/3] java-utils-2.eclass: enhance ejavadoc Volkmar W. Pogatzki
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=20231231162632.10228-2-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