|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
# Slackware build script for octave |
|
|
# Slackware build script for octave |
|
|
|
|
|
|
|
|
# Copyright 2012-2015 Kyle Guinn <elyk03@gmail.com>, USA |
|
|
|
|
|
|
|
|
# Copyright 2012-2016 Kyle Guinn <elyk03@gmail.com>, USA |
|
|
# All rights reserved. |
|
|
# All rights reserved. |
|
|
# |
|
|
# |
|
|
# Redistribution and use of this script, with or without modification, is |
|
|
# Redistribution and use of this script, with or without modification, is |
|
|
@ -23,13 +23,13 @@ |
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
|
|
|
|
|
|
PRGNAM=octave |
|
|
PRGNAM=octave |
|
|
VERSION=${VERSION:-4.0.0} |
|
|
|
|
|
|
|
|
VERSION=${VERSION:-4.2.0} |
|
|
BUILD=${BUILD:-1} |
|
|
BUILD=${BUILD:-1} |
|
|
TAG=${TAG:-_SBo} |
|
|
TAG=${TAG:-_SBo} |
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then |
|
|
if [ -z "$ARCH" ]; then |
|
|
case "$(uname -m)" in |
|
|
case "$(uname -m)" in |
|
|
i?86) ARCH=i486 ;; |
|
|
|
|
|
|
|
|
i?86) ARCH=i586 ;; |
|
|
arm*) ARCH=arm ;; |
|
|
arm*) ARCH=arm ;; |
|
|
*) ARCH=$(uname -m) ;; |
|
|
*) ARCH=$(uname -m) ;; |
|
|
esac |
|
|
esac |
|
|
@ -45,6 +45,9 @@ DOCS="AUTHORS BUGS CITATION COPYING ChangeLog INSTALL* NEWS README" |
|
|
if [ "$ARCH" = "i486" ]; then |
|
|
if [ "$ARCH" = "i486" ]; then |
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686" |
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686" |
|
|
LIBDIRSUFFIX="" |
|
|
LIBDIRSUFFIX="" |
|
|
|
|
|
elif [ "$ARCH" = "i586" ]; then |
|
|
|
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686" |
|
|
|
|
|
LIBDIRSUFFIX="" |
|
|
elif [ "$ARCH" = "i686" ]; then |
|
|
elif [ "$ARCH" = "i686" ]; then |
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686" |
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686" |
|
|
LIBDIRSUFFIX="" |
|
|
LIBDIRSUFFIX="" |
|
|
@ -59,21 +62,20 @@ fi |
|
|
# TODO: ImageMagick 6.8.6-10 from Slackware 14.1 is not compatible. |
|
|
# TODO: ImageMagick 6.8.6-10 from Slackware 14.1 is not compatible. |
|
|
# Newer versions might work, so try offering that alternative again later. |
|
|
# Newer versions might work, so try offering that alternative again later. |
|
|
|
|
|
|
|
|
# umfpack.h includes amd.h, which may be installed outside of the standard |
|
|
|
|
|
# search dirs if you use the SBo packages. This ensures UMFPACK is found. |
|
|
|
|
|
WITH_AMD_INCLUDEDIR=${WITH_AMD_INCLUDEDIR:-/usr/include/amd} |
|
|
|
|
|
|
|
|
|
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
rm -rf $PKG |
|
|
rm -rf $PKG |
|
|
mkdir -p $TMP $PKG $OUTPUT |
|
|
mkdir -p $TMP $PKG $OUTPUT |
|
|
cd $TMP |
|
|
cd $TMP |
|
|
rm -rf $PRGNAM-$VERSION |
|
|
rm -rf $PRGNAM-$VERSION |
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz |
|
|
|
|
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.lz |
|
|
cd $PRGNAM-$VERSION |
|
|
cd $PRGNAM-$VERSION |
|
|
chown -R root:root . |
|
|
chown -R root:root . |
|
|
chmod -R u+w,go-w,a+rX-st . |
|
|
chmod -R u+w,go-w,a+rX-st . |
|
|
|
|
|
|
|
|
|
|
|
patch -p1 < $CWD/patches/atlas-lib-rename.diff |
|
|
|
|
|
autoreconf -vif |
|
|
|
|
|
|
|
|
# Avoid rebuilding the documentation by making stamp-vti newer than its |
|
|
# Avoid rebuilding the documentation by making stamp-vti newer than its |
|
|
# dependencies (in particular ./configure, which we may need to patch). |
|
|
# dependencies (in particular ./configure, which we may need to patch). |
|
|
# If you live far enough east or west that the date contained in version.texi |
|
|
# If you live far enough east or west that the date contained in version.texi |
|
|
@ -84,9 +86,6 @@ chmod -R u+w,go-w,a+rX-st . |
|
|
# targets in Octave 3.8.1. Maybe it works with a recent version of TeXLive? |
|
|
# targets in Octave 3.8.1. Maybe it works with a recent version of TeXLive? |
|
|
find . -name stamp-vti -exec touch {} + |
|
|
find . -name stamp-vti -exec touch {} + |
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
FFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
./configure \ |
|
|
./configure \ |
|
|
--prefix=/usr \ |
|
|
--prefix=/usr \ |
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \ |
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \ |
|
|
@ -97,8 +96,10 @@ FFLAGS="$SLKCFLAGS" \ |
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \ |
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \ |
|
|
--disable-dependency-tracking \ |
|
|
--disable-dependency-tracking \ |
|
|
--enable-strict-warning-flags \ |
|
|
--enable-strict-warning-flags \ |
|
|
--with-amd-includedir=$WITH_AMD_INCLUDEDIR \ |
|
|
|
|
|
--build=$ARCH-slackware-linux |
|
|
|
|
|
|
|
|
--build=$ARCH-slackware-linux \ |
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
FFLAGS="$SLKCFLAGS" \ |
|
|
|
|
|
|
|
|
make |
|
|
make |
|
|
make check |
|
|
make check |
|
|
|