aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2023-10-05 21:34:45 +0000
committerLudovic Courtès <ludo@gnu.org>2023-10-06 12:26:44 +0200
commita6fc1164c458dfdde97522f4bd872f2732029b4b (patch)
tree70d93eeb83e93a484a8a3ebaf7926662a4946d0f /gnu
parent4a368c3a8b58fb2a292166c1a6236a2dd9425fe0 (diff)
downloadguix-a6fc1164c458dfdde97522f4bd872f2732029b4b.tar
guix-a6fc1164c458dfdde97522f4bd872f2732029b4b.tar.gz
gnu: Add suitesparse-config.
The suitesparse-source variable contains the entire SuiteSparse source code, which is used for all subpackages. * gnu/packages/maths.scm (suitesparse-version, suitesparse-source, suitesparse-config): New variables. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/maths.scm81
1 files changed, 81 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c796501e72..0dcd456a2e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5039,6 +5039,87 @@ Fresnel integrals, and similar related functions as well.")
;; public domain software.
(license (list license:expat license:public-domain))))
+;; Source for the modular SuiteSparse packages. When updating, also update the
+;; (different) versions of the subpackages.
+(define suitesparse-version "7.2.0")
+(define suitesparse-source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+ (commit (string-append "v" suitesparse-version))))
+ (file-name (git-file-name "suitesparse" suitesparse-version))
+ (sha256
+ (base32
+ "1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Delete autogenerated and bundled files
+ (for-each delete-file (find-files "." "\\.pdf$"))
+ ;; ssget
+ (delete-file-recursively "ssget")
+ ;; SuiteSparse_config
+ (delete-file "SuiteSparse_config/SuiteSparse_config.h")
+ ;; CHOLMOD
+ (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
+ ; GraphBLAS
+ (delete-file "GraphBLAS/README.md")
+ (delete-file "GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Config/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/cpu_features")
+ (delete-file "GraphBLAS/CUDA/GB_cuda_common_jitFactory.hpp")
+ (delete-file "GraphBLAS/JITpackage/GB_JITpackage.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.h")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.h")
+ (delete-file "GraphBLAS/GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/Source/FactoryKernels")
+ (delete-file "GraphBLAS/Source/GB_AxB__include1.h")
+ (delete-file "GraphBLAS/xxHash/xxhash.h")
+ (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
+ ;; KLU
+ (delete-file "KLU/Include/klu.h")
+ (delete-file "KLU/Doc/klu_version.tex")
+ ;; LDL
+ (delete-file "LDL/Include/ldl.h")
+ (delete-file "LDL/Doc/ldl_version.tex")
+ ;; RBio
+ (delete-file "RBio/Include/RBio.h")
+ ;; SPEX
+ (delete-file "SPEX/Include/SPEX.h")
+ (delete-file "SPEX/Doc/SPEX_version.tex")
+ ;; SPQR
+ (delete-file "SPQR/Include/SuiteSparseQR_definitions.h")
+ (delete-file "SPQR/Doc/spqr_version.tex")
+ ;; UMFPACK
+ (delete-file "UMFPACK/Include/umfpack.h")
+ (delete-file "UMFPACK/Doc/umfpack_version.tex")))))
+
+(define-public suitesparse-config
+ (package
+ (name "suitesparse-config")
+ (version suitesparse-version)
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "SuiteSparse_config"))))))
+ (inputs (list openblas))
+ (native-inputs (list pkg-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Configuration for all SuiteSparse packages")
+ (description "SuiteSparse is a suite of sparse matrix algorithms. This
+package contains a library with common configuration options.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")