summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-18 16:21:35 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-18 21:15:16 -0700
commit59675b1abf9fdc1af45f786a40fe180bdb24b55d (patch)
treeae9ccc5348236d892c8953efd75242ff7d081e58 /sci-mathematics/geogebra-bin/files
parentapp-emulation/diskimage-builder: 3.3.1 fix (diff)
downloadgentoo-59675b1abf9fdc1af45f786a40fe180bdb24b55d.tar.gz
gentoo-59675b1abf9fdc1af45f786a40fe180bdb24b55d.tar.bz2
gentoo-59675b1abf9fdc1af45f786a40fe180bdb24b55d.zip
sci-mathematics/geogebra-bin: new package
Bug: https://bugs.gentoo.org/719076 Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sci-mathematics/geogebra-bin/files')
-rw-r--r--sci-mathematics/geogebra-bin/files/geogebra.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/sci-mathematics/geogebra-bin/files/geogebra.sh b/sci-mathematics/geogebra-bin/files/geogebra.sh
new file mode 100644
index 000000000000..652563aa47f9
--- /dev/null
+++ b/sci-mathematics/geogebra-bin/files/geogebra.sh
@@ -0,0 +1,23 @@
+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
+
+main() {
+ local JAVACMD
+ # prefer openjdk-8 over 11
+ local j8="$(java-config --select-vm openjdk-8 -J)"
+ local j11="$(java-config --select-vm openjdk-11 -J)"
+
+ if [[ -f $(dirname ${j8:-/})/../jre/lib/javafx.properties ]]; then
+ JAVACMD="${j8}"
+ elif [[ -f $(dirname ${j11:-/})/../lib/javafx.properties ]]; then
+ JAVACMD="${j11}"
+ else
+ echo "openjdk[javafx] not found!" 1>&2
+ exit 1
+ fi
+
+ echo "using ${JAVACMD}"
+ export JAVACMD
+ exec "@GENTOO_PORTAGE_EPREFIX@/opt/geogebra/geogebra" "${@}"
+}
+
+main "$@"