From 2d224bfa26a9094f3f40a538bc963f815b25850d Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Tue, 1 Nov 2022 15:50:47 +0100 Subject: dev-java/zstd-jni: add 1.5.2.5 Signed-off-by: Volkmar W. Pogatzki Closes: https://github.com/gentoo/gentoo/pull/28079 Signed-off-by: Florian Schmaus --- dev-java/zstd-jni/Manifest | 1 + dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild | 63 +++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild (limited to 'dev-java/zstd-jni') diff --git a/dev-java/zstd-jni/Manifest b/dev-java/zstd-jni/Manifest index 14a650f44f39..22e87ae6df6c 100644 --- a/dev-java/zstd-jni/Manifest +++ b/dev-java/zstd-jni/Manifest @@ -1 +1,2 @@ DIST zstd-jni-1.5.2.4.tar.gz 9343792 BLAKE2B 8a446b229d49671b3f38d630ecf2c2688210176af95b66c788027de89986ad1f23615582d670f1d7a0b3866572b05c722ad6c71783d208401844287e8149f65c SHA512 bf67fc6573f2b1e45bd4985186814a54fb948a1b7280b5cf2f6d2577626c1f70626a58994291ffb228f097c91d60e3ed52d56ad92830c8f386b96b11fb6cf4a2 +DIST zstd-jni-1.5.2.5.tar.gz 9342510 BLAKE2B 259f3087f06c567f2126dacfb90ecfcc1d20f389ff99ef48a6f8c558441b37b56f29b73ca55aad176116439c4ef47f9ad253116a968f74e527eb13a0fda98f7e SHA512 16f2aeee6005e2da366a849f0972b3ef9245d355ed875e633bf4013d340cc74445604710e7b628aefafa90f74dfaa82a93c741f06f633b8a6c2162e9da304850 diff --git a/dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild b/dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild new file mode 100644 index 000000000000..c7430c949f87 --- /dev/null +++ b/dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild @@ -0,0 +1,63 @@ +# 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="com.github.luben:zstd-jni:1.5.2-5" + +inherit java-pkg-2 java-pkg-simple cmake + +DESCRIPTION="JNI bindings for Zstd native library" +HOMEPAGE="https://github.com/luben/zstd-jni" +SRC_URI="https://github.com/luben/zstd-jni/archive/c$(ver_rs 3 -).tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +RDEPEND=">=virtual/jre-1.8:*" +DEPEND=">=virtual/jdk-1.8:*" + +S="${WORKDIR}/zstd-jni-c$(ver_rs 3 -)" + +JAVA_AUTOMATIC_MODULE_NAME="com.github.luben.zstd_jni" +JAVA_RESOURCE_DIRS="resources" +JAVA_SRC_DIR="src/main/java" + +src_prepare() { + cmake_src_prepare + # https://github.com/luben/zstd-jni/blob/c1.5.2-5/build.gradle#L66 + cat > src/main/java/com/github/luben/zstd/util/ZstdVersion.java <<-EOF || die + package com.github.luben.zstd.util; + + public class ZstdVersion + { + public static final String VERSION = "$(ver_rs 3 -)"; + } + EOF + + mkdir -p resources/META-INF || die + echo "Implementation-Version: $(ver_rs 3 -)" \ + > resources/META-INF/MANIFEST.MF || die +} + +src_configure() { + local mycmakeargs=( + -DJAVA_HOME="$(java-config -g JAVA_HOME)" + # Resolve bug #776910 + # Reference: https://stackoverflow.com/a/51764145 + -DJAVA_AWT_LIBRARY="NotNeeded" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + java-pkg-simple_src_compile +} + +src_install() { + java-pkg_doso "${BUILD_DIR}/libzstd-jni-$(ver_rs 3 -).so" + java-pkg-simple_src_install +} -- cgit v1.2.3-65-gdbad