Сравнение commons-collections-3.2.2-r1 с commons-collections-4.4-r1

/usr/portage/dev-java/commons-collections/commons-collections-4.4-r1.ebuild 2023-10-09 14:52:29.416368348 +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 pom.xml --download-uri mirror://apache/commons/collections/source/commons-collections4-4.4-src.tar.gz --slot 4 --keywords "~amd64 ~arm64 ~ppc64 ~x86" --ebuild commons-collections-4.4.ebuild
6

  
4 7
EAPI=8
5 8

  
6 9
JAVA_PKG_IUSE="doc source test"
7
MAVEN_ID="commons-collections:commons-collections:3.2.2"
10
MAVEN_ID="org.apache.commons:commons-collections4:4.4"
11
JAVA_TESTING_FRAMEWORKS="junit-4"
8 12

  
9
inherit java-pkg-2 java-ant-2 verify-sig
13
inherit java-pkg-2 java-pkg-simple
10 14

  
11
DESCRIPTION="Jakarta-Commons Collections Component"
12
HOMEPAGE="https://commons.apache.org/collections/"
13
SRC_URI="https://archive.apache.org/dist/commons/collections/source/commons-collections-${PV}-src.tar.gz
14
	verify-sig? ( https://archive.apache.org/dist/commons/collections/source/commons-collections-${PV}-src.tar.gz.asc )"
15
DESCRIPTION="Extends the JCF classes with new interfaces, implementations and utilities"
16
HOMEPAGE="https://commons.apache.org/proper/commons-collections/"
17
SRC_URI="mirror://apache/commons/collections/source/${PN}4-${PV}-src.tar.gz -> ${P}-src.tar.gz"
15 18

  
16 19
LICENSE="Apache-2.0"
17
SLOT="0"
18
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos"
19
RESTRICT="!test? ( test )"
20
SLOT="4"
21
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
22

  
23
# Compile dependencies
24
# POM: pom.xml
25
# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4
26
# test? org.apache.commons:commons-lang3:3.9 -> >=dev-java/commons-lang-3.12.0:3.6
27
# test? org.easymock:easymock:4.0.2 -> !!!suitable-mavenVersion-not-found!!!
20 28

  
21 29
DEPEND="
22 30
	>=virtual/jdk-1.8:*
23 31
	test? (
24
		dev-java/junit:0
25
		dev-java/ant-junit:0
26
	)"
27

  
28
RDEPEND=">=virtual/jre-1.8:*"
29

  
30
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )"
31
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/commons.apache.org.asc"
32

  
33
S="${WORKDIR}/${P}-src"
34

  
35
PATCHES=(
36
	"${FILESDIR}/${P}-fixes.patch"
37
)
38

  
39
src_prepare() {
40
	default
41
}
42

  
43
src_compile() {
44
	local antflags
45
	if use test; then
46
		antflags="tf.jar -Djunit.jar=$(java-pkg_getjars --build-only junit)"
47
	fi
48
	eant jar $(use_doc) ${antflags}
49
}
32
		dev-java/easymock:3.2
33
		dev-java/commons-lang:3.6
34
	)
35
"
36

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

  
41
DOCS=( {CONTRIBUTING,README}.md {LICENSE,NOTICE,RELEASE-NOTES}.txt )
42
HTML_DOCS=( {DEVELOPERS-GUIDE,PROPOSAL}.html )
43

  
44
S="${WORKDIR}/commons-collections4-${PV}-src"
45

  
46
JAVA_SRC_DIR="src/main/java"
47

  
48
JAVA_TEST_GENTOO_CLASSPATH="junit-4,commons-lang-3.6,easymock-3.2"
49
JAVA_TEST_SRC_DIR="src/test/java"
50
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
51
JAVA_AUTOMATIC_MODULE_NAME="org.apache.commons.collections4"
50 52

  
51 53
src_test() {
52
	if [[ "${ARCH}" = "ppc" ]]; then
53
		einfo "tests are disabled on ppc"
54
	else
55
		ANT_TASKS="ant-junit" eant testjar -Djunit.jar="$(java-pkg_getjars junit)"
56
	fi
54
	# https://github.com/apache/commons-collections/blob/cab58b3a8093a2f6b84f12783a3fb358747310f7/pom.xml#L542-L550
55
	pushd src/test/java || die
56
		local TESTS=$(find * -name "*Test.java" ! -name "TestUtils.java"  ! -name "Abstract*.java" ! -name "BulkTest.java")
57
		TESTS="${TESTS//.java}"
58
		TESTS="${TESTS//\//.}"
59
	popd
60

  
61
	JAVA_TEST_RUN_ONLY=( "${TESTS}" )
62
	java-pkg-simple_src_test
57 63
}
58 64

  
59 65
src_install() {
60
	java-pkg_newjar build/${P}.jar ${PN}.jar
61
	use test && \
62
		java-pkg_newjar build/${PN}-testframework-${PV}.jar \
63
			${PN}-testframework.jar
64

  
65
	java-pkg_dohtml *.html
66
	if use doc; then
67
		java-pkg_dojavadoc build/docs/apidocs
68
	fi
69
	use source && java-pkg_dosrc src/java/*
66
	default # https://bugs.gentoo.org/789582
67
	java-pkg-simple_src_install
70 68
}
Спасибо!