summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-20 18:38:38 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-09-20 18:49:33 -0700
commit95759d9dc56112d6c12256df4718e070f3bd6e82 (patch)
tree688e8c3b3e8b16df9235075776b90f22dac314cd /sci-mathematics/geogebra-bin
parentsys-firmware/intel-microcode: bump (diff)
downloadgentoo-95759d9dc56112d6c12256df4718e070f3bd6e82.tar.gz
gentoo-95759d9dc56112d6c12256df4718e070f3bd6e82.tar.bz2
gentoo-95759d9dc56112d6c12256df4718e070f3bd6e82.zip
sci-mathematics/geogebra-bin: revbump, wrapper improvements
should work with openjdk:11 without gentoo-vm useflag now. 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')
-rw-r--r--sci-mathematics/geogebra-bin/files/geogebra.sh33
-rw-r--r--sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r2.ebuild (renamed from sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r1.ebuild)1
2 files changed, 22 insertions, 12 deletions
diff --git a/sci-mathematics/geogebra-bin/files/geogebra.sh b/sci-mathematics/geogebra-bin/files/geogebra.sh
index 652563aa47f9..b0f941e8a463 100644
--- a/sci-mathematics/geogebra-bin/files/geogebra.sh
+++ b/sci-mathematics/geogebra-bin/files/geogebra.sh
@@ -1,23 +1,32 @@
#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
+set -euo pipefail
+IFS=$'\n\t'
+
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)"
+ local j8 j11 jcmd
+ j8="$(java-config --select-vm openjdk-8 -J 2> /dev/null || true)"
+ j11="$(java-config --select-vm openjdk-11 -J 2> /dev/null || true)"
- if [[ -f $(dirname ${j8:-/})/../jre/lib/javafx.properties ]]; then
- JAVACMD="${j8}"
- elif [[ -f $(dirname ${j11:-/})/../lib/javafx.properties ]]; then
- JAVACMD="${j11}"
+ if [[ -f "$(dirname "${j8:-/}")/../jre/lib/javafx.properties" ]]; then
+ jcmd="${j8}"
+ elif [[ -f "$(dirname "${j11:-/}")/../lib/javafx.properties" ]]; then
+ jcmd="${j11}"
+ elif [[ -f @GENTOO_PORTAGE_EPREFIX@/usr/lib64/openjdk-11/lib/javafx.properties ]]; then
+ jcmd="@GENTOO_PORTAGE_EPREFIX@/usr/lib64/openjdk-11/bin/java"
+ elif [[ -f @GENTOO_PORTAGE_EPREFIX@/usr/lib/openjdk-11/lib/javafx.properties ]]; then
+ jcmd="@GENTOO_PORTAGE_EPREFIX@/usr/lib/openjdk-11/bin/java"
else
- echo "openjdk[javafx] not found!" 1>&2
+ echo "dev-java/openjdk[javafx] not found!" 1>&2
+ exit 1
+ fi
+
+ if [[ ! -x "${jcmd}" ]]; then
+ echo "${jcmd} not executable!" 1>&2
exit 1
fi
- echo "using ${JAVACMD}"
- export JAVACMD
- exec "@GENTOO_PORTAGE_EPREFIX@/opt/geogebra/geogebra" "${@}"
+ env JAVACMD="${jcmd}" "@GENTOO_PORTAGE_EPREFIX@/opt/geogebra/geogebra" "${@}"
}
main "$@"
diff --git a/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r1.ebuild b/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r2.ebuild
index 510a5bd2d372..f2e494821062 100644
--- a/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r1.ebuild
+++ b/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r2.ebuild
@@ -18,6 +18,7 @@ KEYWORDS="~amd64 ~ppc64"
IUSE=""
RDEPEND="
+ dev-java/java-config
|| (
dev-java/openjdk:8[javafx]
dev-java/openjdk:11[javafx]