dev-java/tomcat-servlet-api: ppc64 stable wrt bug #718020
[gentoo.git] / dev-java / xom / xom-1.2.10.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 JAVA_PKG_IUSE="doc examples source"
7
8 inherit java-pkg-2 java-ant-2
9
10 JAXEN_V="1.1.6"
11 JAXEN_P="jaxen-${JAXEN_V}"
12
13 DESCRIPTION="A new XML object model"
14 HOMEPAGE="http://cafeconleche.org/XOM/index.html"
15 # Bundled jaxen as its moved under XOM's namespace
16 SRC_URI="http://cafeconleche.org/XOM/${P}.tar.gz
17         http://dist.codehaus.org/jaxen/distributions/${JAXEN_P}-src.tar.gz"
18
19 LICENSE="LGPL-2"
20 SLOT="0"
21 KEYWORDS="amd64 ~arm ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
22
23 COMMON_DEPEND="dev-java/xerces:2
24                 dev-java/xml-commons-external:1.3
25                 examples? ( java-virtuals/servlet-api:2.4 )"
26
27 RDEPEND=">=virtual/jre-1.4
28                 ${COMMON_DEPEND}"
29
30 DEPEND=">=virtual/jdk-1.4
31                 dev-java/jarjar:1
32                 ${COMMON_DEPEND}"
33
34 S="${WORKDIR}/XOM"
35
36 # Test require network access to pass.
37 # They need a redirected http document on public web.
38 RESTRICT="test"
39
40 java_prepare() {
41         epatch "${FILESDIR}/${PN}-1.2.6.patch"
42         epatch "${FILESDIR}/${PN}-strip-fallback-parser.patch" #399119
43
44         # Delete test files as they aren't installed
45         rm -vr src/nu/xom/tests || die
46
47         # Delete bundled jars
48         rm -v *.jar lib/*.jar || die
49
50         # Delete bundled classes
51         find . -name "*.class" -delete -print || die
52
53         # Move bundled jaxen to where the build.xml expects it
54         mv "${WORKDIR}"/${JAXEN_P}/ lib/ || die
55
56         java-pkg_jar-from --into lib/ xml-commons-external-1.3
57         java-pkg_jar-from --into lib/ xerces-2
58         java-pkg_jar-from --build-only --into lib/ jarjar-1
59
60         # Tagsoup is only needed to run betterdoc but we use the pregenerated ones.
61 }
62
63 src_compile() {
64         local ant_flags="-Ddebug=off"
65         use examples && ant_flags="${ant_flags} -Dservlet.jar=$(java-pkg_getjar servlet-api-2.4 servlet-api.jar)"
66
67         ANT_TASKS="jarjar-1" eant jar ${ant_flags}\
68                 $(use examples && echo samples)
69 }
70
71 src_install() {
72         java-pkg_newjar build/${P}.jar ${PN}.jar
73         use examples && java-pkg_dojar build/xom-samples.jar
74         dodoc Todo.txt
75
76         use doc && java-pkg_dojavadoc apidocs/
77         use source && java-pkg_dosrc src/*
78         use examples && java-pkg_doexamples --subdir nu/xom/samples src/nu/xom/samples
79 }