gnu: atlas: Use 'modify-phases'.
* gnu/packages/maths.scm (atlas)[arguments]: Use 'modify-phases'.master
parent
349cef585d
commit
e5b4b96b8c
|
@ -2079,59 +2079,54 @@ 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.
|
(add-before 'configure 'fix-/bin/sh
|
||||||
(alist-cons-before
|
|
||||||
'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'.
|
(replace 'configure
|
||||||
(alist-replace
|
(lambda* (#:key native-inputs inputs outputs
|
||||||
'configure
|
(configure-flags '())
|
||||||
(lambda* (#:key native-inputs inputs outputs
|
#:allow-other-keys #:rest args)
|
||||||
(configure-flags '())
|
(let* ((prefix (assoc-ref outputs "out"))
|
||||||
#:allow-other-keys #:rest args)
|
(bash (or (and=> (assoc-ref
|
||||||
(let* ((prefix (assoc-ref outputs "out"))
|
(or native-inputs inputs) "bash")
|
||||||
(bash (or (and=> (assoc-ref
|
(cut string-append <> "/bin/bash"))
|
||||||
(or native-inputs inputs) "bash")
|
"/bin/sh"))
|
||||||
(cut string-append <> "/bin/bash"))
|
(flags `(,(string-append "--prefix=" prefix)
|
||||||
"/bin/sh"))
|
,@configure-flags))
|
||||||
(flags `(,(string-append "--prefix=" prefix)
|
(abs-srcdir (getcwd))
|
||||||
,@configure-flags))
|
(srcdir (string-append "../" (basename abs-srcdir))))
|
||||||
(abs-srcdir (getcwd))
|
(format #t "source directory: ~s (relative from build: ~s)~%"
|
||||||
(srcdir (string-append "../" (basename abs-srcdir))))
|
abs-srcdir srcdir)
|
||||||
(format #t "source directory: ~s (relative from build: ~s)~%"
|
(mkdir "../build")
|
||||||
abs-srcdir srcdir)
|
(chdir "../build")
|
||||||
(mkdir "../build")
|
(format #t "build directory: ~s~%" (getcwd))
|
||||||
(chdir "../build")
|
(format #t "configure flags: ~s~%" flags)
|
||||||
(format #t "build directory: ~s~%" (getcwd))
|
(zero? (apply system* bash
|
||||||
(format #t "configure flags: ~s~%" flags)
|
(string-append srcdir "/configure")
|
||||||
(zero? (apply system* bash
|
flags))))))))
|
||||||
(string-append srcdir "/configure")
|
|
||||||
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
|
||||||
|
|
Reference in New Issue