summaryrefslogtreecommitdiff
path: root/dev-java/zstd-jni
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-30 09:09:34 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-30 09:09:34 +0100
commitad0412d0cafb8c04ce98024155cf99a4cc27db44 (patch)
treec34688ab389c18775a322de6cd4cfd957cbe8014 /dev-java/zstd-jni
parentcdb747b791914a30c287a3a8e33d1b635e431707 (diff)
gentoo auto-resync : 30:07:2022 - 09:09:33
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.0.5.ebuild60
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-java/zstd-jni/Manifest b/dev-java/zstd-jni/Manifest
index 663af35f4242..ee37783202e9 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.4.tar.gz 9296353 BLAKE2B 1b4011cc7876d3d4ca2636d9872b1127d3a700f4cc6b159a36dbff5e73a2ec3af91d4a27965123c9dbb9f017200bb68bf7e078806d25d7e395243c2251936891 SHA512 2d83a1e4ff6c25ef301dc25343dcfd4f2dda7f8c44aae2d1d5da2159affb6d0c2885693022dd5cbd2d360540092bebfe0635b61c899fc7ce8dc496a96ba6f017
+DIST zstd-jni-1.5.0.5.tar.gz 9297542 BLAKE2B 96b2aa09d62c7a45c352d52358aa47a66c95c1b122bfc61b7e2b3aaa829e011a8ed6f71373130700ecdb7d8541ca6971c2cd7fda01be396053532c4aeeca3cb1 SHA512 b63858d58c7d1b2c9d120f49d1289caa7e5b429d0f8c3c95b7f58a5d432f09d41504c5f5b0934f53be8eadf3c1ab02a1a872e292bac465907fffe2a67108267e
EBUILD zstd-jni-1.5.0.4.ebuild 1628 BLAKE2B af3514aff4b542a30f98f179ccb5bdf7d78d9f1c152e2ecbffb10d585dfbcc9308a5b0a9515574650641eab1654d848ae75fd8d1526b424de4d0b7c463cc59af SHA512 0d5f86d2e2c55e58679b80e8091ba2726da1d37ec286003190b3ead62f645dbae10e89a820d9d501d2a66bdd10c0089d0d861c998aed9b30e6a77c223a8d83a1
+EBUILD zstd-jni-1.5.0.5.ebuild 1653 BLAKE2B deb34bf0b64209f8f1e40e4672eecca6997def1e39706ccd7c6ef523b573d749ec3963e370a984e7bc6a336e1cc552ab5da4c178d5eea5f2437602fe288667dd SHA512 e9a7280291cf5f0849a9e1b429469680dace8349d338a8dc334ebbfa50e396ebe96d599561d7acd2a55a9c14dcc2fc2a002a8e0527a0fcad5fdbe23c426965ec
MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f
diff --git a/dev-java/zstd-jni/zstd-jni-1.5.0.5.ebuild b/dev-java/zstd-jni/zstd-jni-1.5.0.5.ebuild
new file mode 100644
index 000000000000..fd0b9e85ee37
--- /dev/null
+++ b/dev-java/zstd-jni/zstd-jni-1.5.0.5.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MAVEN_ID="com.github.luben:zstd-jni:1.5.0-5"
+MY_PV="$(ver_rs 3 -)"
+
+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/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+RDEPEND=">=virtual/jre-1.8:*"
+DEPEND=">=virtual/jdk-1.8:*"
+
+PATCHES=(
+ "${FILESDIR}/zstd-jni-1.5.0.4-filter-flags.patch"
+)
+
+JAVA_SRC_DIR="src/main/java"
+
+src_prepare() {
+ cmake_src_prepare
+
+ echo -e "package com.github.luben.zstd.util;\n\npublic class ZstdVersion\n{\n\tpublic static final String VERSION = \"${PV}\";\n}\n" \
+ >> ${JAVA_SRC_DIR}/com/github/luben/zstd/util/ZstdVersion.java || die "Failed to generate version class"
+}
+
+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
+
+ mkdir -p "${S}/target/classes/META-INF" || die "Failed to create META-INF dir"
+ echo "Manifest-Version: 1.0
+Implementation-Version: ${MY_PV}
+Bundle-NativeCode: libzstd-jni.so;osname=Linux" > "${S}/target/classes/META-INF/MANIFEST.MF" || die "Failed to create MANIFEST.MF"
+ java-pkg-simple_src_compile
+ java-pkg_addres ${JAVA_JAR_FILENAME} "${BUILD_DIR}" -name libzstd-jni.so || die "Failed to add library to jar"
+}
+
+src_install() {
+ java-pkg-simple_src_install
+}