From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8347A158094 for ; Tue, 4 Oct 2022 09:40:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 88E58E0946; Tue, 4 Oct 2022 09:40:54 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6F043E0936 for ; Tue, 4 Oct 2022 09:40:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9817533BF3C for ; Tue, 4 Oct 2022 09:40:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DAB5E606 for ; Tue, 4 Oct 2022 09:40:50 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1664876319.7219c49d521b8d8e4e0f4d54519b02876e40dd33.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/zstd-jni/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/zstd-jni/Manifest dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild X-VCS-Directories: dev-java/zstd-jni/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 7219c49d521b8d8e4e0f4d54519b02876e40dd33 X-VCS-Branch: master Date: Tue, 4 Oct 2022 09:40:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e6e92481-5e14-4c9b-9415-57dd3d842a8b X-Archives-Hash: 1830d4e98cf1b6edf0a317a059f0694b commit: 7219c49d521b8d8e4e0f4d54519b02876e40dd33 Author: Volkmar W. Pogatzki pogatzki net> AuthorDate: Fri Sep 16 14:10:57 2022 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Tue Oct 4 09:38:39 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7219c49d 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 pogatzki.net> Signed-off-by: Florian Schmaus gentoo.org> dev-java/zstd-jni/Manifest | 1 + dev-java/zstd-jni/zstd-jni-1.5.2.4.ebuild | 67 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) 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 +}