diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-04-28 08:46:23 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-06-14 12:12:49 +0200 |
commit | b9c5bae54fcc9e773f256d7194acc1ed4d5f9c1a (patch) | |
tree | 84ac964fd80a7b407046996b3ae16c9ad668e367 /dev-java/saxon | |
parent | net-misc/arpd: last-rite (diff) | |
download | gentoo-b9c5bae54fcc9e773f256d7194acc1ed4d5f9c1a.tar.gz gentoo-b9c5bae54fcc9e773f256d7194acc1ed4d5f9c1a.tar.bz2 gentoo-b9c5bae54fcc9e773f256d7194acc1ed4d5f9c1a.zip |
dev-java/saxon: code cleanup, rewrite with java-pkg-simple
Also introduces the "ant-task" USE flag making the dependency on
dev-java/ant optional.
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/36770/commits/2478d9c955f5c304716a7e8d9a452ff6e57030e8
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/saxon')
-rw-r--r-- | dev-java/saxon/metadata.xml | 3 | ||||
-rw-r--r-- | dev-java/saxon/saxon-9.2.0.6-r5.ebuild | 67 |
2 files changed, 70 insertions, 0 deletions
diff --git a/dev-java/saxon/metadata.xml b/dev-java/saxon/metadata.xml index 4a2440bdfc71..796069569107 100644 --- a/dev-java/saxon/metadata.xml +++ b/dev-java/saxon/metadata.xml @@ -8,4 +8,7 @@ <upstream> <remote-id type="sourceforge">saxon</remote-id> </upstream> + <use> + <flag name="ant-task">BUILD and register the ant-task</flag> + </use> </pkgmetadata> diff --git a/dev-java/saxon/saxon-9.2.0.6-r5.ebuild b/dev-java/saxon/saxon-9.2.0.6-r5.ebuild new file mode 100644 index 000000000000..474bdfb14787 --- /dev/null +++ b/dev-java/saxon/saxon-9.2.0.6-r5.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="A XSLT and XQuery Processor" +HOMEPAGE="https://www.saxonica.com/index.html https://saxon.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/saxon/Saxon-HE/$(ver_cut 1-2)/saxonhe${PV//./-}source.zip" + +LICENSE="MPL-1.0" +SLOT="9" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="ant-task" + +BDEPEND="app-arch/unzip" +CP_DEPEND=" + dev-java/dom4j:1 + dev-java/jdom:0 + dev-java/xom:0 +" +DEPEND="${CP_DEPEND} + >=virtual/jdk-1.8:* + ant-task? ( >=dev-java/ant-1.10.14-r3:0 )" +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:* + ant-task? ( >=dev-java/ant-1.10.14-r3:0 )" + +JAVA_ENCODING="iso-8859-1" +JAVA_RESOURCE_DIRS="resources" + +src_prepare() { + java-pkg-2_src_prepare + + # Fedora-inspired removal. + + # deadNET. + rm -rv net/sf/saxon/dotnet || die + + # Depends on XQJ (javax.xml.xquery). + rm -rv net/sf/saxon/xqj || die + + # This requires a EE edition feature (com.saxonica.xsltextn). + rm -v net/sf/saxon/option/sql/SQLElementFactory.java || die + + if use ant-task; then + JAVA_GENTOO_CLASSPATH+="ant" + else + rm net/sf/saxon/ant/AntTransform.java || die + fi + + mkdir resources || die + cat > "resources/edition.properties" <<-EOF + config=net.sf.saxon.Configuration + platform=net.sf.saxon.java.JavaPlatform + EOF +} + +src_install() { + java-pkg-simple_src_install + java-pkg_dolauncher ${PN}${SLOT}-transform --main net.sf.saxon.Transform + java-pkg_dolauncher ${PN}${SLOT}-query --main net.sf.saxon.Query + use ant-task && java-pkg_register-ant-task +} |