summaryrefslogtreecommitdiff
path: root/academic/metis/metis.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2010-08-24 00:15:01 -0400
committerErik Hanson <erik@slackbuilds.org>2010-08-29 15:32:11 -0500
commit1fdd97021286188c2ec47939c0c2a0727c13ab10 (patch)
tree6a091a4fe8540c520ecdcc924f8ba46e33dcdf87 /academic/metis/metis.SlackBuild
parentd115764b92914556077db689dbf167404cf9070f (diff)
downloadslackbuilds-1fdd97021286188c2ec47939c0c2a0727c13ab10.tar.gz
academic/metis: Added (matrix ordering)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'academic/metis/metis.SlackBuild')
-rw-r--r--academic/metis/metis.SlackBuild82
1 files changed, 82 insertions, 0 deletions
diff --git a/academic/metis/metis.SlackBuild b/academic/metis/metis.SlackBuild
new file mode 100644
index 0000000000..5416295ed9
--- /dev/null
+++ b/academic/metis/metis.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# Slackware build script for METIS
+# Written by Kyle Guinn <elyk03@gmail.com>
+
+PRGNAM=metis
+VERSION=${VERSION:-4.0.1}
+SRCVERSION=${SRCVERSION:-4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="CHANGES FILES INSTALL VERSION"
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVERSION
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
+cd $PRGNAM-$SRCVERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-st .
+
+# The C standard reserves all names that begin with underscores. Metis
+# ignores this and now we have naming conflicts with glibc. Right now only
+# __log2 conflicts, but this should fix the problem for good.
+sed -i 's/__/metis__/g' Lib/rename.h
+
+patch -p1 < $CWD/autotoolize.diff
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}