Use https by default
[gentoo.git] / dev-java / commons-math / commons-math-3.2.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 # Tests are currently broken due to nasty -lib argument.
8 JAVA_PKG_IUSE="doc source" # test
9
10 inherit java-pkg-2 java-ant-2 java-osgi
11
12 MY_PN="${PN}3"
13 MY_P="${MY_PN}-${PV}"
14
15 DESCRIPTION="Lightweight, self-contained mathematics and statistics components"
16 HOMEPAGE="http://commons.apache.org/math/"
17 SRC_URI="mirror://apache/commons/math/source/${MY_P}-src.tar.gz"
18
19 LICENSE="Apache-2.0"
20 SLOT="3"
21 KEYWORDS="amd64 x86"
22
23 DEPEND=">=virtual/jdk-1.5"
24
25 # Tests are currently broken due to nasty -lib argument.
26 # test? (
27 #       dev-java/ant-junit4
28 #       dev-java/hamcrest-core:0
29 # )"
30
31 RDEPEND=">=virtual/jre-1.5"
32
33 S="${WORKDIR}/${MY_P}-src"
34
35 java_prepare() {
36         cp "${FILESDIR}"/${P}-build.xml build.xml || die
37
38         sed -i 's/manifest=".*MANIFEST.MF"//g' build.xml || die
39         sed -i '/name="Main-Class"/d' build.xml || die
40 }
41
42 # Tests are currently broken due to nasty -lib argument.
43 # src_test() {
44 #       java-pkg_jar-from junit-4
45 #       java-pkg_jar-from hamcrest-core
46 #       ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test
47 # }
48
49 src_install() {
50         java-osgi_newjar target/${MY_P}.jar ${MY_PN} ${MY_PN} "Export-Package: ${MY_PN}"
51
52         use doc && java-pkg_dojavadoc target/site/apidocs
53         use source && java-pkg_dosrc src/main/java/org
54 }