guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu: man-db: Embed absolute reference to 'preconv'.


From: Marius Bakke
Subject: 02/05: gnu: man-db: Embed absolute reference to 'preconv'.
Date: Sun, 6 May 2018 09:52:58 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 296551a2e9310d4a030ee49530e9367e73aaeecf
Author: Marius Bakke <address@hidden>
Date:   Sat May 5 23:30:04 2018 +0200

    gnu: man-db: Embed absolute reference to 'preconv'.
    
    Fixes <https://bugs.gnu.org/30785>.
    Reported by Tobias Geerinckx-Rice <address@hidden>.
    
    * gnu/packages/man.scm (man-db)[arguments]: Rename 'patch-iconv-path' to
    'patch-absolute-paths'.  Add substitution for "preconv".
---
 gnu/packages/man.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index ca6fd35..334ebe2 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Alex Kost <address@hidden>
 ;;; Copyright © 2015, 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2018 Marius Bakke <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -80,11 +81,19 @@ a flexible and convenient way.")
                               (string-append "#!" (which "sh")))))
                          (remove file-is-directory?
                                  (find-files "src/tests" ".*"))))))
-         (add-after 'unpack 'patch-iconv-path
+         (add-after 'unpack 'patch-absolute-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/man.c"
                (("\"iconv\"")
                 (string-append "\"" (which "iconv") "\"")))
+             ;; Embed an absolute reference to "preconv", otherwise it
+             ;; falls back to searching in PATH and ultimately fails
+             ;; to render unicode data (see <https://bugs.gnu.org/30785>).
+             (substitute* "lib/encodings.c"
+               (("groff_preconv = NULL")
+                (string-append "groff_preconv = \""
+                               (assoc-ref inputs "groff-minimal")
+                               "/bin/preconv\"")))
              #t)))
        #:configure-flags
        (let ((groff (assoc-ref %build-inputs "groff"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]