aboutsummaryrefslogtreecommitdiff
blob: 343fa2297abda2c081735af9206d54e2d858a4c1 (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
68
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit versionator java-pkg-2 java-ant-2

DESCRIPTION="A collection of tools for processing XML documents: XSLT processor, XSL library, parser"
MY_PV=$(replace_all_version_separators -)
SRC_URI="mirror://sourceforge/${PN}/${PN}-resources${MY_PV}.zip"
HOMEPAGE="http://saxon.sourceforge.net/"

LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples source"

COMMON_DEP="
	dev-java/xom:0
	dev-java/jdom:1.0
	dev-java/dom4j:1
"
# Uses javax.xml.stream that is included
# starting with 1.6. Could also integrate
# support using dev-java/jsr173 I guess
RDEPEND=">=virtual/jre-1.6
	${COMMON_DEP}"

DEPEND=">=virtual/jdk-1.6
	app-arch/unzip
	dev-java/ant-core
	source? ( app-arch/zip )
	${COMMON_DEP}"

S=${WORKDIR}

src_unpack() {
	default

	mkdir src && cd src || die
	unpack ./../source.zip
}

java_prepare() {
	cp -i "${FILESDIR}/build-8.8.xml" build.xml || die

	#Nuking the .NET stuff until I have the time to make it work
	rm -r src/net/sf/saxon/dotnet || die

	mkdir lib && cd lib || die
	java-pkg_jarfrom jdom-1.0
	java-pkg_jarfrom xom
	java-pkg_jarfrom dom4j-1
}

src_install() {
	java-pkg_dojar dist/*.jar
	java-pkg_dolauncher ${PN}-transform --main net.sf.saxon.Transform

	if use doc; then
		java-pkg_dohtml -r doc/*
		java-pkg_dojavadoc dist/doc/api
	fi

	use examples && java-pkg_doexamples samples
	use source && java-pkg_dosrc src/net
}