pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/gtexinfo gtexinfo: fix infinite loop in makeinfo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cb0aeab90db0
branches:  trunk
changeset: 384643:cb0aeab90db0
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Thu Aug 30 11:27:48 2018 +0000

description:
gtexinfo: fix infinite loop in makeinfo with perl-5.28

patch from Niko Tyni via upstream mailing list

diffstat:

 devel/gtexinfo/Makefile                                              |   4 +-
 devel/gtexinfo/distinfo                                              |   3 +-
 devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c |  44 ++++++++++
 3 files changed, 48 insertions(+), 3 deletions(-)

diffs (79 lines):

diff -r 4ba99b8c093b -r cb0aeab90db0 devel/gtexinfo/Makefile
--- a/devel/gtexinfo/Makefile   Thu Aug 30 11:14:24 2018 +0000
+++ b/devel/gtexinfo/Makefile   Thu Aug 30 11:27:48 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.99 2018/08/30 11:03:34 tnn Exp $
+# $NetBSD: Makefile,v 1.100 2018/08/30 11:27:48 tnn Exp $
 
 DISTNAME=              texinfo-6.5
 PKGNAME=               g${DISTNAME}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            devel sysutils
 MASTER_SITES=          ${MASTER_SITE_GNU:=texinfo/}
 
diff -r 4ba99b8c093b -r cb0aeab90db0 devel/gtexinfo/distinfo
--- a/devel/gtexinfo/distinfo   Thu Aug 30 11:14:24 2018 +0000
+++ b/devel/gtexinfo/distinfo   Thu Aug 30 11:27:48 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.53 2018/08/30 11:03:34 tnn Exp $
+$NetBSD: distinfo,v 1.54 2018/08/30 11:27:48 tnn Exp $
 
 SHA1 (texinfo-6.5.tar.gz) = 0f8e69781e28ec102b6a9487b093c440f5bb8545
 RMD160 (texinfo-6.5.tar.gz) = cfa624ad3572c21d201bb4c734aae19cd8785e88
@@ -11,6 +11,7 @@
 SHA1 (patch-texindex_texindex.awk) = 1f022f1495c951337997036ef1cd758ef9c116a7
 SHA1 (patch-tp_Texinfo_Convert_XSParagraph_Makefile.in) = cdb6c78c2c15d3f8ee5755625694c11ecd9004e9
 SHA1 (patch-tp_Texinfo_Convert_XSParagraph_configure) = d4557bae4417cd42297bceaa76478b00b3875df3
+SHA1 (patch-tp_Texinfo_Convert_XSParagraph_xspara.c) = ba679fcd739382ad20babe2241c6504e45b69273
 SHA1 (patch-tp_Texinfo_MiscXS_Makefile.in) = fdf3a4d6f81bdeb03cbf156b77a1510e2f6baf9e
 SHA1 (patch-tp_Texinfo_Parser.pm) = d3e4ed3ab0fca4a9d017ee65608ea66ee85b28ac
 SHA1 (patch-util_texi2dvi) = c894eb109ef3faa7ed1cb544556ca6a97af439e9
diff -r 4ba99b8c093b -r cb0aeab90db0 devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c      Thu Aug 30 11:27:48 2018 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-tp_Texinfo_Convert_XSParagraph_xspara.c,v 1.3 2018/08/30 11:27:48 tnn Exp $
+
+>From 9031aefb7f180f718db83aec5e2782079455a32f Mon Sep 17 00:00:00 2001
+From: Niko Tyni <address@hidden>
+Date: Sat, 30 Jun 2018 16:51:13 +0100
+Subject: [PATCH] Update locale handling for Perl 5.28
+
+Perl 5.28 introduced thread-safe locales, where setlocale()
+only affects the locale of the current thread. External code
+like mbrtowc(3) isn't aware of this thread specific locale,
+so we need to explicitly modify the global one instead.
+
+Without this we could enter a busy loop in xspara__add_next()
+(Texinfo::Convert::XSParagraph) for UTF-8 documents when mbrtowc(3)
+returned -1.
+---
+ tp/Texinfo/Convert/XSParagraph/xspara.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- tp/Texinfo/Convert/XSParagraph/xspara.c.orig       2017-06-18 15:38:01.000000000 +0000
++++ tp/Texinfo/Convert/XSParagraph/xspara.c
+@@ -248,6 +248,11 @@ xspara_init (void)
+ 
+   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 @@ failure:
+     {
+ 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",



Home | Main Index | Thread Index | Old Index