distro: ncurses: Patch references to /bin/sh.
* distro/packages/ncurses.scm (ncurses): Add `patch-makefile-phase' and `pre-install-phase'.
This commit is contained in:
parent
a18b4d085b
commit
49f5a21698
|
@ -24,7 +24,14 @@
|
||||||
#:use-module (guix build-system gnu))
|
#:use-module (guix build-system gnu))
|
||||||
|
|
||||||
(define-public ncurses
|
(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)
|
'(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
;; When building a wide-character (Unicode) build, create backward
|
;; When building a wide-character (Unicode) build, create backward
|
||||||
|
@ -81,9 +88,15 @@
|
||||||
'("--without-cxx-binding")
|
'("--without-cxx-binding")
|
||||||
'()))
|
'()))
|
||||||
#:tests? #f ; no "check" target
|
#:tests? #f ; no "check" target
|
||||||
#:phases (alist-cons-after 'install 'post-install
|
#:phases (alist-cons-after
|
||||||
,post-install-phase
|
'install 'post-install ,post-install-phase
|
||||||
%standard-phases)
|
(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
|
;; 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, to avoid retaining a reference to the build-time Bash.
|
||||||
|
|
Loading…
Reference in New Issue