summaryrefslogtreecommitdiff
blob: c7bab681d57f4306f48c2dbcd0d9e08203de3069 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/picocontainer/picocontainer-1.1-r1.ebuild,v 1.6 2007/03/15 01:26:33 nichoj Exp $

inherit java-pkg-2 java-ant-2

DESCRIPTION="Small footprint Dependency Injection container"
HOMEPAGE="http://www.picocontainer.org"
SRC_URI="http://dist.codehaus.org/${PN}/distributions/${P}-src.tar.gz"
LICENSE="PicoContainer"
SLOT="1"
KEYWORDS="amd64 ppc x86"
IUSE="doc source"
RDEPEND=">=virtual/jre-1.4"
DEPEND=">=virtual/jdk-1.4
	>=dev-java/ant-core-1.5
	source? ( app-arch/zip )
	"
#	test? (
#	    >=dev-java/junit-3.8.1
#	)"

src_unpack() {
	unpack ${A}
	cd "${S}"
	# Don't run tests automatically
	sed -i -e 's/compile,test/compile/' build.xml || die

# doesn't pass internal test even when trying vanilla build.xml that fetches own libs
#	if use test ; then
#    	    mkdir -p target/lib
#	    cd target/lib
#	    java-pkg_jar-from junit junit-3.8.1.jar
#	fi
}

src_compile() {
	local antflags="-Dfinal.name=${PN} -Dnoget=true jar"
	eant ${antflags} $(use_doc)
}

#src_test() {
#	local antflags="-Dfinal.name=${PN} -Dnoget=true test"
#	eant ${antflags}
#}

src_install() {
	java-pkg_dojar target/${PN}.jar

	use doc && java-pkg_dojavadoc dist/docs/api
	use source && java-pkg_dosrc src/java/org
}