diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2021-03-20 10:12:52 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-03-23 12:24:36 +0100 |
commit | 1bba1e847663a86acf3c21fe015656b905dfd0c1 (patch) | |
tree | 08f096d830efa40b5df5257d7d714b203590c657 /dev-java/hamcrest-core | |
parent | www-apps/wordpress: bump to 5.7 (diff) | |
download | gentoo-1bba1e847663a86acf3c21fe015656b905dfd0c1.tar.gz gentoo-1bba1e847663a86acf3c21fe015656b905dfd0c1.tar.bz2 gentoo-1bba1e847663a86acf3c21fe015656b905dfd0c1.zip |
dev-java/hamcrest-core: Switch :1.3 to java-pkg-simple
Closes: https://bugs.gentoo.org/642534
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/20019
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/hamcrest-core')
4 files changed, 21 insertions, 29 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 index 1e3805eb1755..065cc5092b70 100644 --- 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 @@ -1,5 +1,3 @@ -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 @@ @@ -19,8 +17,6 @@ index d435303..962c945 100644 } /** -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 @@ 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 index b250f1cc7c01..9f68faecb6bf 100644 --- 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 @@ -1,5 +1,3 @@ -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> { @@ -11,8 +9,6 @@ index a206b80..d55cf6b 100644 }
/**
-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> { diff --git a/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild b/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild index 1af30d072f00..be9562ee2f45 100644 --- a/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild +++ b/dev-java/hamcrest-core/hamcrest-core-1.3-r2.ebuild @@ -5,7 +5,7 @@ EAPI=7 JAVA_PKG_IUSE="doc source" -inherit java-pkg-2 java-ant-2 +inherit java-pkg-2 java-pkg-simple MY_PN="hamcrest" MY_P="${MY_PN}-${PV}" @@ -19,16 +19,15 @@ 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:* +DEPEND=">=virtual/jdk-1.8:* userland_GNU? ( sys-apps/findutils )" RDEPEND=">=virtual/jre-1.8:*" +BDEPEND=">=dev-java/hamcrest-generator-${PV}:1.3" -JAVA_ANT_REWRITE_CLASSPATH="true" -JAVA_ANT_CLASSPATH_TAGS="${JAVA_ANT_CLASSPATH_TAGS} java java-to-jar" +JAVA_SRC_DIR="${PN}/src" -EANT_BUILD_TARGET="core" +DOCS=( {CHANGES,LICENSE,README}.txt ) PATCHES=( # https://bugs.gentoo.org/751379 @@ -37,24 +36,26 @@ PATCHES=( src_prepare() { default - # Empty out the contents of the generator target; it has already been built. - eapply "${FILESDIR}/hamcrest-1.3-empty_generator.patch" + java-pkg_clean +} - # Fix problems with Javadoc target. - eapply "${FILESDIR}/hamcrest-core-1.3-fix_javadoc.patch" +src_compile() { + java-pkg-simple_src_compile - find -iname "*.jar" -exec rm -v {} + || die "Unable to clean bundled JAR files" + # Need to add this in order to generate "CoreMatchers.java" as with java-ant-2 was triggered by "build.xml" + "$(java-config -J)" \ + -cp $(java-config --with-dependencies --classpath hamcrest-generator:1.3):${PN}.jar \ + org.hamcrest.generator.config.XmlConfigurator \ + core-matchers.xml \ + hamcrest-core/src/main/java \ + org.hamcrest.CoreMatchers \ + hamcrest-core/src/main/java - 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}" + # Compile again, this time including the freshly generated "CoreMatchers.java" + java-pkg-simple_src_compile } 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 + default + java-pkg-simple_src_install } diff --git a/dev-java/hamcrest-core/metadata.xml b/dev-java/hamcrest-core/metadata.xml index b09ef005001e..7ee93b2f2b47 100644 --- a/dev-java/hamcrest-core/metadata.xml +++ b/dev-java/hamcrest-core/metadata.xml @@ -6,7 +6,6 @@ <name>Java</name> </maintainer> <upstream> - <remote-id type="google-code">hamcrest</remote-id> <remote-id type="github">hamcrest/</remote-id> </upstream> </pkgmetadata> |