summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-08-11 11:53:31 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-09-05 20:45:00 +0200
commit6abe431abe3321ae3d71377afd9fa280b101048b (patch)
treeca67591dc99ee27b254a5ee4dc96837119fc5924 /dev-java/hamcrest-library
parentdev-java/hamcrest-core: slot 1.3 use SRC_URI from Github, update EAPI 7 -> 8 (diff)
downloadgentoo-6abe431abe3321ae3d71377afd9fa280b101048b.tar.gz
gentoo-6abe431abe3321ae3d71377afd9fa280b101048b.tar.bz2
gentoo-6abe431abe3321ae3d71377afd9fa280b101048b.zip
dev-java/hamcrest-library: use SRC_URI from Github, update EAPI 7 -> 8
* Add 'doc' to JAVA_PKG_IUSE * https for HOMEPAGE * SRC_URI, use github instead of mirror://gentoo Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/26822 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/hamcrest-library')
-rw-r--r--dev-java/hamcrest-library/Manifest1
-rw-r--r--dev-java/hamcrest-library/files/hamcrest-library-1.3-r3-java-11.patch44
-rw-r--r--dev-java/hamcrest-library/hamcrest-library-1.3-r3.ebuild58
3 files changed, 103 insertions, 0 deletions
diff --git a/dev-java/hamcrest-library/Manifest b/dev-java/hamcrest-library/Manifest
index 480364f4e8f4..42f381d82b57 100644
--- a/dev-java/hamcrest-library/Manifest
+++ b/dev-java/hamcrest-library/Manifest
@@ -1 +1,2 @@
DIST hamcrest-1.3.tgz 3686096 BLAKE2B 38ff91a524064cb00b4d2e82c0a50a2df870bbb0a6e43055f33ce344a1dc8de3760530652691db26aa42890d8517940c038a570b5acaaf91b7e970aca7df3493 SHA512 5672bc627bc71d6fd64b6f776b89ac16ed68819fa4a0748c1250b57f1065c1e7e18ba184d9fe3392e54000ddeb353d0d8d67f4eecdf464974563f05c6b226fc2
+DIST hamcrest-java-1.3.tar.gz 2007925 BLAKE2B 7d54f056814ba30d669e171f00c31e71a0aaea37d345fa93d0c88afb8c3f916180ba699c2cee9219504c3e931b4f4548d708c927cf2caf483847f217c22c7cdf SHA512 4356df7b5b78f821847fde027b416b49b8456e84ab2ec98c2982adf54e2bdc01a5ca2c2b5425620c5ee34bfe3f95ea43c77190504f76ddc9f8b93b137a4ca54b
diff --git a/dev-java/hamcrest-library/files/hamcrest-library-1.3-r3-java-11.patch b/dev-java/hamcrest-library/files/hamcrest-library-1.3-r3-java-11.patch
new file mode 100644
index 000000000000..5e1103d3fbfe
--- /dev/null
+++ b/dev-java/hamcrest-library/files/hamcrest-library-1.3-r3-java-11.patch
@@ -0,0 +1,44 @@
+--- a/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java
++++ b/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java
+@@ -122,7 +122,7 @@ public class IsIterableContainingInAnyOrder<T> extends TypeSafeDiagnosingMatcher
+ */
+ @Factory
+ public static <T> Matcher<Iterable<? extends T>> containsInAnyOrder(Matcher<? super T>... itemMatchers) {
+- return containsInAnyOrder(Arrays.asList(itemMatchers));
++ return containsInAnyOrder((List<Matcher<? super T>>) Arrays.asList(itemMatchers));
+ }
+
+ /**
+--- a/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java
++++ b/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java
+@@ -138,7 +138,7 @@ public class IsIterableContainingInOrder<E> extends TypeSafeDiagnosingMatcher<It
+ */
+ @Factory
+ public static <E> Matcher<Iterable<? extends E>> contains(Matcher<? super E>... itemMatchers) {
+- return contains(asList(itemMatchers));
++ return contains((List<Matcher<? super E>>) asList(itemMatchers));
+ }
+
+ /**
+--- a/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java
++++ b/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java
+@@ -55,7 +55,7 @@ public class IsArrayContainingInAnyOrder<E> extends TypeSafeMatcher<E[]> {
+ */
+ @Factory
+ public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) {
+- return arrayContainingInAnyOrder(Arrays.asList(itemMatchers));
++ return arrayContainingInAnyOrder((List<Matcher<? super E>>) Arrays.asList(itemMatchers));
+ }
+
+ /**
+--- a/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java
++++ b/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java
+@@ -69,7 +69,7 @@ public class IsArrayContainingInOrder<E> extends TypeSafeMatcher<E[]> {
+ */
+ @Factory
+ public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers) {
+- return arrayContaining(asList(itemMatchers));
++ return arrayContaining((List<Matcher<? super E>>) asList(itemMatchers));
+ }
+
+ /**
diff --git a/dev-java/hamcrest-library/hamcrest-library-1.3-r3.ebuild b/dev-java/hamcrest-library/hamcrest-library-1.3-r3.ebuild
new file mode 100644
index 000000000000..c695c5a0b075
--- /dev/null
+++ b/dev-java/hamcrest-library/hamcrest-library-1.3-r3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+MAVEN_ID="org.hamcrest:hamcrest-library:1.3"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Core library of matchers for building test expressions"
+HOMEPAGE="https://hamcrest.org/JavaHamcrest/"
+SRC_URI="https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+CP_DEPEND="dev-java/hamcrest-core:1.3"
+
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*"
+
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+BDEPEND="dev-java/hamcrest-generator:1.3"
+
+JAVA_SRC_DIR="${PN}/src"
+
+DOCS=( {CHANGES,LICENSE,README}.txt )
+
+PATCHES=(
+ "${FILESDIR}"/hamcrest-library-1.3-r3-java-11.patch
+)
+
+S="${WORKDIR}/JavaHamcrest-hamcrest-java-${PV}"
+
+src_prepare() {
+ default
+ java-pkg_clean
+}
+
+src_compile() {
+ java-pkg-simple_src_compile
+
+ # Generate "Matchers.java" (java-pkg-simple does not use the "build.xml" file)
+ "$(java-config -J)" \
+ -cp $(java-config --with-dependencies --classpath hamcrest-core:1.3,hamcrest-generator:1.3):${PN}.jar \
+ org.hamcrest.generator.config.XmlConfigurator \
+ matchers.xml \
+ hamcrest-core/src/main/java,hamcrest-library/src/main/java \
+ org.hamcrest.Matchers \
+ hamcrest-library/src/main/java
+
+ # Compile again, this time including the freshly generated "Matchers.java"
+ java-pkg-simple_src_compile
+}