summaryrefslogtreecommitdiff
blob: e8ee6fb4adda4f1ceea85535cdd9e368ee65a74a (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/jump/jump-0.5.ebuild,v 1.3 2007/09/21 17:01:03 opfer Exp $

JAVA_PKG_IUSE="doc examples source test"
inherit java-pkg-2 java-ant-2

DESCRIPTION="JUMP Ultimate Math Package (JUMP) is a Java-based extensible high-precision math package."
SRC_URI="mirror://sourceforge/${PN}-math/${P}.tar.gz"
HOMEPAGE="http://jump-math.sourceforge.net/"
KEYWORDS="amd64 ~ppc x86"
LICENSE="BSD"
SLOT="0"
DEPEND=">=virtual/jdk-1.4
	test? ( dev-java/ant-junit =dev-java/junit-3* )"
RDEPEND=">=virtual/jre-1.4"

src_unpack() {
	unpack ${A}
	cd "${S}"

	sed -i 's:${java.home}/src::' -i build.xml || die
	java-ant_rewrite-classpath
}

EANT_BUILD_TARGET="jar"
EANT_DOC_TARGET="apidocs"

src_test() {
	local cp="$(java-pkg_getjars junit)"
	ANT_TASKS="ant-junit" eant do-tests -Dgentoo.classpath="${cp}"
}

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

	use doc && java-pkg_dojavadoc  build/apidocs
	use examples && java-pkg_doexamples src/examples
	use source && java-pkg_dosrc src/main/org
}