gnu: Add gklib-suitesparse.

* gnu/packages/maths.scm (gklib-suitesparse): New variable.
* gnu/packages/patches/gklib-suitesparse.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
David Elsing 2023-10-05 21:34:53 +00:00 committed by Ludovic Courtès
parent 9b5dbc46e6
commit 95ecbdc9b1
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 91 additions and 0 deletions

View file

@ -5397,6 +5397,31 @@ matrix with which the LU factorization becomes sparser. It is a variant of
COLAMD which has the the option to apply constraints to the ordering.")
(license license:bsd-3)))
(define-public gklib-suitesparse
(package/inherit gklib
(name "gklib-suitesparse")
(source (origin
(inherit (package-source gklib))
(patches (cons
(search-patch
"gklib-suitesparse.patch")
(origin-patches (package-source gklib))))))
(arguments
(substitute-keyword-arguments (package-arguments gklib)
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(add-after 'unpack 'patch-cmake
(lambda _
(substitute* "CMakeLists.txt"
(("add_library\\(GKlib.*" all)
(string-append
all
"target_link_libraries(GKlib PUBLIC"
" ${SUITESPARSE_CONFIG_LIBRARIES} m)\n")))))))))
(inputs
(modify-inputs (package-inputs gklib)
(prepend suitesparse-config)))))
(define-public suitesparse
(package
(name "suitesparse")