gnu: gawk: Allow cross-compilation.

* gnu/packages/gawk.scm (gawk)[arguments]: Use `set-shell-file-name'
  phase that works when cross-compiling; use `%standard-cross-phases' as
  the base when (%current-target-system) is true.
This commit is contained in:
Ludovic Courtès 2013-05-25 17:54:27 +02:00
parent 9aa949a4b6
commit 3871c9f500
1 changed files with 12 additions and 5 deletions

View File

@ -44,11 +44,18 @@
'configure 'set-shell-file-name 'configure 'set-shell-file-name
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Refer to the right shell. ;; Refer to the right shell.
(let ((bash (assoc-ref inputs "bash"))) ;; FIXME: Remove `else' arm upon core-updates.
(substitute* "io.c" ,(if (%current-target-system)
(("/bin/sh") '(let ((sh (which "sh")))
(string-append bash "/bin/bash"))))) (substitute* "io.c"
%standard-phases))) (("/bin/sh") sh)))
'(let ((bash (assoc-ref inputs "bash")))
(substitute* "io.c"
(("/bin/sh")
(string-append bash "/bin/bash"))))))
,(if (%current-target-system)
'%standard-cross-phases
'%standard-phases))))
(inputs `(("libsigsegv" ,libsigsegv))) (inputs `(("libsigsegv" ,libsigsegv)))
(home-page "http://www.gnu.org/software/gawk/") (home-page "http://www.gnu.org/software/gawk/")
(synopsis "A text scanning and processing language") (synopsis "A text scanning and processing language")