Import geogebra-4.0.38.0.

GeoGebra is free and multi-platform dynamic mathematics software for
learning and teaching.

based on an initial submission from Azwaw OUSADOU and reworked by myself
ok jasper@
This commit is contained in:
ajacoutot 2012-08-21 07:18:17 +00:00
parent 65978ca70b
commit 8ffa15a7d0
5 changed files with 231 additions and 0 deletions

54
math/geogebra/Makefile Normal file
View File

@ -0,0 +1,54 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/08/21 07:18:17 ajacoutot Exp $
COMMENT= educational mathematical software
V= 4.0.38.0
DISTNAME= GeoGebra-Unixlike-Installer-${V}
PKGNAME= geogebra-${V}
CATEGORIES= math java
HOMEPAGE= http://www.geogebra.org
# GeoGebra Source: GPLv3
# Language Files and Documentation:
# Creative Commons Attribution-Share Alike 3.0
# See: http://www.geogebra.org/download/license.txt
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://geogebra.googlecode.com/files/
MODULES= java
MODJAVA_VER= 1.7+
MODJAVA_JRERUN= Yes
RUN_DEPENDS= java/javaPathHelper \
devel/desktop-file-utils \
misc/shared-mime-info \
x11/gtk+2,-guic
NO_BUILD= Yes
NO_REGRESS= Yes
PKG_ARCH= *
WRKDIST= ${WRKDIR}/geogebra-${V}
pre-configure:
perl -pi -e 's,/usr,${WRKINST}${TRUEPREFIX},g' ${WRKSRC}/install.sh
perl -pi -e 's,/usr,${TRUEPREFIX},g' ${WRKSRC}/geogebra.desktop
${SUBST_CMD} ${WRKSRC}/geogebra
do-install:
mkdir -p ${PREFIX}/share/mime/packages
mkdir -p ${PREFIX}/share/applications
cd ${WRKBUILD} && ./install.sh
gzip -d ${PREFIX}/share/icons/hicolor/scalable/apps/geogebra.svgz \
-o ${PREFIX}/share/icons/hicolor/scalable/apps/geogebra.svg
gzip -d ${PREFIX}/share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.file.svgz \
-o ${PREFIX}/share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.file.svg
gzip -d ${PREFIX}/share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.tool.svgz \
-o ${PREFIX}/share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.tool.svg
.include <bsd.port.mk>

2
math/geogebra/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (GeoGebra-Unixlike-Installer-4.0.38.0.tar.gz) = jvWKF8/Wb/ntGK+iJzj2aY4N9cd02bCaCfutC7RLOmM=
SIZE (GeoGebra-Unixlike-Installer-4.0.38.0.tar.gz) = 14868843

View File

