2010-01-26 15:53:08 +01:00
|
|
|
{ stdenv, fetchurl, gfortran }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-09-17 16:40:34 +02:00
|
|
|
name = "blas-20110419";
|
2010-01-26 15:53:08 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.netlib.org/blas/blas.tgz";
|
2013-09-17 16:40:34 +02:00
|
|
|
sha256 = "1d931d91byv2svydpj2ipjh1f2sm1h9ns8ik2w5fwaa8qinxz1za";
|
2010-01-26 15:53:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [gfortran];
|
|
|
|
|
|
|
|
configurePhase = ''
|
2010-01-29 01:17:59 +01:00
|
|
|
echo >make.inc "SHELL = ${stdenv.shell}"
|
2010-01-26 15:53:08 +01:00
|
|
|
echo >>make.inc "PLAT = _LINUX"
|
|
|
|
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 "ARCH = gfortran"
|
|
|
|
echo >>make.inc "ARCHFLAGS = -shared -o"
|
|
|
|
echo >>make.inc "RANLIB = echo"
|
|
|
|
echo >>make.inc "BLASLIB = libblas.so.3.0.3"
|
|
|
|
'';
|
|
|
|
|
2010-07-09 15:15:56 +02:00
|
|
|
buildPhase = ''
|
|
|
|
make
|
|
|
|
echo >>make.inc "ARCHFLAGS = "
|
|
|
|
echo >>make.inc "BLASLIB = libblas.a"
|
|
|
|
echo >>make.inc "ARCH = ar rcs"
|
|
|
|
echo >>make.inc "RANLIB = ranlib"
|
|
|
|
make
|
|
|
|
'';
|
2012-10-18 10:14:06 +02:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
# FreeBSD's stdenv doesn't use Coreutils.
|
2012-10-18 17:34:49 +02:00
|
|
|
let dashD = if stdenv.isFreeBSD then "" else "-D"; in
|
|
|
|
(stdenv.lib.optionalString stdenv.isFreeBSD "mkdir -p $out/lib ;")
|
|
|
|
+ ''
|
2012-10-18 10:14:06 +02:00
|
|
|
install ${dashD} -m755 libblas.a "$out/lib/libblas.a"
|
|
|
|
install ${dashD} -m755 libblas.so.3.0.3 "$out/lib/libblas.so.3.0.3"
|
2010-01-26 15:53:08 +01:00
|
|
|
ln -s libblas.so.3.0.3 "$out/lib/libblas.so.3"
|
|
|
|
ln -s libblas.so.3.0.3 "$out/lib/libblas.so"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Basic Linear Algebra Subprograms";
|
2014-11-06 01:44:33 +01:00
|
|
|
license = stdenv.lib.licenses.publicDomain;
|
2010-01-26 15:53:08 +01:00
|
|
|
homepage = "http://www.netlib.org/blas/";
|
|
|
|
};
|
|
|
|
}
|