1 |
commit: d69a238faf8e3bba5a66917136cc83207a380860 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Mon Feb 21 16:38:28 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 22 07:44:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d69a238f |
7 |
|
8 |
dev-java/cglib: Fix test failure |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/24301 |
13 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
14 |
|
15 |
dev-java/cglib/cglib-3.3.0-r1.ebuild | 71 ++++++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 71 insertions(+) |
17 |
|
18 |
diff --git a/dev-java/cglib/cglib-3.3.0-r1.ebuild b/dev-java/cglib/cglib-3.3.0-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 000000000000..d82a7f3a7d4a |
21 |
--- /dev/null |
22 |
+++ b/dev-java/cglib/cglib-3.3.0-r1.ebuild |
23 |
@@ -0,0 +1,71 @@ |
24 |
+# Copyright 1999-2022 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=8 |
28 |
+ |
29 |
+# doc USE flag is not in IUSE as the docs does not compile because of errors |
30 |
+JAVA_PKG_IUSE="examples source test" |
31 |
+MAVEN_ID="cglib:cglib:3.3.0" |
32 |
+JAVA_TESTING_FRAMEWORKS="junit-4" |
33 |
+ |
34 |
+inherit java-pkg-2 java-pkg-simple |
35 |
+ |
36 |
+MY_PV=RELEASE_${PV//./_} |
37 |
+MY_P=cglib-${MY_PV} |
38 |
+ |
39 |
+DESCRIPTION="cglib is a powerful, high performance and quality Code Generation Library" |
40 |
+HOMEPAGE="https://github.com/cglib/cglib" |
41 |
+SRC_URI="https://github.com/cglib/cglib/archive//${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="Apache-2.0" |
44 |
+SLOT="3" |
45 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
46 |
+ |
47 |
+CDEPEND="dev-java/ant-core:0 |
48 |
+ dev-java/asm:9 |
49 |
+" |
50 |
+DEPEND=" |
51 |
+ >=virtual/jdk-1.8:* |
52 |
+ ${CDEPEND} |
53 |
+" |
54 |
+RDEPEND=" |
55 |
+ >=virtual/jre-1.8:* |
56 |
+ ${CDEPEND} |
57 |
+" |
58 |
+ |
59 |
+S="${WORKDIR}" |
60 |
+ |
61 |
+JAVA_GENTOO_CLASSPATH="asm-9 ant-core" |
62 |
+JAVA_SRC_DIR="${MY_P}/${PN}/src/main/java" |
63 |
+JAVA_RESOURCE_DIRS="${MY_P}/${PN}/src/main/resources" |
64 |
+ |
65 |
+JAVA_TEST_GENTOO_CLASSPATH="junit-4" |
66 |
+JAVA_TEST_SRC_DIR="${MY_P}/${PN}/src/test/java" |
67 |
+JAVA_TEST_EXCLUDES=( |
68 |
+ "net.sf.cglib.CodeGenTestCase" # not a test class |
69 |
+ "net.sf.cglib.TestAll" |
70 |
+ "net.sf.cglib.TestGenerator" # not a test class |
71 |
+ "net.sf.cglib.proxy.TestEnhancer" # broken tests |
72 |
+ "net.sf.cglib.proxy.TestInterceptor" # not a test class |
73 |
+ "net.sf.cglib.reflect.TestFastClass" # broken tests |
74 |
+) |
75 |
+ |
76 |
+src_test() { |
77 |
+ # Caused by: net.sf.cglib.core.CodeGenerationException: |
78 |
+ # java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class |
79 |
+ # java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) |
80 |
+ # throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @42bb2aee |
81 |
+ |
82 |
+ local vm_version="$(java-config -g PROVIDES_VERSION)" |
83 |
+ if [[ "${vm_version}" -ge "17" ]] ; then |
84 |
+ JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED ) |
85 |
+ fi |
86 |
+ |
87 |
+ java-pkg-simple_src_test |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ java-pkg-simple_src_install |
92 |
+ |
93 |
+ use examples && java-pkg_doexamples --subdir samples ${MY_P}/cglib-sample/src/main/java |
94 |
+} |