summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--academic/mathics/README5
-rw-r--r--academic/mathics/mathics-create-database19
-rw-r--r--academic/mathics/mathics.SlackBuild89
-rw-r--r--academic/mathics/mathics.info10
-rw-r--r--academic/mathics/setup_py_fixes.diff14
-rw-r--r--academic/mathics/slack-desc19
6 files changed, 156 insertions, 0 deletions
diff --git a/academic/mathics/README b/academic/mathics/README
new file mode 100644
index 0000000000..bfcff96767
--- /dev/null
+++ b/academic/mathics/README
@@ -0,0 +1,5 @@
+Mathics is a free, light-weight alternative to Mathematica.
+Mathics is a general-purpose online computer algebra system featuring Mathematica-compatible syntax and functions.
+It is backed by highly extensible Python code, relying on SymPy for most mathematical tasks.
+
+You can install Cython for some extra functionality/optimizations.
diff --git a/academic/mathics/mathics-create-database b/academic/mathics/mathics-create-database
new file mode 100644
index 0000000000..62f39a9b01
--- /dev/null
+++ b/academic/mathics/mathics-create-database
@@ -0,0 +1,19 @@
+# created by Urchlay
+
+#!/bin/sh
+
+if [ -z "$HOME" ]; then
+ echo "$0: \$HOME not set in the environment, aborting" 1>&2
+ exit 1
+fi
+
+DBDIR="$HOME/.local/var/mathics/"
+
+# In case of multiple installs, SCRIPT prefers /usr/lib64 to /usr/lib,
+# and higher-numbered python versions to lower-numbered. But this is
+# just paranoia, there shouldn't be multiple mathics installations.
+SCRIPT=$( /bin/ls -d /usr/lib*/python2.*/site-packages/mathics/manage.py | tac | head -1 )
+
+echo "Initializing mathics SQLite databases in $DBDIR"
+mkdir -p $DBDIR
+exec python $SCRIPT syncdb --noinput
diff --git a/academic/mathics/mathics.SlackBuild b/academic/mathics/mathics.SlackBuild
new file mode 100644
index 0000000000..b934c26d11
--- /dev/null
+++ b/academic/mathics/mathics.SlackBuild
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# Slackware build script for Mathics
+
+# Copyright 2015 David Melik, Colbert, WA, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=mathics
+VERSION=${VERSION:-0.8}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p1 < $CWD/setup_py_fixes.diff
+
+python setup.py install --root=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+install -m0755 $CWD/$PRGNAM-create-database $PKG/usr/bin
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a mathics/doc $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/academic/mathics/mathics.info b/academic/mathics/mathics.info
new file mode 100644
index 0000000000..66919c5b1b
--- /dev/null
+++ b/academic/mathics/mathics.info
@@ -0,0 +1,10 @@
+PRGNAM="mathics"
+VERSION="0.8"
+HOMEPAGE="http://www.mathics.org/"
+DOWNLOAD="http://github.com/mathics/Mathics/releases/download/v0.8/mathics-0.8.tar.gz"
+MD5SUM="05d6d1f0af9dc20f267a1d9b1b7b1831"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="colorama interruptingcow mpmath ply python-dateutil python-django sympy"
+MAINTAINER="David Melik"
+EMAIL="dchmelik@gmail.com"
diff --git a/academic/mathics/setup_py_fixes.diff b/academic/mathics/setup_py_fixes.diff
new file mode 100644
index 0000000000..be399022f8
--- /dev/null
+++ b/academic/mathics/setup_py_fixes.diff
@@ -0,0 +1,14 @@
+diff -Naur mathics-0.8/setup.py mathics-0.8.patched/setup.py
+--- mathics-0.8/setup.py 2015-05-30 20:15:49.000000000 -0700
++++ mathics-0.8.patched/setup.py 2015-06-27 18:41:36.237193840 -0700
+@@ -61,8 +61,8 @@
+ INSTALL_REQUIRES = ['cython>=0.15.1']
+
+ # General Requirements
+-INSTALL_REQUIRES += ['sympy==0.7.6', 'django >= 1.6, < 1.7', 'ply>=3.6',
+- 'mpmath>=0.19', 'argparse', 'python-dateutil', 'colorama',
++INSTALL_REQUIRES += ['sympy==0.7.6', 'django >= 1.6', 'ply>=3.6',
++ 'mpmath>=0.19', 'python-dateutil', 'colorama',
+ 'interruptingcow']
+
+ # if sys.platform == "darwin":
diff --git a/academic/mathics/slack-desc b/academic/mathics/slack-desc
new file mode 100644
index 0000000000..1578bda0e9
--- /dev/null
+++ b/academic/mathics/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+mathics: mathics (A free, light-weight alternative to Mathematica)
+mathics:
+mathics: Mathics is a free, general-purpose online computer algebra system
+mathics: featuring Mathematica-compatible syntax and functions. It is backed
+mathics: by highly extensible Python code, relying on SymPy for most
+mathics: mathematical tasks.
+mathics:
+mathics: http://www.mathics.org/
+mathics:
+mathics:
+mathics: