mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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'.
This commit is contained in:
parent
de6d9f4553
commit
27ec9624ca
1 changed files with 28 additions and 6 deletions
|
@ -29,16 +29,35 @@ (define-public ncurses
|
||||||
'(lambda _
|
'(lambda _
|
||||||
(for-each patch-makefile-SHELL
|
(for-each patch-makefile-SHELL
|
||||||
(find-files "." "Makefile.in"))))
|
(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
|
(remove-shebang-phase
|
||||||
'(lambda _
|
'(lambda _
|
||||||
;; To avoid retaining a reference to the bootstrap Bash via the
|
;; To avoid retaining a reference to the bootstrap Bash via the
|
||||||
;; shebang of the 'ncursesw5-config' script, simply remove that
|
;; shebang of the 'ncursesw6-config' script, simply remove that
|
||||||
;; shebang: it'll work just as well without it.
|
;; shebang: it'll work just as well without it. Likewise, do not
|
||||||
|
;; retain a reference to the "doc" output.
|
||||||
(substitute* "misc/ncurses-config.in"
|
(substitute* "misc/ncurses-config.in"
|
||||||
(("#!@SHELL@")
|
(("#!@SHELL@")
|
||||||
"# No shebang here, use /bin/sh!\n")
|
"# No shebang here, use /bin/sh!\n")
|
||||||
(("@SHELL@ \\$0")
|
(("@SHELL@ \\$0")
|
||||||
"$0"))
|
"$0")
|
||||||
|
(("mandir=.*$")
|
||||||
|
"mandir=share/man"))
|
||||||
#t))
|
#t))
|
||||||
(post-install-phase
|
(post-install-phase
|
||||||
'(lambda* (#:key outputs #:allow-other-keys)
|
'(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
@ -79,6 +98,8 @@ (define lib.so
|
||||||
(base32
|
(base32
|
||||||
"0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm"))))
|
"0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(outputs '("out"
|
||||||
|
"doc")) ;1 MiB of man pages
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
`("--with-shared" "--without-debug" "--enable-widec"
|
`("--with-shared" "--without-debug" "--enable-widec"
|
||||||
|
@ -95,6 +116,7 @@ (define lib.so
|
||||||
"/lib"))
|
"/lib"))
|
||||||
#:tests? #f ; no "check" target
|
#:tests? #f ; no "check" target
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
|
(replace 'configure ,configure-phase)
|
||||||
(add-after 'install 'post-install
|
(add-after 'install 'post-install
|
||||||
,post-install-phase)
|
,post-install-phase)
|
||||||
(add-before 'configure 'patch-makefile-SHELL
|
(add-before 'configure 'patch-makefile-SHELL
|
||||||
|
|
Loading…
Reference in a new issue