pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

igv: Patch wrapper for NetBSD



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Mon Feb 22 17:21:36 2021 -0600
Changeset:	24d698e84354cae3299ce44973580766db47725c

Modified Files:
	igv/files/igv.sh.in

Log Message:
igv: Patch wrapper for NetBSD

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=24d698e84354cae3299ce44973580766db47725c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 igv/files/igv.sh.in | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diffs:
diff --git a/igv/files/igv.sh.in b/igv/files/igv.sh.in
index c5bb82af74..281f1131df 100755
--- a/igv/files/igv.sh.in
+++ b/igv/files/igv.sh.in
@@ -1,17 +1,28 @@
 #!/bin/sh
 
-# Replace this with bundled igv.sh?
-if ! java -version 2>&1 | head -n 1 | fgrep '"11.'; then
-    printf "You need Java 11 to run IGV.\n"
-    exit 1
-fi
-
-# MacOS openjdk11
 if [ -e /usr/libexec/java_home ]; then
+    # MacOS openjdk
     export JAVA_HOME=$(/usr/libexec/java_home)
+elif [ -e /usr/pkg/java/openjdk11/bin/java ]; then
+    # Pkgsrc
+    export JAVA_HOME=/usr/pkg/java/openjdk11
+fi
+
+if [ -e $JAVA_HOME/bin/java ]; then
+    java=$JAVA_HOME/bin/java
+else
+    # Assume env is correctly configured
+    java=java
+fi
+
+if ! $java -version 2>&1 | head -n 1 | fgrep '"11.'; then
+    printf "You need Java 11 to run IGV.\n"
+    java -version
+    exit 1
 fi
 
-java -showversion --module-path="%%JAVAJARDIR%%/igv" -Xmx4g \
+$java -showversion \
+    --module-path="%%JAVAJARDIR%%/igv" -Xmx4g \
     @"%%JAVAJARDIR%%/igv/igv.args" \
     -Dapple.laf.useScreenMenuBar=true \
     -Djava.net.preferIPv4Stack=true \


Home | Main Index | Thread Index | Old Index