1 |
commit: 16b7cf5e72b6255564733656746c76421b776b0a |
2 |
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jul 28 15:03:03 2021 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 28 19:52:11 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16b7cf5e |
7 |
|
8 |
dev-java/zstd-jni: Allow CMake to find and use JNI without AWT |
9 |
|
10 |
The AWT library, libjawt.so, is not needed for zstd-jni itself as the |
11 |
compilation can finish without it. But CMake's FindJNI module will |
12 |
always try to search for it, and if it is not found, CMake will declare |
13 |
everything pertaining to JNI unavailable, even if some of the JNI |
14 |
components do exist on the system -- like jni.h, which is required for |
15 |
building zstd-jni. Because the AWT library is actually unused, it is |
16 |
safe to set the CMake variable controlling it (JAVA_AWT_LIBRARY) to an |
17 |
arbitrary string for deceiving CMake about its existence. |
18 |
|
19 |
Closes: https://bugs.gentoo.org/776910 |
20 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
21 |
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com> |
22 |
Closes: https://github.com/gentoo/gentoo/pull/21816 |
23 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
24 |
|
25 |
dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild | 3 +++ |
26 |
dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild | 3 +++ |
27 |
2 files changed, 6 insertions(+) |
28 |
|
29 |
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 |
30 |
index 6428adfaaec..91f20179a56 100644 |
31 |
--- a/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild |
32 |
+++ b/dev-java/zstd-jni/zstd-jni-1.4.9.1.ebuild |
33 |
@@ -26,6 +26,9 @@ JAVA_SRC_DIR="src/main/java" |
34 |
src_configure() { |
35 |
local mycmakeargs=( |
36 |
-DJAVA_HOME="$(java-config -g JAVA_HOME)" |
37 |
+ # Resolve bug #776910 |
38 |
+ # Reference: https://stackoverflow.com/a/51764145 |
39 |
+ -DJAVA_AWT_LIBRARY="NotNeeded" |
40 |
) |
41 |
cmake_src_configure |
42 |
} |
43 |
|
44 |
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 |
45 |
index 116244dc24e..d978a25ba29 100644 |
46 |
--- a/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild |
47 |
+++ b/dev-java/zstd-jni/zstd-jni-1.5.0.4.ebuild |
48 |
@@ -37,6 +37,9 @@ src_prepare() { |
49 |
src_configure() { |
50 |
local mycmakeargs=( |
51 |
-DJAVA_HOME="$(java-config -g JAVA_HOME)" |
52 |
+ # Resolve bug #776910 |
53 |
+ # Reference: https://stackoverflow.com/a/51764145 |
54 |
+ -DJAVA_AWT_LIBRARY="NotNeeded" |
55 |
) |
56 |
cmake_src_configure |
57 |
} |