diff options
Diffstat (limited to 'academic/octave/octave.SlackBuild')
-rw-r--r-- | academic/octave/octave.SlackBuild | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/academic/octave/octave.SlackBuild b/academic/octave/octave.SlackBuild index b0424312d4..7fba88f533 100644 --- a/academic/octave/octave.SlackBuild +++ b/academic/octave/octave.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for octave -# Copyright 2012-2019 Kyle Guinn <elyk03@gmail.com> +# Copyright 2012-2024 Kyle Guinn <elyk03@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,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=octave -VERSION=${VERSION:-5.1.0} +VERSION=${VERSION:-8.4.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$(uname -m)" in @@ -35,17 +38,18 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM-$VERSION +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} DOCS="AUTHORS BUGS CITATION COPYING ChangeLog INSTALL* NEWS README" -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i586" ]; then +if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then @@ -60,13 +64,17 @@ else fi # Use GraphicsMagick by default. Fall back on ImageMagick from the full -# Slackware install if it's not present. Requires a patch for this bug: -# https://savannah.gnu.org/bugs/?49653 +# Slackware install if it's not present. # # GraphicsMagick is default due to the fact that the Octave devs mainly test # with that, and went several releases before noticing ImageMagick was broken. # If ImageMagick doesn't work, install GraphicsMagick, or set MAGICK="". -MAGICK=${MAGICK-GraphicsMagick} +# +# TODO: ImageMagick may no longer be compatible. The --with-magick argument +# should be the name of a pkg-config file. Documentation suggests +# "ImageMagick++" which does not exist. "ImageMagick" and "Magick++" exist; +# the former does not pass configure checks, the latter fails at compile time. +MAGICK=${MAGICK-GraphicsMagick++} if [ -n "$MAGICK" ] && ! pkg-config --exists $MAGICK; then MAGICK=ImageMagick fi @@ -74,12 +82,6 @@ if [ -n "$MAGICK" ]; then MAGICK="--with-magick=$MAGICK" fi -# Allow forcing a particular version of Qt. Set QT=4 or QT=5. -# If unset, Octave will decide, and it prefers version 5. -if [ -n "$QT" ]; then - QT="--with-qt=$QT" -fi - set -e rm -rf $PKG @@ -91,8 +93,6 @@ cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go-w,a+rX-st . -patch -p1 < $CWD/patches/imagemagick.diff # https://savannah.gnu.org/bugs/?49653 -patch -p1 < $CWD/patches/qt4opengl.diff # https://savannah.gnu.org/bugs/?55735 patch -p1 < $CWD/patches/atlas-lib-rename.diff autoreconf -vif @@ -101,30 +101,27 @@ autoreconf -vif # If you live far enough east or west that the date contained in version.texi # does not match that file's timestamp when printed accounting for your # timezone, then the docs get rebuilt with your local date. -# -# The TeX environment in Slackware 14.1 fails to build the DVI and PDF -# targets in Octave 3.8.1. Maybe it works with a recent version of TeXLive? find . -name stamp-vti -exec touch {} + ./configure \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libdir=\${exec_prefix}/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ + --mandir=\${prefix}/man \ + --infodir=\${prefix}/info \ + --docdir=\${prefix}/doc/$PRGNAM-$VERSION \ --disable-dependency-tracking \ --with-openssl=auto \ ${MAGICK} \ - ${QT} \ --build=$ARCH-slackware-linux \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ FFLAGS="$SLKCFLAGS" \ make -make check +# TODO: May fail if not all optional deps are installed (gl2ps in particular). +#make check make install-strip DESTDIR=$PKG find $PKG/usr/lib${LIBDIRSUFFIX} -name '*.la' -delete @@ -143,4 +140,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |