mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: groff-minimal: Disable relocatability.
* gnu/packages/groff.scm (groff-minimal)[arguments]<#:phases> [disable-relocatability]: New phase.
This commit is contained in:
parent
6c4a951a6e
commit
73b2ce8795
1 changed files with 30 additions and 0 deletions
|
@ -96,6 +96,36 @@ (define-public groff-minimal
|
|||
,@(substitute-keyword-arguments (package-arguments groff)
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-after 'unpack 'disable-relocatability
|
||||
(lambda _
|
||||
;; Groff contains a Rube Goldberg-esque relocator for the
|
||||
;; file "charset.alias".
|
||||
;; It tries to find the current executable using realpath,
|
||||
;; a do-it-yourself search in $PATH and so on.
|
||||
;; Furthermore, the routine that does the search is buggy
|
||||
;; in that it doesn't handle error cases when they arise.
|
||||
;; This causes preconv to segfault when trying to look up
|
||||
;; the file "charset.alias" in the NULL location.
|
||||
;; The "charset.alias" parser is a copy of gnulib's, and a
|
||||
;; non-broken version of gnulib's "charset.alias" parser
|
||||
;; is part of glibc's libcharset.
|
||||
;; However, groff unconditionally uses their own
|
||||
;; "charset.alias" parser, but then DOES NOT INSTALL the
|
||||
;; file "charset.alias" when glibc is too new.
|
||||
;; In Guix, our file "charset.alias" only contains an
|
||||
;; obscure alias for ASCII and nothing else.
|
||||
;; So just disable relocation and make the entire
|
||||
;; "charset.alias" lookup fail.
|
||||
;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30785>
|
||||
;; for details.
|
||||
(substitute* "src/libs/libgroff/Makefile.sub"
|
||||
(("-DENABLE_RELOCATABLE=1") ""))
|
||||
;; That file contains a crash bug--so make sure that
|
||||
;; its contents are not there.
|
||||
(call-with-output-file "src/libs/libgroff/relocate.cpp"
|
||||
(lambda (port)
|
||||
#t))
|
||||
#t))
|
||||
(add-after 'install 'remove-non-essential-programs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Keep only the programs that man-db needs at run time,
|
||||
|
|
Loading…
Reference in a new issue