gnu: Add %suitesparse-package-versions.

* gnu/packages/maths.scm (%suitesparse-package-versions): New variable.
(suitesparse-version): Update to 7.10.2.
(suitesparse-source)[origin]: Update deletion list.
(suitesparse-amd, suitesparse-btf, suitesparse-camd, suitesparse-colamd,
suitesparse-ccolamd, suitesparse-cholmod, suitesparse-cxsparse,
suitesparse-klu, suitesparse-ldl, suitesparse-rbio,
suitesparse-mongoose, suitesparse-spex, suitesparse-spqr,
suitesparse-umfpack)[version]: Use %suitesparse-package-versions.
[arguments]<#:configure-flags>: Preserve include path.
(suitesparse-cholmod)[arguments]<#:phases>('install-license-files):
Update paths.
(suitesparse-cholmod)[arguments]<#:phases>('build-doc): Update paths.
(suitesparse-spex)[native-inputs]: Add texlive-fncychap.
(suitesparse-spqr)[native-inputs]: Add texlive-etoolbox.
* gnu/packages/patches/gklib-suitesparse.patch: Update version.

Change-Id: I14a9bfeddb37330c88a2e94b0992c2f1afbc5310
This commit is contained in:
Greg Hogan 2025-04-18 14:06:25 +00:00
parent 9a41a54da2
commit c6aaffba1c
No known key found for this signature in database
GPG key ID: EF6EB27413CFEEF3
2 changed files with 55 additions and 26 deletions

View file

