guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: ipopt: Use libblas from LAPACK, and fix 'Libs' in 'ipopt.pc'


From: Ludovic Courtès
Subject: 01/01: gnu: ipopt: Use libblas from LAPACK, and fix 'Libs' in 'ipopt.pc'.
Date: Fri, 3 Jun 2016 12:37:39 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit ad1c453731d5b320fbd94c6486bf0bc96a4e7e7a
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jun 3 14:34:32 2016 +0200

    gnu: ipopt: Use libblas from LAPACK, and fix 'Libs' in 'ipopt.pc'.
    
    * gnu/packages/maths.scm (ipopt)[inputs]: Remove OPENBLAS.
    [arguments]: New field.
---
 gnu/packages/maths.scm |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4498ea0..3b860a9 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -599,12 +599,28 @@ online as well as original implementations of various 
other algorithms.")
                ;; Make sure we don't use the bundled software.
                '(delete-file-recursively "ThirdParty"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'install 'add--L-flags-in-ipopt.pc
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; The '.pc' file lists '-llapack -lblas' in "Libs";
+                      ;; move it to "Libs.private" where it belongs, and add a
+                      ;; '-L' flag for LAPACK.
+                      (let ((out    (assoc-ref outputs "out"))
+                            (lapack (assoc-ref inputs "lapack")))
+                        (substitute* (string-append out "/lib/pkgconfig/"
+                                                    "ipopt.pc")
+                          (("Libs: (.*)-llapack -lblas(.*)$" _ before after)
+                           (string-append "Libs: " before " " after "\n"
+                                          "Libs.private: " before
+                                          "-L" lapack "/lib -llapack -lblas "
+                                          after "\n")))
+                        #t))))))
     (native-inputs
      `(("gfortran" ,gfortran)))
     (inputs
      ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL.
-     `(("blas" ,openblas)
-       ("lapack" ,lapack)))
+     `(("lapack" ,lapack)))                    ;for both libblas and liblapack
     (home-page "http://www.coin-or.org";)
     (synopsis "Large-scale nonlinear optimizer")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]