On Sat, Aug 19, 2023 at 12:23:11AM +0200, Bruno Haible wrote:
> Patrice Dumas wrote:
> > > https://lwn.net/Articles/348090/ "Re: Redhat perl != perl"
> > > https://lwn.net/Articles/348084/ "On properly packaging perl"
> > 
> > This seems to be an old change that was reverted afterwards.
> 
> This thread was in 2009. Since things are fine in CentOS 6 and 7, probably
> they reverted it around 2010 (before CentOS 6) and did the same thing again
> around 2014 (between CentOS 7 and CentOS 8).

I do not think so, reverting that change amounted to rename the perl
package without the modules that make it perl core as another name such
as perl-interpreter, which is the situation today.

> In my CentOS 8-stream installation:
> 
>   $ rpm -q --requires perl
>   package perl is not installed
>   $ rpm -q --requires perl-interpreter | grep Unicode
>   perl(Unicode::Normalize)
> 
> Apparently there is a smaller package than 'perl', called 'perl-interpreter',
> and this is the one that I have installed. And this package depends on
> perl-Unicode-Normalize but not one perl-Unicode-Collate. Why? Probably
> because of the size: perl-Unicode-Normalize is 1 MB large, 
> perl-Unicode-Collate
> weighs 5 MB.

Indeed, this is a small perl that do not contain all the perl core
modules.

> Then the right thing is a configure test, that aborts the configuration
> with a message like "Your perl installations lacks the Unicode::Collate 
> module.
> If you are on a Red Hat distribution, try installing the perl-Unicode-Collate
> package."

I do not think that we should say something like that (if we did, we
should propose to install the perl package actually).

I propose the attached patch.

-- 
Pat
diff --git a/configure.ac b/configure.ac
index 1c7f337400..e996ced210 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,14 +61,14 @@ AC_ARG_VAR([PERL_EXT_LDFLAGS], [Linker flags for a Perl extension])
 AC_ARG_VAR([PERL_EXT_CC], [Compiler for a Perl extension])
 
 AC_MSG_CHECKING([Perl version and modules])
-if $PERL -e "use 5.008_001; use Encode; use Data::Dumper" >/dev/null 2>&1; then
+if $PERL -e "use 5.008_001; use Encode; use Data::Dumper; use Unicode::Collate" >/dev/null 2>&1; then
   perl_version_requirement='yes'
 else
   perl_version_requirement='no'
 fi
 AC_MSG_RESULT($perl_version_requirement)
 if test z"$perl_version_requirement" = 'zno' ; then
-  AC_MSG_ERROR([perl >= 5.8.1 with Encode and Data::Dumper required by Texinfo.])
+  AC_MSG_ERROR([perl >= 5.8.1 with Encode, Data::Dumper and Unicode::Collate required by Texinfo.])
 fi
 
 

Reply via email to