3
0
Fork 0
forked from mirrors/nixpkgs

qrupdate: build with openblas

Replaces ATLAS and LAPACK with OpenBLAS. Also builds both static and
shared libraries. (Octave upstream recommends the shared library.)
This commit is contained in:
Thomas Tuegel 2015-06-07 13:44:24 -05:00
parent bfe106cfa6
commit fa290cb741

View file

@ -1,7 +1,7 @@
{ stdenv
, fetchurl
, gfortran
, liblapack
, openblas
}:
stdenv.mkDerivation {
name = "qrupdate-1.1.2";
@ -10,20 +10,25 @@ stdenv.mkDerivation {
sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";
};
configurePhase = ''
configurePhase =
''
export PREFIX=$out
sed -i -e 's,^BLAS=.*,BLAS=-L${liblapack}/lib -L${liblapack.blas} -lcblas -lf77blas -latlas,' \
-e 's,^LAPACK=.*,LAPACK=-L${liblapack}/lib -llapack -lcblas -lf77blas -latlas,' \
sed -i -e 's,^BLAS=.*,BLAS=-L${openblas}/lib -lopenblas,' \
-e 's,^LAPACK=.*,LAPACK=-L${openblas}/lib -lopenblas,' \
Makeconf
''
+ stdenv.lib.optionalString openblas.blas64
''
sed -i Makeconf -e '/^FFLAGS=.*/ s/$/-fdefault-integer-8/'
'';
doCheck = true;
checkTarget = "test";
buildTarget = "lib";
buildFlags = [ "lib" "solib" ];
installTarget = "install-staticlib";
installTargets = "install";
buildInputs = [ gfortran liblapack ];
buildInputs = [ gfortran openblas ];
}