From ec1280b48c11762699ffa84c8789a4dab2b56b4a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 8 Jul 2019 08:02:00 -0500 Subject: gn: suitesparse-3.5.0: Build with metis. --- gn/packages/maths.scm | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'gn') diff --git a/gn/packages/maths.scm b/gn/packages/maths.scm index d696176..320d83c 100644 --- a/gn/packages/maths.scm +++ b/gn/packages/maths.scm @@ -97,19 +97,13 @@ (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")) + (add-after 'unpack 'unpack-metis + (lambda* (#:key inputs #:allow-other-keys) + (let ((metis (assoc-ref inputs "metis-source"))) + (invoke "tar" "xvf" metis) + ;; backported from 4.0.3 + (substitute* (find-files "metis-4.0") + (("log2") "ilog2"))) #t)) (add-after 'unpack 'fix-source (lambda _ @@ -125,6 +119,14 @@ (mkdir-p (string-append out "/lib")) (mkdir-p (string-append out "/include"))) #t)))))) + (native-inputs + `(("metis-source" ,(origin + (method url-fetch) + (uri "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.1.tar.gz") + (sha256 + (base32 + "0lnkdfdrmmyy67h356bgdc06acvmcr26av9kdvqlws12znrr5iv0")))) + ,@(package-native-inputs suitesparse))) (inputs `(,@(fold alist-delete (package-inputs suitesparse) '("metis")))))) -- cgit v1.2.3