aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn/packages/maths.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gn/packages/maths.scm b/gn/packages/maths.scm
index 52e2a28..097000b 100644
--- a/gn/packages/maths.scm
+++ b/gn/packages/maths.scm
@@ -79,3 +79,49 @@
(sha256
(base32
"1cddqsdcfwavdklg7hsfifppsry81dx3c17wzk6r22mjjpwcihmb"))))))
+
+(define-public suitesparse-3.5.0
+ (package
+ (inherit suitesparse)
+ (version "3.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0npn7c1j5qag5m2r0cmh3bwc42c1jk8k2yg2cfyxlcrp0h7wn4rc"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments suitesparse)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'build-without-metis
+ (lambda _
+ (substitute* "UFconfig/UFconfig.mk"
+ (("CHOLMOD_CONFIG = ")
+ "CHOLMOD_CONFIG = -DNPARTITION")
+ (("SPQR_CONFIG = ")
+ "SPQR_CONFIG = -DNPARTITION")
+ (("METIS = ../../metis-4.0/libmetis.a")
+ "METIS =")
+ (("METIS_PATH = .*")
+ "METIS_PATH = \n"))
+ (substitute* "Makefile"
+ (("\\( .*CHOLMOD .*") "\n"))
+ #t))
+ (add-after 'unpack 'fix-source
+ (lambda _
+ (substitute* "UFconfig/Makefile"
+ (("Lib/") ""))
+ #t))
+ (add-before 'install 'prepare-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/lib"))
+ (mkdir-p (string-append out "/include")))
+ #t))))))
+ (inputs
+ `(,@(fold alist-delete (package-inputs suitesparse)
+ '("metis"))))))