diff options
Diffstat (limited to 'academic/sage/sage.SlackBuild')
-rw-r--r-- | academic/sage/sage.SlackBuild | 63 |
1 files changed, 44 insertions, 19 deletions
diff --git a/academic/sage/sage.SlackBuild b/academic/sage/sage.SlackBuild index 7049bb6d27..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 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:-9.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,17 @@ 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 - -# The docs do not build correctly, so instead of make, do: +# 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) @@ -112,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 @@ -125,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 |