public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/geogebra-bin/files/, sci-mathematics/geogebra-bin/
@ 2020-09-19  4:15 Georgy Yakovlev
  0 siblings, 0 replies; 2+ messages in thread
From: Georgy Yakovlev @ 2020-09-19  4:15 UTC (permalink / raw
  To: gentoo-commits

commit:     59675b1abf9fdc1af45f786a40fe180bdb24b55d
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 23:21:35 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Sep 19 04:15:16 2020 +0000
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 <gyakovlev <AT> 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 00000000000..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 00000000000..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 00000000000..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 00000000000..0d49beafc75
--- /dev/null
+++ b/sci-mathematics/geogebra-bin/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>java@gentoo.org</email>
+	</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/geogebra-bin/files/, sci-mathematics/geogebra-bin/
@ 2020-09-21  1:50 Georgy Yakovlev
  0 siblings, 0 replies; 2+ messages in thread
From: Georgy Yakovlev @ 2020-09-21  1:50 UTC (permalink / raw
  To: gentoo-commits

commit:     95759d9dc56112d6c12256df4718e070f3bd6e82
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 21 01:38:38 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Sep 21 01:49:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95759d9d

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 <AT> gentoo.org>

 sci-mathematics/geogebra-bin/files/geogebra.sh     | 33 ++++++++++++++--------
 ...-r1.ebuild => geogebra-bin-5.0.604.0-r2.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 652563aa47f..b0f941e8a46 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
similarity index 98%
rename from sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r1.ebuild
rename to sci-mathematics/geogebra-bin/geogebra-bin-5.0.604.0-r2.ebuild
index 510a5bd2d37..f2e49482106 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]


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-21  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21  1:50 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/geogebra-bin/files/, sci-mathematics/geogebra-bin/ Georgy Yakovlev
  -- strict thread matches above, loose matches on Subject: below --
2020-09-19  4:15 Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox