summaryrefslogtreecommitdiffstats
path: root/academic/sage/sage.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/sage/sage.SlackBuild')
-rw-r--r--academic/sage/sage.SlackBuild39
1 files changed, 26 insertions, 13 deletions
diff --git a/academic/sage/sage.SlackBuild b/academic/sage/sage.SlackBuild
index 8e6e47ae47..6cb41edaa4 100644
--- a/academic/sage/sage.SlackBuild
+++ b/academic/sage/sage.SlackBuild
@@ -2,7 +2,9 @@
# Slackware build script for sage
# Written by Jack Maddox <jack@auburn.edu>
-# Currently maintained by Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Currently maintained by Christopher L Duston <christopher.duston@protonmail.com>
+# Last update June 2020.
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=sage
-VERSION=${VERSION:-8.0}
+VERSION=${VERSION:-9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,8 +37,22 @@ if [ -z "$ARCH" ]; then
esac
fi
+#### These lines are to ensure the build can happen on multilib systems.
+if [ "$ARCH" = "i586" ]; then
+LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+LIBDIRSUFFIX="64"
+else
+LIBDIRSUFFIX=""
+fi
+####
+
+# SAGE_ROOT/bin/sage points to the build directory, which can't be
+# in the /tmp folder if we want it to remain after installation.
+# So we'll put it in /var/tmp. Maybe just sticking it in /usr is better.
+
CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
+TMP=${TMP:-/var/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -60,16 +76,11 @@ find -L . \
mkdir -p $PKG/$SAGEROOT $PKG/usr/share/{applications,pixmaps} \
$PKG/usr/doc/$PRGNAM-$VERSION $PKG/etc/profile.d
-# Added freeBSD patch to build as root, thanks to Heinz for pointing it
-patch -p0 < $CWD/pynac.patch
-
-# Added more patch to build as root.
-patch -p1 < $CWD/sage-build-root.patch
-
-# Thanks to Philip Lacroix <slackph@posteo.de>
-rm build/pkgs/python2/patches/sys_path_security-issue_16202.patch
-
-make
+# The docs do not build correctly, so instead of make, do the following:
+LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
+ ./configure \
+ --enable-build-as-root
+make build
# test all examples in the documentation (over 93,000 line of input)
[ "${TEST:-no}" = "yes" ] && make test
@@ -113,6 +124,8 @@ fi
sed "s%SAGEROOT%${SAGEROOT}%" $CWD/$PRGNAM-notebook.desktop > $PKG/usr/share/applications/$PRGNAM-notebook.desktop
cp src/doc/common/themes/sage/static/sageicon.png $PKG/usr/share/pixmaps/
+# Put a line here which *actually* adds sage to the path
+
# install sagetex to a location that is accessible to the system TeX installation
cp -a local/share/texmf $PKG/usr/share