diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-05-26 22:48:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-05-26 23:46:11 +0200 |
commit | 9a97b8144ded0385d1e73ebb0bc1b66d1f5c461b (patch) | |
tree | 3d320f81c2c132fd84527f9a457bfd7b90180942 /gnu/packages | |
parent | aa289a3e82bbbf2aceccc3abacf5343e0d4319ba (diff) | |
download | guix-9a97b8144ded0385d1e73ebb0bc1b66d1f5c461b.tar.gz |
gnu: bash: Fix cross-compilation.
* gnu/packages/bash.scm (bash): Pass "bash_cv_job_control_missing=no" when (%current-target-system) is true.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/bash.scm | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 7caa26f36c..637c098604 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,19 +26,29 @@ #:use-module (guix build-system gnu)) (define-public bash - (let ((cppflags (string-join '("-DSYS_BASHRC='\"/etc/bashrc\"'" - "-DSYS_BASH_LOGOUT='\"/etc/bash_logout\"'" - "-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" - "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" - "-DNON_INTERACTIVE_LOGIN_SHELLS" - "-DSSH_SOURCE_BASHRC") - " ")) - (post-install-phase - '(lambda* (#:key outputs #:allow-other-keys) - ;; Add a `bash' -> `sh' link. - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion (string-append out "/bin") - (symlink "bash" "sh")))))) + (let* ((cppflags (string-join '("-DSYS_BASHRC='\"/etc/bashrc\"'" + "-DSYS_BASH_LOGOUT='\"/etc/bash_logout\"'" + "-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" + "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" + "-DNON_INTERACTIVE_LOGIN_SHELLS" + "-DSSH_SOURCE_BASHRC") + " ")) + (configure-flags + ``("--with-installed-readline" + ,,(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "readline") + "/lib" + " -Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib"))) + (post-install-phase + '(lambda* (#:key outputs #:allow-other-keys) + ;; Add a `bash' -> `sh' link. + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion (string-append out "/bin") + (symlink "bash" "sh")))))) (package (name "bash") (version "4.2") @@ -53,15 +63,12 @@ (inputs `(("readline" ,readline) ("ncurses" ,ncurses))) ; TODO: add texinfo (arguments - `(#:configure-flags `("--with-installed-readline" - ,,(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib")) + `(;; When cross-compiling, `configure' incorrectly guesses that job + ;; control is missing. + #:configure-flags ,(if (%current-target-system) + `(cons* "bash_cv_job_control_missing=no" + ,configure-flags) + configure-flags) ;; Bash is reportedly not parallel-safe. See, for instance, ;; <http://patches.openembedded.org/patch/32745/> and @@ -75,7 +82,9 @@ #:phases (alist-cons-after 'install 'post-install ,post-install-phase - %standard-phases))) + ,(if (%current-target-system) + '%standard-cross-phases + '%standard-phases)))) (synopsis "The GNU Bourne-Again SHell") (description "Bash is the shell, or command language interpreter, that will appear in |