3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
JAVA_PKG_IUSE="doc examples source"
|
|
6 |
JAVA_PKG_IUSE="doc source"
|
7 |
7 |
|
8 |
|
inherit java-pkg-2 java-pkg-simple
|
|
8 |
inherit java-pkg-2 java-ant-2
|
9 |
9 |
|
10 |
|
DESCRIPTION="Set of tools for processing XML documents"
|
|
10 |
DESCRIPTION="A XSLT and XQuery Processor"
|
11 |
11 |
HOMEPAGE="http://saxon.sourceforge.net/"
|
12 |
|
SRC_URI="mirror://sourceforge/project/saxon/saxon6/${PV}/saxon${PV//./-}.zip"
|
|
12 |
SRC_URI="mirror://sourceforge/project/saxon/Saxon-HE/$(ver_cut 1-2)/saxonhe${PV//./-}source.zip"
|
13 |
13 |
|
14 |
|
LICENSE="MPL-1.1"
|
15 |
|
SLOT="6.5"
|
16 |
|
KEYWORDS="amd64 x86"
|
|
14 |
LICENSE="MPL-1.0"
|
|
15 |
SLOT="9"
|
|
16 |
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
|
|
17 |
|
|
18 |
CDEPEND="
|
|
19 |
dev-java/xom:0
|
|
20 |
dev-java/jdom:0
|
|
21 |
dev-java/dom4j:1
|
|
22 |
dev-java/ant-core"
|
17 |
23 |
|
18 |
|
CP_DEPEND="dev-java/jdom:0"
|
19 |
|
|
20 |
|
# Restricting to jdk:1.8 for following reason:
|
21 |
|
# src/org/w3c/dom/UserDataHandler.java:1: error: package exists in another module: java.xml
|
22 |
|
# package org.w3c.dom;
|
23 |
|
DEPEND="${CP_DEPEND}
|
24 |
|
virtual/jdk:1.8"
|
25 |
|
|
26 |
|
RDEPEND="${CP_DEPEND}
|
|
24 |
RDEPEND="
|
|
25 |
${CDEPEND}
|
27 |
26 |
>=virtual/jre-1.8:*"
|
28 |
27 |
|
|
28 |
DEPEND="
|
|
29 |
${CDEPEND}
|
|
30 |
>=virtual/jdk-1.8:*"
|
|
31 |
|
29 |
32 |
BDEPEND="app-arch/unzip"
|
30 |
33 |
|
31 |
|
JAVA_ENCODING="ISO-8859-1"
|
32 |
|
JAVA_SRC_DIR="src"
|
|
34 |
S="${WORKDIR}"
|
33 |
35 |
|
34 |
|
src_unpack() {
|
35 |
|
unpack ${A}
|
36 |
|
unzip -qq source.zip -d src || die "failed to unpack"
|
37 |
|
}
|
|
36 |
# prepare eclass variables
|
|
37 |
JAVA_ANT_REWRITE_CLASSPATH="yes"
|
|
38 |
JAVA_ANT_CLASSPATH_TAGS="javac javadoc"
|
38 |
39 |
|
39 |
40 |
src_prepare() {
|
40 |
41 |
default
|
41 |
|
java-pkg_clean
|
|
42 |
|
|
43 |
# Fedora-inspired removal.
|
|
44 |
|
|
45 |
# deadNET.
|
|
46 |
rm -rv net/sf/saxon/dotnet || die
|
|
47 |
|
|
48 |
# Depends on XQJ (javax.xml.xquery).
|
|
49 |
rm -rv net/sf/saxon/xqj || die
|
|
50 |
|
|
51 |
# This requires a EE edition feature (com.saxonica.xsltextn).
|
|
52 |
rm -v net/sf/saxon/option/sql/SQLElementFactory.java || die
|
|
53 |
|
|
54 |
# <major>.<minor> version
|
|
55 |
local version="$(ver_cut 1-2)"
|
|
56 |
|
|
57 |
# generate build.xml with external javadoc links
|
|
58 |
sed -e "s:@JDK@:1.6:" \
|
|
59 |
-e "s:@JDOM@:1:" \
|
|
60 |
< "${FILESDIR}/${version}-build.xml" \
|
|
61 |
> "${S}/build.xml" \
|
|
62 |
|| die "build.xml generation failed!"
|
|
63 |
|
|
64 |
# prepare creates the dir for properties
|
|
65 |
eant prepare
|
|
66 |
|
|
67 |
# properties
|
|
68 |
cp -v \
|
|
69 |
"${FILESDIR}/${version}-edition.properties" \
|
|
70 |
"${S}/build/classes/edition.properties" || die
|
|
71 |
}
|
|
72 |
|
|
73 |
src_compile() {
|
|
74 |
local gcp="$(java-pkg_getjars dom4j-1,jdom,xom)"
|
|
75 |
gcp="${gcp}:$(java-pkg_getjars --build-only ant-core)"
|
|
76 |
eant -Dgentoo.classpath="${gcp}" jar $(use_doc)
|
42 |
77 |
}
|
43 |
78 |
|
44 |
79 |
src_install() {
|
45 |
|
default
|
46 |
|
java-pkg-simple_src_install
|
47 |
|
use examples && java-pkg_doexamples samples
|
|
80 |
java-pkg_dojar build/lib/${PN}.jar
|
|
81 |
|
|
82 |
java-pkg_dolauncher ${PN}${SLOT}-transform --main net.sf.saxon.Transform
|
|
83 |
java-pkg_dolauncher ${PN}${SLOT}-query --main net.sf.saxon.Query
|
|
84 |
|
|
85 |
java-pkg_register-ant-task
|
|
86 |
|
|
87 |
use doc && java-pkg_dojavadoc build/api
|
|
88 |
|
|
89 |
use source && java-pkg_dosrc src
|
48 |
90 |
}
|