@ -0,0 +1,99 @@
$OpenBSD: patch-geogebra-4_0_38_0_geogebra,v 1.1.1.1 2012/08/21 07:18:17 ajacoutot Exp $
--- geogebra.orig Sat Jul 14 10:33:41 2012
+++ geogebra Mon Aug 20 12:33:10 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#---------------------------------------------
# Script to start GeoGebra
#---------------------------------------------
@@ -9,13 +9,13 @@
# GG_SCRIPTNAME=<name of originally called script to start GeoGebra> # If unset, name of this script will be used
#
# GG_PATH=<path of directory containing geogebra.jar> # If unset, path of this script will be used.
-# In this case if the path of script does not contain the geogebra.jar file, /usr/share/geogebra will be used.
+# In this case if the path of script does not contain the geogebra.jar file, ${TRUEPREFIX}/share/geogebra will be used.
#
# JAVACMD=<Java command> # If unset, java will be used
#
# GG_XMS=<initial Java heap size> # If unset, 32m will be used.
#
-# GG_XMX=<maximum Java heap size> # If unset, 512m will be used.
+# GG_XMX=<maximum Java heap size> # If unset, 256m will be used.
#
# GG_DJAVA_LIBRARY_PATH=<native library path>
@@ -34,24 +34,23 @@ if [ -z "$GG_XMS" ]; then
fi
#---------------------------------------------
-# If GG_XMX not set, set to 512m
+# If GG_XMX not set, set to 256m
if [ -z "$GG_XMX" ]; then
- GG_XMX='512m'
+ GG_XMX='256m'
fi
#---------------------------------------------
# Set Java default options
-JAVA_OPTS=("-Xms$GG_XMS" "-Xmx$GG_XMX")
if [ -n "$GG_DJAVA_LIBRARY_PATH" ]; then
- JAVA_OPTS[${#JAVA_OPTS[*]}]="-Djava.library.path=$GG_DJAVA_LIBRARY_PATH"
+ JAVA_OPTS="-Djava.library.path=$GG_DJAVA_LIBRARY_PATH"
fi
#---------------------------------------------
# Set GeoGebra default options
-GG_OPTS=()
+GG_OPTS=""
#---------------------------------------------
# Define usage function
@@ -93,7 +92,7 @@ _USAGE
# If JAVACMD not set, use java
if [ -z "$JAVACMD" ]; then
- JAVACMD='java'
+ JAVACMD=`javaPathHelper -c geogebra`
fi
#---------------------------------------------
@@ -104,10 +103,10 @@ for i in "$@"; do
--help | --hel | --he | --h )
func_usage; exit 0 ;;
esac
- if [ $(expr match "$i" '.*--') -ne 0 ]; then
+ if [ $(expr -- "$i" : '.*--') -ne 0 ]; then
GG_OPTS[${#GG_OPTS[*]}]="$i"
shift $((1))
- elif [ $(expr match "$i" '.*-Xms') -ne 0 -o $(expr match "$i" '.*-Xmx') -ne 0 -o $(expr match "$i" '.*-Djava.library.path') -ne 0 ]; then
+ elif [ $(expr -- "$i" : '.*-Xms') -ne 0 -o $(expr -- "$i" : '.*-Xmx') -ne 0 -o $(expr -- "$i" : '.*-Djava.library.path') -ne 0 ]; then
JAVA_OPTS[${#JAVA_OPTS[*]}]="$i"
shift $((1))
fi
@@ -117,20 +116,10 @@ done
# If GG_PATH not set, use path of this script
if [ -z "$GG_PATH" ]; then
- GG_PATH="${BASH_SOURCE[0]}"
- if [ -h "${GG_PATH}" ]; then
- while [ -h "${GG_PATH}" ]; do
- GG_PATH=`readlink "${GG_PATH}"`
- done
- fi
- pushd . > /dev/null
- cd `dirname ${GG_PATH}` > /dev/null
- GG_PATH=`pwd`
- popd > /dev/null
- test -r "${GG_PATH}/geogebra.jar" || GG_PATH='/usr/share/geogebra'
+ GG_PATH='${TRUEPREFIX}/share/geogebra'
fi
#---------------------------------------------
# Run
-exec "$JAVACMD" "${JAVA_OPTS[@]}" -jar "$GG_PATH/geogebra.jar" "${GG_OPTS[@]}" "$@"
+exec "$JAVACMD" "-Xms$GG_XMS" "-Xmx$GG_XMX" "${JAVA_OPTS[@]}" -jar "$GG_PATH/geogebra.jar" "${GG_OPTS[@]}" "$@"

3
math/geogebra/pkg/DESCR Normal file
View File

@ -0,0 +1,3 @@
GeoGebra is free and multi-platform dynamic mathematics software for
learning and teaching. It has received several educational software
awards in Europe and the USA.

73
math/geogebra/pkg/PLIST Normal file
View File

@ -0,0 +1,73 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/08/21 07:18:17 ajacoutot Exp $
bin/geogebra
share/applications/geogebra.desktop
share/geogebra/
share/geogebra/geogebra.jar
share/geogebra/geogebra_algos.jar
share/geogebra/geogebra_cas.jar
share/geogebra/geogebra_export.jar
share/geogebra/geogebra_gui.jar
share/geogebra/geogebra_javascript.jar
share/geogebra/geogebra_main.jar
share/geogebra/geogebra_properties.jar
share/geogebra/jlatexmath.jar
share/geogebra/jlm_cyrillic.jar
share/geogebra/jlm_greek.jar
share/geogebra/unsigned/
share/geogebra/unsigned/geogebra.jar
share/geogebra/unsigned/geogebra_algos.jar
share/geogebra/unsigned/geogebra_cas.jar
share/geogebra/unsigned/geogebra_export.jar
share/geogebra/unsigned/geogebra_gui.jar
share/geogebra/unsigned/geogebra_javascript.jar
share/geogebra/unsigned/geogebra_main.jar
share/geogebra/unsigned/geogebra_properties.jar
share/geogebra/unsigned/jlatexmath.jar
share/geogebra/unsigned/jlm_cyrillic.jar
share/geogebra/unsigned/jlm_greek.jar
share/icons/hicolor/128x128/apps/geogebra.png
share/icons/hicolor/128x128/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/128x128/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/16x16/apps/geogebra.png
share/icons/hicolor/16x16/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/16x16/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/192x192/apps/geogebra.png
share/icons/hicolor/192x192/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/192x192/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/22x22/apps/geogebra.png
share/icons/hicolor/22x22/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/22x22/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/24x24/apps/geogebra.png
share/icons/hicolor/24x24/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/24x24/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/256x256/apps/geogebra.png
share/icons/hicolor/256x256/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/256x256/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/32x32/apps/geogebra.png
share/icons/hicolor/32x32/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/32x32/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/36x36/apps/geogebra.png
share/icons/hicolor/36x36/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/36x36/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/48x48/apps/geogebra.png
share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/48x48/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/64x64/apps/geogebra.png
share/icons/hicolor/64x64/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/64x64/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/72x72/apps/geogebra.png
share/icons/hicolor/72x72/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/72x72/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/96x96/apps/geogebra.png
share/icons/hicolor/96x96/mimetypes/application-vnd.geogebra.file.png
share/icons/hicolor/96x96/mimetypes/application-vnd.geogebra.tool.png
share/icons/hicolor/scalable/apps/geogebra.svg
share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.file.svg
share/icons/hicolor/scalable/mimetypes/application-vnd.geogebra.tool.svg
share/mime/packages/geogebra.xml
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@exec %D/bin/update-mime-database %D/share/mime
@unexec-delete %D/bin/update-mime-database %D/share/mime
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database