Сравнение junit-3.8.2-r2 с junit-4.13.2

/usr/portage/dev-java/junit/junit-4.13.2.ebuild 2023-10-09 14:52:29.432368349 +0300
1
# Copyright 1999-2021 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 junit4-r4.13.2/pom.xml --download-uri https://github.com/junit-team/junit4/archive/refs/tags/r4.13.2.tar.gz --slot 4 --keywords "~amd64 ~arm64 ~ppc64 ~x86" --ebuild junit-4.13.2.ebuild
6

  
4 7
EAPI=7
5 8

  
6
JAVA_PKG_IUSE="doc source"
7
MAVEN_ID="junit:junit:3.8.2"
9
JAVA_PKG_IUSE="doc source test"
10
MAVEN_ID="junit:junit:4.13.2"
8 11

  
9 12
inherit java-pkg-2 java-pkg-simple
10 13

  
11
MY_P=${P/-/}
12

  
13 14
DESCRIPTION="Simple framework to write repeatable tests"
14
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
15
HOMEPAGE="http://www.junit.org/"
16
LICENSE="CPL-1.0"
17
SLOT="0"
18
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
19

  
20
DEPEND=">=virtual/jdk-1.8"
21
RDEPEND=">=virtual/jre-1.8"
22

  
23
DOCS=( README.html cpl-v10.html )
15
HOMEPAGE="https://junit.org/junit4/"
16
SRC_URI="https://github.com/${PN}-team/${PN}4/archive/refs/tags/r${PV}.tar.gz -> ${P}.tar.gz"
24 17

  
25
JAVA_SRC_DIR="${PN}"
26

  
27
S="${WORKDIR}/${MY_P}"
18
LICENSE="EPL-1.0"
19
SLOT="4"
20
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
28 21

  
29
src_unpack() {
30
	unpack ${A}
31
	cd "${S}" || die
32
	unzip src.jar || die
33
}
22
# Common dependencies
23
# POM: ${PN}4-r${PV}/pom.xml
24
# org.hamcrest:hamcrest-core:1.3 -> >=dev-java/hamcrest-core-1.3:1.3
25

  
26
CDEPEND="
27
	dev-java/hamcrest-core:1.3
28
"
29

  
30
# Compile dependencies
31
# POM: ${PN}4-r${PV}/pom.xml
32
# test? org.hamcrest:hamcrest-library:1.3 -> >=dev-java/hamcrest-library-1.3:1.3
33

  
34
DEPEND="
35
	>=virtual/jdk-1.8:*
36
	test? (
37
		dev-java/hamcrest-library:1.3
38
	)
39
	${CDEPEND}"
40
RDEPEND="
41
	>=virtual/jre-1.8:*
42
	${CDEPEND}"
43
BDEPEND="app-arch/unzip"
44
S="${WORKDIR}"
45

  
46
JAVA_ENCODING="ISO-8859-1"
47

  
48
JAVA_GENTOO_CLASSPATH="hamcrest-core-1.3"
49
JAVA_SRC_DIR="${PN}4-r${PV}/src/main/java"
50
JAVA_RESOURCE_DIRS="${PN}4-r${PV}/src/main/resources"
51

  
52
JAVA_TEST_GENTOO_CLASSPATH="hamcrest-core-1.3,hamcrest-library-1.3"
53
JAVA_TEST_SRC_DIR="${PN}4-r${PV}/src/test/java"
54
JAVA_TEST_RESOURCE_DIRS="${PN}4-r${PV}/src/test/resources"
34 55

  
35 56
src_prepare() {
36 57
	default
37 58
	java-pkg_clean
38 59
}
39 60

  
40
src_install() {
41
	java-pkg-simple_src_install
42
	einstalldocs
61
src_test() {
62
	cd "${JAVA_TEST_SRC_DIR}" || die
63

  
64
	local CP=".:../resources:${S}/${PN}.jar:$(java-pkg_getjars ${JAVA_TEST_GENTOO_CLASSPATH})"
65

  
66
	ejavac -cp "${CP}" -d . $(find * -name "*.java")
67
	java -cp "${CP}" -Djava.awt.headless=true org.junit.runner.JUnitCore junit.tests.AllTests || die "Running junit failed"
43 68
}
Спасибо!