From 6819e3514f137590abb4b6a9a7ec68f82d4e8d4d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 26 Nov 2023 10:34:57 +0000 Subject: gentoo auto-resync : 26:11:2023 - 10:34:57 --- dev-java/lz4-java/Manifest | 1 + dev-java/lz4-java/lz4-java-1.8.0-r2.ebuild | 97 ++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 dev-java/lz4-java/lz4-java-1.8.0-r2.ebuild (limited to 'dev-java/lz4-java') diff --git a/dev-java/lz4-java/Manifest b/dev-java/lz4-java/Manifest index 199c63848b2c..2e1b0dca1748 100644 --- a/dev-java/lz4-java/Manifest +++ b/dev-java/lz4-java/Manifest @@ -4,4 +4,5 @@ AUX lz4-java-1.8.0-r1-Makefile 1528 BLAKE2B e3f8825785c329fc2c9a480dc5e7dbb00268 AUX lz4-java-1.8.0-skip-ivy.patch 3236 BLAKE2B cae70a2600d8bc6f3e89e901728261d23102ec61ae35dfe678542953ecd5467f33d724154903dae3e7214c4c5bfcbf5b6956ae70f7806e270a9cb747b3661d47 SHA512 fd24db414b0944cac78e0b39014d9de38d694e958352d9dc4b83560c84c16790844f197a80bb4f90f084bb882406992ed72da5e54dc774122a347c2df2c76301 DIST lz4-java-1.8.0.tar.gz 1069398 BLAKE2B 02ee363fc42eeeade01f04649416dd874513f4517264c6e1b6474d64e8b81e2ee9ff1f55e51b508608929e8d78cb30e98d929cc4a118c03f86b0e69bae237e8a SHA512 ae78748d984d2ede18018d5e9ae6aee0d5fe6ac8b56d717f863968cfad6e9f85b62305692345ba16002bee68278e87a0364aa98aeb92e2af6dc169e5d5b612d4 EBUILD lz4-java-1.8.0-r1.ebuild 3162 BLAKE2B af48a8774cc7e0c67fbeea0b48383fc48b909d90cc05f03217846f082741416253dd215b073cb41cf1508b2b42eb7b22b45ba9191b8a739ce0276de078b40209 SHA512 0fd583fcfba0fb4760c263aec6a2d4cb3334c7c780c47ebee392ce3c78e4b6a1f0bc181a9d7470e49ce48e9bc72166bb785a522a29e4842fe640629fd5ed00e9 +EBUILD lz4-java-1.8.0-r2.ebuild 3012 BLAKE2B 0e668ff01aa4fbf2814ab283e16ff2c5301e7dc987b7e72557014eadaf66566c2cb0ff44ee666435d91a3bf0a3a348c6f5b8fcccf1338b9c35be4a27be7d9fe0 SHA512 37621d8a9a082b6a2beaca8336d2799ad3c797c283f524c7e0617fed160992aaada5d0762a08421e6b6b31a3494ab5e9ce4aea0734478c5d23659e32111cbd41 MISC metadata.xml 314 BLAKE2B 029f69d900ca078525f401c897f9ebc3eb63d5fdbc201f8d42cadec684a66d1797fe4217ae4c8e874974fcfe74a2a1c024d7bf8bb165c8a9ec22ea103b11e5d7 SHA512 6a8817e187e78b1f175b35a07c9fa498f4b8af167a971320845148409ba352e5aa560cd907fb7e94336ebda07b7c7b5db407f0e9bdc94356e5d2090ee5f2fc9c diff --git a/dev-java/lz4-java/lz4-java-1.8.0-r2.ebuild b/dev-java/lz4-java/lz4-java-1.8.0-r2.ebuild new file mode 100644 index 000000000000..45a7f75b6a3c --- /dev/null +++ b/dev-java/lz4-java/lz4-java-1.8.0-r2.ebuild @@ -0,0 +1,97 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="org.lz4:lz4-java:1.8.0" + +inherit java-pkg-2 java-ant-2 toolchain-funcs + +DESCRIPTION="LZ4 compression for Java" +HOMEPAGE="https://github.com/lz4/lz4-java" +SRC_URI="https://github.com/lz4/lz4-java/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +# Tests require com.carrotsearch.randomizedtesting:junit4-ant, which is yet to +# be packaged. Some extra steps are required before running the tests: +# 1. Download junit4-ant 2.7.x from https://mvnrepository.com/artifact/com.carrotsearch.randomizedtesting/junit4-ant +# 2. Set EANT_GENTOO_CLASSPATH_EXTRA to the path to junit4-ant-2.7.*.jar +# 3. ppc64 only: Install test dependencies that are unkeyworded +# 4. Set ALLOW_TEST="all" +RESTRICT="test" + +CDEPEND=" + app-arch/lz4:= +" + +DEPEND=" + >=virtual/jdk-1.8:* + dev-java/mvel:2.5 + dev-libs/xxhash + test? ( + dev-java/junit:4 + dev-java/randomized-runner:0 + ) + ${CDEPEND} +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CDEPEND} +" + +# Ant is only needed to generate JNI headers; +# the JNI shared object will be built by the custom Makefile +EANT_BUILD_TARGET="compile-java generate-headers" +EANT_DOC_TARGET="docs" +EANT_EXTRA_ARGS="-Djava.io.tmpdir=${T}" +EANT_TEST_GENTOO_CLASSPATH="randomized-runner" + +pkg_setup() { + java-pkg-2_pkg_setup + local build_only_cp="$(java-pkg_getjars --build-only mvel-2.5)" + if [[ -z "${EANT_GENTOO_CLASSPATH_EXTRA}" ]]; then + EANT_GENTOO_CLASSPATH_EXTRA="${build_only_cp}" + else + EANT_GENTOO_CLASSPATH_EXTRA+=":${build_only_cp}" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${P}-print-os-props.patch" + eapply "${FILESDIR}/${P}-skip-ivy.patch" + cp "${FILESDIR}/${P}-r1-Makefile" Makefile || die "Failed to copy Makefile" + cp "${FILESDIR}/${P}-gentoo-classpath.xml" gentoo-classpath.xml || + die "Failed to copy Gentoo classpath injection XML" + java-pkg-2_src_prepare + rm -r src/resources || die "Failed to remove pre-built shared libraries" +} + +src_compile() { + java-pkg-2_src_compile + emake CC="$(tc-getCC)" JAVA_HOME="${JAVA_HOME}" + # JNI has already been built by the Makefile at this point + # Also pretend cpptasks is available, which is required by build.xml + EANT_EXTRA_ARGS+=" -Dcpptasks.available=true -Dskip.jni=true" + # Manually call 'ant jar' to include the JNI shared object in JAR + eant jar -f "${EANT_BUILD_XML}" ${EANT_EXTRA_ARGS} +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + java-pkg_newjar 'dist/${ivy.module}.jar' + java-pkg_doso $(find build/jni -name "*.so") + use doc && java-pkg_dojavadoc build/docs + # Ant project's 'sources' target generates a source JAR rather than a Zip + # archive; we simply let java-utils-2.eclass create the source Zip archive + # from the same source directories the 'sources' target would access + # https://github.com/lz4/lz4-java/blob/1.8.0/build.xml#L323-L330 + use source && java-pkg_dosrc src/java/* src/java-unsafe/* +} -- cgit v1.2.3