summaryrefslogtreecommitdiff
blob: a36aa73d8ca90b34de4c872317d8231562a4bd51 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-grant/commons-grant-1.0_beta5.ebuild,v 1.1 2005/12/27 01:48:56 nichoj Exp $

# Note: Upstream is dead... only place to find is on the ibiblio maven repo
# and on jpackage.org
inherit java-pkg eutils rpm
MY_PN="jakarta-${PN}"
SNAPSHOT_DATE="20040118"
MY_PV="${PV%%_*}.b5.cvs${SNAPSHOT_DATE}"
MY_PV="${MY_PV//_beta/.b}"
MY_P="${MY_PN}-${MY_PV}"
JPACKAGE_REVISION="4"

DESCRIPTION="A small collection of hacks to make using Ant in an embedded envinronment much easier."
# This link seems dead, but I don't have anywhere else to turn
HOMEPAGE="http://jakarta.apache.org/commons/sandbox/grant/"
SRC_URI="mirror://jpackage/1.6/generic/free/SRPMS/${MY_P}-${JPACKAGE_REVISION}jpp.src.rpm"
DEPEND=">=virtual/jdk-1.3
	jikes? ( dev-java/jikes )
	source? ( app-arch/zip )
	dev-java/ant-core
	dev-java/junit"
RDEPEND=">=virtual/jre-1.3"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc jikes source"
S="${WORKDIR}/${PN}-${MY_PV}"

src_unpack(){
	rpm_src_unpack
	cd ${S}
	epatch ${FILESDIR}/${P}-gentoo.diff
	mkdir -p target/lib
	cd target/lib
	java-pkg_jar-from junit
}

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

src_install(){
	java-pkg_newjar target/${PN}-1.0-beta-4.jar ${PN}.jar
	use doc && java-pkg_dohtml -r dist/docs/api
	use source && java-pkg_dosrc src/java/*
}

src_test() {
	ant test || die "Test failed"
}