From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] Add LAPACKE Date: Mon, 11 Jul 2016 11:23:33 +0200 Message-ID: References: <20160708154008.24871-1-ricardo.wurmus@mdc-berlin.de> <20160710142058.GA5924@solar> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMXRN-0004MD-QM for guix-devel@gnu.org; Mon, 11 Jul 2016 05:23:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMXRJ-0005gl-HB for guix-devel@gnu.org; Mon, 11 Jul 2016 05:23:48 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:48622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMXRJ-0005gc-6Z for guix-devel@gnu.org; Mon, 11 Jul 2016 05:23:45 -0400 In-Reply-To: <20160710142058.GA5924@solar> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andreas Enge Cc: guix-devel --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Andreas Enge writes: > On Fri, Jul 08, 2016 at 05:40:07PM +0200, Ricardo Wurmus wrote: >> A third option would be to move LAPACKE to its own output. > > if this is easily possible, I think this option would be more elegant. A patch is attached. It produces two output directories: /gnu/store/40g0xqcikbz6ya7h2gbyj8gck043ajl8-lapack-3.5.0-lapacke /gnu/store/lqnm7fmpz3si0rgyqz1pzax4ipa25xlx-lapack-3.5.0 The closure of the lapacke output is larger: $ guix size /gnu/store/40g0xqcikbz6ya7h2gbyj8gck043ajl8-lapack-3.5.0-lapa= cke store item total = self /gnu/store/40g0xqcikbz6ya7h2gbyj8gck043ajl8-lapack-3.5.0-lapacke 97.2 = 2.9 3.0% /gnu/store/lqnm7fmpz3si0rgyqz1pzax4ipa25xlx-lapack-3.5.0 71.4 = 6.4 6.6% /gnu/store/gaximh48qbqf4712bw224ghq919hqp64-gfortran-4.9.3-lib 64.9 = 27.1 27.9% /gnu/store/v39bh3ln3ncnzhyw0kd12d46kww9747v-gcc-4.9.3-lib 60.7 = 22.9 23.5% /gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22 37.9 = 36.5 37.5% /gnu/store/5y72ql4zbnbd50lf88k91k0y766kq75x-bash-static-4.3.42 1.4 = 1.4 1.4% total: 97.2 MiB But the plain output is unchanged: $ guix size /gnu/store/lqnm7fmpz3si0rgyqz1pzax4ipa25xlx-lapack-3.5.0 store item total = self /gnu/store/lqnm7fmpz3si0rgyqz1pzax4ipa25xlx-lapack-3.5.0 71.4 = 6.4 9.0% /gnu/store/gaximh48qbqf4712bw224ghq919hqp64-gfortran-4.9.3-lib 64.9 = 27.1 38.0% /gnu/store/8m00x5x8ykmar27s9248cmhnkdb2n54a-glibc-2.22 37.9 = 36.5 51.1% /gnu/store/5y72ql4zbnbd50lf88k91k0y766kq75x-bash-static-4.3.42 1.4 = 1.4 2.0% total: 71.4 MiB I have yet to test that this works as expected with the package I=E2=80=99= m working on. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-lapack-Add-output-for-lapacke.patch" >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 --=-=-=--