summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2023-10-05 21:34:53 +0000
committerLudovic Courtès <ludo@gnu.org>2023-10-06 12:26:45 +0200
commit95ecbdc9b162998c55eb7b355c59fa5205a4373c (patch)
tree81cd8025679ccb7bf916b3ad96de34f135109c1a /gnu/packages/maths.scm
parent9b5dbc46e6945fbb03cdf5918d93ba06de3deb2b (diff)
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>
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 76d770466f..a096b24cfe 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -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")