Use https by default
[gentoo.git] / dev-java / xpp2 / xpp2-2.1.10-r2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 JAVA_PKG_IUSE="doc source"
7
8 inherit java-pkg-2 java-ant-2
9
10 MY_PN="PullParser"
11 MY_P="${MY_PN}${PV}"
12
13 DESCRIPTION="A streaming pull XML parser used to quickly process input elements"
14 HOMEPAGE="http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html"
15 SRC_URI="http://www.extreme.indiana.edu/xgws/xsoap/xpp/download/${MY_PN}2/${MY_P}.tgz"
16
17 LICENSE="Apache-1.1 IBM"
18 SLOT="0"
19 KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
20 IUSE="test"
21
22 # Some failures, partly because we haven't patched Xerces but probably
23 # also because this software is ancient. :(
24 RESTRICT="test"
25
26 CDEPEND="dev-java/xerces:2"
27 DEPEND=">=virtual/jdk-1.3
28         test? ( dev-java/junit:4 )
29         ${CDEPEND}"
30 RDEPEND=">=virtual/jre-1.3
31         ${CDEPEND}"
32
33 S="${WORKDIR}/${MY_P}"
34
35 EANT_GENTOO_CLASSPATH="xerces-2"
36 EANT_EXTRA_ARGS="-Dx2_present=true -Djunit.present=true"
37 EANT_BUILD_TARGET="intf intf_jar impl x2impl"
38 EANT_DOC_TARGET="api"
39 EANT_TEST_TARGET="junit"
40
41 java_prepare() {
42         rm -r build/ lib/ || die
43
44         # Our usual rewriting stomps over the existing classpath, which
45         # isn't helpful here.
46         sed -i -r \
47                 -e 's/\bclasspath="/\0${gentoo.classpath}:/g' \
48                 -e 's/\$\{java\.class\.path\}/${gentoo.classpath}/g' \
49                 build.xml || die
50 }
51
52 src_install() {
53         local suffix
54
55         for suffix in "" -intf -standard -x2; do
56                 java-pkg_newjar build/lib/${MY_PN}${suffix}-${PV}.jar ${MY_PN}${suffix}.jar
57         done
58
59         dodoc README.html
60         use doc && java-pkg_dojavadoc doc/api
61         use source && java-pkg_dosrc $(find src/java -name org -o -name javax)
62 }
63
64 src_test() {
65         java-pkg-2_src_test
66 }