summaryrefslogtreecommitdiff
path: root/dev-java/zstd-jni
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-04 13:17:38 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-04 13:17:38 +0100
commit78754950ffa3aaba0f48b1ca1d505caa4a3dfbfa (patch)
tree285997f09f32d26633ba2beffd30c972a4ec87a2 /dev-java/zstd-jni
parentbf99f8024d68382f76665735c70ae912331bc2ca (diff)
gentoo auto-resync : 04:10:2022 - 13:17:38
Diffstat (limited to 'dev-java/zstd-jni')
-rw-r--r--dev-java/zstd-jni/Manifest2
-rw-r--r--dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild67
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-java/zstd-jni/Manifest b/dev-java/zstd-jni/Manifest
index b4053e5ccc52..7c1612bbdd97 100644
--- a/dev-java/zstd-jni/Manifest
+++ b/dev-java/zstd-jni/Manifest
@@ -1,4 +1,6 @@
AUX zstd-jni-1.5.0.4-filter-flags.patch 369 BLAKE2B d79c3f5bee1e8faafb96a6d87c03c1cf5d1f292697fef1d7724394b9a415a30d9912946a612003e93a278648e4e5b1cc532e28d2c296c90b683eb7e0e769ac9c SHA512 fb56c386c6db387aa2c27a722d3c417813c427425d0dc6fb350ca02bee3f261efbb639eefbcc5dd58107f33c0211dba1b5bc696680e111a6338d0a67381ab533
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
EBUILD zstd-jni-1.5.0.5.ebuild 1649 BLAKE2B 1a8b753c98faf7e6c0c98bfa9d10c1c09cd4049ecbf4cc403a039e3fb9fc8636c6bdb8d59dcf99c2aa097f079bbff382c35891129393aee040e4b41b81b0d51c SHA512 af839745dc4e62c244e0dc5cc5e7d0acbf27434819967919004664f37c5d96ed7385459f729c21cd3a75d7e1b1c51f5f247604b64be115c00acf8b4f415a8420
+EBUILD zstd-jni-1.5.2.4.ebuild 1697 BLAKE2B 562c35fadde964224058c841db3433e16d79ddb2e8c448eea885265dcfcced5cd2071ff60e8060b55f6fd70fde3bc1ce7849be70c0871c22ccd78712927c25e4 SHA512 dad743a085b7bba1451cf92b6c6f4fd400285698e9ac20e56eebd18a079876cd0763c6b6a17d7c95c4c079c805fe59f8cac8b032ba1be4ea0fd7155004456f92
MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f
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..b613a58dbeee
--- /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 ~arm ~arm64 ~ppc64 ~x86"
+
+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
+}