summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2024-11-01 14:04:37 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2024-11-04 08:28:58 +0100
commita0d9abe50b4b7d7aa3e477b883d39cd8539a0c80 (patch)
treeaf5df2a89fabeef618ec6e7c2c83f8220e2706b0 /dev-java
parentprofiles/base: update mask on dev-java/protobuf-java (diff)
downloadgentoo-a0d9abe50b4b7d7aa3e477b883d39cd8539a0c80.tar.gz
gentoo-a0d9abe50b4b7d7aa3e477b883d39cd8539a0c80.tar.bz2
gentoo-a0d9abe50b4b7d7aa3e477b883d39cd8539a0c80.zip
dev-java/bcprov: add 1.79
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/39180/commits/f1a47482d1f019cee48c5a6a0cd033292fbb5c30 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/bcprov/Manifest2
-rw-r--r--dev-java/bcprov/bcprov-1.79.ebuild109
-rw-r--r--dev-java/bcprov/files/bcprov-1.79-PKCS12StoreTest.patch21
3 files changed, 132 insertions, 0 deletions
diff --git a/dev-java/bcprov/Manifest b/dev-java/bcprov/Manifest
index e6b842b60cd4..f227ab547b8b 100644
--- a/dev-java/bcprov/Manifest
+++ b/dev-java/bcprov/Manifest
@@ -1,2 +1,4 @@
DIST bc-java-r1rv78v1.tar.gz 47211344 BLAKE2B 6d28e69db8ad0043a5cd6c0a4f6901ff40884be4baf60ee40d4cb5487d799e6ac5ef4282b5d6e7f873e45607394890dd26e3150c9c1729bd5346d9cc8f30f240 SHA512 87e6ecd6fea47877d9d7a196f58c5b45a7f026f18f17b71d4155061fad024194c30ce0fc44ea3e879b17f310a6626407f345a8e8970781afec4551f2aa688223
+DIST bc-java-r1rv79.tar.gz 47563177 BLAKE2B 7ca8b64ab004fb70399e950e8c588b19d110596790525ce30aeec3f2c6501bffd1bab6854c6bf1499f101e33e0ac8127c2cdaa34e5531c430e4f00fb145202f3 SHA512 294241371f536e8a9be8ff2307eaad433620c9becb26a00f6b225ea31488bc40dd8b01d20c18e47c105c7a8f1b2415136608d82811581fad4718db02e9c882a3
DIST bc-test-data-r1rv78v1.tar.gz 2084599485 BLAKE2B a4f67d4ab35321aba52696345cf1ac605866fede41d3b99aa42194f37b587fe7bdebd3ac264379b37416bf5f5c456cd78126126799257c28183e4b71a98b4225 SHA512 cc35260189f2100eb883c30f7a15b7c10f564e7e44e02c61373e7f56a03ab9971350c6798bcbb7a4c4508f5022a0a986fdcd8862449b937765dbf567e2f370ed
+DIST bc-test-data-r1rv79.tar.gz 2101723062 BLAKE2B 1fa25babfbcaa855dfcf2ae8727f6a7a5221837127cc295a4c15dce515908418c9e052af101d6fc984c4b5ce204286b7361da29dbefad1b95603d6b1571603a0 SHA512 e14c1bf96a6010447cd13a680a87249a4e6d0661cc46b437e8b2e1098f3e80482dc9038446aad495ba72e1254e9c07e49b1ac848177b02ac36e10710fcd06413
diff --git a/dev-java/bcprov/bcprov-1.79.ebuild b/dev-java/bcprov/bcprov-1.79.ebuild
new file mode 100644
index 000000000000..f203619a0823
--- /dev/null
+++ b/dev-java/bcprov/bcprov-1.79.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.bouncycastle:bcprov-jdk18on:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple check-reqs
+
+DESCRIPTION="Java cryptography APIs"
+HOMEPAGE="https://www.bouncycastle.org/java.html"
+MY_PV="r$(ver_rs 1 'rv' 2 'v')"
+SRC_URI="https://github.com/bcgit/bc-java/archive/${MY_PV}.tar.gz -> bc-java-${MY_PV}.tar.gz
+ test? ( https://github.com/bcgit/bc-test-data/archive/${MY_PV}.tar.gz -> bc-test-data-${MY_PV}.tar.gz )"
+S="${WORKDIR}/bc-java-${MY_PV}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+
+DEPEND=">=virtual/jdk-11:*"
+RDEPEND=">=virtual/jre-1.8:*"
+
+DOCS=( {README,SECURITY}.md )
+HTML_DOCS=( {CONTRIBUTORS,index}.html )
+
+PATCHES=( "${FILESDIR}/bcprov-1.79-PKCS12StoreTest.patch" )
+
+check_env() {
+ if use test; then
+ # this is needed only for tests
+ CHECKREQS_MEMORY="2048M"
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_env
+}
+
+pkg_setup() {
+ check_env
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack bc-java-${MY_PV}.tar.gz
+ use test && unpack bc-test-data-${MY_PV}.tar.gz
+}
+
+src_prepare() {
+ default #780585
+ java-pkg-2_src_prepare
+ # TBD: unboundid-ldapsdk should be packaged from source.
+ java-pkg_clean ! -path "./libs/unboundid-ldapsdk-6.0.8.jar"
+}
+
+src_compile() {
+ JAVA_RESOURCE_DIRS=(
+ "core/src/main/resources"
+ "prov/src/main/resources"
+ )
+ JAVA_SRC_DIR=(
+ "core/src/main/java"
+ "prov/src/main/java"
+ "prov/src/main/jdk1.9"
+ )
+ java-pkg-simple_src_compile
+}
+
+src_test() {
+ mv ../bc-test-data-${MY_PV} bc-test-data || die "cannot move bc-test-data"
+
+ JAVA_TEST_EXTRA_ARGS="-Dtest.java.version.prefix=$(java-config -g PROVIDES_VERSION)"
+ JAVA_TEST_EXTRA_ARGS+=" -Dbc.test.data.home=${S}/core/src/test/data"
+ JAVA_TEST_EXTRA_ARGS+=" -Xmx${CHECKREQS_MEMORY}"
+ JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+
+ einfo "Testing \"core\""
+ JAVA_TEST_RESOURCE_DIRS="core/src/test/resources"
+ JAVA_TEST_SRC_DIR="core/src/test/java"
+ pushd core/src/test/java || die
+ local JAVA_TEST_RUN_ONLY=$(find * \
+ -name "AllTests.java" )
+ popd || die
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+ java-pkg-simple_src_test
+
+ einfo "Testing bcprov"
+ JAVA_GENTOO_CLASSPATH_EXTRA=":core.jar:libs/unboundid-ldapsdk-6.0.8.jar"
+ JAVA_TEST_RESOURCE_DIRS="prov/src/test/resources"
+ JAVA_TEST_SRC_DIR="prov/src/test/java"
+ pushd prov/src/test/java || die
+ local JAVA_TEST_RUN_ONLY=$(find * \
+ -name "AllTests.java" )
+ popd || die
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ docinto html
+ dodoc -r docs
+ java-pkg-simple_src_install
+}
diff --git a/dev-java/bcprov/files/bcprov-1.79-PKCS12StoreTest.patch b/dev-java/bcprov/files/bcprov-1.79-PKCS12StoreTest.patch
new file mode 100644
index 000000000000..b644fa927034
--- /dev/null
+++ b/dev-java/bcprov/files/bcprov-1.79-PKCS12StoreTest.patch
@@ -0,0 +1,21 @@
+There was 1 failure:
+1) testJCE(org.bouncycastle.jce.provider.test.SimpleTestTest)
+junit.framework.AssertionFailedError: index 30 PKCS12Store: Exception: java.io.FileNotFoundException: /tmp/PKCS12-AES256-AES128.p12 (Permission denied)
+ at junit.framework.Assert.fail(Assert.java:57)
+ at junit.framework.TestCase.fail(TestCase.java:223)
+ at org.bouncycastle.jce.provider.test.SimpleTestTest.testJCE(SimpleTestTest.java:33)
+
+FAILURES!!!
+Tests run: 1, Failures: 1
+
+--- a/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java
++++ b/prov/src/test/java/org/bouncycastle/jce/provider/test/PKCS12StoreTest.java
+@@ -2153,7 +2153,7 @@ public class PKCS12StoreTest
+
+ inStore.load(new ByteArrayInputStream(bOut.toByteArray()), passwd);
+
+- FileOutputStream fOut = new FileOutputStream("/tmp/" + storeType + ".p12");
++ FileOutputStream fOut = new FileOutputStream(System.getProperty("java.io.tmpdir") + storeType + ".p12");
+ fOut.write(bOut.toByteArray());
+ fOut.close();
+ Key k = inStore.getKey("key", null);