aboutsummaryrefslogtreecommitdiffstats
path: root/testing/perl-xml-easy
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-09-05 10:56:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-09-05 15:36:55 +0000
commit883ef1301ea691b3c6bad0f299b51306a84cd7b2 (patch)
treed8cb1036e9cffd365b62f8204b70ea3199126f68 /testing/perl-xml-easy
parenta14e4d08df7c89e98ea8ae4942e44a481fc2be3d (diff)
downloadaports-883ef1301ea691b3c6bad0f299b51306a84cd7b2.tar.bz2
aports-883ef1301ea691b3c6bad0f299b51306a84cd7b2.tar.xz
testing/perl-xml-easy: rebuild against perl 5.30
Diffstat (limited to 'testing/perl-xml-easy')
-rw-r--r--testing/perl-xml-easy/APKBUILD8
-rw-r--r--testing/perl-xml-easy/syntax_main-test.patch54
2 files changed, 59 insertions, 3 deletions
diff --git a/testing/perl-xml-easy/APKBUILD b/testing/perl-xml-easy/APKBUILD
index 53fc7bb6da..2374fc51f1 100644
--- a/testing/perl-xml-easy/APKBUILD
+++ b/testing/perl-xml-easy/APKBUILD
@@ -4,7 +4,7 @@
pkgname=perl-xml-easy
_pkgreal=XML-Easy
pkgver=0.011
-pkgrel=2
+pkgrel=3
pkgdesc="XML processing with a clean interface"
url="https://metacpan.org/release/XML-Easy/"
arch="all"
@@ -14,7 +14,8 @@ cpanmakedepends="perl-module-build"
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
-source="https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/XML-Easy-$pkgver.tar.gz"
+source="https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/XML-Easy-$pkgver.tar.gz
+ syntax_main-test.patch"
builddir="$srcdir/$_pkgreal-$pkgver"
build() {
@@ -32,4 +33,5 @@ package() {
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
-sha512sums="19e325a2968cd62e255e6f4e3e870a15f84c2d69ea6a1bf457b1de25d352554285f7162c01fd1dbb363bbad6ae882bc7d49b94655a4795664a735392871b2e02 XML-Easy-0.011.tar.gz"
+sha512sums="19e325a2968cd62e255e6f4e3e870a15f84c2d69ea6a1bf457b1de25d352554285f7162c01fd1dbb363bbad6ae882bc7d49b94655a4795664a735392871b2e02 XML-Easy-0.011.tar.gz
+6696f9fdb393b39d6e58a45ce7e591bf22f8af59849b96dc947ae274420f41fe77fc8b9ff04fac15cfbc28c63a2af95bf5078ac63fd7810f2f3c954498d8615e syntax_main-test.patch"
diff --git a/testing/perl-xml-easy/syntax_main-test.patch b/testing/perl-xml-easy/syntax_main-test.patch
new file mode 100644
index 0000000000..56a64ab397
--- /dev/null
+++ b/testing/perl-xml-easy/syntax_main-test.patch
@@ -0,0 +1,54 @@
+from: https://rt.cpan.org/Public/Bug/Display.html?id=127416
+
+--- a/t/syntax_main.t- 2019-04-24 11:47:08.365496801 +0100
++++ b/t/syntax_main.t 2019-04-24 12:01:50.459442769 +0100
+@@ -35,16 +35,34 @@
+
+ # This code checks whether the regexp iteration limit bug (#60034) is
+ # present. The regexp match expression checks for getting the wrong
+-# result with a long input, and suffices to diagnose the bug. However,
+-# running that test on a pre-5.10 perl causes the stack to grow large,
++# result with a long input, and suffices to diagnose the bug.
++# for a pattern like /X*/, where X is sub-pattern that can match variable
++# length string, e.g. (ab?), it is currently known that:
++#
++# on < 5.10.0, the old recursive engine will crash on too long a match;
++# on < 5.29.4, /X*/ is misinterpreted as /X{0,32767}/
++# on 5.29.4+, /X*/ is misinterpreted as /X{0,65535}/
++#
++# Running that test on a pre-5.10 perl causes the stack to grow large,
+ # and if there's a limited stack size then this may overflow it and
+ # cause perl to crash. All pre-5.10 perls have the iteration limit
+ # bug, so there's no need to run the proper test on those verions.
+ # 5.10 fixed the stack issue, so it's safe to run the proper test there.
+-my $have_iterlimit_bug = "$]" < 5.010 || do {
+- local $SIG{__WARN__} = sub { };
+- ("a"x40000) !~ /\A(?:X?[a-z])*\z/;
+-};
++
++my $iterlimit; # if defined, sets an upper limit for iterations
++
++if ($] < 5.010) {
++ $iterlimit = 0;
++}
++else {
++ local $SIG{__WARN__} = sub { };
++ for my $i (32767, 65535) {
++ if (("a"x($i+1)) !~ /\A(?:X?[a-z])*\z/) {
++ $iterlimit = $i;
++ last;
++ }
++ }
++}
+
+ my $data_in = IO::File->new("t/read.data", "r") or die;
+ my $line = $data_in->getline;
+@@ -75,7 +93,7 @@
+ }
+ SKIP: {
+ skip "perl bug affects long inputs", 2
+- if $have_iterlimit_bug && length($input) >= 32766;
++ if defined $iterlimit && length($input) >= $iterlimit;
+ is upgraded($input) =~ $recogniser{$prod}, !$syntax_error;
+ is downgraded($input) =~ $recogniser{$prod}, !$syntax_error;
+ }