commit: 16b7cf5e72b6255564733656746c76421b776b0a Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com> AuthorDate: Wed Jul 28 15:03:03 2021 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Wed Jul 28 19:52:11 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16b7cf5e
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 <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/21816 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild | 3 +++ dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild | 3 +++ 2 files changed, 6 insertions(+) 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 6428adfaaec..91f20179a56 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 116244dc24e..d978a25ba29 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 }
