[PATCH 0/2] gnu: texinfo-7: Use external modules.

  • Open
  • quality assurance status badge
Details
2 participants
  • gemmaro
  • Ludovic Courtès
Owner
unassigned
Submitted by
gemmaro
Severity
normal
G
G
gemmaro wrote on 17 Nov 11:52 +0100
(address . guix-patches@gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
cover.1731840319.git.gemmaro.dev@gmail.com
Hello,

This makes Texinfo version 7 to use packaged external modules instead of
bundled sources. It also adds a dependency package.

Thank you,
gemmaro.

gemmaro (2):
gnu: Add perl-unicode-eastasianwidth.
gnu: texinfo-7: Use external modules.

gnu/packages/perl.scm | 21 +++++++++++++++++++++
gnu/packages/texinfo.scm | 10 +++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)


base-commit: 0e1ffbc7f5f060f89c890472377a6102f27f6e9b
--
2.46.0
G
G
gemmaro wrote on 17 Nov 12:21 +0100
[PATCH 2/2] gnu: texinfo-7: Use external modules.
(address . 74393@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
2ccd9b48bbc1649f1a0e3fd5d9f5f6395add8dcc.1731840319.git.gemmaro.dev@gmail.com
* 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.

Change-Id: Ife2cdec50affb5287d5ad850b0ef80c6048b4b32
---
gnu/packages/texinfo.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 81afdaf7a7..ac10af59fc 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -116,9 +116,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
--
2.46.0
G
G
gemmaro wrote on 17 Nov 12:21 +0100
[PATCH 1/2] gnu: Add perl-unicode-eastasianwidth.
(address . 74393@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
4abd6decfed02b6cd60aa76ae25598ba81511117.1731840319.git.gemmaro.dev@gmail.com
* gnu/packages/perl.scm (perl-unicode-eastasianwidth): New variable.

Change-Id: I3b9eb2a15bf77aa64109dbd2836ac1d71aa509f0
---
gnu/packages/perl.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index faaac13bf1..4d7f9a2854 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11830,6 +11830,27 @@ (define-public perl-unicode-collate
;; license.
(license (list (package-license perl) license:expat))))
+(define-public perl-unicode-eastasianwidth
+ (package
+ (name "perl-unicode-eastasianwidth")
+ (version "12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/A/AU/AUDREYT/Unicode-EastAsianWidth-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1x0gm5akah6x1ypykipywlm2hi95mhqjrnipc5zggragdj9gsnra"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/Unicode-EastAsianWidth")
+ (synopsis "East Asian Width properties")
+ (description
+ "This module provides user-defined Unicode properties that deal with width
+status of East Asian characters, as specified in
+@url{https://www.unicode.org/reports/tr11/,Unicode® Standard Annex #11}.")
+ (license license:cc0)))
+
(define-public perl-unicode-linebreak
(package
(name "perl-unicode-linebreak")
--
2.46.0
L
L
Ludovic Courtès wrote 7 days ago
Re: [bug#74393] [PATCH 2/2] gnu: texinfo-7: Use external modules.
(name . gemmaro)(address . gemmaro.dev@gmail.com)(address . 74393@debbugs.gnu.org)
87ikrhkxl1.fsf@gnu.org
Hi,

gemmaro <gemmaro.dev@gmail.com> skribis:

Toggle quote (9 lines)
> * 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.
>
> Change-Id: Ife2cdec50affb5287d5ad850b0ef80c6048b4b32

Nice.

Toggle quote (12 lines)
> + (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))

I believe the ‘wrap-program’ phase needs to be adjusted accordingly so
that all the Perl modules are found. Right now, with these patches, I
get:

Toggle snippet (5 lines)
$ ./pre-inst-env guix shell texinfo@7 -- makeinfo --version
Can't locate Locale/Messages.pm in @INC (you may need to install the Locale::Messages module) (@INC contains: /gnu/store/5nj6cj127n61skayphscg7icpq34brab-texinfo-7.1.1/lib/texinfo /gnu/store/5nj6cj127n61skayphscg7icpq34brab-texinfo-7.1.1/share/texinfo /gnu/store/5nj6cj127n61skayphscg7icpq34brab-texinfo-7.1.1/share/texinfo /gnu/store/jfmknbgrxmbp7gg0g4gx2bnx70z2y998-perl-archive-zip-1.68/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi /gnu/store/jfmknbgrxmbp7gg0g4gx2bnx70z2y998-perl-archive-zip-1.68/lib/perl5/site_perl/5.36.0 /home/ludo/.guix-home/profile/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi /home/ludo/.guix-home/profile/lib/perl5/site_perl/5.36.0 /home/ludo/.guix-home/profile/lib/perl5/site_perl /home/ludo/.guix-home/profile/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi /home/ludo/.guix-home/profile/lib/perl5/site_perl/5.36.0 /home/ludo/.guix-home/profile/lib/perl5/site_perl /gnu/store/prf2zax6rxl3l179d1qxn6hkm726jyj4-perl-5.36.0/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi /gnu/store/prf2zax6rxl3l179d1qxn6hkm726jyj4-perl-5.36.0/lib/perl5/site_perl/5.36.0 /gnu/store/prf2zax6rxl3l179d1qxn6hkm726jyj4-perl-5.36.0/lib/perl5/5.36.0/x86_64-linux-thread-multi /gnu/store/prf2zax6rxl3l179d1qxn6hkm726jyj4-perl-5.36.0/lib/perl5/5.36.0) at /gnu/store/5nj6cj127n61skayphscg7icpq34brab-texinfo-7.1.1/bin/.texi2any-real line 127.
BEGIN failed--compilation aborted at /gnu/store/5nj6cj127n61skayphscg7icpq34brab-texinfo-7.1.1/bin/.texi2any-real line 127.

Could you take a look and send updated patches?

Thanks,
Ludo’.
G
G
gemmaro wrote 6 days ago
[PATCH v2 1/2] gnu: Add perl-unicode-eastasianwidth.
(address . 74393@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
20241219151042.3949-1-gemmaro.dev@gmail.com
* gnu/packages/perl.scm (perl-unicode-eastasianwidth): New variable.

Change-Id: I3b9eb2a15bf77aa64109dbd2836ac1d71aa509f0
---
gnu/packages/perl.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 702369caf7..382a1d3e61 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11926,6 +11926,27 @@ (define-public perl-unicode-collate
;; license.
(license (list (package-license perl) license:expat))))
+(define-public perl-unicode-eastasianwidth
+ (package
+ (name "perl-unicode-eastasianwidth")
+ (version "12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/A/AU/AUDREYT/Unicode-EastAsianWidth-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1x0gm5akah6x1ypykipywlm2hi95mhqjrnipc5zggragdj9gsnra"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/Unicode-EastAsianWidth")
+ (synopsis "East Asian Width properties")
+ (description
+ "This module provides user-defined Unicode properties that deal with width
+status of East Asian characters, as specified in
+@url{https://www.unicode.org/reports/tr11/,Unicode® Standard Annex #11}.")
+ (license license:cc0)))
+
(define-public perl-unicode-linebreak
(package
(name "perl-unicode-linebreak")
--
2.46.0
G
G
gemmaro wrote 6 days ago
[PATCH v2 2/2] gnu: texinfo-7: Use external modules.
(address . 74393@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
20241219151042.3949-2-gemmaro.dev@gmail.com
* 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(-)

Toggle diff (43 lines)
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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74393@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74393
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch