summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2021-03-17 18:09:50 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2021-03-20 09:29:19 +0100
commit7eb968c34b6f4bda3d7a72f1cc8740eaea11144d (patch)
tree219e48fe6c9c252c8d3d403a3cbe2cd3ed353af7 /dev-java
parentx11-themes/numix-icon-theme: drop 18.07.17, 20.03.20 (diff)
downloadgentoo-7eb968c34b6f4bda3d7a72f1cc8740eaea11144d.tar.gz
gentoo-7eb968c34b6f4bda3d7a72f1cc8740eaea11144d.tar.bz2
gentoo-7eb968c34b6f4bda3d7a72f1cc8740eaea11144d.zip
dev-java/hamcrest-core: jdk 11 + EAPI 7
SRC_URI (:1.3) was from googlecode.com Allow jdk:11 Closes: https://bugs.gentoo.org/751379 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/19981 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/hamcrest-core/files/hamcrest-core-1.1-java-11.patch42
-rw-r--r--dev-java/hamcrest-core/files/hamcrest-core-1.3-java-11.patch26
-rw-r--r--dev-java/hamcrest-core/hamcrest-core-1.1-r4.ebuild40
-rw-r--r--dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild60
4 files changed, 168 insertions, 0 deletions
diff --git a/dev-java/hamcrest-core/files/hamcrest-core-1.1-java-11.patch b/dev-java/hamcrest-core/files/hamcrest-core-1.1-java-11.patch
new file mode 100644
index 000000000000..1e3805eb1755
--- /dev/null
+++ b/dev-java/hamcrest-core/files/hamcrest-core-1.1-java-11.patch
@@ -0,0 +1,42 @@
+diff --git a/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java b/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
+index d435303..962c945 100644
+--- a/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
++++ b/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
+@@ -1,6 +1,7 @@
+ package org.hamcrest.core;
+
+ import java.util.Arrays;
++import java.util.List;
+
+ import org.hamcrest.Description;
+ import org.hamcrest.Factory;
+@@ -32,7 +33,7 @@ public class AllOf<T> extends ShortcutCombination<T> {
+ */
+ @Factory
+ public static <T> Matcher<T> allOf(Matcher<? super T>... matchers) {
+- return allOf(Arrays.asList(matchers));
++ return allOf((List<Matcher<? super T>>) Arrays.asList(matchers));
+ }
+
+ /**
+diff --git a/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java b/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
+index e003a7f..4ed9030 100644
+--- a/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
++++ b/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
+@@ -1,6 +1,7 @@
+ package org.hamcrest.core;
+
+ import java.util.Arrays;
++import java.util.List;
+
+ import org.hamcrest.Description;
+ import org.hamcrest.Factory;
+@@ -33,7 +34,7 @@ public class AnyOf<T> extends ShortcutCombination<T> {
+ */
+ @Factory
+ public static <T> Matcher<T> anyOf(Matcher<? super T>... matchers) {
+- return anyOf(Arrays.asList(matchers));
++ return anyOf((List<Matcher<? super T>>) Arrays.asList(matchers));
+ }
+
+ /**
diff --git a/dev-java/hamcrest-core/files/hamcrest-core-1.3-java-11.patch b/dev-java/hamcrest-core/files/hamcrest-core-1.3-java-11.patch
new file mode 100644
index 000000000000..b250f1cc7c01
--- /dev/null
+++ b/dev-java/hamcrest-core/files/hamcrest-core-1.3-java-11.patch
@@ -0,0 +1,26 @@
+diff --git a/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java b/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
+index a206b80..d55cf6b 100644
+--- a/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
++++ b/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java
+@@ -57,7 +57,7 @@ public class AllOf<T> extends DiagnosingMatcher<T> {
+ */
+ @Factory
+ public static <T> Matcher<T> allOf(Matcher<? super T>... matchers) {
+- return allOf(Arrays.asList(matchers));
++ return allOf((List<Matcher<? super T>>) Arrays.asList(matchers));
+ }
+
+ /**
+diff --git a/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java b/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
+index 55d08dd..2a46631 100644
+--- a/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
++++ b/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java
+@@ -47,7 +47,7 @@ public class AnyOf<T> extends ShortcutCombination<T> {
+ */
+ @Factory
+ public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers) {
+- return anyOf(Arrays.asList(matchers));
++ return anyOf((List<Matcher<? super T>>) Arrays.asList(matchers));
+ }
+
+ /**
diff --git a/dev-java/hamcrest-core/hamcrest-core-1.1-r4.ebuild b/dev-java/hamcrest-core/hamcrest-core-1.1-r4.ebuild
new file mode 100644
index 000000000000..36347fc3a513
--- /dev/null
+++ b/dev-java/hamcrest-core/hamcrest-core-1.1-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+MY_PN="hamcrest"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Library of matchers for building test expressions"
+HOMEPAGE="https://github.com/hamcrest"
+SRC_URI="https://github.com/${MY_PN}/JavaHamcrest/archive/${MY_PN}-java-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-solaris"
+
+RDEPEND="
+ >=virtual/jre-1.8:*"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ source? ( app-arch/zip )"
+
+S="${WORKDIR}/JavaHamcrest-${MY_PN}-java-${PV}"
+
+JAVA_SRC_DIR="${PN}/src"
+
+PATCHES=(
+ # https://bugs.gentoo.org/751379
+ "${FILESDIR}"/hamcrest-core-1.1-java-11.patch
+)
+
+src_prepare() {
+ default
+ java-pkg_clean
+}
diff --git a/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild b/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild
new file mode 100644
index 000000000000..1af30d072f00
--- /dev/null
+++ b/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN="hamcrest"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Core library of matchers for building test expressions"
+HOMEPAGE="https://github.com/hamcrest"
+SRC_URI="mirror://gentoo/${MY_P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-macos ~x64-macos"
+
+DEPEND="~dev-java/hamcrest-generator-${PV}:1.3
+ >=virtual/jdk-1.8:*
+ userland_GNU? ( sys-apps/findutils )"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} java java-to-jar"
+
+EANT_BUILD_TARGET="core"
+
+PATCHES=(
+ # https://bugs.gentoo.org/751379
+ "${FILESDIR}"/hamcrest-core-1.3-java-11.patch
+)
+
+src_prepare() {
+ default
+ # Empty out the contents of the generator target; it has already been built.
+ eapply "${FILESDIR}/hamcrest-1.3-empty_generator.patch"
+
+ # Fix problems with Javadoc target.
+ eapply "${FILESDIR}/hamcrest-core-1.3-fix_javadoc.patch"
+
+ find -iname "*.jar" -exec rm -v {} + || die "Unable to clean bundled JAR files"
+
+ local cp="build/${P}.jar"
+ cp="${cp}:$(java-pkg_getjars --build-only --with-dependencies hamcrest-generator-${SLOT})"
+ EANT_EXTRA_ARGS="-Dversion=${PV} -Dgentoo.classpath=${cp}"
+}
+
+src_install() {
+ java-pkg_newjar build/${P}.jar ${PN}.jar
+
+ dodoc README.txt CHANGES.txt
+
+ use doc && java-pkg_dojavadoc build/temp/hamcrest-all-${PV}-javadoc.jar.contents
+ use source && java-pkg_dosrc ${PN}/src/main/java/org
+}