1 |
commit: 908691da1cd5fc82983f37fce2541525aca48337 |
2 |
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> |
3 |
AuthorDate: Mon May 9 10:57:14 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 11 13:36:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=908691da |
7 |
|
8 |
dev-java/gson: add 2.9.0 |
9 |
|
10 |
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/25443 |
12 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
13 |
|
14 |
dev-java/gson/Manifest | 1 + |
15 |
dev-java/gson/gson-2.9.0.ebuild | 63 +++++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 64 insertions(+) |
17 |
|
18 |
diff --git a/dev-java/gson/Manifest b/dev-java/gson/Manifest |
19 |
index 9a396043ab0c..439250dc98ed 100644 |
20 |
--- a/dev-java/gson/Manifest |
21 |
+++ b/dev-java/gson/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST gson-2.8.8-sources.tar.gz 393941 BLAKE2B ebdd1088a069eea58e5ea4e2eddea0d42064c53f7284778b1b7217c8bc7abeb7e14350e19d838af1d94f78c5c38aca6de0f37674b022f0e528ed65eef803c3f1 SHA512 f90ad679c99c5e9a6ee9e397e59ab1d7d94a9c82366902b808addc40ebbab101fdba7fc83e4666c4f35e52d8b127e6f901e65072a7de210496466074dcd043c5 |
24 |
+DIST gson-2.9.0.tar.gz 350309 BLAKE2B f17f7a7410744b14cb79c979b35c7f3c46a3d9e922722c41893b872013319a1bd06d81526e8380055aafa47524bfcc50e02629d1c5994e1f9f81df4391a9c651 SHA512 25e57f0e3cbff7e4d33070d250ba4ecf1c659380bce07863c52a3b30edd0ba88c923e55b0f38098b5ce3827a74a21c4d41f9de02f6a84da771ae39fd823667d3 |
25 |
|
26 |
diff --git a/dev-java/gson/gson-2.9.0.ebuild b/dev-java/gson/gson-2.9.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..f5694762cc65 |
29 |
--- /dev/null |
30 |
+++ b/dev-java/gson/gson-2.9.0.ebuild |
31 |
@@ -0,0 +1,63 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+# Skeleton command: |
36 |
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/google/gson/archive/gson-parent-2.9.0.tar.gz --slot 2.6 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild gson-2.9.0.ebuild |
37 |
+ |
38 |
+EAPI=8 |
39 |
+ |
40 |
+JAVA_PKG_IUSE="doc source test" |
41 |
+MAVEN_ID="com.google.code.gson:gson:2.9.0" |
42 |
+JAVA_TESTING_FRAMEWORKS="junit-4" |
43 |
+ |
44 |
+inherit java-pkg-2 java-pkg-simple |
45 |
+ |
46 |
+DESCRIPTION="Gson JSON library" |
47 |
+HOMEPAGE="https://github.com/google/gson" |
48 |
+SRC_URI="https://github.com/google/${PN}/archive/${PN}-parent-${PV}.tar.gz -> ${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="Apache-2.0" |
51 |
+SLOT="2.6" |
52 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
53 |
+ |
54 |
+DEPEND=" |
55 |
+ virtual/jdk:11 |
56 |
+" |
57 |
+ |
58 |
+# Set to jre-11:* since jre-1.8:* causes errors: |
59 |
+# error: Invalid SafeVarargs annotation. Instance method <T>assertIterationOrder(Iterable<T>,T...) is not final. |
60 |
+# in src/test/java/com/google/gson/internal/LinkedTreeMapTest.java:164: |
61 |
+RDEPEND=" |
62 |
+ >=virtual/jre-11:* |
63 |
+" |
64 |
+ |
65 |
+S="${WORKDIR}/${PN}-${PN}-parent-${PV}/${PN}" |
66 |
+ |
67 |
+JAVA_SRC_DIR=( |
68 |
+ "src/main/java" |
69 |
+ "src/main/java-templates" |
70 |
+) |
71 |
+ |
72 |
+JAVA_TEST_GENTOO_CLASSPATH="junit-4" |
73 |
+JAVA_TEST_SRC_DIR="src/test/java" |
74 |
+JAVA_TEST_RESOURCE_DIRS=( |
75 |
+ "src/test/resources" |
76 |
+) |
77 |
+ |
78 |
+JAVA_TEST_EXCLUDES=( |
79 |
+ # requires the test class to be obfuscated using proguard which we do not have atm |
80 |
+ "com.google.gson.functional.EnumWithObfuscatedTest" |
81 |
+ # FAILURES!!! |
82 |
+ # Tests run: 1090, Failures: 3 |
83 |
+ # testComGoogleGsonAnnotationsPackage(com.google.gson.regression.OSGiTest) |
84 |
+ # junit.framework.AssertionFailedError: Cannot find com.google.gson OSGi bundle manifest |
85 |
+ "com.google.gson.regression.OSGiTest" |
86 |
+ # testSerializeInternalImplementationObject(com.google.gson.functional.ReflectionAccessTest) |
87 |
+ # java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ |
88 |
+ "com.google.gson.functional.ReflectionAccessTest" |
89 |
+) |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ sed -i "s/\${project.version}/${PV}/g" src/main/java-templates/com/google/gson/internal/GsonBuildConfig.java || die "Failed to set version" |
94 |
+} |