diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2022-09-16 16:10:57 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-10-04 11:38:39 +0200 |
commit | 7219c49d521b8d8e4e0f4d54519b02876e40dd33 (patch) | |
tree | 79e01cd1fe95934794fadb30bd923a9fb124ac3c /dev-java/zstd-jni | |
parent | dev-java/felix-framework: new package, add 7.0.5 (diff) | |
download | gentoo-7219c49d521b8d8e4e0f4d54519b02876e40dd33.tar.gz gentoo-7219c49d521b8d8e4e0f4d54519b02876e40dd33.tar.bz2 gentoo-7219c49d521b8d8e4e0f4d54519b02876e40dd33.zip |
dev-java/zstd-jni: add 1.5.2.4
* tests not enabled because of missing test dependencies
* for testing it's recommended to test-run dev-java/commons-compress
which has tests dependeing on zstd-jni
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/zstd-jni')
-rw-r--r-- | dev-java/zstd-jni/Manifest | 1 | ||||
-rw-r--r-- | dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild | 67 |
2 files changed, 68 insertions, 0 deletions
diff --git a/dev-java/zstd-jni/Manifest b/dev-java/zstd-jni/Manifest index 86423a908744..5b766999bc7c 100644 --- a/dev-java/zstd-jni/Manifest +++ b/dev-java/zstd-jni/Manifest @@ -1 +1,2 @@ DIST zstd-jni-1.5.0.5.tar.gz 9297542 BLAKE2B 96b2aa09d62c7a45c352d52358aa47a66c95c1b122bfc61b7e2b3aaa829e011a8ed6f71373130700ecdb7d8541ca6971c2cd7fda01be396053532c4aeeca3cb1 SHA512 b63858d58c7d1b2c9d120f49d1289caa7e5b429d0f8c3c95b7f58a5d432f09d41504c5f5b0934f53be8eadf3c1ab02a1a872e292bac465907fffe2a67108267e +DIST zstd-jni-1.5.2.4.tar.gz 9343792 BLAKE2B 8a446b229d49671b3f38d630ecf2c2688210176af95b66c788027de89986ad1f23615582d670f1d7a0b3866572b05c722ad6c71783d208401844287e8149f65c SHA512 bf67fc6573f2b1e45bd4985186814a54fb948a1b7280b5cf2f6d2577626c1f70626a58994291ffb228f097c91d60e3ed52d56ad92830c8f386b96b11fb6cf4a2 diff --git a/dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild b/dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild new file mode 100644 index 000000000000..0b0b0072958b --- /dev/null +++ b/dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild @@ -0,0 +1,67 @@ +# 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-4" + +inherit java-pkg-2 java-pkg-simple cmake + +DESCRIPTION="JNI bindings for Zstd native library" +HOMEPAGE="https://github.com/luben/zstd-jni" +# Snapshop needed because this version is not tagged. +MY_COMMIT="37faee49643b2739457716e3752f44fcaa09005f" +SRC_URI="https://github.com/luben/zstd-jni/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=">=virtual/jre-1.8:*" +DEPEND=">=virtual/jdk-1.8:*" + +S="${WORKDIR}/zstd-jni-${MY_COMMIT}" + +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/v1.5.2-3/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 + cat > resources/META-INF/MANIFEST.MF <<-EOF || die + Implementation-Version: $(ver_rs 3 -) + Bundle-NativeCode: libzstd-jni.so;osname=Linux" + EOF +} + +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 +} |