diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-05-25 17:54:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-05-25 17:54:27 +0200 |
commit | 3871c9f50092b152367f6b2b570d481386e0d398 (patch) | |
tree | 8408fbcc5c203b9f978f83e33e369032dc36a917 /gnu/packages/gawk.scm | |
parent | 9aa949a4b6cb3f0501458f82cc1a33dba0130a57 (diff) | |
download | guix-3871c9f50092b152367f6b2b570d481386e0d398.tar guix-3871c9f50092b152367f6b2b570d481386e0d398.tar.gz |
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.
Diffstat (limited to 'gnu/packages/gawk.scm')
-rw-r--r-- | gnu/packages/gawk.scm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index bba2ea1af0..34a119f05b 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -44,11 +44,18 @@ '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") |