summaryrefslogtreecommitdiff
blob: ab0fc988cb664e5b2d030d3e94561d4ce47d281a (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="5"

JAVA_PKG_IUSE="doc examples source"

inherit java-pkg-2 java-ant-2

DESCRIPTION="Small XML pull parser for constrained environments such as Applets, Personal Java or MIDP devices"
HOMEPAGE="http://kxml.org/"
SRC_URI="mirror://sourceforge/${PN}/${PN}2-src-${PV}.zip"

LICENSE="BSD"
SLOT="2"
KEYWORDS="amd64 ~ppc ~ppc64 ~x86"

CDEPEND="dev-java/xpp3:0"

DEPEND="
	${CDEPEND}
	>=virtual/jdk-1.6
	app-arch/unzip"

RDEPEND="
	${CDEPEND}
	>=virtual/jre-1.6"

S="${WORKDIR}"

java_prepare() {
	java-pkg_clean
	cp "${FILESDIR}"/${P}-build.xml build.xml || die
}

JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_BUILD_TARGET="build_jar"
EANT_GENTOO_CLASSPATH="xpp3"

src_install() {
	java-pkg_newjar dist/${PN}2-${PV}.jar ${PN}.jar
	java-pkg_newjar dist/${PN}2-min-${PV}.jar ${PN}-min.jar

	use source && java-pkg_dosrc src/org
	use doc && java-pkg_dojavadoc www/kxml2/javadoc
	use examples && java-pkg_doexamples samples
}