gnu: scotch, pt-scotch: Use modify-phases.

* gnu/packages/maths.scm (scotch, pt-scotch)[arguments]: Use modify-phases.
This commit is contained in:
Eric Bavier 2015-06-15 05:09:55 -05:00
parent 6c7985408f
commit d6602ee9d4

View file

@ -802,10 +802,11 @@ (define-public scotch
("bison" ,bison)))
(arguments
`(#:phases
(alist-cons-after
(modify-phases %standard-phases
(add-after
'unpack 'chdir-to-src
(lambda _ (chdir "src"))
(alist-replace
(lambda _ (chdir "src")))
(replace
'configure
(lambda _
(call-with-output-file "Makefile.inc"
@ -837,16 +838,15 @@ (define-public scotch
;; XXX: Causes invalid frees in superlu-dist tests
;; "SCOTCH_PTHREAD"
;; "SCOTCH_PTHREAD_NUMBER=2"
"restrict=__restrict")))))
(alist-replace
"restrict=__restrict"))))))
(replace
'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(mkdir out)
(zero? (system* "make"
(string-append "prefix=" out)
"install"))))
%standard-phases)))))
"install"))))))))
(home-page "http://www.labri.fr/perso/pelegrin/scotch/")
(synopsis "Programs and libraries for graph algorithms")
(description "SCOTCH is a set of programs and libraries which implement
@ -867,26 +867,18 @@ (define-public pt-scotch
(arguments
(substitute-keyword-arguments (package-arguments scotch)
((#:phases scotch-phases)
`(alist-replace
`(modify-phases ,scotch-phases
(replace
'build
;; TODO: Would like to add parallelism here
(lambda _
(and
(zero? (system* "make" "ptscotch"))
;; Install the serial metis compatibility library
(zero? (system* "make" "-C" "libscotchmetis" "install"))))
(alist-replace
(zero? (system* "make" "-C" "libscotchmetis" "install")))))
(replace
'check
(lambda _ (zero? (system* "make" "ptcheck")))
(alist-replace
'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(mkdir out)
(zero? (system* "make"
(string-append "prefix=" out)
"install"))))
,scotch-phases))))))
(lambda _ (zero? (system* "make" "ptcheck"))))))))
(synopsis "Programs and libraries for graph algorithms (with MPI)")))
(define-public gsegrafix