blob: 5d9bd2909968c3dba29deeb9bbc8bd706a88fb36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
diff -Naur a/bin/signal-cli b/bin/signal-cli
--- a/bin/signal-cli
+++ b/bin/signal-cli
@@ -84,13 +84,20 @@
# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
+# This package needs Java 11, but Java 11 is currently not part of the gentoo eselect config system
+# so we must search for matching java binaries
+JAVA_DIRS="$JAVA_HOME /opt/openjdk-jre-bin-11 /opt/openjdk-bin-11"
+for I in $JAVA_DIRS ; do
+ J_TRY="$I/bin/java"
+ if [ -x "$J_TRY" ] ; then
+ "$J_TRY" -version 2>&1 | grep --fixed-strings --quiet "11."
+ if [ $? -eq 0 ] ; then
+ JAVACMD="$J_TRY"
+ break
+ fi
+ fi
+done
+if [ -n "$JAVACMD" ] ; then
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|