@ -6155,9 +6155,25 @@ Fresnel integrals, and similar related functions as well.")
;; public domain software. ;; public domain software.
(license (list license:expat license:public-domain)))) (license (list license:expat license:public-domain))))
(define %suitesparse-package-versions
'(("AMD" . "3.3.3")
("BTF" . "2.3.2")
("CAMD" . "3.3.3")
("CCOLAMD" . "3.3.4")
("CHOLMOD" . "5.3.2")
("COLAMD" . "3.3.4")
("CXSparse" . "4.4.1")
("KLU" . "2.3.5")
("LDL" . "3.3.2")
("SuiteSparse_Mongoose" . "3.3.4")
("RBio" . "4.3.4")
("SPEX" . "3.2.3")
("SPQR" . "4.3.4")
("UMFPACK" . "6.3.5")))
;; Source for the modular SuiteSparse packages. When updating, also update the ;; Source for the modular SuiteSparse packages. When updating, also update the
;; (different) versions of the subpackages. ;; (different) versions of the subpackages.
(define suitesparse-version "7.2.0") (define suitesparse-version "7.10.2")
(define suitesparse-source (define suitesparse-source
(origin (origin
(method git-fetch) (method git-fetch)
@ -6167,10 +6183,12 @@ Fresnel integrals, and similar related functions as well.")
(file-name (git-file-name "suitesparse" suitesparse-version)) (file-name (git-file-name "suitesparse" suitesparse-version))
(sha256 (sha256
(base32 (base32
"1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa")) "1ndwx2cp5zxrikq4xdrzjrxk1b5ps7lyi6qw34m8jpfpa0ba01ln"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
#~(begin #~(begin
;; Empty except for a .gitignore.
(delete-file-recursively "build")
;; Delete autogenerated and bundled files ;; Delete autogenerated and bundled files
(for-each delete-file (find-files "." "\\.pdf$")) (for-each delete-file (find-files "." "\\.pdf$"))
;; ssget ;; ssget
@ -6181,19 +6199,13 @@ Fresnel integrals, and similar related functions as well.")
(delete-file-recursively "CHOLMOD/SuiteSparse_metis") (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
; GraphBLAS ; GraphBLAS
(delete-file "GraphBLAS/README.md") (delete-file "GraphBLAS/README.md")
(delete-file "GraphBLAS/Config/GB_config.h")
(delete-file "GraphBLAS/Config/GB_prejit.c") (delete-file "GraphBLAS/Config/GB_prejit.c")
(delete-file-recursively "GraphBLAS/cpu_features") (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.c")
(delete-file-recursively "GraphBLAS/lz4/lz4.h") (delete-file-recursively "GraphBLAS/lz4/lz4.h")
(delete-file-recursively "GraphBLAS/lz4/lz4hc.c") (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
(delete-file-recursively "GraphBLAS/lz4/lz4hc.h") (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 "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 "GraphBLAS/xxHash/xxhash.h")
(delete-file-recursively "GraphBLAS/zstd/zstd_subset") (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
;; KLU ;; KLU
@ -6223,6 +6235,7 @@ Fresnel integrals, and similar related functions as well.")
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6239,12 +6252,13 @@ package contains a library with common configuration options.")
(define-public suitesparse-amd (define-public suitesparse-amd
(package (package
(name "suitesparse-amd") (name "suitesparse-amd")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "AMD"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6289,12 +6303,13 @@ to Cholesky factorization (or for LU factorization with diagonal pivoting).")
(define-public suitesparse-btf (define-public suitesparse-btf
(package (package
(name "suitesparse-btf") (name "suitesparse-btf")
(version "2.2.0") (version (assoc-ref %suitesparse-package-versions "BTF"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6322,12 +6337,13 @@ matrix into block upper triangular form.")
(define-public suitesparse-camd (define-public suitesparse-camd
(package (package
(name "suitesparse-camd") (name "suitesparse-camd")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "CAMD"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6369,12 +6385,13 @@ ordering.")
(define-public suitesparse-colamd (define-public suitesparse-colamd
(package (package
(name "suitesparse-colamd") (name "suitesparse-colamd")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "COLAMD"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6402,12 +6419,13 @@ matrix with which the LU factorization becomes sparser.")
(define-public suitesparse-ccolamd (define-public suitesparse-ccolamd
(package (package
(name "suitesparse-ccolamd") (name "suitesparse-ccolamd")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "CCOLAMD"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6485,12 +6503,13 @@ COLAMD which has the the option to apply constraints to the ordering.")
(define-public suitesparse-cholmod (define-public suitesparse-cholmod
(package (package
(name "suitesparse-cholmod") (name "suitesparse-cholmod")
(version "4.2.0") (version (assoc-ref %suitesparse-package-versions "CHOLMOD"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6548,7 +6567,7 @@ target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})"
(let ((out (string-append #$output (let ((out (string-append #$output
"/share/doc/" #$name "-" #$version))) "/share/doc/" #$name "-" #$version)))
(install-file "../CHOLMOD/Doc/License.txt" out) (install-file "../CHOLMOD/Doc/License.txt" out)
(install-file "../CHOLMOD/Core/lesser.txt" out) (install-file "../CHOLMOD/Check/lesser.txt" out)
(install-file "../CHOLMOD/MatrixOps/gpl.txt" out))))))) (install-file "../CHOLMOD/MatrixOps/gpl.txt" out)))))))
(inputs (inputs
(list gklib-suitesparse (list gklib-suitesparse
@ -6571,12 +6590,13 @@ and other related operations.")
(define-public suitesparse-cxsparse (define-public suitesparse-cxsparse
(package (package
(name "suitesparse-cxsparse") (name "suitesparse-cxsparse")
(version "4.2.0") (version (assoc-ref %suitesparse-package-versions "CXSparse"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6605,12 +6625,13 @@ direct methods on both real and complex matrices.")
(define-public suitesparse-klu (define-public suitesparse-klu
(package (package
(name "suitesparse-klu") (name "suitesparse-klu")
(version "2.2.0") (version (assoc-ref %suitesparse-package-versions "KLU"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6670,12 +6691,13 @@ for real and complex matrices.")
(define-public suitesparse-ldl (define-public suitesparse-ldl
(package (package
(name "suitesparse-ldl") (name "suitesparse-ldl")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "LDL"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6724,12 +6746,13 @@ code.")
(define-public suitesparse-rbio (define-public suitesparse-rbio
(package (package
(name "suitesparse-rbio") (name "suitesparse-rbio")
(version "4.2.0") (version (assoc-ref %suitesparse-package-versions "RBio"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6762,12 +6785,13 @@ for reading and writing sparse matrices in the Rutherford/Boeing format.")
(define-public suitesparse-mongoose (define-public suitesparse-mongoose
(package (package
(name "suitesparse-mongoose") (name "suitesparse-mongoose")
(version "3.2.0") (version (assoc-ref %suitesparse-package-versions "SuiteSparse_Mongoose"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6839,12 +6863,13 @@ edge cuts using a coarsening and refinement framework.")
(define-public suitesparse-spex (define-public suitesparse-spex
(package (package
(name "suitesparse-spex") (name "suitesparse-spex")
(version "2.2.0") (version (assoc-ref %suitesparse-package-versions "SPEX"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6883,6 +6908,7 @@ edge cuts using a coarsening and refinement framework.")
texlive-soul texlive-soul
texlive-multirow texlive-multirow
texlive-algorithms texlive-algorithms
texlive-fncychap
texlive-float texlive-float
texlive-algorithmicx texlive-algorithmicx
texlive-cprotect texlive-cprotect
@ -6906,12 +6932,13 @@ LU factorization for solving unsymmetric sparse linear systems.")
(define-public suitesparse-spqr (define-public suitesparse-spqr
(package (package
(name "suitesparse-spqr") (name "suitesparse-spqr")
(version "4.2.0") (version (assoc-ref %suitesparse-package-versions "SPQR"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
@ -6957,7 +6984,8 @@ LU factorization for solving unsymmetric sparse linear systems.")
(propagated-inputs (list suitesparse-cholmod)) (propagated-inputs (list suitesparse-cholmod))
(native-inputs (native-inputs
(list (texlive-local-tree (list (texlive-local-tree
(list texlive-epsf)))) (list texlive-epsf
texlive-etoolbox))))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html") (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Sparse QR factorization method") (synopsis "Sparse QR factorization method")
(description "The SPQR (SuiteSparseQR) package provides sparse QR (description "The SPQR (SuiteSparseQR) package provides sparse QR
@ -6968,12 +6996,13 @@ matrices.")
(define-public suitesparse-umfpack (define-public suitesparse-umfpack
(package (package
(name "suitesparse-umfpack") (name "suitesparse-umfpack")
(version "6.2.0") (version (assoc-ref %suitesparse-package-versions "UMFPACK"))
(source suitesparse-source) (source suitesparse-source)
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:tests? #f #:tests? #f
#:configure-flags #~(list "-DSUITESPARSE_INCLUDEDIR_POSTFIX=")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir (add-after 'unpack 'chdir

View file

@ -1,5 +1,5 @@
This patch contains the relevant changes to GKlib made in SuiteSparse This patch contains the relevant changes to GKlib made in SuiteSparse
(CHOLMOD) for the version 7.2.0 (CHOLMOD) for the version 7.10.2
(https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2). (https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2).
The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted. The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted.
@ -10,7 +10,7 @@ diff -ur a/CMakeLists.txt b/CMakeLists.txt
option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)
+find_package ( SuiteSparse_config 7.1.0 REQUIRED ) +find_package ( SuiteSparse_config 7.10.2 REQUIRED )
+ +
get_filename_component(abs "." ABSOLUTE) get_filename_component(abs "." ABSOLUTE)
set(GKLIB_PATH ${abs}) set(GKLIB_PATH ${abs})