blob: efc878a3c6ee93ecab07aa570ec2a0828847cac5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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 arm64 ppc64"
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
}
|