distro: m4: Patch references to /bin/sh.

* distro/packages/m4.scm (m4): Add `pre-check' phase.
This commit is contained in:
Ludovic Courtès 2012-12-20 19:01:14 +01:00
parent 42ff70e262
commit f5b7894942
1 changed files with 13 additions and 1 deletions

View File

@ -46,7 +46,19 @@
#:patches (list (assoc-ref %build-inputs "patch/s_isdir")
(assoc-ref %build-inputs
"patch/readlink-EINVAL")
(assoc-ref %build-inputs "patch/gets"))))
(assoc-ref %build-inputs "patch/gets"))
#:phases (alist-cons-before
'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
;; Fix references to /bin/sh.
(let ((bash (assoc-ref inputs "bash")))
(for-each patch-shebang
(find-files "tests" "\\.sh$"))
(substitute* (find-files "tests"
"posix_spawn")
(("/bin/sh")
(format #f "~a/bin/bash" bash)))))
%standard-phases)))
((system cross-system)
`(#:patches (list (assoc-ref %build-inputs "patch/s_isdir")
(assoc-ref %build-inputs