From: "Volkmar W. Pogatzki" <gentoo@pogatzki.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH 1/3] java-utils-2.eclass: new JAVADOC_CLASSPATH, JAVADOC_SRC_DIRS
Date: Sun, 31 Dec 2023 17:26:00 +0100 [thread overview]
Message-ID: <20231231162632.10228-1-gentoo@pogatzki.net> (raw)
Several multi-jar packages built with java-pkg-simple.eclass use a
workaround to avoid passing arguments to ejavadoc. That workaround
runs another java-pkg-simple_src_compile which builds an unneeded
jar file usually called "ignoreme.jar".
This patch defines the JAVADOC_SRC_DIRS eclass variable needed by the
java-pkg-simple.eclass to decide whether to call ejavadoc or not.
The other new eclass variable is JAVADOC_CLASSPATH. It can be used for
multi-jar packages to pass dependencies's classpath to ejavadoc.
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
---
eclass/java-utils-2.eclass | 40 ++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 31b8ab8df60a..814b4957d52c 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -218,6 +218,46 @@ JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/com
# ebuild foo.ebuild compile
# @CODE
+# @ECLASS_VARIABLE: JAVADOC_CLASSPATH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Comma or space separated list of java packages that are needed for generating
+# javadocs. Can be used to avoid overloading the compile classpath in multi-jar
+# packages if there are jar files which have different dependencies.
+#
+# @CODE
+# Example:
+# JAVADOC_CLASSPATH="
+# jna-4
+# jsch
+# "
+# @CODE
+
+# @ECLASS_VARIABLE: JAVADOC_SRC_DIRS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# An array of directories relative to ${S} which contain the sources of
+# the application. It needs to sit in global scope; if put in src_compile()
+# it would not work.
+# It is needed by the java-pkg-simple.eclass to decide whether to call ejavadoc
+# or not. If this variable is defined then java-pkg-simple_src_compile will not
+# call ejavadoc automatically. ejavadoc has then to be called explicitly from
+# the ebuild. It is meant for usage in multi-jar packages in order to avoid an
+# extra compilation run only for producing the javadocs.
+#
+# @CODE
+# Example:
+# JAVADOC_SRC_DIRS=(
+# "${PN}-core"
+# "${PN}-jsch"
+# "${PN}-pageant"
+# "${PN}-sshagent"
+# "${PN}-usocket-jna"
+# "${PN}-usocket-nc"
+# "${PN}-connector-factory"
+# )
+# @CODE
+
# TODO document me
JAVA_PKG_QA_VIOLATIONS=0
--
2.41.0
next reply other threads:[~2023-12-31 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-31 16:26 Volkmar W. Pogatzki [this message]
2023-12-31 16:26 ` [gentoo-dev] [PATCH 2/3] java-pkg-simple.eclass: respect JAVADOC_SRC_DIRS Volkmar W. Pogatzki
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-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