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 MY_P="${PN}-jdk15on-${PV/./}"
12 DESCRIPTION="Java cryptography APIs"
13 HOMEPAGE="http://www.bouncycastle.org/java.html"
14 SRC_URI="http://polydistortion.net/bc/download/${MY_P}.tar.gz"
18 KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
20 # Tests are currently broken. Appears to need older version of bcprov; but
21 # since bcprov is not slotted, this can cause conflicts. Needs further
22 # investigation; though, only a small part has tests and there are no tests for
26 CDEPEND="dev-java/bcprov:${SLOT}"
31 test? ( dev-java/ant-junit:0 )"
37 S="${WORKDIR}/${MY_P}"
39 JAVA_GENTOO_CLASSPATH="bcprov-${SLOT}"
51 org/bouncycastle/openpgp/test
52 org/bouncycastle/openpgp/examples/test
54 rm -rv "${RM_TEST_FILES[@]}" || die
59 java-pkg-simple_src_compile
63 local cp="${PN}.jar:bcprov.jar:junit.jar"
64 local pkg="org.bouncycastle"
65 java -cp ${cp} ${pkg}.openpgp.test.AllTests | tee openpgp.tests
66 grep -q FAILURES *.tests && die "Tests failed."
71 java-pkg-simple_src_install
72 use source && java-pkg_dosrc org