summaryrefslogtreecommitdiffstats
path: root/libraries/xblas/xblas.SlackBuild
diff options
context:
space:
mode:
author Kyle Guinn <elyk03@gmail.com>2017-03-12 00:19:18 +0000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2017-03-18 06:58:16 +0700
commit6cc63067fc86e85e22b911c80010b4778b311014 (patch)
treee955a42371a7d5fbea3ab6c07c0346cdee28eae6 /libraries/xblas/xblas.SlackBuild
parent27dbafc3552afbff2e4c30fd57431f8f1f92c7be (diff)
downloadslackbuilds-6cc63067fc86e85e22b911c80010b4778b311014.tar.gz
slackbuilds-6cc63067fc86e85e22b911c80010b4778b311014.tar.xz
libraries/xblas: Added (Extra Precise BLAS).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'libraries/xblas/xblas.SlackBuild')
-rw-r--r--libraries/xblas/xblas.SlackBuild108
1 files changed, 108 insertions, 0 deletions
diff --git a/libraries/xblas/xblas.SlackBuild b/libraries/xblas/xblas.SlackBuild
new file mode 100644
index 0000000000..edd20a8cfe
--- /dev/null
+++ b/libraries/xblas/xblas.SlackBuild
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Slackware build script for XBLAS
+
+# Copyright 2017 Kyle Guinn <elyk03@gmail.com>, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=xblas
+VERSION=${VERSION:-1.0.248}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="LICENSE README* doc/report.ps"
+
+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=""
+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-$VERSION
+tar xvf $CWD/$PRGNAM.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go-w,a+rX-st .
+
+# Ignore the nice generated Makefiles and use automake for the convenience of
+# creating a shared lib and installing everything to the right directories.
+# Also generates a pkgconfig file. Must run `make` from the src subdirectory.
+# Ideally the Makefile generation would generate automake input files instead.
+patch -p1 < $CWD/patches/automake.diff
+autoreconf -vif
+
+./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-static \
+ --disable-dependency-tracking \
+ --build=$ARCH-slackware-linux \
+ CFLAGS="$SLKCFLAGS" \
+ FCFLAGS="$SLKCFLAGS" \
+
+make -C src
+make -C src install-strip DESTDIR=$PKG
+
+find $PKG/usr/lib${LIBDIRSUFFIX} -name '*.la' -delete
+
+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}