summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-05-25 17:54:27 +0200
committerLudovic Courtès <ludo@gnu.org>2013-05-25 17:54:27 +0200
commit3871c9f50092b152367f6b2b570d481386e0d398 (patch)
tree8408fbcc5c203b9f978f83e33e369032dc36a917 /gnu
parent9aa949a4b6cb3f0501458f82cc1a33dba0130a57 (diff)
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')
-rw-r--r--gnu/packages/gawk.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index bba2ea1af0e..34a119f05be 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -44,11 +44,18 @@
44 'configure 'set-shell-file-name 44 'configure 'set-shell-file-name
45 (lambda* (#:key inputs #:allow-other-keys) 45 (lambda* (#:key inputs #:allow-other-keys)
46 ;; Refer to the right shell. 46 ;; Refer to the right shell.
47 (let ((bash (assoc-ref inputs "bash"))) 47 ;; FIXME: Remove `else' arm upon core-updates.
48 (substitute* "io.c" 48 ,(if (%current-target-system)
49 (("/bin/sh") 49 '(let ((sh (which "sh")))
50 (string-append bash "/bin/bash"))))) 50 (substitute* "io.c"
51 %standard-phases))) 51 (("/bin/sh") sh)))
52 '(let ((bash (assoc-ref inputs "bash")))
53 (substitute* "io.c"
54 (("/bin/sh")
55 (string-append bash "/bin/bash"))))))
56 ,(if (%current-target-system)
57 '%standard-cross-phases
58 '%standard-phases))))
52 (inputs `(("libsigsegv" ,libsigsegv))) 59 (inputs `(("libsigsegv" ,libsigsegv)))
53 (home-page "http://www.gnu.org/software/gawk/") 60 (home-page "http://www.gnu.org/software/gawk/")
54 (synopsis "A text scanning and processing language") 61 (synopsis "A text scanning and processing language")