From 4e04199427902f535f772cd534a9bd20fb2e4112 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 8 Jul 2016 17:34:30 +0200 Subject: [PATCH] gnu: lapack: Add output for lapacke. * gnu/packages/maths.scm (lapack)[outputs]: New field. [arguments]: Add build phase to move lapacke to separate output. --- gnu/packages/maths.scm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 68fb272..86a466e 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -331,10 +331,12 @@ large scale eigenvalue problems.") "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s")))) (build-system cmake-build-system) (home-page "http://www.netlib.org/lapack/") + (outputs '("out" "lapacke")) (inputs `(("fortran" ,gfortran) ("python" ,python-2))) (arguments - `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES") + `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" + "-DLAPACKE=ON") #:phases (modify-phases %standard-phases (add-before 'check 'patch-python @@ -342,13 +344,26 @@ large scale eigenvalue problems.") (let ((python (assoc-ref inputs "python"))) (substitute* "lapack_testing.py" (("/usr/bin/env python") python)) - #t)))))) + #t))) + (add-after 'install 'use-separate-outputs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (lapacke (assoc-ref outputs "lapacke"))) + (mkdir-p (string-append lapacke "/lib/pkgconfig")) + (for-each + (lambda (file) + (rename-file (string-append out file) + (string-append lapacke file))) + (list "/lib/liblapacke.so" + "/lib/pkgconfig/lapacke.pc" + "/include"))) + #t))))) (synopsis "Library for numerical linear algebra") (description "LAPACK is a Fortran 90 library for solving the most commonly occurring problems in numerical linear algebra.") (license (license:non-copyleft "file://LICENSE" - "See LICENSE in the distribution.")))) + "See LICENSE in the distribution.")))) (define-public scalapack (package -- 2.9.0