diff options
author | tnn <tnn@pkgsrc.org> | 2018-08-30 11:27:48 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2018-08-30 11:27:48 +0000 |
commit | 18e8e17483ce4ff2c14927ba94c89c957cc4bad7 (patch) | |
tree | cbda6e65b1b54c44bcc3e631ce2219b7ceb86e80 /devel/gtexinfo | |
parent | 5bbc7b7888c97ebdd75b5c6d53ce815a9fc08b15 (diff) | |
download | pkgsrc-18e8e17483ce4ff2c14927ba94c89c957cc4bad7.tar.gz |
gtexinfo: fix infinite loop in makeinfo with perl-5.28
patch from Niko Tyni via upstream mailing list
Diffstat (limited to 'devel/gtexinfo')
-rw-r--r-- | devel/gtexinfo/Makefile | 4 | ||||
-rw-r--r-- | devel/gtexinfo/distinfo | 3 | ||||
-rw-r--r-- | devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c | 44 |
3 files changed, 48 insertions, 3 deletions
diff --git a/devel/gtexinfo/Makefile b/devel/gtexinfo/Makefile index b4ab4a2bcd7..f69f23b380b 100644 --- a/devel/gtexinfo/Makefile +++ b/devel/gtexinfo/Makefile @@ -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 --git a/devel/gtexinfo/distinfo b/devel/gtexinfo/distinfo index 9e0072c0eb8..1287b07b8d7 100644 --- a/devel/gtexinfo/distinfo +++ b/devel/gtexinfo/distinfo @@ -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-gnulib_lib_mbuiter.h) = be293674c37cb91746527be07aa40acbd285d2f4 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 --git a/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c b/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c new file mode 100644 index 00000000000..4e559898e43 --- /dev/null +++ b/devel/gtexinfo/patches/patch-tp_Texinfo_Convert_XSParagraph_xspara.c @@ -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", |