aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2016-07-07 17:03:44 -0500
committerEric Bavier <bavier@member.fsf.org>2016-07-20 21:16:24 -0500
commit64dcc2896389475b0a3133854952bea1fe52cada (patch)
tree3142d90d81e18268b6b47fb62dbf1e20a5b0c550 /gnu/packages
parent9474a4b3ec568164583a4ca7aa3c01d02ac014da (diff)
downloadpatches-64dcc2896389475b0a3133854952bea1fe52cada.tar
patches-64dcc2896389475b0a3133854952bea1fe52cada.tar.gz
gnu: petsc: Use modify-phases.
* gnu/packages/maths.scm (petsc)[arguments]: Use modify-phases.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/maths.scm45
1 files changed, 21 insertions, 24 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4a60e2f7ce..b3780fa265 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -829,30 +829,28 @@ ASCII text files using Gmsh's own scripting language.")
,(string-append "--with-superlu-lib="
(assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a"))
#:phases
- (alist-replace
- 'configure
- ;; PETSc's configure script is actually a python script, so we can't
- ;; run it with bash.
- (lambda* (#:key outputs (configure-flags '())
- #:allow-other-keys)
- (let* ((prefix (assoc-ref outputs "out"))
- (flags `(,(string-append "--prefix=" prefix)
- ,@configure-flags)))
- (format #t "build directory: ~s~%" (getcwd))
- (format #t "configure flags: ~s~%" flags)
- (zero? (apply system* "./configure" flags))))
- (alist-cons-after
- 'configure 'clean-local-references
- ;; Try to keep build directory names from leaking into compiled code
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
- (((getcwd)) out))))
- (alist-cons-after
- 'install 'clean-install
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; PETSc's configure script is actually a python script, so we can't
+ ;; run it with bash.
+ (lambda* (#:key outputs (configure-flags '())
+ #:allow-other-keys)
+ (let* ((prefix (assoc-ref outputs "out"))
+ (flags `(,(string-append "--prefix=" prefix)
+ ,@configure-flags)))
+ (format #t "build directory: ~s~%" (getcwd))
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags)))))
+ (add-after 'configure 'clean-local-references
+ ;; Try to keep build directory names from leaking into compiled code
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
+ (((getcwd)) out)))))
+ (add-after 'install 'clean-install
;; Try to keep installed files from leaking build directory names.
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (let ((out (assoc-ref outputs "out")))
(substitute* (map (lambda (file)
(string-append out "/lib/petsc/conf/" file))
'("petscvariables" "PETScConfig.cmake"))
@@ -869,8 +867,7 @@ ASCII text files using Gmsh's own scripting language.")
'("configure.log" "make.log" "gmake.log"
"test.log" "error.log" "RDict.db"
;; Once installed, should uninstall with Guix
- "uninstall.py"))))
- %standard-phases)))))
+ "uninstall.py"))))))))
(home-page "http://www.mcs.anl.gov/petsc")
(synopsis "Library to solve PDEs")
(description "PETSc, pronounced PET-see (the S is silent), is a suite of