summaryrefslogtreecommitdiff
path: root/dev-java
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-04-14 18:45:23 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-04-14 18:45:23 +0000
commit8fdc3a2b9cc2cfe01893b9cb3f923c210287b0f1 (patch)
tree67723745baeb547a82176791d74b80470cdb8d29 /dev-java
parent63e9c2d7721dccfc29927b157ad9c1934f727820 (diff)
downloadbaldeagleos-repo-8fdc3a2b9cc2cfe01893b9cb3f923c210287b0f1.tar.gz
baldeagleos-repo-8fdc3a2b9cc2cfe01893b9cb3f923c210287b0f1.tar.xz
baldeagleos-repo-8fdc3a2b9cc2cfe01893b9cb3f923c210287b0f1.zip
Adding metadata
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/antlr-tool/antlr-tool-4.9.3-r2.ebuild (renamed from dev-java/antlr-tool/antlr-tool-4.9.3-r1.ebuild)2
-rw-r--r--dev-java/auto-service-annotations/auto-service-annotations-1.1.1.ebuild4
-rw-r--r--dev-java/commons-codec/commons-codec-1.16.1.ebuild2
-rw-r--r--dev-java/commons-compress/commons-compress-1.26.1.ebuild2
-rw-r--r--dev-java/commons-lang/commons-lang-3.14.0.ebuild2
-rw-r--r--dev-java/commons-net/commons-net-3.10.0.ebuild2
-rw-r--r--dev-java/commons-validator/commons-validator-1.8.0.ebuild2
-rw-r--r--dev-java/icu4j/icu4j-74.2-r1.ebuild (renamed from dev-java/icu4j/icu4j-74.2.ebuild)0
-rw-r--r--dev-java/javacc/Manifest1
-rw-r--r--dev-java/javacc/javacc-5.0-r5.ebuild73
-rw-r--r--dev-java/jimfs/Manifest2
-rw-r--r--dev-java/jimfs/jimfs-1.3.0.ebuild70
-rw-r--r--dev-java/jimfs/metadata.xml9
-rw-r--r--dev-java/junit/Manifest2
-rw-r--r--dev-java/junit/junit-5.10.2.ebuild351
-rw-r--r--dev-java/openjdk/openjdk-8.402_p06-r2.ebuild (renamed from dev-java/openjdk/openjdk-8.402_p06-r1.ebuild)8
16 files changed, 447 insertions, 85 deletions
diff --git a/dev-java/antlr-tool/antlr-tool-4.9.3-r1.ebuild b/dev-java/antlr-tool/antlr-tool-4.9.3-r2.ebuild
index eaf876b5e1b3..2891b009c53f 100644
--- a/dev-java/antlr-tool/antlr-tool-4.9.3-r1.ebuild
+++ b/dev-java/antlr-tool/antlr-tool-4.9.3-r2.ebuild
@@ -32,7 +32,7 @@ CP_DEPEND="
~dev-java/antlr-runtime-${PV}:${SLOT}
dev-java/antlr-runtime:3.5
dev-java/jakarta-json-api:1
- dev-java/icu4j:0
+ >=dev-java/icu4j-74.2-r1:0
dev-java/stringtemplate:4
dev-java/treelayout:0
"
diff --git a/dev-java/auto-service-annotations/auto-service-annotations-1.1.1.ebuild b/dev-java/auto-service-annotations/auto-service-annotations-1.1.1.ebuild
index 0ae78daf656a..59f4e19a87db 100644
--- a/dev-java/auto-service-annotations/auto-service-annotations-1.1.1.ebuild
+++ b/dev-java/auto-service-annotations/auto-service-annotations-1.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -15,7 +15,7 @@ S="${WORKDIR}/auto-auto-service-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~arm ~arm64"
DEPEND=">=virtual/jdk-1.8:*"
RDEPEND=">=virtual/jre-1.8:*"
diff --git a/dev-java/commons-codec/commons-codec-1.16.1.ebuild b/dev-java/commons-codec/commons-codec-1.16.1.ebuild
index e092312d1927..c067370788bb 100644
--- a/dev-java/commons-codec/commons-codec-1.16.1.ebuild
+++ b/dev-java/commons-codec/commons-codec-1.16.1.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${P}-src"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux"
RESTRICT="test" #839681
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
diff --git a/dev-java/commons-compress/commons-compress-1.26.1.ebuild b/dev-java/commons-compress/commons-compress-1.26.1.ebuild
index b51066f5a17e..87b74429b039 100644
--- a/dev-java/commons-compress/commons-compress-1.26.1.ebuild
+++ b/dev-java/commons-compress/commons-compress-1.26.1.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${P}-src"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+KEYWORDS="~amd64 ~arm arm64 ppc64 x86"
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )"
diff --git a/dev-java/commons-lang/commons-lang-3.14.0.ebuild b/dev-java/commons-lang/commons-lang-3.14.0.ebuild
index 51add8c5a5af..438cd67818f2 100644
--- a/dev-java/commons-lang/commons-lang-3.14.0.ebuild
+++ b/dev-java/commons-lang/commons-lang-3.14.0.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${PN}3-${PV}-src"
LICENSE="Apache-2.0"
SLOT="3.6"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
+KEYWORDS="~amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
DEPEND=">=virtual/jdk-1.8:*"
RDEPEND=">=virtual/jre-1.8:*"
diff --git a/dev-java/commons-net/commons-net-3.10.0.ebuild b/dev-java/commons-net/commons-net-3.10.0.ebuild
index d49ece23e44e..48ea3dda6e61 100644
--- a/dev-java/commons-net/commons-net-3.10.0.ebuild
+++ b/dev-java/commons-net/commons-net-3.10.0.ebuild
@@ -16,7 +16,7 @@ SRC_URI="mirror://apache/commons/net/source/commons-net-${PV}-src.tar.gz
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
DEPEND=">=virtual/jdk-1.8:*"
RDEPEND=">=virtual/jre-1.8:*"
diff --git a/dev-java/commons-validator/commons-validator-1.8.0.ebuild b/dev-java/commons-validator/commons-validator-1.8.0.ebuild
index 293c25a82599..3cb73b0c5c09 100644
--- a/dev-java/commons-validator/commons-validator-1.8.0.ebuild
+++ b/dev-java/commons-validator/commons-validator-1.8.0.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${P}-src"
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
+KEYWORDS="~amd64 ppc64 x86"
RESTRICT="test" #839681
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
diff --git a/dev-java/icu4j/icu4j-74.2.ebuild b/dev-java/icu4j/icu4j-74.2-r1.ebuild
index df2c5aa4daba..df2c5aa4daba 100644
--- a/dev-java/icu4j/icu4j-74.2.ebuild
+++ b/dev-java/icu4j/icu4j-74.2-r1.ebuild
diff --git a/dev-java/javacc/Manifest b/dev-java/javacc/Manifest
index b05142bce90b..aea384cd1646 100644
--- a/dev-java/javacc/Manifest
+++ b/dev-java/javacc/Manifest
@@ -1,4 +1,3 @@
DIST javacc-4.1.tar.gz 769476 BLAKE2B c2a22fa78ff4dcf1e36221a23ca1e3cd1eecb473a59ea94ce52e298673f6bd18c0ea0cf757dd68885696ebc8cc724d271c69c923a21ffa433d03c1062b1201ee SHA512 911e5e9f062561ade1748dcef3596e0f25c399c4d52dd174773783dadf24a4ceea8d3feab9ab08880370677959051d8557aed815d4c4184f5ecd5789ee8a5754
-DIST javacc-5.0src.tar.gz 810123 BLAKE2B 6833e79a33c7ae8b28902d1c372162a2f9e326629f0d4c1936a8c3638d3aa3f6bd5713aca8398ba5f1ff963fe585eb683fcd3009602ee592ba79692c8ba0f3d6 SHA512 91896a0affac1c4fd00a093a731dfd02bda548d1a4d83e1077ed36a67f4f9deab0ce9f2d0212fd4c08ab00065d3029533adbafbc026a22ca071285093bd3bba6
DIST javacc-7.0.13.tar.gz 3199783 BLAKE2B 7e3dddbe53a6e417a31bb7386d154c0e9589f17f88e652f5e146a4e344d72cd948d4d8e55fab753bb983e5d31971efc948c1ecdca4e875031bea3f8a38bfc082 SHA512 ed71e47fc4a382c9c53067bbf73bd9736ee0c41d65e328d5e4843cd71c88d3b7715d7a8fe38f10152ef7ef3be064abf9e801c6ea78066c4fcbabf124dfc4e144
DIST javacc-7.0.4.tar.gz 2842349 BLAKE2B e5a2e24c99e5e3883270cf0e3931d7667e5b5b49a11c1d9b79b98767f74f4addf2dc7d3d620550bc1b5bb0bfbef8bf07af48a40d250d0902d97c8215f6cb8e01 SHA512 b93c93e8490aae9a26b0de948896ec6d7a044c205d09584c3908988e24a3ea63a1147365115b17a15c6fb311c44f53ddff7c11f092731cbd05d3ec1950ef57f1
diff --git a/dev-java/javacc/javacc-5.0-r5.ebuild b/dev-java/javacc/javacc-5.0-r5.ebuild
deleted file mode 100644
index 6df77f9fca66..000000000000
--- a/dev-java/javacc/javacc-5.0-r5.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-JAVA_PKG_IUSE="doc examples source test"
-
-inherit java-pkg-2 java-ant-2
-
-DESCRIPTION="Java Compiler Compiler - The Java Parser Generator"
-HOMEPAGE="https://javacc.github.io/javacc/"
-SRC_URI="http://java.net/projects/${PN}/downloads/download/${P}src.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-
-KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-
-CDEPEND="dev-java/junit:0"
-
-RDEPEND="
- ${CDEPEND}
- >=virtual/jre-1.8:*"
-
-DEPEND="
- ${CDEPEND}
- >=virtual/jdk-1.8:*
- test? ( >=dev-java/ant-1.10.14:0[junit] )"
-
-S="${WORKDIR}/${PN}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.0-javadoc.patch
-)
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
-
-EANT_GENTOO_CLASSPATH="junit"
-
-src_prepare() {
- default #780585
-
- rm -v lib/junit*/*.jar || die
-}
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_dojar "bin/lib/${PN}.jar"
-
- if use doc; then
- java-pkg_dohtml -r www/*
- java-pkg_dojavadoc doc/api
- fi
-
- use examples && java-pkg_doexamples examples
- use source && java-pkg_dosrc src/*
-
- echo "JAVACC_HOME=${EPREFIX}/usr/share/javacc/" > "${T}"/22javacc || die
- doenvd "${T}"/22javacc
-
- echo "export VERSION=${PV}" > "${T}"/pre || die
-
- local launcher
- for launcher in javacc jjdoc jjtree; do
- java-pkg_dolauncher ${launcher} -pre "${T}"/pre --main ${launcher}
- done
-
- einstalldocs
-}
diff --git a/dev-java/jimfs/Manifest b/dev-java/jimfs/Manifest
new file mode 100644
index 000000000000..b43255dddabd
--- /dev/null
+++ b/dev-java/jimfs/Manifest
@@ -0,0 +1,2 @@
+DIST jimfs-1.3.0.tar.gz 157568 BLAKE2B 1febcf132c162ebb87ec9507bc12e05d6a9354195f36b0e198fd50faa22284608adafd1989a79390271ced4c063dda44c477fc7ae051c32960afca0f4f2ee2b7 SHA512 1c769ba74d45de1656fd30bd695b61caaa5ec9bd6c6e051310d371012fa6c746d0b2ba85d3f94490ebfb9f74ca75f173b879144673f8e3af8fde1a132725490d
+DIST truth-1.1.3.jar 243021 BLAKE2B a59149038c62ef5dd352b13d4b393e1b7715fbafe5ed86ec2d16d722c738a31dcdca10132fc73b17b367ac4309e5407ba2e489f8d4c8fbca60ce5f35ae75d1e3 SHA512 f29a9fb070aff8a32358a7b6c8998c0095de5d8d68afa7f7bac759c7050309deff929e767657ecbbefd96163460f10255ca01bc567ab30df4834b9d916a4fae8
diff --git a/dev-java/jimfs/jimfs-1.3.0.ebuild b/dev-java/jimfs/jimfs-1.3.0.ebuild
new file mode 100644
index 000000000000..777cf00cfa5c
--- /dev/null
+++ b/dev-java/jimfs/jimfs-1.3.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="com.google.jimfs:jimfs:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="An in-memory file system for Java 7+"
+HOMEPAGE="https://github.com/google/jimfs"
+SRC_URI="https://github.com/google/jimfs/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar )"
+S="${WORKDIR}/${P}/jimfs"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+
+CP_DEPEND="
+ dev-java/auto-service-annotations:0
+ dev-java/error-prone-annotations:0
+ dev-java/guava:0
+ >=dev-java/icu4j-74.2-r1:0
+ dev-java/jsr305:0
+"
+
+DEPEND="${CP_DEPEND}
+ dev-java/checker-framework-qual:0
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/guava-testlib:0
+ )"
+
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+JAVA_CLASSPATH_EXTRA="checker-framework-qual"
+JAVA_AUTOMATIC_MODULE_NAME="com.google.common.jimfs"
+JAVA_RESOURCE_DIRS="src/main/res"
+JAVA_SRC_DIR="src/main/java"
+JAVA_TEST_GENTOO_CLASSPATH="guava-testlib junit-4"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ mkdir -p src/main/res/META-INF/services || die
+ echo "com.google.common.jimfs.SystemJimfsFileSystemProvider" > \
+ src/main/res/META-INF/services/java.nio.file.spi.FileSystemProvider || die
+}
+
+src_test() {
+ JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/truth-1.1.3.jar"
+ # Using the defaults of java-pkg-simple would exclude
+ # several tests which are run by "mvn test".
+ pushd src/test/java > /dev/null || die
+ local JAVA_TEST_RUN_ONLY=$(find * \
+ -name "*Test.java" \
+ ! -name AbstractGlob*.java \
+ ! -name AbstractPathMatcherTest.java \
+ ! -name AbstractJimfsIntegrationTest.java \
+ ! -name AbstractAttributeProviderTest.java \
+ )
+ popd > /dev/null
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+ java-pkg-simple_src_test
+}
diff --git a/dev-java/jimfs/metadata.xml b/dev-java/jimfs/metadata.xml
new file mode 100644
index 000000000000..a63267abaf71
--- /dev/null
+++ b/dev-java/jimfs/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ </maintainer>
+
+ <origin>gentoo-staging</origin>
+</pkgmetadata> \ No newline at end of file
diff --git a/dev-java/junit/Manifest b/dev-java/junit/Manifest
index 68aac7156ad4..88d8a813f89d 100644
--- a/dev-java/junit/Manifest
+++ b/dev-java/junit/Manifest
@@ -1,4 +1,6 @@
DIST junit-4.13.2.tar.gz 1077147 BLAKE2B c083982cd604812ba3375f90e0486bb3683ecbc3b08e3d14d4541845c5b91cd85100fe86028c70a7cec4e1ab6f6794bcb9333686b3c9b0705eacb75ac36e64da SHA512 29f8f8717efe50b9c7e27805a699f3664a0a068e32ce93e3a1a2bc67a045417490ac04251ef8f8bbd21c77a759bf7e4c6b7a5a07141227bd17de0c526c5031bb
DIST junit-4.13.2_p20240222.tar.gz 1007781 BLAKE2B 4eeab59aa7ff3cc65c73318acb562523e6ba781da6a0baf28f8fa82042f1affddb583d188c550207a7e267b3475f4a546e8e25eba61d5ba36d13bd7e277ad156 SHA512 89506413b7aca7c2d0b41c8297dde48c1b90a44133bfb3ebf300247c7837839a3aff2d785d891ddb8762427d718eacf016a1d67e2e24edda05f4eae36ca311f1
+DIST junit-5.10.2.tar.gz 2942035 BLAKE2B 4880df74b7cbf23acd34c716f9fce26edd28b31c14d720e129e9e1f06aa35b70c447a0d87904e083a54663fba17e0b2b470678dc32480e0a11c5ebf46d5fe38e SHA512 c36ff7c2bd21f9a64c93b836fc1017a8a96ebcc0079cf1d95b09f5b764435178c2dc2336f2493e7e4df561013693dce4f08dfe0cf3bd76cc9b820313f64d064f
DIST junit-5.9.2.tar.gz 2882173 BLAKE2B 6baf8768654b399d64237a110dcb6a821ab7dc8964254a5d00f7ffb65c789818aed51ad7042a963a47669042baaeec87b5d0453643a2b0eeeaf6393a42c75fd6 SHA512 5673577f773042b4e253241d27298a60dbac239502788e1d999fbe0d3ffe76b29c90d4fb43660f2e2e00e3e9b8d4c1b6b909ff95dc6e87ccb6f7b009ae6b0e78
DIST junit3.8.2.zip 461426 BLAKE2B 8fbef1ccdf7f71c611976d63f45838f4cb2564da5f5064e7abc39931a3c99039a40660093aba2cc3c70af761171125f434c16c52021226f2e92fdf23597dbf25 SHA512 f203332ccc2bdc38c683a95bdbe448f38cbfbeea81ecc431bf9ebf0a3292f0150fcfe5cd5dd6da481be034366820f95775a33581931aed9e4cc12a6ff27e3930
+DIST junit5-java18-compatibility.patch 742 BLAKE2B 89bfa36330278cdee2f7f66ed5527895e650a7b490d3f3695772a27541be1d8383c1742bab4e8494f3a84c29f93f553880a3bd5cd4d84792cf662fbc33a6e594 SHA512 5a9a562eb61a875764da369ff40da6ff95c6de8b3b3ecb612634112076741d75d6eab385743843b4fe7ca8a1827960e06550f6e90c8b7ef75b55006b41c416cd
diff --git a/dev-java/junit/junit-5.10.2.ebuild b/dev-java/junit/junit-5.10.2.ebuild
new file mode 100644
index 000000000000..6e794beca258
--- /dev/null
+++ b/dev-java/junit/junit-5.10.2.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Declare the 'doc' USE flag in IUSE -- not JAVA_PKG_IUSE -- to
+# prevent java-pkg-simple.eclass from handling Javadoc; instead,
+# let this ebuild handle Javadoc generation and installation itself.
+# This ebuild invokes java-pkg-simple.eclass's phase functions
+# multiple times to build multiple modules, but the eclass always
+# installs each module's Javadoc to the same directory, which would
+# trigger an error when the second module's Javadoc is installed.
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Simple framework to write repeatable tests"
+HOMEPAGE="https://junit.org/junit5/"
+DEB="5.10.1-1"
+SRC_URI="https://github.com/junit-team/junit5/archive/r${PV}.tar.gz -> ${P}.tar.gz
+ https://sources.debian.org/data/main/j/junit5/${DEB}/debian/patches/18-java-compatibility.patch \
+ -> junit5-java18-compatibility.patch"
+S="${WORKDIR}/junit5-r${PV}"
+
+LICENSE="EPL-2.0"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64"
+IUSE="doc migration-support suite vintage"
+
+CP_DEPEND="
+ dev-java/apiguardian-api:0
+ dev-java/opentest4j:0
+ dev-java/open-test-reporting-events:0
+ dev-java/picocli:0
+ dev-java/univocity-parsers:0
+"
+
+# java-utils-2.eclass does not support
+# USE-conditional dependencies in CP_DEPEND
+COND_DEPEND="
+ migration-support? ( dev-java/junit:4 )
+ vintage? ( dev-java/junit:4 )
+"
+
+# Limiting JDK version to >=11 for module-info.java in this package
+# https://bugs.gentoo.org/796875#c3
+DEPEND="
+ >=virtual/jdk-11:*
+ ${CP_DEPEND}
+ ${COND_DEPEND}
+ test? ( dev-java/jimfs:0 )
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CP_DEPEND}
+ ${COND_DEPEND}
+"
+
+PATCHES=(
+ "${DISTDIR}/junit5-java18-compatibility.patch"
+)
+
+src_prepare() {
+ default #780585
+ java-pkg-2_src_prepare
+}
+
+src_configure() {
+ # Please make sure to declare a module's dependencies before the module itself.
+ # Useful upstream documentation regarding modules and dependencies:
+ # https://junit.org/junit5/docs/current/user-guide/index.html#dependency-metadata
+ # https://junit.org/junit5/docs/current/user-guide/index.html#dependency-diagram
+ JUNIT5_MODULES=(
+ junit-platform-commons
+ junit-platform-engine
+ junit-platform-launcher
+ junit-platform-reporting
+ junit-platform-console # For launching tests from CLI;
+ # an eclass would need it to support running tests using JUnit 5
+
+ $(use suite && echo \
+ junit-platform-suite-api \
+ junit-platform-suite-commons \
+ junit-platform-suite-engine \
+ )
+
+ junit-jupiter-api
+ junit-jupiter-engine # For JUnit Jupiter tests -- the so-called
+ # "JUnit 5 tests", which cannot run on earlier JUnit versions
+ junit-jupiter-params # For parameterized tests; the junit-jupiter
+ # aggregator module includes it, so building it unconditionally
+ $(usev migration-support junit-jupiter-migrationsupport)
+
+ $(usev vintage junit-vintage-engine)
+
+ # Modules not included:
+ # - junit-bom: Has no sources; solely for helping Maven and Gradle
+ # projects that use JUnit 5 manage dependencies easier
+ # - junit-jupiter: Aggregator; does not have 'src/main/java'
+ # - junit-platform-console-standalone: Has no sources; solely used
+ # by the upstream to build a fat JAR that bundles everything, so
+ # users can use just this single JAR to run JUnit 5
+ # - junit-platform-jfr: For an experimental feature
+ # - junit-platform-runner: Deprecated
+ # - junit-platform-suite: Aggregator; does not have 'src/main/java'
+ # - junit-platform-testkit: Requires >=dev-java/assertj-core-3.14.0
+ )
+ local cp_packages=()
+ (use migration-support || use vintage) && cp_packages+=( junit-4 )
+ local save_IFS="${IFS}"
+ IFS=',' JAVA_GENTOO_CLASSPATH="${cp_packages[*]}"
+ IFS="${save_IFS}"
+
+ JUNIT5_VM_VERSION="$(java-config --get-env PROVIDES_VERSION)"
+}
+
+junit5_foreach_module() {
+ local module
+ for module in "${JUNIT5_MODULES[@]}"; do
+ junit5_module_do "${module}" "${@}"
+ done
+}
+
+junit5_module_do() {
+ local module="${1}"
+ # Invocation of the passed function will not be guarded by '|| die'.
+ # Like the case for multibuild_foreach_variant(), it is recommended
+ # that the passed function itself calls 'die'.
+ local func=( "${@:2}" )
+
+ einfo "Running '${func[@]}' for ${module} ..."
+ pushd "${module}" > /dev/null || die "Failed to enter directory '${module}'"
+
+ # Set up Java eclass variables that are
+ # supposed to be set in the ebuild global scope
+
+ local JAVA_JAR_FILENAME="${module}.jar"
+
+ local JAVA_SRC_DIR=(
+ src/main/java
+ src/module
+ )
+
+ local JAVA_RESOURCE_DIRS=()
+ local default_resource_dir="src/main/resources"
+ [[ -d "${default_resource_dir}" ]] &&
+ JAVA_RESOURCE_DIRS+=( "${default_resource_dir}" )
+
+ if [[ "${module}" == junit-platform-console ]]; then
+ local JAVA_MAIN_CLASS="org.junit.platform.console.ConsoleLauncher"
+ local JAVA_LAUNCHER_FILENAME="${module}"
+ fi
+
+ # Invoke the passed function
+ "${func[@]}"
+ local ret="${?}"
+
+ popd > /dev/null || die "Failed to leave directory '${module}'"
+ return "${ret}"
+}
+
+junit5_gen_cp() {
+ echo "$(java-pkg_getjars --build-only --with-dependencies \
+ "${JAVA_GENTOO_CLASSPATH}"):${JAVA_GENTOO_CLASSPATH_EXTRA}"
+}
+
+junit5_module_compile() {
+ if [[ "${module}" == junit-platform-console ]]; then
+ # Unlike other modules that have a src/main/java9 directory, for this
+ # module, the upstream puts the class files built from src/main/java9
+ # in their JAR's top-level directory instead of META-INF/versions/9
+ cp -rv src/main/java9/* src/main/java/ ||
+ die "Failed to merge ${module}'s sources for Java 9+"
+ # Remove for the [[ -d src/main/java9 ]] test
+ # during versioned directory handling
+ rm -rv src/main/java9 ||
+ die "Failed to remove ${module}'s Java 9+ source directory"
+ fi
+
+ java-pkg-simple_src_compile
+ local sources="sources.lst"
+ local classes="target/classes"
+
+ # Collect a list of all compiler input files for building Javadoc
+ local source
+ while read source; do
+ echo "${module}/${source}" >> "${all_sources}"
+ done < "${sources}" ||
+ die "Failed to add ${module}'s sources to Javadoc input list"
+
+ # Handle classes that will go into versioned directories. This will be
+ # no longer needed after https://bugs.gentoo.org/900433 is implemented.
+ local vm_ver
+ for vm_ver in 9 17; do
+ local versioned_src="src/main/java${vm_ver}"
+ if [[ -d "${versioned_src}" ]]; then
+ if ver_test "${JUNIT5_VM_VERSION}" -ge "${vm_ver}"; then
+ local versioned_classes="target/${vm_ver}/classes"
+ mkdir -p "${versioned_classes}" ||
+ die "Failed to create directory for ${module}'s Java ${vm_ver}+ classes"
+ ejavac -d "${versioned_classes}" -encoding "${JAVA_ENCODING}" \
+ -classpath "${classes}:$(junit5_gen_cp)" ${JAVAC_ARGS} \
+ $(find "${versioned_src}" -type f -name '*.java')
+ "$(java-config --jar)" -uvf "${JAVA_JAR_FILENAME}" \
+ --release "${vm_ver}" -C "${versioned_classes}" . ||
+ die "Failed to add ${module}'s Java ${vm_ver}+ classes to JAR"
+ else
+ # Modules that may hit this branch as of 5.9.2:
+ # - junit-platform-console:
+ # src/main/java17/.../ConsoleUtils.java tries to use
+ # java.io.Console.charset() (available since Java 17) to get
+ # the default output charset. It is fine to not use this
+ # file, even if the built artifacts will be used on JRE 17+,
+ # as src/main/java/.../ConsoleUtils.java still gets the
+ # default from java.nio.charset.Charset.defaultCharset().
+ elog "JDK ${JUNIT5_VM_VERSION} used; skipping Java ${vm_ver}-dependent parts in ${module}"
+ fi
+ fi
+ done
+
+ # Add the current module's JAR to classpath
+ # for the module's reverse dependencies in this package
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":${S}/${module}/${JAVA_JAR_FILENAME}"
+}
+
+src_compile() {
+ local all_sources="${S}/all-sources.lst"
+ junit5_foreach_module junit5_module_compile
+
+ if use doc; then
+ einfo "Generating Javadoc for all modules ..."
+ local apidoc="target/api"
+ mkdir -p "${apidoc}" || die "Failed to create Javadoc directory"
+ ejavadoc -d "${apidoc}" \
+ -encoding "${JAVA_ENCODING}" -docencoding UTF-8 -charset UTF-8 \
+ -classpath "$(junit5_gen_cp)" ${JAVADOC_ARGS:- -quiet} \
+ -windowtitle "JUnit ${PV} API" \
+ "@${all_sources}"
+ fi
+}
+
+src_test() {
+ # Running the JUnit 5 modules' tests (located in each module's
+ # 'src/test/java') has a few obstacles:
+ # - Some test sources use text blocks -- a feature introduced in Java 15.
+ # A JDK at a lower version, e.g. 11, cannot compile them.
+ # - Some test classes depend on JUnit 5 modules that this ebuild does not
+ # include, like junit-platform-runner and junit-platform-testkit.
+ #
+ # Therefore, this ebuild uses a simpler approach to test the artifacts just
+ # built: it uses the artifacts to run tests in examples under the
+ # 'documentation/src' directory. The test coverage will not be impressive,
+ # but at least this approach verifies that the copy of JUnit 5 just built
+ # is capable of running some simple tests launched from CLI.
+
+ local JUNIT5_TEST_SRC_DIR="documentation/src/test/java"
+ local JUNIT5_TEST_RESOURCE_DIR="documentation/src/test/resources"
+ local JUNIT5_TEST_RM=(
+ $(usev !migration-support example/IgnoredTestsDemo.java)
+ $(use !suite && echo \
+ example/DocumentationTestSuite.java \
+ example/SuiteDemo.java \
+ )
+ $(usev !vintage example/JUnit4Tests.java)
+
+ # Need excluded module junit-platform-runner
+ example/JUnitPlatformClassDemo.java
+ example/JUnitPlatformSuiteDemo.java
+
+ # Need excluded module junit-platform-testkit
+ example/testkit/
+
+ # Not necessary for the tests; some files even require extra dependency
+ org/junit/api/tools/
+
+ # Needs dev-java/hamcrest; no need to pull in extra dependency
+ # as the examples already provide ample tests to run
+ example/HamcrestAssertionsDemo.java
+
+ # Makes an HTTP request and expects a certain response
+ example/session/HttpTests.java
+ )
+
+ pushd "${JUNIT5_TEST_SRC_DIR}" > /dev/null ||
+ die "Failed to enter test source directory"
+ rm -rv "${JUNIT5_TEST_RM[@]}" ||
+ die "Failed to remove unneeded test sources"
+ # Test sources expect the working directory to be 'documentation'
+ sed -i -e "s|src/test/resources|${JUNIT5_TEST_RESOURCE_DIR}|g" \
+ example/ParameterizedTestDemo.java ||
+ die "Failed to update file paths in test sources"
+ popd > /dev/null || die "Failed to leave test source directory"
+
+ local test_dir="${T}/junit5_src_test"
+ local example_classes="${test_dir}/classes"
+ local test_classes="${test_dir}/test-classes"
+ mkdir -p "${example_classes}" "${test_classes}" ||
+ die "Failed to create test directories"
+
+ local example_sources="${test_dir}/sources.lst"
+ local test_sources="${test_dir}/test-sources.lst"
+ find documentation/src/main/java -type f -name '*.java' > "${example_sources}" ||
+ die "Failed to get a list of example sources"
+ find documentation/src/test/java -type f -name '*.java' > "${test_sources}" ||
+ die "Failed to get a list of test sources"
+
+ ejavac -d "${example_classes}" -encoding "${JAVA_ENCODING}" \
+ -classpath "$(junit5_gen_cp)" ${JAVAC_ARGS} \
+ "@${example_sources}"
+
+ local test_cp="${example_classes}:${JUNIT5_TEST_RESOURCE_DIR}:$(junit5_gen_cp)"
+ test_cp="${test_cp}:$(java-pkg_getjars --build-only --with-dependencies jimfs)"
+ ejavac -d "${test_classes}" -encoding "${JAVA_ENCODING}" \
+ -classpath "${test_cp}" ${JAVAC_ARGS} \
+ "@${test_sources}"
+
+ set -- "$(java-config --java)" -classpath "${test_classes}:${test_cp}" \
+ org.junit.platform.console.ConsoleLauncher \
+ --disable-ansi-colors --fail-if-no-tests --scan-classpath \
+ --include-classname='^(Test.*|.+[.$]Test.*|.*Tests?|.*Demo)$' \
+ --exclude-tag="exclude"
+ echo "${@}" >&2
+ "${@}"
+ local status="${?}"
+ [[ "${status}" -eq 2 ]] && die "JUnit did not discover any tests"
+ [[ "${status}" -eq 0 ]] || die "ConsoleLauncher failed"
+}
+
+junit5_module_install() {
+ # It is OK to let java-pkg-simple_src_install call einstalldocs for
+ # each module as long as each documentation file being installed
+ # has a unique filename among _all_ modules; otherwise, some files
+ # would overwrite other ones.
+ if [[ -f README.md ]]; then
+ mv -v README.md "README-${module}.md" ||
+ die "Failed to rename ${module}'s README.md"
+ fi
+ java-pkg-simple_src_install
+}
+
+src_install() {
+ junit5_foreach_module junit5_module_install
+ einstalldocs # For project-global documentation
+
+ if use doc; then
+ einfo "Installing Javadoc for all modules ..."
+ local apidoc="target/api"
+ java-pkg_dojavadoc "${apidoc}"
+ fi
+}
diff --git a/dev-java/openjdk/openjdk-8.402_p06-r1.ebuild b/dev-java/openjdk/openjdk-8.402_p06-r2.ebuild
index 902c433e73dd..2b9037da0174 100644
--- a/dev-java/openjdk/openjdk-8.402_p06-r1.ebuild
+++ b/dev-java/openjdk/openjdk-8.402_p06-r2.ebuild
@@ -83,9 +83,11 @@ DEPEND="
x11-libs/libXrender
x11-libs/libXt
x11-libs/libXtst
- || (
- dev-java/openjdk-bin:${SLOT}
- dev-java/openjdk:${SLOT}
+ system-bootstrap? (
+ || (
+ dev-java/openjdk-bin:${SLOT}
+ dev-java/openjdk:${SLOT}
+ )
)
"