summaryrefslogtreecommitdiff
blob: 5b5faa9594df0609afd778abcb591518afcae643 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

JAVA_PKG_IUSE="doc source test"

inherit java-pkg-2 java-ant-2

DESCRIPTION="JNDI Kit is a toolkit designed to help with the construction of JNDI providers"
HOMEPAGE="https://github.com/codehaus"
SRC_URI="http://dist.codehaus.org/spice/distributions/${P}-src.tar.gz"
LICENSE="Spice-1.1"
SLOT="0"
KEYWORDS="~x86"

RDEPEND=">=virtual/jre-1.4"
DEPEND="
	>=virtual/jdk-1.4
	test? ( dev-java/ant-junit )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	java-ant_ignore-system-classes
	java-ant_rewrite-classpath
}

src_compile() {
	java-pkg-2_src_compile
	cd target/classes
	rmic org.codehaus.spice.jndikit.rmi.server.RMINamingProviderImpl \
		|| die "rmic failed"
}

src_test() {
	einfo "Tests need a network connection so they will fail without it"
	ANT_TASKS="ant-junit" eant test -DJunit.present=true \
		-Dgentoo.classpath="$(java-pkg_getjars --build-only junit)"
}

src_install() {
	java-pkg_newjar target/${P}.jar
	use doc && java-pkg_dojavadoc dist/docs/api
	use source && java-pkg_dosrc src/java/*
}