From fa290cb741cb23a04024f09e2018d5ea7bc0e3a3 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 7 Jun 2015 13:44:24 -0500 Subject: [PATCH] qrupdate: build with openblas Replaces ATLAS and LAPACK with OpenBLAS. Also builds both static and shared libraries. (Octave upstream recommends the shared library.) --- .../libraries/qrupdate/default.nix | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/qrupdate/default.nix b/pkgs/development/libraries/qrupdate/default.nix index 465ec7eebb2b..aaa9ab8a61ad 100644 --- a/pkgs/development/libraries/qrupdate/default.nix +++ b/pkgs/development/libraries/qrupdate/default.nix @@ -1,29 +1,34 @@ { stdenv , fetchurl , gfortran -, liblapack +, openblas }: stdenv.mkDerivation { name = "qrupdate-1.1.2"; src = fetchurl { url = mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz ; - sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2"; + sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2"; }; - - 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,' \ - Makeconf - ''; + + configurePhase = + '' + export PREFIX=$out + 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"; - - buildInputs = [ gfortran liblapack ]; + installTargets = "install"; + + buildInputs = [ gfortran openblas ]; }