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://www.bouncycastle.org/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 since bcprov is not slotted, this can cause conflicts.
21 # Needs further investigation; though, only a small part has tests and there are no tests for bcpg itself.
24 CDEPEND="dev-java/bcprov:${SLOT}"
26 DEPEND=">=virtual/jdk-1.6
33 RDEPEND=">=virtual/jre-1.6
36 S="${WORKDIR}/${MY_P}"
38 JAVA_GENTOO_CLASSPATH="bcprov-${SLOT}"
49 org/bouncycastle/openpgp/test
50 org/bouncycastle/openpgp/examples/test
52 rm -rf "${RM_TEST_FILES[@]}" || die
57 java-pkg-simple_src_compile
61 local cp="${PN}.jar:bcprov.jar:junit.jar"
62 local pkg="org.bouncycastle"
63 java -cp ${cp} ${pkg}.openpgp.test.AllTests | tee openpgp.tests
64 grep -q FAILURES *.tests && die "Tests failed."
68 java-pkg-simple_src_install
69 use source && java-pkg_dosrc org