summaryrefslogtreecommitdiff
path: root/academic/octave/octave.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/octave/octave.SlackBuild')
-rw-r--r--academic/octave/octave.SlackBuild27
1 files changed, 18 insertions, 9 deletions
diff --git a/academic/octave/octave.SlackBuild b/academic/octave/octave.SlackBuild
index 2747d1222d..744a8dc5ea 100644
--- a/academic/octave/octave.SlackBuild
+++ b/academic/octave/octave.SlackBuild
@@ -2,11 +2,10 @@
# Slackware build script for octave
# Written by Kyle Guinn <elyk03@gmail.com>
-# HDF5 support by Aleksandar Samardzic <asamardzic@matf.bg.ac.yu>
PRGNAM="octave"
-VERSION=${VERSION:-3.2.4}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.4.0}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -22,7 +21,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM-$VERSION
OUTPUT=${OUTPUT:-/tmp}
-DOCS="BUGS COPYING ChangeLog* INSTALL* NEWS* PROJECTS README* ROADMAP SENDING-PATCHES"
+DOCS="AUTHORS BUGS COPYING ChangeLog* INSTALL* NEWS* PROJECTS README*"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -49,6 +48,20 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-st .
+# Several configure checks look for headers in the 'amd' directory
+# instead of 'cxsparse', 'camd', 'colamd', and 'ccolamd' directories
+# as liboctave/oct-sparse.h expects. Fix the typos and reconfigure.
+# Note that camd.h doesn't appear to be included anywhere, but is used
+# to determine if the CAMD library is present.
+sed -i -e 's| amd/cs\.h| cxsparse/cs.h|' \
+ -e 's| amd/camd\.h| camd/camd.h|' \
+ -e 's| amd/colamd\.h| colamd/colamd.h|' \
+ -e 's| amd/ccolamd\.h| ccolamd/ccolamd.h|' configure.ac
+autoreconf -vif
+# If you have amd.h in some non-default location (e.g. /usr/include/amd/amd.h)
+# now the check for umfpack.h will fail because umfpack.h includes "amd.h"
+# instead of "amd/amd.h". The --with-amd-includedir option below fixes this.
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
FFLAGS="$SLKCFLAGS" \
@@ -63,16 +76,12 @@ FFLAGS="$SLKCFLAGS" \
--enable-shared \
--disable-static \
--enable-strict-warning-flags \
+ --with-amd-includedir=/usr/include/amd \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
-# install-strip doesn't strip the files in usr/lib/octave-$VERSION,
-# so leave this in for now.
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
find $PKG/usr/man -type f -exec gzip -9 {} \;
rm -f $PKG/usr/info/dir