[133136] trunk/dports/perl/p5-devel-size
devans at macports.org
devans at macports.org
Fri Feb 20 14:28:56 PST 2015
Revision: 133136
https://trac.macports.org/changeset/133136
Author: devans at macports.org
Date: 2015-02-20 14:28:56 -0800 (Fri, 20 Feb 2015)
Log Message:
-----------
p5-devel-size: add perl branch 5.20, apply suggested upstream patches to address test issues on 5.20+ (#46414).
Modified Paths:
--------------
trunk/dports/perl/p5-devel-size/Portfile
Added Paths:
-----------
trunk/dports/perl/p5-devel-size/files/
trunk/dports/perl/p5-devel-size/files/rt88180-sv_magical.patch
trunk/dports/perl/p5-devel-size/files/rt88182-magic_read_shrink.patch
Modified: trunk/dports/perl/p5-devel-size/Portfile
===================================================================
--- trunk/dports/perl/p5-devel-size/Portfile 2015-02-20 22:17:21 UTC (rev 133135)
+++ trunk/dports/perl/p5-devel-size/Portfile 2015-02-20 22:28:56 UTC (rev 133136)
@@ -4,8 +4,7 @@
PortSystem 1.0
PortGroup perl5 1.0
-# tests with 5.20 fail
-perl5.branches 5.16 5.18
+perl5.branches 5.16 5.18 5.20
perl5.setup Devel-Size 0.79
license {Artistic-1 GPL}
maintainers nomaintainer
@@ -16,3 +15,20 @@
checksums rmd160 fa604c5b230047a22f06861031dea6e5fdd8b68d \
sha256 1370f2a054e0bcbd93099c8b31a1e2f7ac8801e1ffea5c401404c16b9cbb1ae8
+
+# apply suggested upstream patches to fix all test
+# failures but one when using 5.20+ (#46414)
+# https://rt.cpan.org/Public/Bug/Display.html?id=95493
+# https://rt.cpan.org/Public/Bug/Display.html?id=88180
+# https://rt.cpan.org/Public/Bug/Display.html?id=88182
+# https://rt.perl.org/Public/Bug/Display.html?id=122322
+
+if {${perl5.major} != ""} {
+
+# only apply patches if ${perl5.major} > 5.18
+
+ if {[vercmp ${perl5.major} 5.18] > 0} {
+ patchfiles rt88180-sv_magical.patch \
+ rt88182-magic_read_shrink.patch
+ }
+}
Added: trunk/dports/perl/p5-devel-size/files/rt88180-sv_magical.patch
===================================================================
--- trunk/dports/perl/p5-devel-size/files/rt88180-sv_magical.patch (rev 0)
+++ trunk/dports/perl/p5-devel-size/files/rt88180-sv_magical.patch 2015-02-20 22:28:56 UTC (rev 133136)
@@ -0,0 +1,11 @@
+--- Size.xs 2013-05-10 12:35:23.000000000 +0000
++++ Size.xs 2013-08-27 14:52:53.000000000 +0000
+@@ -707,7 +707,7 @@
+ }
+ st->total_size += sizeof(SV) + body_sizes[type];
+
+- if (type >= SVt_PVMG) {
++ if (SvMAGICAL(thing)) {
+ magic_size(aTHX_ thing, st);
+ }
+
Added: trunk/dports/perl/p5-devel-size/files/rt88182-magic_read_shrink.patch
===================================================================
--- trunk/dports/perl/p5-devel-size/files/rt88182-magic_read_shrink.patch (rev 0)
+++ trunk/dports/perl/p5-devel-size/files/rt88182-magic_read_shrink.patch 2015-02-20 22:28:56 UTC (rev 133136)
@@ -0,0 +1,18 @@
+--- t/magic.t 2012-02-10 19:54:28.000000000 +0000
++++ t/magic.t 2013-08-27 15:15:25.000000000 +0000
+@@ -46,13 +46,14 @@
+ my $after_size = total_size($string);
+ cmp_ok($after_size, '>', $before_size, 'size increases due to magic');
+ is($string, undef, 'No value yet');
++ my $small_size = total_size($string);
+ # This is defineately cheating, in that we're poking inside the
+ # implementation of Tie::StdScalar, but if we just write to $string, the way
+ # magic works, the (nice long) value is first written to the regular scalar,
+ # then picked up by the magic. So it grows, which defeats the purpose of the
+ # test.
+ ${tied $string} = 'X' x 1024;
+- cmp_ok(total_size($string), '>', $after_size + 1024,
++ cmp_ok(total_size($string), '>', $small_size + 1024,
+ 'the magic object is counted');
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150220/8c7a3b10/attachment.html>
More information about the macports-changes
mailing list