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

JAVA_PKG_IUSE="doc source"

inherit java-pkg-2 java-ant-2

DESCRIPTION="Java Tools and Libraries for the Advancement of Sciences"
SRC_URI="http://jscience.org/${P}-src.zip"
HOMEPAGE="http://jscience.org/"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

COMMON_DEP="~dev-java/javolution-2.2.4"

RDEPEND=">=virtual/jdk-1.4
	${COMMON_DEP}"
DEPEND=">=virtual/jdk-1.4
	app-arch/unzip
	${COMMON_DEP}"

S="${WORKDIR}/jscience-${PV%.*}"

src_unpack() {
	unpack ${A}
	cd "${S}/lib"
	rm -v *.jar || die
	java-pkg_jar-from javolution-2.2.4
}

EANT_BUILD_TARGET="jarfile"

src_test() {
	# this works here as javolution is in lib/ and referenced in jar's manifest
	java -jar jscience.jar test || die "test failed"
}

src_install() {
	java-pkg_dojar jscience.jar

	dodoc doc/coding_standard.txt || die
	use doc && java-pkg_dojavadoc api
	use source && java-pkg_dosrc "${S}/src/org"
}