Subject: [bug#45368] [PATCH core-updates 0/3] Help2man updates

From: Ludovic Courtès <[email-masked]>
Date: Sun, 03 Jan 2021 16:12:31 +0100

¡Hola!

Miguel Ángel Arruga Vivas <[email-masked]> skribis:

> The following patches do some work on help2man, namely:
> 1. Allow the generation of localized manual pages.
> 2. Update the package to the latest version.
>
> To perform the first objective, the library perl-gettext was imported
> from CPAN.  Its path is encoded directly on the resulting binary to
> ensure it is loaded, as perl and the library should be propagated to the
> environment in order to achieve the same result with PERL5LIB.

Nice.

> Nonetheless, currently there are two open issues with this approach:
>
> - The library used for a cross compilation could be different, but the
>   generated version is used for its own documentation generation.  Are
>   the inputs correctly placed?  Should it be patched on a later stage to
>   the final input?

If the problem is just the generation of help2man’s own documentation
when cross-compiling, perhaps we need to add itself as a native input
when cross-compiling?

Anyhow that doesn’t sound like a showstopper to me.

> - The compilation tries to generate translated man pages and sets LC_ALL
>   to values not available on glibc-utf8-locales, therefore only
>   languages available there have their manual page properly translated,
>   such as french.  You can see the following lines (and more) on the
>   build log, which warn about this issue:
>   --------------------------------8<-------------------------------- sh:
>   warning: setlocale: LC_ALL: cannot change locale (uk_UA.UTF-8) sh:
>   warning: setlocale: LC_ALL: cannot change locale (vi_VN.UTF-8)
>   -------------------------------->8--------------------------------
>
> IMHO, a change on gnu-build-system to allow the selection of the locales
> used for the build could be the best way forward, but I haven't
> implemented it yet.  WDYT?

Yes, that’s a good idea.  There’s already a procedure to generate a
locale package IIRC.  We just have to make sure its result is properly
memoized so that performance doesn’t suffer.

Thanks!

Ludo’.