[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: gnu: ncurses: Add "doc" output.
From: |
Ludovic Courtès |
Subject: |
03/06: gnu: ncurses: Add "doc" output. |
Date: |
Tue, 15 Dec 2015 22:40:04 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit 27ec9624ca6a6ba64704bc1f976d8bf818fea05d
Author: Ludovic Courtès <address@hidden>
Date: Tue Dec 15 23:02:51 2015 +0100
gnu: ncurses: Add "doc" output.
* gnu/packages/ncurses.scm (ncurses)[outputs]: New field.
[arguments] <configure>: Replace standard 'configure' phase.
<remove-shebang-phase>: Remove "mandir=" line from 'ncursesw6-config'.
---
gnu/packages/ncurses.scm | 34 ++++++++++++++++++++++++++++------
1 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index ae3788c..147033a 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -29,16 +29,35 @@
'(lambda _
(for-each patch-makefile-SHELL
(find-files "." "Makefile.in"))))
+ (configure-phase
+ ;; The 'configure' script does not understand '--docdir', so we must
+ ;; override that and use '--mandir' instead.
+ '(lambda* (#:key build target outputs configure-flags
+ #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (zero? (apply system* "./configure"
+ (string-append "SHELL=" (which "sh"))
+ (string-append "--build=" build)
+ (string-append "--prefix=" out)
+ (string-append "--mandir=" doc "/share/man")
+ (if target
+ (cons (string-append "--host=" target)
+ configure-flags)
+ configure-flags))))))
(remove-shebang-phase
'(lambda _
;; To avoid retaining a reference to the bootstrap Bash via the
- ;; shebang of the 'ncursesw5-config' script, simply remove that
- ;; shebang: it'll work just as well without it.
+ ;; shebang of the 'ncursesw6-config' script, simply remove that
+ ;; shebang: it'll work just as well without it. Likewise, do not
+ ;; retain a reference to the "doc" output.
(substitute* "misc/ncurses-config.in"
(("address@hidden@")
"# No shebang here, use /bin/sh!\n")
(("@SHELL@ \\$0")
- "$0"))
+ "$0")
+ (("mandir=.*$")
+ "mandir=share/man"))
#t))
(post-install-phase
'(lambda* (#:key outputs #:allow-other-keys)
@@ -79,6 +98,8 @@
(base32
"0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm"))))
(build-system gnu-build-system)
+ (outputs '("out"
+ "doc")) ;1 MiB of man pages
(arguments
`(#:configure-flags
`("--with-shared" "--without-debug" "--enable-widec"
@@ -95,12 +116,13 @@
"/lib"))
#:tests? #f ; no "check" target
#:phases (modify-phases %standard-phases
+ (replace 'configure ,configure-phase)
(add-after 'install 'post-install
- ,post-install-phase)
+ ,post-install-phase)
(add-before 'configure 'patch-makefile-SHELL
- ,patch-makefile-phase)
+ ,patch-makefile-phase)
(add-after 'unpack 'remove-unneeded-shebang
- ,remove-shebang-phase))))
+ ,remove-shebang-phase))))
(self-native-input? #t) ; for `tic'
(native-search-paths
(list (search-path-specification
- branch core-updates updated (304e4f5 -> 6042f40), Ludovic Courtès, 2015/12/15
- 01/06: gnu: bash: Add "doc" output., Ludovic Courtès, 2015/12/15
- 02/06: gnu: ncurses: Add 'TERMINFO_DIRS' search path variable., Ludovic Courtès, 2015/12/15
- 03/06: gnu: ncurses: Add "doc" output.,
Ludovic Courtès <=
- 05/06: gnu: util-linux: Do not build static libraries., Ludovic Courtès, 2015/12/15
- 04/06: gnu: gettext: Add "doc" output., Ludovic Courtès, 2015/12/15
- 06/06: gnu: pcre: Add "doc" output., Ludovic Courtès, 2015/12/15