blob: 01ca4cb0836f307ee5186354263b691ffe362506 (
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
69
70
71
72
73
74
75
76
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/xalan/xalan-2.7.0-r4.ebuild,v 1.1 2007/05/26 19:09:41 caster Exp $
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2 eutils versionator
MY_PN="${PN}-j"
MY_PV="$(replace_all_version_separators _)"
MY_P="${MY_PN}_${MY_PV}"
DESCRIPTION="Apache's XSLT processor for transforming XML documents into HTML, text, or other XML document types."
HOMEPAGE="http://xml.apache.org/xalan-j/index.html"
SRC_URI="mirror://apache/xml/${MY_PN}/source/${MY_P}-src.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
IUSE="doc source"
COMMON_DEP="
dev-java/javacup
dev-java/bcel
=dev-java/jakarta-regexp-1.3*
>=dev-java/xerces-2.7.1
=dev-java/xml-commons-external-1.3*
~dev-java/xalan-serializer-${PV}"
RDEPEND=">=virtual/jre-1.4
${COMMON_DEP}"
DEPEND=">=virtual/jdk-1.4
${COMMON_DEP}"
S="${WORKDIR}/${MY_P}"
src_unpack() {
unpack ${A}
cd "${S}"
# disable building of serializer.jar
sed -i -e 's/depends="prepare,serializer.jar"/depends="prepare"/' \
build.xml || die "sed build.xml failed"
# remove bundled jars
rm -f lib/*.jar tools/*.jar
cd lib
java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar
java-pkg_jar-from xerces-2 xercesImpl.jar
java-pkg_jar-from javacup javacup.jar java_cup.jar
java-pkg_jar-from javacup javacup.jar runtime.jar
java-pkg_jar-from bcel bcel.jar BCEL.jar
java-pkg_jar-from jakarta-regexp-1.3 jakarta-regexp.jar regexp.jar
cd "${S}"
mkdir build && cd build
java-pkg_jar-from xalan-serializer serializer.jar
}
# When version bumping Xalan make sure that the installed jar
# does not bunled .class files from dependencies
src_compile() {
eant jar $(use_doc javadocs -Dbuild.apidocs=build/docs/api) \
-Dxsltc.bcel_jar.not_needed=true \
-Dxsltc.runtime_jar.not_needed=true \
-Dxsltc.regexp_jar.not_needed=true
}
src_install() {
java-pkg_dojar build/${PN}.jar
# installs symlinks to the file in /usr/share/xalan-serializer
java-pkg_dojar build/serializer.jar
# and records it to package.env as if it belongs to this one's
# classpath, for maximum possible backward compatibility
java-pkg_regjar $(java-pkg_getjar xalan-serializer serializer.jar)
java-pkg_dolauncher ${PN} --main org.apache.xalan.xslt.Process
use doc && java-pkg_dojavadoc build/docs/api
use source && java-pkg_dosrc src/org
}
|