Browse Source

l/libatlas: Upgraded to atlas-3.8.3 and lapack-3.2.1.

slackware-14.2
Damien Goutte-Gattat 12 years ago
parent
commit
6f93111950
  1. 1
      l/libatlas/atlas3.8.2.tar.gz.sha1
  2. 1
      l/libatlas/atlas3.8.3.tar.gz.sha1
  3. 1
      l/libatlas/lapack-3.1.1.tgz.sha1
  4. 1
      l/libatlas/lapack-3.2.1.tgz.sha1
  5. 97
      l/libatlas/libatlas.SlackBuild

1
l/libatlas/atlas3.8.2.tar.gz.sha1

@ -1 +0,0 @@
c628bc1827a309dbac2957bf4efba8da4573adea atlas3.8.2.tar.gz

1
l/libatlas/atlas3.8.3.tar.gz.sha1

@ -0,0 +1 @@
5f2787f6a52821ee02f39d8addacc5feb074dd3a atlas3.8.3.tar.gz

1
l/libatlas/lapack-3.1.1.tgz.sha1

@ -1 +0,0 @@
be1a3d53d761935703a7be88c3dd1164daa79554 lapack-3.1.1.tgz

1
l/libatlas/lapack-3.2.1.tgz.sha1

@ -0,0 +1 @@
c75223fdef3258c461370af5d2b889d580d7f38a lapack-3.2.1.tgz

97
l/libatlas/libatlas.SlackBuild

@ -1,52 +1,55 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" <dgouttegattat at incenp.org>
# Copyright (C) 2008,2009 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications, is
# permitted provided that the following conditions are met:
# Redistribution and use of this script, with or without modifications,
# 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.
# 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.
# 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.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest ATLAS sourcecode is available at:
# http://math-atlas.sourceforge.net/
# <http://math-atlas.sourceforge.net/>.
#
# Latest Lapack sourcecode is available at:
# http://www.netlib.org/lapack/
# <http://www.netlib.org/lapack/>.
# Source packages infos
ATLAS_NAMESRC=${ATLAS_NAMESRC:-atlas}
ATLAS_VERSION=${ATLAS_VERSION:-3.8.2}
ATLAS_VERSION=${ATLAS_VERSION:-3.8.3}
ATLAS_ARCHIVE=${ATLAS_ARCHIVE:-${ATLAS_NAMESRC}$ATLAS_VERSION.tar.gz}
ATLAS_URL=${ATLAS_URL:-http://garr.dl.sourceforge.net/sourceforge/math-atlas}
LAPACK_NAMESRC=${LAPACK_NAMESRC:-lapack}
LAPACK_VERSION=${LAPACK_VERSION:-3.1.1}
LAPACK_VERSION=${LAPACK_VERSION:-3.2.1}
LAPACK_ARCHIVE=${LAPACK_ARCHIVE:-$LAPACK_NAMESRC-$LAPACK_VERSION.tgz}
LAPACK_URL=${LAPACK_URL:-http://www.netlib.org/lapack}
# Built package infos
NAMETGZ=${NAMETGZ:-libatlas}
# Build infos
NAMEPKG=${NAMEPKG:-libatlas}
VERSION=${VERSION:-$ATLAS_VERSION}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -61,21 +64,34 @@ if [ ! -d $TMP ]; then
exit 1
fi
# Compilation settings
MHZ=$(sed -nre 's/^cpu MHz\s+: ([0-9]+)\.[0-9]{3}/\1/ p' /proc/cpuinfo | \
head -n 1)
case "$ARCH" in
x86_64)
BITS=64
LIBDIRSUFFIX=64
;;
*)
BITS=32
LIBDIRSUFFIX=""
;;
esac
# Get and verify the source archives
if [ ! -r $ATLAS_ARCHIVE ]; then
wget "$ATLAS_URL/$ATLAS_ARCHIVE"
wget -c -O $ATLAS_ARCHIVE.part "$ATLAS_URL/$ATLAS_ARCHIVE"
mv $ATLAS_ARCHIVE.part $ATLAS_ARCHIVE
fi
if [ ! -r $LAPACK_ARCHIVE ]; then
wget "$LAPACK_URL/$LAPACK_ARCHIVE"
wget -c -O $LAPACK_ARCHIVE.part "$LAPACK_URL/$LAPACK_ARCHIVE"
mv $LAPACK_ARCHIVE.part $LAPACK_ARCHIVE
fi
sha1sum -c $ATLAS_ARCHIVE.sha1
sha1sum -c $LAPACK_ARCHIVE.sha1
ATLAS_DIRNAME=$(tar ft $ATLAS_ARCHIVE | head -n 1 | cut -d / -f 1)
LAPACK_DIRNAME=$(tar ft $LAPACK_ARCHIVE | head -n 1 | cut -d / -f 1)
# Determine the CPU's clock frequency
MHZ=$(sed -nre 's/^cpu MHz\s+: ([0-9]+)\.[0-9]{3}/\1/ p' /proc/cpuinfo | head -n 1)
# Extract the archives
cd $TMP
tar xf $CWD/$LAPACK_ARCHIVE
@ -83,7 +99,7 @@ tar xf $CWD/$ATLAS_ARCHIVE
# Build the temporary Lapack library
cd $LAPACK_DIRNAME
cp $CWD/make.inc make.inc
sed "s/-m32/-m$BITS/" $CWD/make.inc > make.inc
make lib
# Build the ATLAS library (static)
@ -91,30 +107,25 @@ mkdir -p $TMP/$ATLAS_DIRNAME/build
cd $TMP/$ATLAS_DIRNAME/build
../configure \
--prefix=/usr \
-b 32 -D c -DPentiumCPS=$MHZ -Fa alg -fPIC \
--with-netlib-lapack=$TMP/$LAPACK_DIRNAME/lapack_LINUX.a
--with-netlib-lapack=$TMP/$LAPACK_DIRNAME/lapack_LINUX.a \
-b $BITS -D c -DPentiumCPS=$MHZ -Fa alg -fPIC
make
make install DESTDIR=$PKG/usr
if [ "x$ARCH" = xx86_64 ]; then
mv $PKG/usr/lib $PKG/usr/lib64
fi
# Build, install and strip the shared libraries
cd $TMP/$ATLAS_DIRNAME/build/lib
make shared
install -s -m 0644 *.so $PKG/usr/lib
strip --strip-unneeded $PKG/usr/lib/*.so
# Install and compress man pages
mkdir -p $PKG/usr/man/manl
find $TMP/$LAPACK_DIRNAME/manpages -type f -name '*.l' \
-exec install -m 644 '{}' $PKG/usr/man/manl \;
find $PKG/usr/man -type f -exec gzip -9 '{}' \;
install -s -m 0644 *.so $PKG/usr/lib$LIBDIRSUFFIX
# Install documentation
mkdir -p $PKG/usr/doc/$NAMETGZ-$VERSION/lapack/html
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION/lapack
cd $TMP/$LAPACK_DIRNAME
install -m 644 COPYING README $PKG/usr/doc/$NAMETGZ-$VERSION/lapack
install -m 644 html/* $PKG/usr/doc/$NAMETGZ-$VERSION/lapack/html
install -m 644 LICENSE README $PKG/usr/doc/$NAMEPKG-$VERSION/lapack
cd $TMP/$ATLAS_DIRNAME
install -m 0644 INSTALL.txt README doc/* $PKG/usr/doc/$NAMETGZ-$VERSION
install -m 0644 INSTALL.txt README doc/* $PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
@ -124,7 +135,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$LAPACK_DIRNAME $TMP/$ATLAS_DIRNAME
"

Loading…
Cancel
Save