Skip to content
Snippets Groups Projects
Commit 3871c9f5 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 9aa949a4
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,18 @@ (define-public gawk
'configure 'set-shell-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; Refer to the right shell.
(let ((bash (assoc-ref inputs "bash")))
(substitute* "io.c"
(("/bin/sh")
(string-append bash "/bin/bash")))))
%standard-phases)))
;; FIXME: Remove `else' arm upon core-updates.
,(if (%current-target-system)
'(let ((sh (which "sh")))
(substitute* "io.c"
(("/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)))
(home-page "http://www.gnu.org/software/gawk/")
(synopsis "A text scanning and processing language")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment