summaryrefslogtreecommitdiff
path: root/dev-java/zstd-jni
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-28 20:13:26 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-28 20:13:26 +0000
commitd7ef5a07f47da6898dcb2d1503790c59b0470571 (patch)
treed11b9a210e75a7369cb3f644657b94b951109c58 /dev-java/zstd-jni
parentebadb1bcdd3c4fdd2e1a569a04d2cd8c5049b64d (diff)
gentoo auto-resync : 28:12:2022 - 20:13:25
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.5.ebuild63
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-java/zstd-jni/Manifest b/dev-java/zstd-jni/Manifest
index 424b56387fb1..e55e7ec2ae20 100644
--- a/dev-java/zstd-jni/Manifest
+++ b/dev-java/zstd-jni/Manifest
@@ -1,3 +1,5 @@
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
EBUILD zstd-jni-1.5.2.4.ebuild 1693 BLAKE2B c186358196b6c5425eb71ced0d9c594f039c440b73e3e013c3dab89d61d94f478535803312e6180809911dc5b7cf7114ff2446340e666538a5e67b30bd4584d7 SHA512 e5ee8352fcb398a6a6f077c7d70dc3443f62a81f665bb848b33f03fc647528f752bb864444c06da01e0d69008360c84725d3b8d146461166ce97fd84c22dbf35
+EBUILD zstd-jni-1.5.2.5.ebuild 1537 BLAKE2B 4066fc48010c044939f2474c8f0cccd5445a8d8e8ce60c64d539d1be28b463edb454c44218679c4b3edd178ec39266d584f2a2a7d3b21c5be1ea8b33444c7480 SHA512 20f772f07911619b3aca15bcb3555f45038c80045daa06b8f6ae3c55f421baf55637161afa1f8ed0f96031d9c41e5adaae0c29010228bdc5bfded3085e048176
MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f
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
+}