diff options
Diffstat (limited to 'libraries/lapack/lapack.SlackBuild')
-rw-r--r-- | libraries/lapack/lapack.SlackBuild | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/libraries/lapack/lapack.SlackBuild b/libraries/lapack/lapack.SlackBuild index 6b7dd871c9..03c28a6630 100644 --- a/libraries/lapack/lapack.SlackBuild +++ b/libraries/lapack/lapack.SlackBuild @@ -1,29 +1,29 @@ #!/bin/sh -# Slackware build script for BLAS and LAPACK libraries. +# Slackware build script for LAPACK libraries. # Written by Eugene Suter <easuter@gmail.com> - -# Licence: Read the LICENCE file in the tarball +# Thanks to Pablo Santamaria <pablosantamaria@gmail.com> for fixing the +# shared library version problem (major version consistency between updates) PRGNAM=lapack -VERSION=${VERSION:-3.2.1} +VERSION=${VERSION:-3.2.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: +MAJOR=$(echo $VERSION | cut -d. -f1) + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then @@ -47,7 +47,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tgz +tar xvf $CWD/$PRGNAM.tgz cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -66,21 +66,24 @@ make OPTS="$SLKCFLAGS" NOOPT="$NOOPTFLAGS" lapacklib # Build dynamic libraries (it would be really nice for the netlib folks to # include this already...) -#LAPACK only. We assume blas is already insralled in /usr/lib +# LAPACK only. We assume blas is already installed in /usr/lib${LIBDIRSUFFIX} ( mkdir shared_$PRGNAM cd shared_$PRGNAM ar -x ../lib$PRGNAM.a - gcc -fPIC -lgfortran -shared *.o -Wl,-soname,$PRGNAM.so.$VERSION \ - -o lib$PRGNAM.so.$VERSION + gcc -fPIC -lgfortran -shared *.o -W1,-soname,lib$PRGNAM.so.$MAJOR \ + -o lib$PRGNAM.so.$VERSION ) mkdir -p $PKG/usr/lib${LIBDIRSUFFIX} cp lib$PRGNAM.a $PKG/usr/lib${LIBDIRSUFFIX} cp shared_$PRGNAM/lib$PRGNAM.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX} -( cd $PKG/usr/lib${LIBDIRSUFFIX} - chmod 755 lib$PRGNAM.so.$VERSION - ln -s lib$PRGNAM.so.$VERSION lib$PRGNAM.so + +( + cd $PKG/usr/lib${LIBDIRSUFFIX} + chmod 755 *.so.* + ln -s lib$PRGNAM.so.$VERSION lib$PRGNAM.so.$MAJOR + ln -s lib$PRGNAM.so.$MAJOR lib$PRGNAM.so ) find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ |