aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/groff.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-02-25 23:37:31 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-02-28 19:13:54 +0100
commit5466e82a1e61349e5a3f9726a03874e4f9817226 (patch)
treeecee61af0b6b21bf63a9a2fdbb8ac426bdc9b7be /gnu/packages/groff.scm
parent9a6b8c9fa36bca5541336d61685ebdea10654ce4 (diff)
downloadguix-5466e82a1e61349e5a3f9726a03874e4f9817226.tar
guix-5466e82a1e61349e5a3f9726a03874e4f9817226.tar.gz
gnu: groff: Adjust relocatability snippet for 1.22.4.
This commit does three things. It reverts 73b2ce87 ("gnu: groff-minimal: Disable relocatability."), re-applies f57693e1 ("gnu: groff: Disable relocatability."), and finally adjusts the substitution for changes since 0559a4c2 ("gnu: groff: Update to 1.22.4."). * gnu/packages/groff.scm (groff-minimal)[arguments]: Move relocatibility snippet ... (groff)[arguments]: ... here. Don't delete relocation.cpp and adjust file name.
Diffstat (limited to 'gnu/packages/groff.scm')
-rw-r--r--gnu/packages/groff.scm53
1 files changed, 23 insertions, 30 deletions
diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index dd679f1582..cf4a884e04 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -63,6 +63,29 @@
`(#:parallel-build? #f ; parallel build fails
#:phases
(modify-phases %standard-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* "Makefile.in"
+ (("-DENABLE_RELOCATABLE=1") ""))
+ #t))
(add-after 'unpack 'setenv
(lambda _
(setenv "GS_GENERATE_UUIDS" "0")
@@ -101,36 +124,6 @@ is usually the formatter of \"man\" documentation pages.")
,@(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,