aboutsummaryrefslogtreecommitdiff
path: root/academic/sage
diff options
context:
space:
mode:
authorChristopher L Duston <christopher.duston@protonmail.com>2020-04-04 05:54:33 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-04 05:54:33 +0700
commit1dabc2309a076fb9cfa87b841f0643d472b801f5 (patch)
tree53b66104c19b066846bdca99f972559c4c866f64 /academic/sage
parentb12ac2fb7d3a034f5098960060a839a9a734f775 (diff)
academic/sage: Fix build on x86.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/sage')
-rw-r--r--academic/sage/README8
-rw-r--r--academic/sage/sage.SlackBuild20
2 files changed, 26 insertions, 2 deletions
diff --git a/academic/sage/README b/academic/sage/README
index ab5e912702cf3..6c308c8ccee4b 100644
--- a/academic/sage/README
+++ b/academic/sage/README
@@ -15,7 +15,13 @@ 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.
+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
+
+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.
diff --git a/academic/sage/sage.SlackBuild b/academic/sage/sage.SlackBuild
index 7049bb6d27362..2ee5996dc9b00 100644
--- a/academic/sage/sage.SlackBuild
+++ b/academic/sage/sage.SlackBuild
@@ -35,6 +35,16 @@ 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
+####
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -69,7 +79,13 @@ 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:
+# Test Fix - this did not work.
+# sed -i "s|/lib|/lib${LIBDIRSUFFIX}|" build/pkgs/iml/spkg-install
+
+
+
+# The docs do not build correctly, so instead of make, do the following:
+LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
make build
# test all examples in the documentation (over 93,000 line of input)
@@ -114,6 +130,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