summaryrefslogtreecommitdiff
path: root/academic/metis/metis.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2016-11-18 22:01:49 -0600
committerDavid Spencer <idlemoor@slackbuilds.org>2016-12-04 19:28:56 +0000
commite43491d02aa85d5d32902512855465f8c54c0821 (patch)
treef990cf69ef11834bbead6ecccfb86d74726abf3b /academic/metis/metis.SlackBuild
parent25925df9a2d4aaf4c1a997728e8566038e943280 (diff)
downloadslackbuilds-e43491d02aa85d5d32902512855465f8c54c0821.tar.gz
academic/metis: Updated for version 5.1.0.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'academic/metis/metis.SlackBuild')
-rw-r--r--academic/metis/metis.SlackBuild57
1 files changed, 30 insertions, 27 deletions
diff --git a/academic/metis/metis.SlackBuild b/academic/metis/metis.SlackBuild
index b8ba91ac58..5bd73be964 100644
--- a/academic/metis/metis.SlackBuild
+++ b/academic/metis/metis.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for METIS
-# Copyright 2015 Kyle Guinn <elyk03@gmail.com>, USA
+# Copyright 2015-2016 Kyle Guinn <elyk03@gmail.com>, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=metis
-VERSION=${VERSION:-4.0.3}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-5.1.0}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$(uname -m) ;;
esac
@@ -40,11 +40,14 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM-$VERSION
OUTPUT=${OUTPUT:-/tmp}
-DOCS="CHANGES FILES INSTALL LICENSE VERSION"
+DOCS="Changelog LICENSE.txt manual/manual.pdf"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
@@ -57,7 +60,7 @@ else
fi
# Recommended by SuiteSparse
-SLKCFLAGS="$SLKCFLAGS -fexceptions -D_FILE_OFFSET_BITS=64"
+SLKCFLAGS="$SLKCFLAGS -fexceptions"
set -e
@@ -70,27 +73,27 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
-patch -p1 < $CWD/autotoolize.diff
-autoreconf -vif
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-shared \
- --disable-dependency-tracking \
- --build=$ARCH-slackware-linux
-
-make
-make check
-make install-strip DESTDIR=$PKG
-
-find $PKG/usr/lib${LIBDIRSUFFIX} -name '*.la' -delete
+# Fix compiler flags and directories.
+# Fix overlinking.
+# Respect CMake's BUILD_SHARED_LIBS variable.
+# Add a pkg-config file.
+patch -p1 < $CWD/patches/cmake.diff
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_SKIP_RPATH=YES \
+ -DCMAKE_RULE_MESSAGES=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE \
+ -DOPENMP=ON \
+ ..
+ make install/strip DESTDIR=$PKG
+cd ..
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION