aboutsummaryrefslogtreecommitdiff
path: root/distro/packages/ncurses.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-11 16:01:49 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-11 16:01:49 +0100
commit01e354eb83299d00ddd6ba4beb73bac8130beeae (patch)
tree03368edd8462d818334bec458cd04dc1de4750a1 /distro/packages/ncurses.scm
parentbfe384cc4c7e56ac1eceff8b5d92e916507436eb (diff)
parent28e55604212c01884a77a4f5eb66294c4957c48a (diff)
downloadpatches-01e354eb83299d00ddd6ba4beb73bac8130beeae.tar
patches-01e354eb83299d00ddd6ba4beb73bac8130beeae.tar.gz
Merge branch 'core-updates'
Conflicts: guix/build/union.scm
Diffstat (limited to 'distro/packages/ncurses.scm')
-rw-r--r--distro/packages/ncurses.scm39
1 files changed, 30 insertions, 9 deletions
diff --git a/distro/packages/ncurses.scm b/distro/packages/ncurses.scm
index f8641c72f9..938d1dc2c4 100644
--- a/distro/packages/ncurses.scm
+++ b/distro/packages/ncurses.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.
;;;
@@ -24,7 +24,26 @@
#:use-module (guix build-system gnu))
(define-public ncurses
- (let ((post-install-phase
+ (let ((patch-makefile-phase
+ '(lambda _
+ (for-each patch-makefile-SHELL
+ (find-files "." "Makefile.in"))))
+ (configure-phase
+ '(lambda* (#:key inputs outputs configure-flags
+ #:allow-other-keys)
+ ;; The `ncursesw5-config' has a #!/bin/sh. We want to patch
+ ;; it to point to libc's embedded Bash, to avoid retaining a
+ ;; reference to the bootstrap Bash.
+ (let* ((libc (assoc-ref inputs "libc"))
+ (bash (string-append libc "/bin/bash"))
+ (out (assoc-ref outputs "out")))
+ (format #t "configure flags: ~s~%" configure-flags)
+ (zero? (apply system* bash "./configure"
+ (string-append "SHELL=" bash)
+ (string-append "CONFIG_SHELL=" bash)
+ (string-append "--prefix=" out)
+ configure-flags)))))
+ (post-install-phase
'(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; When building a wide-character (Unicode) build, create backward
@@ -81,13 +100,15 @@
'("--without-cxx-binding")
'()))
#:tests? #f ; no "check" target
- #:phases (alist-cons-after 'install 'post-install
- ,post-install-phase
- %standard-phases)
-
- ;; The `ncursesw5-config' has a #!/bin/sh that we don't want to
- ;; patch, to avoid retaining a reference to the build-time Bash.
- #:patch-shebangs? #f))
+ #:phases (alist-cons-after
+ 'install 'post-install ,post-install-phase
+ (alist-cons-before
+ 'configure 'patch-makefile-SHELL
+ ,patch-makefile-phase
+ (alist-replace
+ 'configure
+ ,configure-phase
+ %standard-phases)))))
((system cross-system)
(arguments cross-system))))
(self-native-input? #t)