summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuan Liao <liaoyuan@gmail.com>2021-07-28 08:03:03 -0700
committerFlorian Schmaus <flow@gentoo.org>2021-07-28 21:52:11 +0200
commit16b7cf5e72b6255564733656746c76421b776b0a (patch)
tree18b394020b4defb21681eb97cde63005a99464d9 /dev-java
parentapp-crypt/dieharder: keyword 3.31.1-r4 for ~riscv (diff)
downloadgentoo-16b7cf5e72b6255564733656746c76421b776b0a.tar.gz
gentoo-16b7cf5e72b6255564733656746c76421b776b0a.tar.bz2
gentoo-16b7cf5e72b6255564733656746c76421b776b0a.zip
dev-java/zstd-jni: Allow CMake to find and use JNI without AWT
The AWT library, libjawt.so, is not needed for zstd-jni itself as the compilation can finish without it. But CMake's FindJNI module will always try to search for it, and if it is not found, CMake will declare everything pertaining to JNI unavailable, even if some of the JNI components do exist on the system -- like jni.h, which is required for building zstd-jni. Because the AWT library is actually unused, it is safe to set the CMake variable controlling it (JAVA_AWT_LIBRARY) to an arbitrary string for deceiving CMake about its existence. Closes: https://bugs.gentoo.org/776910 Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Yuan Liao <liaoyuan@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/21816 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild3
-rw-r--r--dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild3
2 files changed, 6 insertions, 0 deletions
diff --git a/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild b/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild
index 6428adfaaec3..91f20179a562 100644
--- a/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild
+++ b/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild
@@ -26,6 +26,9 @@ JAVA_SRC_DIR="src/main/java"
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
}
diff --git a/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild b/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild
index 116244dc24e7..d978a25ba299 100644
--- a/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild
+++ b/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild
@@ -37,6 +37,9 @@ src_prepare() {
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
}