aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2023-10-05 21:35:02 +0000
committerLudovic Courtès <ludo@gnu.org>2023-10-06 12:26:47 +0200
commit383d54282eb3c4adaa2ba98c12ac7cad70c1432e (patch)
tree50866fef1866c6f058a9e26ce383d076ce04e77f
parentb2783361807285a5df703264ba902606b1bb7ce4 (diff)
downloadguix-383d54282eb3c4adaa2ba98c12ac7cad70c1432e.tar
guix-383d54282eb3c4adaa2ba98c12ac7cad70c1432e.tar.gz
gnu: Add suitesparse-spqr.
* gnu/packages/maths.scm (suitesparse-spqr): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/maths.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b41b2be6e9..fa0bd2d406 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5867,6 +5867,68 @@ LU factorization for solving unsymmetric sparse linear systems.")
;; Dual licensed.
(license (list license:lgpl3+ license:gpl2+))))
+(define-public suitesparse-spqr
+ (package
+ (name "suitesparse-spqr")
+ (version "4.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "SPQR")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../SPQR/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../SPQR/Doc/spqr_user_guide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../SPQR/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-epsf))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse QR factorization method")
+ (description "The SPQR (SuiteSparseQR) package provides sparse QR
+factorization based on the multifrontal method, using BLAS for the frontal
+matrices.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")