me
/
guix
Archived
1
0
Fork 0

gnu: atlas: Use 'modify-phases'.

* gnu/packages/maths.scm (atlas)[arguments]: Use 'modify-phases'.
master
Efraim Flashner 2016-08-19 16:16:06 +03:00
parent 349cef585d
commit e5b4b96b8c
No known key found for this signature in database
GPG Key ID: F4C1D3917EACEE93
1 changed files with 44 additions and 49 deletions

View File

@ -2079,37 +2079,33 @@ packages.")
,(string-append "--with-netlib-lapack-tarfile=" ,(string-append "--with-netlib-lapack-tarfile="
(assoc-ref %build-inputs "lapack-tar"))) (assoc-ref %build-inputs "lapack-tar")))
#:phases #:phases
(alist-cons-after (modify-phases %standard-phases
'install 'install-doc (add-after 'install 'install-doc
(lambda* (#:key outputs inputs #:allow-other-keys) (lambda* (#:key outputs inputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc") (let ((doc (string-append (assoc-ref outputs "doc")
"/share/doc/atlas"))) "/share/doc/atlas")))
(mkdir-p doc) (mkdir-p doc)
(fold (lambda (file previous) (fold (lambda (file previous)
(and previous (zero? (system* "cp" file doc)))) (and previous (zero? (system* "cp" file doc))))
#t (find-files "../ATLAS/doc" ".*")))) #t (find-files "../ATLAS/doc" ".*")))))
(alist-cons-after (add-after 'check 'check-pt
'check 'check-pt (lambda _ (zero? (system* "make" "ptcheck"))))
(lambda _ (zero? (system* "make" "ptcheck")))
;; Fix files required to run configure. ;; Fix files required to run configure.
(alist-cons-before (add-before 'configure 'fix-/bin/sh
'configure 'fix-/bin/sh
(lambda _ (lambda _
;; Use `sh', not `/bin/sh'. ;; Use `sh', not `/bin/sh'.
(substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c") (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
(("/bin/sh") (("/bin/sh")
"sh"))) "sh"))))
;; Fix /bin/sh in generated make files. ;; Fix /bin/sh in generated make files.
(alist-cons-after (add-after 'configure 'fix-/bin/sh-in-generated-files
'configure 'fix-/bin/sh-in-generated-files
(lambda _ (lambda _
(substitute* (find-files "." "^[Mm]ake\\.inc.*") (substitute* (find-files "." "^[Mm]ake\\.inc.*")
(("/bin/sh") (("/bin/sh")
"sh"))) "sh"))))
;; ATLAS configure program does not accepts the default flags ;; ATLAS configure program does not accepts the default flags
;; passed by the 'gnu-build-system'. ;; passed by the 'gnu-build-system'.
(alist-replace (replace 'configure
'configure
(lambda* (#:key native-inputs inputs outputs (lambda* (#:key native-inputs inputs outputs
(configure-flags '()) (configure-flags '())
#:allow-other-keys #:rest args) #:allow-other-keys #:rest args)
@ -2130,8 +2126,7 @@ packages.")
(format #t "configure flags: ~s~%" flags) (format #t "configure flags: ~s~%" flags)
(zero? (apply system* bash (zero? (apply system* bash
(string-append srcdir "/configure") (string-append srcdir "/configure")
flags)))) flags))))))))
%standard-phases)))))))
(synopsis "Automatically Tuned Linear Algebra Software") (synopsis "Automatically Tuned Linear Algebra Software")
(description (description
"ATLAS is an automatically tuned linear algebra software library "ATLAS is an automatically tuned linear algebra software library