summaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-12-20 01:35:58 +0100
committerLudovic Courtès <ludo@gnu.org>2012-12-20 01:38:56 +0100
commit49f5a21698f4e47b381c9c1f2ecc13d19d1faaf3 (patch)
tree1473635095b1ec709ef17954216f3e7361b273ee /distro
parenta18b4d085bf7d39cb089f9f67d6089516ebb345a (diff)
downloadpatches-49f5a21698f4e47b381c9c1f2ecc13d19d1faaf3.tar
patches-49f5a21698f4e47b381c9c1f2ecc13d19d1faaf3.tar.gz
distro: ncurses: Patch references to /bin/sh.
* distro/packages/ncurses.scm (ncurses): Add `patch-makefile-phase' and `pre-install-phase'.
Diffstat (limited to 'distro')
-rw-r--r--distro/packages/ncurses.scm21
1 files changed, 17 insertions, 4 deletions
diff --git a/distro/packages/ncurses.scm b/distro/packages/ncurses.scm
index 9764474c93..868222ef83 100644
--- a/distro/packages/ncurses.scm
+++ b/distro/packages/ncurses.scm
@@ -24,7 +24,14 @@
#:use-module (guix build-system gnu))
(define-public ncurses
- (let ((post-install-phase
+ (let ((patch-makefile-phase
+ '(lambda _
+ (substitute* (find-files "." "Makefile.in")
+ (("^SHELL[[:blank:]]*=.*$") ""))))
+ (pre-install-phase
+ '(lambda _
+ (for-each patch-shebang (find-files "." "\\.sh$"))))
+ (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,9 +88,15 @@
'("--without-cxx-binding")
'()))
#:tests? #f ; no "check" target
- #:phases (alist-cons-after 'install 'post-install
- ,post-install-phase
- %standard-phases)
+ #:phases (alist-cons-after
+ 'install 'post-install ,post-install-phase
+ (alist-cons-before
+ 'configure 'patch-makefile-SHELL
+ ,patch-makefile-phase
+ (alist-cons-before
+ 'install 'pre-install-phase
+ ,pre-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.