diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-28 20:13:26 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-28 20:13:26 +0000 |
commit | d7ef5a07f47da6898dcb2d1503790c59b0470571 (patch) | |
tree | d11b9a210e75a7369cb3f644657b94b951109c58 /dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild | |
parent | ebadb1bcdd3c4fdd2e1a569a04d2cd8c5049b64d (diff) |
gentoo auto-resync : 28:12:2022 - 20:13:25
Diffstat (limited to 'dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild')
-rw-r--r-- | dev-java/zstd-jni/zstd-jni-1.5.2.5.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
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 +} |