summaryrefslogtreecommitdiffstats
path: root/academic/sage
diff options
context:
space:
mode:
Diffstat (limited to 'academic/sage')
-rw-r--r--academic/sage/README20
-rw-r--r--academic/sage/doinst.sh2
-rw-r--r--academic/sage/pynac.patch10
-rw-r--r--academic/sage/sage-build-root.patch24
-rw-r--r--academic/sage/sage.SlackBuild66
-rw-r--r--academic/sage/sage.info10
6 files changed, 67 insertions, 65 deletions
diff --git a/academic/sage/README b/academic/sage/README
index c69694fb19..6772d6b5d3 100644
--- a/academic/sage/README
+++ b/academic/sage/README
@@ -11,10 +11,20 @@ of a full Slackware installation).
Building sage requires >12GB of disk space, so you may need to
redefine $TMP and/or $OUTPUT.
+Note that the build will likely spit out many "zero length file" errors,
+which can safely be ignored.
-See README.BUILDOPTS for additional (important) information about
-build options and such.
+See README.BUILDOPTS for additional (important) information
+about build options and such. Specifically, if you do not move the
+installation directory via a specification of SAGEROOT, you may need
+to do something like
-NOTE:
-If you have ATOM processors, you need to run this command prior building:
-export OPENBLAS_CONFIGURE="TARGET=ATOM"
+source /etc/profile.d/sage.ch
+
+so make sure the binary is in your path.
+
+This package does not include the doc files. Those can be found at
+doc.sagemath.org.
+
+NOTE: If you have ATOM processors, you need to run this command prior
+building: export OPENBLAS_CONFIGURE="TARGET=ATOM"
diff --git a/academic/sage/doinst.sh b/academic/sage/doinst.sh
index 272b54cdf2..afc6c7588b 100644
--- a/academic/sage/doinst.sh
+++ b/academic/sage/doinst.sh
@@ -4,7 +4,7 @@ if [ -x usr/share/texmf/bin/texhash ]; then
fi
# run sage at least once as root after moving it to a new location
-echo "exit" | SAGEROOT/sage
+#echo "exit" | SAGEROOT/sage
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
diff --git a/academic/sage/pynac.patch b/academic/sage/pynac.patch
deleted file mode 100644
index c8a0cdc26b..0000000000
--- a/academic/sage/pynac.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- build/pkgs/pynac/spkg-install.orig 2014-08-11 20:52:14.220516400 +0700
-+++ build/pkgs/pynac/spkg-install 2014-08-11 20:52:27.906551659 +0700
-@@ -31,6 +31,7 @@
-
- build_pynac()
- {
-+ chmod -R g-w ${PYNACDIR}
- cd ${PYNACDIR}
- PKG_CONFIG_PATH=${SAGE_LOCAL}/lib/pkgconfig; export PKG_CONFIG_PATH
- ./configure --disable-static --prefix=${SAGE_LOCAL} --libdir="$SAGE_LOCAL/lib"
diff --git a/academic/sage/sage-build-root.patch b/academic/sage/sage-build-root.patch
deleted file mode 100644
index 0daaca9c33..0000000000
--- a/academic/sage/sage-build-root.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- sage-6.10/configure.old 2015-12-19 08:15:37.404497471 +0700
-+++ sage-6.10/configure 2015-12-19 08:15:55.691461292 +0700
-@@ -2965,21 +2965,6 @@
-
- #---------------------------------------------------------
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for root user" >&5
--$as_echo_n "checking for root user... " >&6; }
--
--uid=`id -u`
--if test "x$uid" == "x0"; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
-- as_fn_error $? "You cannot build Sage as root, switch to an unpriviledged user" "$LINENO" 5
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--
--fi;
--
--
- # Check whether we are on a supported platform
- # Make sure we can run config.sub.
- $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
diff --git a/academic/sage/sage.SlackBuild b/academic/sage/sage.SlackBuild
index 8e6e47ae47..d70c643c99 100644
--- a/academic/sage/sage.SlackBuild
+++ b/academic/sage/sage.SlackBuild
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# 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 2023.
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=sage
-VERSION=${VERSION:-8.0}
+VERSION=${VERSION:-10.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,8 +40,29 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
+#### These lines are to ensure the build can happen on multilib systems.
+if [ "$ARCH" = "i586" ] || [ "$ARCH" = "i686" ]; 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.
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/var/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -53,23 +79,18 @@ 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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
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
@@ -111,10 +132,15 @@ if [ "${INSTALLSCRIPTS:-no}" = "yes" ]; then
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/
+#cp src/doc/common/themes/sage/static/sageicon.png $PKG/usr/share/pixmaps/
+
+# Put a line here which *actually* adds sage to the path
+# Gotta source that .sh script, that works fine (see README)
+
# install sagetex to a location that is accessible to the system TeX installation
-cp -a local/share/texmf $PKG/usr/share
+cp -a local/var/lib/sage/venv-python3.9/share/texmf $PKG/usr/share
+
cp -a COPYING.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -124,4 +150,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
sed "s%SAGEROOT%${SAGEROOT}%" $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/academic/sage/sage.info b/academic/sage/sage.info
index 24c282defa..70070f617e 100644
--- a/academic/sage/sage.info
+++ b/academic/sage/sage.info
@@ -1,10 +1,10 @@
PRGNAM="sage"
-VERSION="8.0"
+VERSION="10.1"
HOMEPAGE="http://www.sagemath.org"
-DOWNLOAD="http://mirrors.mit.edu/sage/src/sage-8.0.tar.gz"
-MD5SUM="93bdd128991e9144c4b137d3d6655065"
+DOWNLOAD="http://mirrors.mit.edu/sage/src/sage-10.1.tar.gz"
+MD5SUM="53a3ea057086eca87102eedb4efa9722"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere.com"
+MAINTAINER="Christopher L Duston"
+EMAIL="christopher.duston@protonmail.com"