diff options
| author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2023-10-12 13:07:32 +0200 |
|---|---|---|
| committer | Miroslav Šulc <fordfrog@gentoo.org> | 2025-09-25 13:19:22 +0200 |
| commit | 0eeebaf0348d55de8911b5632416255e13805eb1 (patch) | |
| tree | fdf80661aac150a7e34226d591f46096b012cf28 /dev-java/guice/guice-7.0.0.ebuild | |
| parent | f85e06ced5b943b8900aa4d8c32d1669b0f22fa8 (diff) | |
| download | gentoo-0eeebaf0348d55de8911b5632416255e13805eb1.tar.gz gentoo-0eeebaf0348d55de8911b5632416255e13805eb1.tar.bz2 gentoo-0eeebaf0348d55de8911b5632416255e13805eb1.zip | |
dev-java/guice: add 7.0.0
- switches to default slot
- bundles pre-built jars of truth{,-java8-extension}-1.1.3
- skips one test which would otherwise fail with jdk 25 or higher
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/43492
Closes: https://github.com/gentoo/gentoo/pull/43492
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/guice/guice-7.0.0.ebuild')
| -rw-r--r-- | dev-java/guice/guice-7.0.0.ebuild | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/dev-java/guice/guice-7.0.0.ebuild b/dev-java/guice/guice-7.0.0.ebuild new file mode 100644 index 000000000000..6b3b13a973c4 --- /dev/null +++ b/dev-java/guice/guice-7.0.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" +MAVEN_ID="com.google.inject:guice:7.0.0" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Guice is a lightweight dependency injection framework for Java 6 and above" +HOMEPAGE="https://github.com/google/guice" +# Currently we bundle these binary versions used only for tests, we don't install it. +TV="1.1.3" # with 1.4.4 there is an 'ambiguous' problem in EnhancedTest. +SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + test? ( + https://repo1.maven.org/maven2/com/google/truth/truth/${TV}/truth-${TV}.jar + https://repo1.maven.org/maven2/com/google/truth/extensions/truth-java8-extension/${TV}/truth-java8-extension-${TV}.jar + )" +S="${WORKDIR}/${P}/core" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +CP_DEPEND=" + dev-java/aopalliance:1 + dev-java/injection-api:0 + >=dev-java/asm-9.8-r1:0 + >=dev-java/error-prone-annotations-2.41.0:0 + >=dev-java/guava-33.4.8:0 + dev-java/jsr305:0 +" + +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-1.8:* + test? ( + >=dev-java/guava-testlib-33.4.8:0 + dev-java/jakarta-inject-tck:0 + dev-java/osgi-core:0 + ) +" + +RDEPEND=" + ${CP_DEPEND} + >=virtual/jre-1.8:* +" + +DOCS=( ../{COPYING,{CONTRIBUTING,README}.md} ) + +PATCHES=( + # this test passes with jdk 21 and lower + "${FILESDIR}/guice-7.0.0-skipFailingTest.patch" +) + +JAVA_AUTOMATIC_MODULE_NAME="com.google.guice" +JAVA_SRC_DIR="src" +JAVA_TEST_GENTOO_CLASSPATH="guava-testlib jakarta-inject-tck junit-4 osgi-core" +JAVA_TEST_RESOURCE_DIRS="test" +JAVA_TEST_SRC_DIR="test" + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + + # line 99, pom.xml + rm test/com/googlecode/guice/OSGiContainerTest.java || die "remove OSGITest" +} + +src_test() { + JAVAC_ARGS="-parameters" + + # it needs java8-extension and the older versions + JAVA_GENTOO_CLASSPATH_EXTRA=":${DISTDIR}/truth-${TV}.jar" + JAVA_GENTOO_CLASSPATH_EXTRA+=":${DISTDIR}/truth-java8-extension-${TV}.jar" + + # exclude tests not run by mvn test + JAVA_TEST_EXCLUDES=( + com.google.inject.AllTests + com.google.inject.ScopesTest + com.google.inject.TypeConversionTest + ) + + # line 111, pom.xml + JAVA_TEST_EXTRA_ARGS=( + -Dguice_custom_class_loading=ANONYMOUS + -XX:+UnlockDiagnosticVMOptions + -XX:+ShowHiddenFrames + ) + + java-pkg-simple_src_test +} |
