pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/perl5 perl5: evaluating this regex to force utf8_...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/07d0bd8c3719
branches:  trunk
changeset: 417482:07d0bd8c3719
user:      maya <maya%pkgsrc.org@localhost>
date:      Mon Nov 11 21:32:12 2019 +0000

description:
perl5: evaluating this regex to force utf8_heavy.pl to load no longer works,
use a unicode 'tr///' instead.

Fixes Bugzilla checksetup.pl, which uses Safe.

Thanks to many on #perl on freenode.
PR pkg/54625
Bump PKGREVISION

diffstat:

 lang/perl5/Makefile              |   4 ++--
 lang/perl5/distinfo              |   3 ++-
 lang/perl5/patches/patch-Safe.pm |  16 ++++++++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 5b4aae48c00d -r 07d0bd8c3719 lang/perl5/Makefile
--- a/lang/perl5/Makefile       Mon Nov 11 20:37:01 2019 +0000
+++ b/lang/perl5/Makefile       Mon Nov 11 21:32:12 2019 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.257 2019/11/03 19:04:05 rillig Exp $
+# $NetBSD: Makefile,v 1.258 2019/11/11 21:32:12 maya Exp $
 
 .include "license.mk"
 .include "Makefile.common"
 
-PKGREVISION=   1
+PKGREVISION=   2
 
 COMMENT=       Practical Extraction and Report Language
 
diff -r 5b4aae48c00d -r 07d0bd8c3719 lang/perl5/distinfo
--- a/lang/perl5/distinfo       Mon Nov 11 20:37:01 2019 +0000
+++ b/lang/perl5/distinfo       Mon Nov 11 21:32:12 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.159 2019/10/10 17:59:57 maya Exp $
+$NetBSD: distinfo,v 1.160 2019/11/11 21:32:12 maya Exp $
 
 SHA1 (perl-5.30.0.tar.xz) = cc8d1e08ffe4624c197a44d02855632725d39f8e
 RMD160 (perl-5.30.0.tar.xz) = 64ff4c65823122c337e18278585d71def1de9c5d
@@ -6,6 +6,7 @@
 Size (perl-5.30.0.tar.xz) = 12419868 bytes
 SHA1 (patch-Configure) = 6000aafeb993fd096c9b1327302b510aa0d386bb
 SHA1 (patch-Makefile.SH) = 93cae9736ef94cdd9e5748f7e0a0183332c2f3b3
+SHA1 (patch-Safe.pm) = bfeefb82d4cfe991e3a9a90cd87b894c9f4cc337
 SHA1 (patch-alignment_1) = b68c0916b271523922caa7f89edb165284e7b5f4
 SHA1 (patch-alignment_2) = cae8495c4a092e31da422bf5684481091ee2adf3
 SHA1 (patch-caretx.c) = b76b4175a58123fa4dfd2adf36b2207dcb6cf65a
diff -r 5b4aae48c00d -r 07d0bd8c3719 lang/perl5/patches/patch-Safe.pm
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/patches/patch-Safe.pm  Mon Nov 11 21:32:12 2019 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-Safe.pm,v 1.1 2019/11/11 21:32:12 maya Exp $
+
+Use tr/// to force the loading of utf8_heavy, the current code no longer works.
+https://github.com/Perl/perl5/issues/17271
+
+--- dist/Safe/Safe.pm.orig     2019-11-11 21:17:50.484290191 +0000
++++ dist/Safe/Safe.pm
+@@ -67,7 +67,7 @@ require utf8;
+ # particular code points don't cause it to load.
+ # (Swashes are cached internally by perl in PL_utf8_* variables
+ # independent of being inside/outside of Safe. So once loaded they can be)
+-do { my $a = pack('U',0x100); my $b = chr 0x101; utf8::upgrade $b; $a =~ /$b/i };
++do { my $a = pack('U',0x100); my $b = chr 0x101; utf8::upgrade $b; $a =~ tr/\x{202a}-\x{202e}//d };
+ # now we can safely include utf8::SWASHNEW in $default_share defined below.
+ 
+ my $default_root  = 0;



Home | Main Index | Thread Index | Old Index