Diff jaxb-runtime-2.3.8 with a jaxb-runtime-4.0.0-r1

/usr/portage/dev-java/jaxb-runtime/jaxb-runtime-4.0.0-r1.ebuild 2023-10-09 14:52:29.428368349 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2022 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 runtime/impl/pom.xml --download-uri https://github.com/eclipse-ee4j/jaxb-ri/archive/4.0.0-RI.tar.gz --slot 4 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild jaxb-runtime-4.0.0.ebuild
6

  
4 7
EAPI=8
5 8

  
6 9
JAVA_PKG_IUSE="doc source test"
7
MAVEN_ID="org.glassfish.jaxb:jaxb-runtime:${PV}"
10
MAVEN_ID="org.glassfish.jaxb:jaxb-runtime:4.0.0"
8 11
JAVA_TESTING_FRAMEWORKS="junit-4"
9 12

  
10 13
inherit java-pkg-2 java-pkg-simple
......
12 15
DESCRIPTION="JAXB (JSR 222) Reference Implementation"
13 16
HOMEPAGE="https://eclipse-ee4j.github.io/jaxb-ri/"
14 17
SRC_URI="https://github.com/eclipse-ee4j/jaxb-ri/archive/${PV}-RI.tar.gz -> jaxb-ri-${PV}.tar.gz"
15
S="${WORKDIR}/jaxb-ri-${PV}-RI/jaxb-ri/runtime/impl"
16 18

  
17 19
LICENSE="EPL-1.0"
18
SLOT="2"
20
SLOT="4"
19 21
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
20 22

  
21
CP_DEPEND="
22
	dev-java/fastinfoset:0
23
	dev-java/istack-commons-runtime:3
24
	dev-java/jaxb-api:2
25
	dev-java/jaxb-stax-ex:1
26
	~dev-java/txw2-${PV}:2
27
"
28

  
29 23
DEPEND="
24
	>=dev-java/fastinfoset-2.1.0-r1:0
25
	dev-java/jaxb-api:4
26
	>=dev-java/jaxb-stax-ex-2.1.0-r1:0
27
	dev-java/istack-commons-runtime:0
30 28
	>=virtual/jdk-11:*
31
	${CP_DEPEND}
32
	>=dev-java/jakarta-activation-api-1.2.2:1
33 29
"
34 30

  
35
RDEPEND="
36
	>=virtual/jre-1.8:*
37
	${CP_DEPEND}
38
	>=dev-java/jakarta-activation-1.2.2:1
39
"
31
# reason: '<>' with anonymous inner classes is not supported in -source 8
32
#   (use -source 9 or higher to enable '<>' with anonymous inner classes)
33
RDEPEND=">=virtual/jre-11:*"
34

  
35
DOCS=( ../{CONTRIBUTING,NOTICE,README}.md )
40 36

  
41
JAVA_CLASSPATH_EXTRA="jakarta-activation-api-1"
42
JAVA_RESOURCE_DIRS="src/main/resources"
43
JAVA_SRC_DIR="src/main/java"
37
S="${WORKDIR}/jaxb-ri-${PV}-RI/jaxb-ri"
44 38

  
39
JAVA_CLASSPATH_EXTRA="fastinfoset,jaxb-stax-ex"
45 40
JAVA_TEST_GENTOO_CLASSPATH="junit-4"
46
JAVA_TEST_SRC_DIR="src/test/java"
41

  
42
src_compile() {
43
	einfo "Compiling txw-runtime"
44
	JAVA_SRC_DIR="txw/runtime/src/main/java"
45
	JAVA_JAR_FILENAME="txw-runtime.jar"
46
	java-pkg-simple_src_compile
47
	JAVA_GENTOO_CLASSPATH_EXTRA+=":txw-runtime.jar"
48
	rm -r target || die
49

  
50
	einfo "Compiling core"
51
	JAVA_SRC_DIR="core/src/main/java"
52
	JAVA_RESOURCE_DIRS="core/src/main/resources"
53
	JAVA_JAR_FILENAME="core.jar"
54
	JAVA_CLASSPATH_EXTRA+=" istack-commons-runtime,jaxb-api-4"
55
	java-pkg-simple_src_compile
56
	JAVA_GENTOO_CLASSPATH_EXTRA+=":core.jar"
57
	rm -r target || die
58

  
59
	einfo "Compiling runtime"
60
	JAVA_SRC_DIR="runtime/impl/src/main/java"
61
	JAVA_RESOURCE_DIRS="runtime/impl/src/main/resources"
62
	JAVA_JAR_FILENAME="runtime.jar"
63
	java-pkg-simple_src_compile
64
	JAVA_GENTOO_CLASSPATH_EXTRA+=":runtime.jar"
65
	rm -r target || die
66

  
67
	if use doc; then
68
		einfo "Compiling javadocs"
69
		rm {core,runtime/impl}/src/main/java/module-info.java || die
70
		JAVA_SRC_DIR=(
71
			"txw/runtime/src/main/java"
72
			"core/src/main/java"
73
			"runtime/impl/src/main/java"
74
		)
75
		JAVA_JAR_FILENAME="ignoreme.jar"
76
		java-pkg-simple_src_compile
77
	fi
78
}
47 79

  
48 80
src_test() {
49
	# Run this test separately as it prevents a reasonable test summary
50
	JAVA_TEST_RUN_ONLY="com.sun.xml.bind.v2.schemagen.XmlSchemaGeneratorTest"
81
	einfo "Testing core"
82
	JAVA_TEST_SRC_DIR="core/src/test/java"
83
	JAVA_TEST_RESOURCE_DIRS="core/src/test/resources"
51 84
	java-pkg-simple_src_test
52 85

  
53
	# The default test selection of java-pkg-simple would omit
54
	# "com.sun.xml.bind.v2.schemagen.MarshallingAbstractTest"
55
	pushd src/test/java || die
56
		local JAVA_TEST_RUN_ONLY=$(find * \
57
			-type f \
58
			-name "*Test.java" \
59
			! -name "XmlSchemaGeneratorTest.java" \
60
			)
61
		JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
62
		JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
63
	popd
86
	einfo "Testing runtime"
87
	JAVA_TEST_SRC_DIR="runtime/impl/src/test/java"
88
	JAVA_TEST_RESOURCE_DIRS=()
64 89
	java-pkg-simple_src_test
65 90
}
91

  
92
src_install() {
93
	einstalldocs
94

  
95
	java-pkg_dojar "txw-runtime.jar"
96
	java-pkg_dojar "core.jar"
97
	java-pkg_dojar "runtime.jar"
98

  
99
	if use doc; then
100
		java-pkg_dojavadoc target/api
101
	fi
102

  
103
	if use source; then
104
		java-pkg_dosrc "txw/runtime/src/main/java/*"
105
		java-pkg_dosrc "core/src/main/java/*"
106
		java-pkg_dosrc "runtime/impl/src/main/java/*"
107
	fi
108
}
Thank you!