Diff snakeyaml-1.33 with a snakeyaml-2.0

/usr/portage/dev-java/snakeyaml/snakeyaml-2.0.ebuild 2023-10-09 14:52:29.444368349 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
# Skeleton command:
5
# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://bitbucket.org/snakeyaml/snakeyaml/get/snakeyaml-1.33.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild snakeyaml-1.33.ebuild
6

  
7 4
EAPI=8
8 5

  
9 6
JAVA_PKG_IUSE="doc source test"
10
MAVEN_ID="org.yaml:snakeyaml:1.33"
7
MAVEN_ID="org.yaml:snakeyaml:2.0"
11 8
JAVA_TESTING_FRAMEWORKS="junit-4"
12 9

  
13 10
inherit java-pkg-2 java-pkg-simple
......
15 12
DESCRIPTION="YAML 1.1 parser and emitter for Java"
16 13
HOMEPAGE="https://bitbucket.org/snakeyaml/snakeyaml"
17 14
SRC_URI="https://bitbucket.org/${PN}/${PN}/get/${P}.tar.gz"
15
S="${WORKDIR}/snakeyaml-snakeyaml-59ddbb3304bb"
18 16

  
19 17
LICENSE="Apache-2.0"
20
SLOT="0"
18
SLOT="2"
21 19
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
22 20

  
23 21
# Compile dependencies
......
28 26
# test? org.projectlombok:lombok:1.18.24 -> !!!groupId-not-found!!!
29 27

  
30 28
DEPEND="
31
	>=virtual/jdk-1.8:*
29
	>=virtual/jdk-11:*
32 30
	test? (
33 31
		dev-java/velocity:0
34 32
		dev-java/joda-time:0
......
37 35

  
38 36
RDEPEND=">=virtual/jre-1.8:*"
39 37

  
40
S="${WORKDIR}/snakeyaml-snakeyaml-7f5106920d77"
41

  
42
JAVA_AUTOMATIC_MODULE_NAME="org.yaml.snakeyaml"
43 38
JAVA_SRC_DIR="src/main/java"
44

  
45 39
JAVA_TEST_GENTOO_CLASSPATH="joda-time,junit-4,velocity"
46 40
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
47 41
JAVA_TEST_SRC_DIR="src/test/java"
48 42

  
43
# Workaround for https://bugs.gentoo.org/900433
44
# src/main/java9/org/yaml/snakeyaml/internal/Logger.java:16:
45
# error: duplicate class: org.yaml.snakeyaml.internal.Logger
46
src_prepare() {
47
	java-pkg-2_src_prepare
48
	mv src/main/java{9,}/module-info.java || die
49
}
50

  
49 51
src_test() {
50 52
	export EnvironmentKey1="EnvironmentValue1"
51 53
	export EnvironmentEmpty=""
......
53 55
	# Not packaged org.projectlombok:lombok - https://bugs.gentoo.org/868684
54 56
	rm src/test/java/org/yaml/snakeyaml/env/EnvLombokTest.java || die # Tests run: 1
55 57
	rm src/test/java/org/yaml/snakeyaml/issues/issue387/YamlExecuteProcessContextTest.java || die # Tests run: 1
56
	rm src/test/java/org/yaml/snakeyaml/env/ApplicationProperties.java || die # No tests
58
	rm src/test/java/org/yaml/snakeyaml/env/ApplicationProperties.java || die # No tests # import lombok.
57 59

  
58 60
	# https://bugs.gentoo.org/871744
59 61
	pushd src/test/java || die
Thank you!