diff options
-rw-r--r-- | academic/lapack95/README | 3 | ||||
-rw-r--r-- | academic/lapack95/lapack95-config | 55 | ||||
-rw-r--r-- | academic/lapack95/lapack95.SlackBuild | 82 | ||||
-rw-r--r-- | academic/lapack95/lapack95.info | 10 | ||||
-rw-r--r-- | academic/lapack95/make.inc | 47 | ||||
-rw-r--r-- | academic/lapack95/slack-desc | 19 |
6 files changed, 216 insertions, 0 deletions
diff --git a/academic/lapack95/README b/academic/lapack95/README new file mode 100644 index 0000000000000..6ed5f818b5495 --- /dev/null +++ b/academic/lapack95/README @@ -0,0 +1,3 @@ +LAPACK95 is a Fortran 95 interface to LAPACK. + +This requires lapack and blas. diff --git a/academic/lapack95/lapack95-config b/academic/lapack95/lapack95-config new file mode 100644 index 0000000000000..9eb5f60eb3b56 --- /dev/null +++ b/academic/lapack95/lapack95-config @@ -0,0 +1,55 @@ +#!/bin/sh + +lapack95_version=@VERSION@ +lapack95_libs="-llapack -lblas -llapack95" +lapack95_fflags="-I/usr/include/lapack95" + +usage() +{ + cat <<EOF +Usage: lapack95-config [OPTIONS] +Options: + [--version] + [--libs] + [--fflags] +EOF + exit $1 +} + +if [ $# -eq 0 ] ; then + usage 1 1>&2 +fi + +while [ $# -gt 0 ] ; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --version) + echo $lapack95_version + ;; + --fflags) + echo_fflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if [ "$echo_fflags" = "yes" ] ; then + echo $lapack95_fflags +fi + +if [ "$echo_libs" = "yes" ] ; then + echo $lapack95_libs +fi + +exit 0 + diff --git a/academic/lapack95/lapack95.SlackBuild b/academic/lapack95/lapack95.SlackBuild new file mode 100644 index 0000000000000..bd72f7acb6c02 --- /dev/null +++ b/academic/lapack95/lapack95.SlackBuild @@ -0,0 +1,82 @@ +#!/bin/sh + +# Slackware build script for lapack95 + +# Written by Pablo Santamarķa (pablosantamaria@gmail.com) + +PRGNAM=lapack95 +VERSION=${VERSION:-3.0} +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" + 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 LAPACK95 +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 + +# Make single and double precision, complex and double complex +# static library. +cd SRC + make clean + make OPTS0="$SLKCFLAGS" single_double_complex_dcomplex +cd .. + +# Install lib +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX} +cp $PRGNAM.a $PKG/usr/lib${LIBDIRSUFFIX}/lib$PRGNAM.a + +# Install modules +mkdir -p $PKG/usr/include/lapack95 +cp lapack95_modules/* $PKG/usr/include/lapack95 + +# Install config script +mkdir -p $PKG/usr/bin +sed "s%@VERSION@%$VERSION%" $CWD/lapack95-config > $PKG/usr/bin/lapack95-config +chmod 755 $PKG/usr/bin/lapack95-config + +( 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 || true +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README $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} diff --git a/academic/lapack95/lapack95.info b/academic/lapack95/lapack95.info new file mode 100644 index 0000000000000..af27bf6827ff1 --- /dev/null +++ b/academic/lapack95/lapack95.info @@ -0,0 +1,10 @@ +PRGNAM="lapack95" +VERSION="3.0" +HOMEPAGE="http://www.netlib.org/lapack95/" +DOWNLOAD="http://www.netlib.org/lapack95/lapack95.tgz" +MD5SUM="a49ac8f061d7cd429e5279e69bbe334d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Pablo Santamaria" +EMAIL="pablosantamaria@gmail.com" +APPROVED="rworkman" diff --git a/academic/lapack95/make.inc b/academic/lapack95/make.inc new file mode 100644 index 0000000000000..3a98a2fe407e8 --- /dev/null +++ b/academic/lapack95/make.inc @@ -0,0 +1,47 @@ +# +# -- LAPACK95 interface driver routine (version 2.0) -- +# UNI-C, Denmark; Univ. of Tennessee, USA; NAG Ltd., UK +# August 5, 2000 +# +FC = gfortran -ffree-form +FC1 = gfortran -ffixed-form +# -dcfuns Enable recognition of non-standard double +# precision complex intrinsic functions +# -dusty Allows the compilation and execution of "legacy" +# software by downgrading the category of common +# errors found in such software from "Error" to +# -ieee=full enables all IEEE arithmetic facilities +# including non-stop arithmetic. + +OPTS0 = +MODLIB = -I./../lapack95_modules +OPTS1 = -c $(OPTS0) +OPTS3 = $(OPTS1) $(MODLIB) +OPTL = -o +OPTLIB = + +LAPACK_PATH = @LIBDIR@ + +LAPACK95 = ../lapack95.a +LAPACK77 = $(LAPACK_PATH)/liblapack.a +TMG77 = $(LAPACK_PATH)/libtmglib.a +BLAS = $(LAPACK_PATH)/libblas.a + +LIBS = $(LAPACK95) $(TMG77) $(LAPACK77) $(BLAS) +SUF = f90 + +XX = 'rm' -f $@; \ + 'rm' -f $@.res; \ + $(FC) $(OPTS0) -o $@ $(MODLIB) $@.$(SUF) $(OPTLIB) $(LIBS); \ + $@ < $@.dat > $@.res; \ + 'rm' -f $@ + +YY = $(FC) $(OPTS0) -o $@ $(MODLIB) $@.$(SUF) $(OPTLIB) $(LIBS) + +.SUFFIXES: .f90 .f .o + +.$(SUF).o: + $(FC) $(OPTS3) $< + +.f.o: + $(FC1) $(OPTS3) $< diff --git a/academic/lapack95/slack-desc b/academic/lapack95/slack-desc new file mode 100644 index 0000000000000..5c37de347adef --- /dev/null +++ b/academic/lapack95/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------------------------------------------------------| +lapack95: lapack95 (Fortran 95 interface to LAPACK) +lapack95: +lapack95: LAPACK95 is a Fortran 95 interface to LAPACK. +lapack95: +lapack95: +lapack95: +lapack95: +lapack95: +lapack95: +lapack95: +lapack95: |