summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2017-12-23 20:36:12 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2017-12-23 20:37:40 +0100
commit493937ae1fb5b3ffdd836c144cb4682067b94de9 (patch)
tree0d4dad24c6be9cc910a64a05b934a394148e6cb4 /gnu/packages
parent6a069618ab48600ffd241666cf8f9ed871c7484b (diff)
downloadguix-493937ae1fb5b3ffdd836c144cb4682067b94de9.tar.gz
gnu: openblas: Build with LAPACK.
* gnu/packages/maths.scm (openblas)[arguments]: Don't disable LAPACK;
add set-extralib phase.
[inputs]: Add fortran-lib.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm16
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 837e142f59..b1a497c36b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright � 2017 Dave Love <me@fx@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2641,7 +2642,6 @@ parts of it.")
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              "SHELL=bash"
-             "NO_LAPACK=1"
              ;; Build the library for all supported CPUs.  This allows
              ;; switching CPU targets at runtime with the environment variable
              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
@@ -2662,11 +2662,21 @@ parts of it.")
                    '("TARGET=ARMV8"))
                   (else '()))))
        ;; no configure script
-       #:phases (alist-delete 'configure %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'set-extralib
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Get libgfortran found when building in utest.
+             (setenv "FEXTRALIB"
+                     (string-append "-L" (assoc-ref inputs "fortran-lib")
+                                    "/lib"))
+             #t)))))
     (inputs
-     `(("fortran" ,gfortran)))
+     `(("fortran-lib" ,gfortran "lib")))
     (native-inputs
      `(("cunit" ,cunit)
+       ("fortran" ,gfortran)
        ("perl" ,perl)))
     (home-page "http://www.openblas.net/")
     (synopsis "Optimized BLAS library based on GotoBLAS")