diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-08-10 16:49:20 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-08-10 21:58:38 +0200 |
commit | 698673699e0ec501bca3abf1d455670a49cbf90e (patch) | |
tree | 65f62d76c59f75affd3d9bf0758463c79f6920a9 /gnu/packages/maths.scm | |
parent | 2d4c25f0164a6752852ba07dc7b1687fa656bf25 (diff) | |
download | guix-698673699e0ec501bca3abf1d455670a49cbf90e.tar.gz |
gnu: Add clapack.
* gnu/packages/maths.scm (clapack): New variable.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r-- | gnu/packages/maths.scm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 3a746bd712..232dec5ecc 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -809,6 +809,62 @@ problems in numerical linear algebra.") (license (license:non-copyleft "file://LICENSE" "See LICENSE in the distribution.")))) +(define-public clapack + (package + (name "clapack") + (version "3.2.1") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.netlib.org/clapack/clapack-" + version "-CMAKE.tgz")) + (sha256 + (base32 + "0nnap9q1mv14g57dl3vkvxrdr10k5w7zzyxs6rgxhia8q8mphgqb")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; These tests use a lot of stack variables and segfault without + ;; lifting resource limits. + (add-after 'unpack 'disable-broken-tests + (lambda _ + (substitute* "TESTING/CMakeLists.txt" + (("add_lapack_test.* xeigtstz\\)") "")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libdir (string-append out "/lib")) + (f2cinc (string-append out "/include/libf2c"))) + (mkdir-p f2cinc) + (display (getcwd)) + (for-each (lambda (file) + (install-file file libdir)) + '("SRC/liblapack.a" + "F2CLIBS/libf2c/libf2c.a" + "TESTING/MATGEN/libtmglib.a" + "BLAS/SRC/libblas.a")) + (for-each (lambda (file) + (install-file file f2cinc)) + (cons "F2CLIBS/libf2c/arith.h" + (find-files (string-append "../clapack-" + ,version "-CMAKE/F2CLIBS/libf2c") + "\\.h$"))) + (copy-recursively (string-append "../clapack-" + ,version "-CMAKE/INCLUDE") + (string-append out "/include")) + #t)))))) + (home-page "https://www.netlib.org/clapack/") + (synopsis "Numerical linear algebra library for C") + (description + "The CLAPACK library was built using a Fortran to C conversion utility +called f2c. The entire Fortran 77 LAPACK library is run through f2c to obtain +C code, and then modified to improve readability. CLAPACK's goal is to +provide LAPACK for someone who does not have access to a Fortran compiler.") + (license (license:non-copyleft "file://LICENSE" + "See LICENSE in the distribution.")))) + (define-public scalapack (package (name "scalapack") |