GNU bug report logs - #74393
[PATCH 0/2] gnu: texinfo-7: Use external modules.

Previous Next

Package: guix-patches;

Reported by: gemmaro <gemmaro.dev <at> gmail.com>

Date: Sun, 17 Nov 2024 10:54:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: gemmaro <gemmaro.dev <at> gmail.com>
To: 74393 <at> debbugs.gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>, gemmaro <gemmaro.dev <at> gmail.com>, Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#74393] [PATCH v2 2/2] gnu: texinfo-7: Use external modules.
Date: Fri, 20 Dec 2024 00:10:34 +0900
* gnu/packages/texinfo.scm (texinfo-7): Use external modules
rather than bundled ones.
[inputs]: Add perl-unicode-eastasianwidth, perl-text-unidecode,
and perl-libintl-perl.
[arguments]<#:configure-flags>: Add a phase
to enable the use of external modules.
<#:phases>: Add Perl modules to the PERL5LIB variable of the texi2any program
in the wrap-program phase.

Change-Id: Ife2cdec50affb5287d5ad850b0ef80c6048b4b32
---
 gnu/packages/texinfo.scm | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 13c780897e..d389e4d60e 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -120,9 +120,17 @@ (define-public texinfo-7
                (base32
                 "10kcdb3pf7yakniccvv0krchs2fh3vh1rvhvnqr98ll3cbj3gbii"))))
     (inputs (modify-inputs (package-inputs texinfo)
-              (append perl-archive-zip)))        ;needed for 'tex2any --epub3'
+              (append perl-archive-zip           ;needed for 'tex2any --epub3'
+                      perl-unicode-eastasianwidth perl-text-unidecode
+                      perl-libintl-perl)))
     (arguments
      (substitute-keyword-arguments (package-arguments texinfo)
+       ((#:configure-flags flags
+         ''())
+        #~(cons* "--with-external-Unicode-EastAsianWidth"
+                 "--with-external-Text-Unidecode"
+                 "--with-external-libintl-perl"
+                 #$flags))
        ((#:phases phases #~%standard-phases)
         #~(modify-phases #$phases
             (add-after 'install 'wrap-program
@@ -136,9 +144,15 @@ (define-public texinfo-7
                                     (and (eq? 'directory (stat:type stat))
                                          (string=? (basename file)
                                                    "Archive")))
-                                  #:directories? #t))))
+                                  #:directories? #t)))
+                       (mods (map (lambda (mod)
+                                    (string-append (assoc-ref inputs mod)
+                                                   "/lib/perl5/site_perl"))
+                                  '("perl-unicode-eastasianwidth"
+                                    "perl-text-unidecode" "perl-libintl-perl"))))
                   (wrap-program program
-                    `("PERL5LIB" prefix (,(dirname zip)))))))))))))
+                    `("PERL5LIB" prefix
+                      ,(cons* (dirname zip) mods))))))))))))
 
 (define-public texinfo-5
   (package (inherit texinfo)
-- 
2.46.0





This bug report was last modified 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.