aboutsummaryrefslogtreecommitdiff
path: root/academic/sundials/sundials.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/sundials/sundials.SlackBuild')
-rw-r--r--academic/sundials/sundials.SlackBuild18
1 files changed, 14 insertions, 4 deletions
diff --git a/academic/sundials/sundials.SlackBuild b/academic/sundials/sundials.SlackBuild
index fcf76299aafe6..67f79222913e9 100644
--- a/academic/sundials/sundials.SlackBuild
+++ b/academic/sundials/sundials.SlackBuild
@@ -2,7 +2,9 @@
# Slackware build script for sundials
-# Copyright 2014 R. S. Ananda Murthy, Mysore, India
+# Copyright 2014 R. S. Ananda Murthy, Mysuru, India (rsamurti@gmail.com)
+# Patch for detecting KLU library developed by Guan Xin (guanx.bac@gmail.com)
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=sundials
-VERSION=${VERSION:-3.1.0}
+VERSION=${VERSION:-3.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,6 +56,12 @@ else
LIBDIRSUFFIX=""
fi
+if [ -f /usr/include/suitesparse/klu.h ]; then
+ KLU="-DKLU_ENABLE=BOOL:ON -DKLU_INCLUDE_DIR=/usr/include/suitesparse -DKLU_LIBRARY_DIR=/usr/lib$LIBDIRSUFFIX"
+else
+ KLU=""
+fi
+
set -e
rm -rf $PKG
@@ -81,7 +89,9 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DBUILD_SHARED_LIBS=BOOL:ON \
- -DCMAKE_BUILD_TYPE=Release ..
+ -DCMAKE_BUILD_TYPE=Release \
+ $KLU \
+ ..
make
make install DESTDIR=$PKG
cd ..
@@ -90,7 +100,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README INSTALL_GUIDE.pdf LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md INSTALL_GUIDE.pdf LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mv $PKG/usr/examples $PKG/usr/doc/$PRGNAM-$VERSION