dev-java/openjdk-bin: amd64 stable wrt bug #718720
[gentoo.git] / dev-java / classmate / classmate-1.1.0.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 JAVA_PKG_IUSE="doc source test"
7
8 inherit java-pkg-2 java-pkg-simple
9
10 DESCRIPTION="Zero-dependency Java library for accurately introspecting type information"
11 HOMEPAGE="https://github.com/cowtowncoder/java-classmate/"
12 SRC_URI="https://github.com/cowtowncoder/java-classmate/archive/${P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17
18 RDEPEND="
19         >=virtual/jre-1.6"
20
21 DEPEND="
22         >=virtual/jdk-1.6
23         test? ( dev-java/junit:4 )"
24
25 S="${WORKDIR}/java-${PN}-${P}"
26
27 JAVA_SRC_DIR="src/main/java"
28
29 # This one test is buggy.
30 JAVA_RM_FILES=(
31         src/test/java/com/fasterxml/classmate/AnnotationsTest.java
32 )
33
34 src_prepare() {
35         default
36         rm -v pom.xml \
37                 src/test/java/com/fasterxml/classmate/AnnotationsTest.java || die
38 }
39
40 src_test() {
41         testcp="${S}/${PN}.jar:$(java-pkg_getjars junit-4):target/tests"
42
43         mkdir target/tests || die
44         ejavac -cp "${testcp}" -d target/tests $(find src/test/java -name "*.java")
45
46         tests=$(find target/tests -name "*Test.class" -not -name "BaseTest.class" \
47                         | sed -e 's/target\/tests\///g' -e "s/\.class//" -e "s/\//./g" \
48                         | grep -vP '\$');
49         ejunit4 -cp "${testcp}" ${tests}
50 }