texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION)


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION), tp/Texinfo/XSLoader.pm ($xs_version, init): replace hyphen by dot in version for XS_VERSION comparison. Rename PACKAGE_PERL_NUMERICAL_VERSION as PACKAGE_XS_VERSION and $numerical_version as $xs_version.
Date: Sat, 05 Oct 2024 12:19:11 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new ca90936d17 * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION), 
tp/Texinfo/XSLoader.pm ($xs_version, init): replace hyphen by dot in version 
for XS_VERSION comparison.  Rename PACKAGE_PERL_NUMERICAL_VERSION as 
PACKAGE_XS_VERSION and $numerical_version as $xs_version.
ca90936d17 is described below

commit ca90936d17acc3bd3a0f541fde0bcfadc2e80160
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 5 18:19:16 2024 +0200

    * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION),
    tp/Texinfo/XSLoader.pm ($xs_version, init): replace hyphen by dot in
    version for XS_VERSION comparison.  Rename
    PACKAGE_PERL_NUMERICAL_VERSION as PACKAGE_XS_VERSION and
    $numerical_version as $xs_version.
---
 ChangeLog                  |  8 ++++++++
 tp/Texinfo/XS/configure.ac |  7 ++++---
 tp/Texinfo/XSLoader.pm     | 14 ++++++++------
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2122247bd5..7073a20855 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/configure.ac (PACKAGE_XS_VERSION),
+       tp/Texinfo/XSLoader.pm ($xs_version, init): replace hyphen by dot in
+       version for XS_VERSION comparison.  Rename
+       PACKAGE_PERL_NUMERICAL_VERSION as PACKAGE_XS_VERSION and
+       $numerical_version as $xs_version.
+
 2024-10-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/Makefile.am (XSLIBS_CPPFLAGS),
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index f66a0f2585..27e6eb8070 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -83,7 +83,7 @@ perl_conf_CFLAGS=
 perl_conf_LDFLAGS=
 XSUBPPARGS=
 PERL_INC=
-PACKAGE_PERL_NUMERICAL_VERSION=0
+PACKAGE_XS_VERSION=0
 
 # See (automake)Conditional Subdirectories.  Even if --disable-perl-xs
 # is given, we still need to configure this directory minimally, so that
@@ -91,7 +91,8 @@ PACKAGE_PERL_NUMERICAL_VERSION=0
 if test x$disable_xs != xyes; then
   AC_PATH_PROG([PERL], [perl])
 
-  PACKAGE_PERL_NUMERICAL_VERSION=`${PERL} -e 'use version; print 
version->declare('"$PACKAGE_VERSION"')->numify;'`
+  #PACKAGE_XS_VERSION=`${PERL} -e 'use version; print 
version->declare('"$PACKAGE_VERSION"')->numify;'`
+  PACKAGE_XS_VERSION=`echo $PACKAGE_VERSION | sed 's/-/./g'`
 
   if test -n "$PERL_EXT_CC" ; then
     CC=$PERL_EXT_CC
@@ -142,7 +143,7 @@ fi # not disable_xs
 AC_SUBST([PERL_INC], [$PERL_INC])
 AC_SUBST([XSUBPPARGS], [$XSUBPPARGS])
 
-AC_SUBST([XS_VERSION], [$PACKAGE_PERL_NUMERICAL_VERSION])
+AC_SUBST([XS_VERSION], [$PACKAGE_XS_VERSION])
 
 AC_PROG_CC
 
diff --git a/tp/Texinfo/XSLoader.pm b/tp/Texinfo/XSLoader.pm
index b05ad0baf7..0faaeabb97 100644
--- a/tp/Texinfo/XSLoader.pm
+++ b/tp/Texinfo/XSLoader.pm
@@ -21,7 +21,7 @@ use warnings;
 
 use DynaLoader;
 
-use version;
+#use version;
 
 BEGIN {
   eval 'require Texinfo::ModulePath';
@@ -37,9 +37,11 @@ our $TEXINFO_XS;
 
 our $VERSION = '7.1.90';
 
-# used for comparison with XS version.  Before some Perl version
-# (5.38 maybe?), need to be numerical.
-my $numerical_version = version->declare($VERSION)->numify;
+# used for comparison with XS_VERSION passed through configure and make.
+# The github CI adds the date after a hyphen, turn the hyphen to a dot.
+my $xs_version = $VERSION;
+$xs_version =~ s/-/./g;
+#my $xs_version = version->declare($VERSION)->numify;
 
 sub XS_parser_enabled {
   return ((not defined($ENV{TEXINFO_XS})
@@ -217,8 +219,8 @@ sub init {
   # and thePerl modules VERSION should be synchronized with the top-level
   # configure.ac version.  The check therefore ensures that the XS objects
   # and the Perl module come from the same GNU Texinfo distribution.
-  #print STDERR "REMARK: numerical version: $numerical_version\n";
-  &$boot_fn($module, $numerical_version);
+  #print STDERR "REMARK: XS version: $xs_version\n";
+  &$boot_fn($module, $xs_version);
 
   # This makes it easier to refer to packages and symbols by name.
   no strict 'refs';



reply via email to

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