guix-commits
[Top][All Lists]
Advanced

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

09/17: gnu: texinfo: Fix FTBFS with Perl 5.28.


From: Marius Bakke
Subject: 09/17: gnu: texinfo: Fix FTBFS with Perl 5.28.
Date: Sun, 22 Jul 2018 12:00:11 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 78a9a2501d121c370684a86ffe105ffdc8ca7d70
Author: Marius Bakke <address@hidden>
Date:   Thu Jul 19 23:15:12 2018 +0200

    gnu: texinfo: Fix FTBFS with Perl 5.28.
    
    * gnu/packages/patches/texinfo-perl-compat.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/texinfo.scm (texinfo)[source](patches): New field.
---
 gnu/local.mk                                   |  1 +
 gnu/packages/patches/texinfo-perl-compat.patch | 51 ++++++++++++++++++++++++++
 gnu/packages/texinfo.scm                       |  1 +
 3 files changed, 53 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 41a10f5..45a7f06 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1137,6 +1137,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch       \
   %D%/packages/patches/teensy-loader-cli-help.patch            \
   %D%/packages/patches/teeworlds-use-latest-wavpack.patch      \
+  %D%/packages/patches/texinfo-perl-compat.patch               \
   %D%/packages/patches/texi2html-document-encoding.patch       \
   %D%/packages/patches/texi2html-i18n.patch                    \
   %D%/packages/patches/thefuck-test-environ.patch              \
diff --git a/gnu/packages/patches/texinfo-perl-compat.patch 
b/gnu/packages/patches/texinfo-perl-compat.patch
new file mode 100644
index 0000000..a7348fd
--- /dev/null
+++ b/gnu/packages/patches/texinfo-perl-compat.patch
@@ -0,0 +1,51 @@
+Fix compatibility with newer Perls.
+
+The first patch is taken from upstream:
+https://svn.savannah.gnu.org/viewvc/texinfo?view=revision&revision=8008
+
+The second gets rid of a deprecation warning that breaks some tests.
+Taken from Fedora: <https://bugzilla.redhat.com/show_bug.cgi?id=1590308>.
+
+--- trunk/tp/Texinfo/Convert/XSParagraph/xspara.c      2017/04/30 14:57:26     
7765
++++ trunk/tp/Texinfo/Convert/XSParagraph/xspara.c      2018/07/13 15:39:29     
8008
+@@ -248,6 +248,11 @@
+ 
+   dTHX;
+ 
++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8)
++  /* needed due to thread-safe locale handling in newer perls */
++  switch_to_global_locale();
++#endif
++
+   if (setlocale (LC_CTYPE, "en_US.UTF-8")
+       || setlocale (LC_CTYPE, "en_US.utf8"))
+     goto success;
+@@ -320,6 +325,10 @@
+     {
+ success: ;
+       free (utf8_locale);
++#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8)
++      /* needed due to thread-safe locale handling in newer perls */
++      sync_locale();
++#endif
+       /*
+       fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n");
+       fprintf (stderr, "character encoding is: %s\n",
+
+diff -up texinfo-6.5/tp/Texinfo/Parser.pm.orig texinfo-6.5/tp/Texinfo/Parser.pm
+--- texinfo-6.5/tp/Texinfo/Parser.pm.orig      2018-06-12 13:40:29.356030136 
+0200
++++ texinfo-6.5/tp/Texinfo/Parser.pm   2018-06-12 13:41:28.357725639 +0200
+@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$)
+     }
+   } elsif ($command eq 'clickstyle') {
+     # REMACRO
+-    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
++    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) {
+       $args = ['@'.$1];
+       $self->{'clickstyle'} = $1;
+       $remaining = $line;
+-      $remaining =~ 
s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
++      $remaining =~ 
s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+       $has_comment = 1 if (defined($4));
+     } else {
+       $self->line_error (sprintf($self->__(
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 109a24b..5fe7f1e 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -37,6 +37,7 @@
               (method url-fetch)
               (uri (string-append "mirror://gnu/texinfo/texinfo-"
                                   version ".tar.xz"))
+              (patches (search-patches "texinfo-perl-compat.patch"))
               (sha256
                (base32
                 "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp"))))



reply via email to

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