summaryrefslogtreecommitdiff
path: root/dev-java/junit/junit-4.13.2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /dev-java/junit/junit-4.13.2.ebuild
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'dev-java/junit/junit-4.13.2.ebuild')
-rw-r--r--dev-java/junit/junit-4.13.2.ebuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-java/junit/junit-4.13.2.ebuild b/dev-java/junit/junit-4.13.2.ebuild
new file mode 100644
index 000000000000..e710a4bf5827
--- /dev/null
+++ b/dev-java/junit/junit-4.13.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# 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
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="junit:junit:4.13.2"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Simple framework to write repeatable tests"
+HOMEPAGE="https://junit.org/junit5/"
+SRC_URI="https://github.com/${PN}-team/${PN}4/archive/refs/tags/r${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="4"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+# Common dependencies
+# POM: ${PN}4-r${PV}/pom.xml
+# org.hamcrest:hamcrest-core:1.3 -> >=dev-java/hamcrest-core-1.3:1.3
+
+CDEPEND="
+ dev-java/hamcrest-core:1.3
+"
+
+# Compile dependencies
+# POM: ${PN}4-r${PV}/pom.xml
+# test? org.hamcrest:hamcrest-library:1.3 -> >=dev-java/hamcrest-library-1.3:1.3
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/hamcrest-library:1.3
+ )
+ ${CDEPEND}"
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CDEPEND}"
+
+S="${WORKDIR}"
+
+JAVA_ENCODING="ISO-8859-1"
+
+JAVA_GENTOO_CLASSPATH="hamcrest-core-1.3"
+JAVA_SRC_DIR="${PN}4-r${PV}/src/main/java"
+JAVA_RESOURCE_DIRS="${PN}4-r${PV}/src/main/resources"
+
+JAVA_TEST_GENTOO_CLASSPATH="hamcrest-core-1.3,hamcrest-library-1.3"
+JAVA_TEST_SRC_DIR="${PN}4-r${PV}/src/test/java"
+JAVA_TEST_RESOURCE_DIRS="${PN}4-r${PV}/src/test/resources"
+
+src_prepare() {
+ default
+ java-pkg_clean
+}
+
+src_test() {
+ cd "${JAVA_TEST_SRC_DIR}" || die
+
+ local CP=".:../resources:${S}/${PN}.jar:$(java-pkg_getjars ${JAVA_TEST_GENTOO_CLASSPATH})"
+
+ ejavac -cp "${CP}" -d . $(find * -name "*.java")
+ java -cp "${CP}" -Djava.awt.headless=true org.junit.runner.JUnitCore junit.tests.AllTests || die "Running junit failed"
+}