From 52a54199639f01f05c7897533cadc6d3ee8b78d3 Mon Sep 17 00:00:00 2001 From: Eugene Suter Date: Wed, 12 May 2010 23:30:24 +0200 Subject: libraries/lapack: Added to 12.2 repository --- libraries/lapack/README | 10 +++++ libraries/lapack/lapack.SlackBuild | 88 ++++++++++++++++++++++++++++++++++++++ libraries/lapack/lapack.info | 8 ++++ libraries/lapack/make.inc | 70 ++++++++++++++++++++++++++++++ libraries/lapack/slack-desc | 19 ++++++++ 5 files changed, 195 insertions(+) create mode 100644 libraries/lapack/README create mode 100644 libraries/lapack/lapack.SlackBuild create mode 100644 libraries/lapack/lapack.info create mode 100644 libraries/lapack/make.inc create mode 100644 libraries/lapack/slack-desc (limited to 'libraries/lapack') diff --git a/libraries/lapack/README b/libraries/lapack/README new file mode 100644 index 0000000000..0f94b08d5f --- /dev/null +++ b/libraries/lapack/README @@ -0,0 +1,10 @@ +LAPACK provides routines for solving systems of simultaneous linear +equations, least-squares solutions of linear systems of equations, +eigenvalue problems, and singular value problems. + +Install an optimized BLAS instead of the reference BLAS from Netlib if you +wish to improve LAPACK's performance. Otherwise, use the BLAS build script +provided at Slackbuilds.org. You may also build your own tuned lapack library +with ATLAS. + +This requires blas. diff --git a/libraries/lapack/lapack.SlackBuild b/libraries/lapack/lapack.SlackBuild new file mode 100644 index 0000000000..65d63e9a0e --- /dev/null +++ b/libraries/lapack/lapack.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for BLAS and LAPACK libraries. + +# Written by Eugene Suter + +# Licence: Read the LICENCE file in the tarball + +PRGNAM=lapack +VERSION=${VERSION:-3.2.1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +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" + NOOPTFLAGS="-fPIC" + LIBDIRSUFFIX="64" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Copy the pre-configured make.inc file but put in the correct LIBDIR +sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%" $CWD/make.inc > make.inc + +# Build objects and static library files +make cleanlib +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 +( + 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 +) + +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 + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $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.tgz diff --git a/libraries/lapack/lapack.info b/libraries/lapack/lapack.info new file mode 100644 index 0000000000..a8e5b1a1c5 --- /dev/null +++ b/libraries/lapack/lapack.info @@ -0,0 +1,8 @@ +PRGNAM="LAPACK" +VERSION="3.2.1" +HOMEPAGE="http://www.netlib.org/lapack/" +DOWNLOAD="http://www.netlib.org/lapack/lapack.tgz" +MD5SUM="a3202a4f9e2f15ffd05d15dab4ac7857" +MAINTAINER="Eugene Suter" +EMAIL="easuter@gmail.com" +APPROVED="rworkman" diff --git a/libraries/lapack/make.inc b/libraries/lapack/make.inc new file mode 100644 index 0000000000..b07500e16a --- /dev/null +++ b/libraries/lapack/make.inc @@ -0,0 +1,70 @@ +# -*- Makefile -*- +#################################################################### +# LAPACK make include file. # +# LAPACK, Version 3.2.1 # +# April 2009 # +#################################################################### +# +# See the INSTALL/ directory for more examples. +# +SHELL = /bin/sh +# +# The machine (platform) identifier to append to the library names +# +#PLAT = _LINUX +# +# Modify the FORTRAN and OPTS definitions to refer to the +# compiler and desired compiler options for your machine. NOOPT +# refers to the compiler options desired when NO OPTIMIZATION is +# selected. Define LOADER and LOADOPTS to refer to the loader +# and desired load options for your machine. +# +FORTRAN = gfortran +OPTS = +DRVOPTS = $(OPTS) +NOOPT = +LOADER = gfortran +LOADOPTS = +# +# Timer for the SECOND and DSECND routines +# +# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME +# TIMER = EXT_ETIME +# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ +# TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME +# TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) +# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 +TIMER = NONE +# +# The archiver and the flag(s) to use when building archive (library) +# If you system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS= cr +RANLIB = ranlib +# +# The location of BLAS library for linking the testing programs. +# The target's machine-specific, optimized BLAS library should be +# used whenever possible. +# +BLASLIB = @LIBDIR@/libblas.a +# +# Location of the extended-precision BLAS (XBLAS) Fortran library +# used for building and testing extended-precision routines. The +# relevant routines will be compiled and XBLAS will be linked only if +# USEXBLAS is defined. +# +# USEXBLAS = Yes +XBLASLIB = +# XBLASLIB = -lxblas +# +# Names of generated libraries. +# +LAPACKLIB = liblapack$(PLAT).a +TMGLIB = libtmglib$(PLAT).a +EIGSRCLIB = libeigsrc$(PLAT).a +LINSRCLIB = liblinsrc$(PLAT).a diff --git a/libraries/lapack/slack-desc b/libraries/lapack/slack-desc new file mode 100644 index 0000000000..1031f33da6 --- /dev/null +++ b/libraries/lapack/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +lapack: LAPACK (linear algebra routines) +lapack: +lapack: LAPACK provides routines for solving systems of simultaneous linear +lapack: equations, least-squares solutions of linear systems of equations, +lapack: eigenvalue problems, and singular value problems. The associated matrix +lapack: factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are +lapack: also provided, as are related computations such as reordering of the +lapack: Schur factorizations and estimating condition numbers. Dense and banded +lapack: matrices are handled, but not general sparse matrices. In all areas, +lapack: similar functionality is provided for real and complex matrices, in +lapack: both single and double precision. -- cgit v1.2.3