Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/bcpkix/
Date: Mon, 06 Jun 2022 07:42:35
Message-Id: 1654501344.ecba7b73baa8c4267f6fa641d95587b7cddd5ee7.flow@gentoo
1 commit: ecba7b73baa8c4267f6fa641d95587b7cddd5ee7
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Mon Jun 6 06:52:25 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 6 07:42:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecba7b73
7
8 dev-java/bcpkix: add java-pkg-2_pkg_setup
9
10 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 dev-java/bcpkix/bcpkix-1.71-r1.ebuild | 116 ++++++++++++++++++++++++++++++++++
14 1 file changed, 116 insertions(+)
15
16 diff --git a/dev-java/bcpkix/bcpkix-1.71-r1.ebuild b/dev-java/bcpkix/bcpkix-1.71-r1.ebuild
17 new file mode 100644
18 index 000000000000..208e40ffb41e
19 --- /dev/null
20 +++ b/dev-java/bcpkix/bcpkix-1.71-r1.ebuild
21 @@ -0,0 +1,116 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +JAVA_PKG_IUSE="doc source test"
28 +MAVEN_ID="org.bouncycastle:bcpkix-jdk18on:1.71"
29 +JAVA_TESTING_FRAMEWORKS="junit-4"
30 +
31 +inherit java-pkg-2 java-pkg-simple check-reqs
32 +
33 +DESCRIPTION="Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation"
34 +HOMEPAGE="https://www.bouncycastle.org/java.html"
35 +SRC_URI="https://github.com/bcgit/bc-java/archive/r${PV/./rv}.tar.gz -> bc-java-r${PV/./rv}.tar.gz"
36 +
37 +LICENSE="BSD"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
40 +
41 +# 1) testSANMismatchIP(org.bouncycastle.est.test.TestHostNameAuthorizer)
42 +# org.bouncycastle.est.ESTException: localhost.me: Temporary failure in name resolution HTTP Status Code: 0
43 +PROPERTIES="test_network"
44 +RESTRICT="test"
45 +
46 +CDEPEND="
47 + ~dev-java/bcprov-${PV}:0
48 + ~dev-java/bcutil-${PV}:0
49 + "
50 +DEPEND="${CDEPEND}
51 + >=virtual/jdk-11:*"
52 +RDEPEND="${CDEPEND}
53 + >=virtual/jre-1.8:*"
54 +
55 +DOCS=( ../{README,SECURITY}.md )
56 +HTML_DOCS=( ../{CONTRIBUTORS,index}.html )
57 +
58 +S="${WORKDIR}/bc-java-r${PV/./rv}/pkix"
59 +
60 +JAVA_GENTOO_CLASSPATH="bcprov,bcutil"
61 +JAVA_SRC_DIR=(
62 + "src/main/java"
63 + "src/main/jdk1.9" # https://bugs.gentoo.org/797634
64 +)
65 +
66 +JAVA_TEST_GENTOO_CLASSPATH="junit-4"
67 +JAVA_TEST_SRC_DIR="src/test/java"
68 +JAVA_TEST_RESOURCE_DIRS="src/test/resources"
69 +
70 +JAVA_TEST_EXTRA_ARGS="-Dbc.test.data.home=${S}/../core/src/test/data"
71 +
72 +# There was 1 failure:
73 +# 1) testSimpleTests(org.bouncycastle.cert.test.AllTests)
74 +# junit.framework.AssertionFailedError: CertTest:
75 +# CertTest: 9 failed - exception java.security.InvalidKeyException: cannot identify EdDSA public key
76 +# at junit.framework.Assert.fail(Assert.java:57)
77 +# at junit.framework.TestCase.fail(TestCase.java:223)
78 +# at org.bouncycastle.cert.test.AllTests.testSimpleTests(AllTests.java:30)
79 +#
80 +# FAILURES!!!
81 +# Tests run: 474, Failures: 1
82 +JAVA_TEST_RUN_ONLY=(
83 + "org.bouncycastle.cert.cmp.test.AllTests"
84 + "org.bouncycastle.cert.crmf.test.AllTests"
85 + "org.bouncycastle.cert.ocsp.test.AllTests"
86 + "org.bouncycastle.cert.path.test.AllTests"
87 +# "org.bouncycastle.cert.test.AllTests"
88 + "org.bouncycastle.cms.test.AllTests"
89 + "org.bouncycastle.dvcs.test.AllTests"
90 + "org.bouncycastle.eac.test.AllTests"
91 + "org.bouncycastle.est.test.AllTests"
92 + "org.bouncycastle.mime.test.AllTests"
93 + "org.bouncycastle.mozilla.test.AllTests"
94 + "org.bouncycastle.openssl.test.AllTests"
95 + "org.bouncycastle.operator.test.AllTests"
96 + "org.bouncycastle.pkcs.test.AllTests"
97 + "org.bouncycastle.tsp.test.AllTests"
98 +)
99 +
100 +# https://bugs.gentoo.org/823347
101 +check_env() {
102 + if use test; then
103 + # this is needed only for tests
104 + CHECKREQS_MEMORY="2048M"
105 + check-reqs_pkg_pretend
106 + fi
107 +}
108 +
109 +# https://bugs.gentoo.org/823347
110 +pkg_pretend() {
111 + check_env
112 +}
113 +
114 +# https://bugs.gentoo.org/823347
115 +pkg_setup() {
116 + check_env
117 + java-pkg-2_pkg_setup
118 +}
119 +
120 +src_prepare() {
121 + default
122 + java-pkg_clean ..
123 +}
124 +
125 +# https://bugs.gentoo.org/823347
126 +src_test() {
127 + JAVA_TEST_EXTRA_ARGS+=" -Xmx${CHECKREQS_MEMORY}"
128 + java-pkg-simple_src_test
129 +}
130 +
131 +src_install() {
132 + default
133 + einstalldocs
134 + docinto html
135 + dodoc -r ../docs
136 + java-pkg-simple_src_install
137 +}