1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 JAVA_PKG_IUSE="doc source test"
8 inherit java-pkg-2 java-pkg-simple
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"
16 KEYWORDS="~amd64 ~x86"
23 test? ( dev-java/junit:4 )"
25 S="${WORKDIR}/java-${PN}-${P}"
27 JAVA_SRC_DIR="src/main/java"
29 # This one test is buggy.
31 src/test/java/com/fasterxml/classmate/AnnotationsTest.java
37 src/test/java/com/fasterxml/classmate/AnnotationsTest.java || die
41 testcp="${S}/${PN}.jar:$(java-pkg_getjars junit-4):target/tests"
43 mkdir target/tests || die
44 ejavac -cp "${testcp}" -d target/tests $(find src/test/java -name "*.java")
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" \
49 ejunit4 -cp "${testcp}" ${tests}