2010-01-26 15:53:13 +01:00
|
|
|
{ stdenv, fetchurl, gfortran, blas }:
|
2008-10-05 11:01:59 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-01-26 15:53:13 +01:00
|
|
|
name = "liblapack-3.2.1";
|
2008-10-05 11:01:59 +02:00
|
|
|
src = fetchurl {
|
2010-01-26 15:53:13 +01:00
|
|
|
url = "http://www.netlib.org/lapack/lapack-3.2.1.tgz";
|
|
|
|
sha256 = "5825f83971157001fd4235514afe8ff5fc16e1c06b2e872e442c242efd6c166d";
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
|
2010-01-26 15:53:13 +01:00
|
|
|
buildInputs = [gfortran blas];
|
|
|
|
patches = [ ./blas-link.patch ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
echo >make.inc "SHELL = ${stdenv.bash}/bin/bash"
|
|
|
|
echo >>make.inc "PLAT ="
|
|
|
|
echo >>make.inc "FORTRAN = gfortran"
|
|
|
|
echo >>make.inc "OPTS = -O2 -fPIC"
|
|
|
|
echo >>make.inc "DRVOPTS = \$(OPTS)"
|
|
|
|
echo >>make.inc "NOOPT = -O0 -fPIC"
|
|
|
|
echo >>make.inc "LOADER = gfortran"
|
|
|
|
echo >>make.inc "LOADOPTS ="
|
|
|
|
echo >>make.inc "TIMER = INT_ETIME"
|
|
|
|
echo >>make.inc "ARCH = gfortran"
|
|
|
|
echo >>make.inc "ARCHFLAGS = -shared -o"
|
|
|
|
echo >>make.inc "RANLIB = echo"
|
|
|
|
echo >>make.inc "BLASLIB = -lblas"
|
|
|
|
echo >>make.inc "LAPACKLIB = liblapack.so.3"
|
|
|
|
echo >>make.inc "TMGLIB = libtmglib.so.3"
|
|
|
|
echo >>make.inc "EIGSRCLIB = libeigsrc.so.3"
|
|
|
|
echo >>make.inc "LINSRCLIB = liblinsrc.so.3"
|
|
|
|
'';
|
2008-10-05 11:01:59 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
2010-01-26 15:53:13 +01:00
|
|
|
make clean
|
|
|
|
make lib
|
2008-10-05 11:01:59 +02:00
|
|
|
'';
|
2010-01-26 15:53:13 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir "$out/lib"
|
|
|
|
install -m755 *.so* "$out/lib"
|
|
|
|
ln -sf liblapack.so.3 "$out/lib/liblapack.so"
|
|
|
|
ln -sf libtmglib.so.3 "$out/lib/libtmglib.so"
|
|
|
|
'';
|
|
|
|
|
2008-10-05 11:01:59 +02:00
|
|
|
meta = {
|
2010-01-26 15:53:13 +01:00
|
|
|
description = "Linear Algebra PACKage";
|
2010-01-26 20:28:09 +01:00
|
|
|
license = "revised-BSD";
|
2010-01-26 15:53:13 +01:00
|
|
|
homepage = "http://www.netlib.org/lapack/";
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
}
|