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,29 +1,34 @@
{ stdenv { stdenv
, fetchurl , fetchurl
, gfortran , gfortran
, liblapack , openblas
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "qrupdate-1.1.2"; name = "qrupdate-1.1.2";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz ; url = mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz ;
sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2"; sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";
}; };
configurePhase = '' configurePhase =
export PREFIX=$out ''
sed -i -e 's,^BLAS=.*,BLAS=-L${liblapack}/lib -L${liblapack.blas} -lcblas -lf77blas -latlas,' \ export PREFIX=$out
-e 's,^LAPACK=.*,LAPACK=-L${liblapack}/lib -llapack -lcblas -lf77blas -latlas,' \ sed -i -e 's,^BLAS=.*,BLAS=-L${openblas}/lib -lopenblas,' \
Makeconf -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; doCheck = true;
checkTarget = "test"; checkTarget = "test";
buildTarget = "lib"; buildFlags = [ "lib" "solib" ];
installTarget = "install-staticlib"; installTargets = "install";
buildInputs = [ gfortran liblapack ]; buildInputs = [ gfortran openblas ];
} }