commit: 59675b1abf9fdc1af45f786a40fe180bdb24b55d
Author: Georgy Yakovlev gentoo org>
AuthorDate: Fri Sep 18 23:21:35 2020 +
Commit: Georgy Yakovlev gentoo org>
CommitDate: Sat Sep 19 04:15:16 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59675b1a
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 gentoo.org>
sci-mathematics/geogebra-bin/Manifest | 2 +
sci-mathematics/geogebra-bin/files/geogebra.sh | 23 ++
.../geogebra-bin/geogebra-bin-5.0.604.0.ebuild | 51 ++
sci-mathematics/geogebra-bin/metadata.xml | 7 +++
4 files changed, 83 insertions(+)
diff --git a/sci-mathematics/geogebra-bin/Manifest
b/sci-mathematics/geogebra-bin/Manifest
new file mode 100644
index 000..a5abac0caa1
--- /dev/null
+++ b/sci-mathematics/geogebra-bin/Manifest
@@ -0,0 +1,2 @@
+DIST GeoGebra-Linux-Portable-5-0-604-0.tar.bz2 138245005 BLAKE2B
589b12a60161ca07e6da82953aeda69a2ed7302634df9078cb997000e2b77486aa1f4dfcbc1daddfddf0b425574ad927c97e0a08d70d708a209eaf0af86d9756
SHA512
ccf190f436504727dc9c6fa10adbd2d0a72a87b641e5b7ce2c7bc8ffe8c1baa00d97b3d2b619f32f1c50b28d5c72b0e0b15619e9c8be74ad8c8fb5afbe66c9a3
+DIST Geogebra.svg 522 BLAKE2B
8c11d037bd8af7af571abc2bba0a8610f0ed5c1cea46fdc47a40d0176e5ea3b7ad4700601a3094b1aa15012f769883c7f5cb60a70f4ed400df57e3b0610271e9
SHA512
a54fedd530d1c803e14d6f44ab7341d9f1ae17fb6b6496bd21788ad1b88b0977d574db6de199e9168543a03dff73ab19e3c50793ec91750ff5fff4a4b7af408d
diff --git a/sci-mathematics/geogebra-bin/files/geogebra.sh
b/sci-mathematics/geogebra-bin/files/geogebra.sh
new file mode 100644
index 000..652563aa47f
--- /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 "$@"
diff --git a/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0.ebuild
b/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0.ebuild
new file mode 100644
index 000..67801b98a81
--- /dev/null
+++ b/sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop prefix xdg
+
+MY_PV="${PV//./-}"
+
+DESCRIPTION="Mathematics software for geometry"
+HOMEPAGE="https://www.geogebra.org";
+SRC_URI="https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${MY_PV}.tar.bz2
+ https://dev.gentoo.org/~gyakovlev/distfiles/Geogebra.svg";
+
+LICENSE="Geogebra CC-BY-NC-SA-3.0 GPL-3 Apache-2.0 BSD-2 BSD BSD-4 colt
EPL-1.0 icu LGPL-2.1 LGPL-2.1+ MIT W3C || ( GPL-2 CDDL )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64"
+IUSE=""
+
+RDEPEND="
+ dev-java/openjdk[javafx]
+ !sci-mathematics/geogebra
+"
+
+# no tests
+RESTRICT="test"
+
+src_unpack() {
+ default
+ mv -v GeoGebra-Linux-Portable-* "${P}" || die
+ rm -rf "${P}/jre"* || die
+ rm -f "${P}/geogebra-portable" || die
+}
+
+src_prepare() {
+ eapply_user
+}
+
+src_install() {
+ insinto /opt
+ doins -r geogebra
+ newbin "$(prefixify_ro "${FILESDIR}"/geogebra.sh)" geogebra
+
+ fperms 0755 /opt/geogebra/geogebra
+ doicon "${DISTDIR}/Geogebra.svg"
+ make_desktop_entry geogebra Geogebra Geogebra Science
+}
+
+src_test() {
+ ewarn "package has no tests"
+}
diff --git a/sci-mathematics/geogebra-bin/metadata.xml
b/sci-mathematics/geogebra-bin/metadata.xml
new file mode 100644
index 000..0d49beafc75
--- /dev/null
+++ b/sci-mathematics/geogebra-bin/metadata.xml
@@ -0,0 +1,7 @@
+
+http://www.gentoo.org/dtd/metadata.dtd";>
+
+
+ j...@gentoo.org
+
+