Skip to content

Commit

Permalink
net-im/signal-cli-bin: enhance java binary search
Browse files Browse the repository at this point in the history
Implement a suggestion to search more directories for the java11 binary
see gentoo#18719 (comment)

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Martin Dummer <[email protected]>
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
madmartin authored and juippis committed Aug 16, 2021
1 parent c72cc1b commit 05304bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Signed-off-by: Martin Dummer <[email protected]>
--- a/bin/signal-cli 2021-03-02 20:56:06.000000000 +0100
+++ b/bin/signal-cli 2021-05-03 12:05:45.406811750 +0200
@@ -84,13 +84,20 @@
--- a/bin/signal-cli
+++ b/bin/signal-cli
@@ -84,13 +84,19 @@


# Determine the Java command to use to start the JVM.
Expand All @@ -14,8 +14,7 @@ Signed-off-by: Martin Dummer <[email protected]>
- 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
+for I in /usr/lib*/openjdk-11 /opt/openjdk-bin-11 /opt/openjdk-jre-bin-11; do
+ J_TRY="$I/bin/java"
+ if [ -x "$J_TRY" ] ; then
+ "$J_TRY" -version 2>&1 | grep --fixed-strings --quiet "11."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BDEPEND="
"

PATCHES=(
"${FILESDIR}/signal-cli-bin-${PV}-use-working-java-version.patch"
"${FILESDIR}/${P}-use-working-java-version.patch"
)

src_unpack() {
Expand Down

0 comments on commit 05304bf

Please sign in to comment.