summaryrefslogtreecommitdiff
blob: a19b781bf2bc6008659a217e426191c997798ae6 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jaxen/jaxen-1.1_beta2.ebuild,v 1.1 2004/12/19 00:00:09 karltk Exp $

inherit java-pkg eutils

DESCRIPTION="A Java XPath Engine"
HOMEPAGE="http://jaxen.org/"
SRC_URI="http://www.ibiblio.org/maven/jaxen/distributions/${PN}-1.1-beta-2-src.tar.gz
	junit? ( http://dev.gentoo.org/~karltk/projects/java/distfiles/jaxen-tests-1.1_beta2.tar.gz )"
LICENSE="jaxen"
SLOT="1.1"
KEYWORDS="~x86 ~ppc ~sparc ~amd64"
IUSE="doc jikes junit"

DEPEND=">=virtual/jdk-1.3
	jikes? ( dev-java/jikes )
	dev-java/ant
	>=sys-apps/sed-4
	${RDEPEND}"

RDEPEND=">=virtual/jre-1.3
	>=dev-java/xerces-2.6.2-r1
	=dev-java/dom4j-1*
	=dev-java/jdom-1.0_beta9"

S=${WORKDIR}/${PN}-1.1-beta-2

src_unpack() {
	unpack ${A}
	mv xml ${S}/
	cd ${S}
	epatch ${FILESDIR}/jaxen-1.1_beta2-gentoo.diff
	mkdir -p target/lib
	cd target/lib
	rm -f *.jar
	java-pkg_jar-from xerces-2
	java-pkg_jar-from jdom
	java-pkg_jar-from dom4j-1

	cd ${S}
	if ! use junit ; then
		sed -i 's/depends="compile,test"/depends="compile"/' build.xml
	fi
}

src_compile() {
	local antops="jar"
	use jikes && antops="${antops} -Dbuild.compiler=jikes"
	use doc && antops="${antops} doc javadoc"
	ant ${antops} || die "compile failed"
}

src_install() {
	
	java-pkg_dojar target/jaxen*.jar

	use doc && java-pkg_dohtml -r target/doc/*
}