[151547] trunk/dports/lang/perl5

mojca at macports.org mojca at macports.org
Wed Aug 17 05:37:48 PDT 2016


Revision: 151547
          https://trac.macports.org/changeset/151547
Author:   mojca at macports.org
Date:     2016-08-17 05:37:47 -0700 (Wed, 17 Aug 2016)
Log Message:
-----------
perl5: patch for sockets and Sierra (hopefully closes #51327 and #52012)

Modified Paths:
--------------
    trunk/dports/lang/perl5/Portfile

Added Paths:
-----------
    trunk/dports/lang/perl5/files/5.22/patch-dist-IO-t-cachepropagate-unix.t.diff
    trunk/dports/lang/perl5/files/5.24/patch-dist-IO-t-cachepropagate-unix.t.diff
    trunk/dports/lang/perl5/files/5.24/patch-dist-Time-HiRes-HiRes.xs.diff

Modified: trunk/dports/lang/perl5/Portfile
===================================================================
--- trunk/dports/lang/perl5/Portfile	2016-08-17 12:11:17 UTC (rev 151546)
+++ trunk/dports/lang/perl5/Portfile	2016-08-17 12:37:47 UTC (rev 151547)
@@ -37,7 +37,9 @@
     5.22 2 0 203afca8995ca426db0af48b78eb606b5d24011a  f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058
     5.24 0 0 756bf07069e91eabe3dac3a47aec5097d48f8963  62328a53d157e8153b33e137594155f6f8b64418f7f9238210feb809585290e0
 }
-#   5.25 0 0 543c60ab51bd0e84e3f04cedbab72077b81f2b9f  70750d287b7a6607c35ab0d2073c78ab7d437eef2f1a78b74afca577605e39f2
+#   5.22 3-RC3 0 24f508e342cb824d96254e91ffd35b09ed740382  9074ac008f11aa5ea3df91a646fa8c23fec37923c729e06a8bc54be4fa710d07
+#   5.24 1-RC3 0 9d055aa3bc92b8cae2a1dd14fd29b7dde1345218  9be39db0b008d2c2d14ae4f6b92418260ce5eb7809a79d729686a0d461b96404
+#   5.25 3 0 268c9c45e4b4f296981be238c11332094fe559b9  0d406dc08717822cfc67937414cf38801ca7101b5a971465b88c0aee005fe823
 
 # NOTE: if you need to revbump perl, please consult with maintainer first
 #       to change the configure flags at the same time
@@ -63,6 +65,7 @@
         dist_subdir         perl${perl5.major}
         use_bzip2           yes
 
+        # TODO: revise patch naming scheme
         patchfiles          ${perl5.major}/clean-up-paths.patch \
                             ${perl5.major}/avoid-no-cpp-precomp-PR38913.patch \
                             ${perl5.major}/fix-ld-modification.patch
@@ -78,6 +81,19 @@
             patchfiles-append \
                             ${perl5.major}/install-under-short-version-PR43480.patch \
         }
+        if {${perl5.major} >= 5.22} {
+            # failed test
+            # https://trac.macports.org/ticket/51327
+            patchfiles-append \
+                            ${perl5.major}/patch-dist-IO-t-cachepropagate-unix.t.diff
+        }
+        if {${perl5.major} == 5.24} {
+            # build error on Sierra (maybe also relevant for other perl versions?)
+            # https://trac.macports.org/ticket/52012
+            patchfiles-append \
+                            ${perl5.major}/patch-dist-Time-HiRes-HiRes.xs.diff \
+                            ${perl5.major}/patch-dist-IO-t-cachepropagate-unix.t.diff
+        }
 
         # Prevent build from picking up the bind9 port's static libbind, which
         # duplicates symbols from /usr/lib/libdl (r10638).

Added: trunk/dports/lang/perl5/files/5.22/patch-dist-IO-t-cachepropagate-unix.t.diff
===================================================================
--- trunk/dports/lang/perl5/files/5.22/patch-dist-IO-t-cachepropagate-unix.t.diff	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.22/patch-dist-IO-t-cachepropagate-unix.t.diff	2016-08-17 12:37:47 UTC (rev 151547)
@@ -0,0 +1,45 @@
+From 4b09738d6af9f9ed8890fd7af0868339e4a3fda9 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony at develop-help.com>
+Date: Mon, 15 Aug 2016 10:39:22 +1000
+Subject: (perl #128095) check pack_sockaddr_un()'s return value
+
+pack_sockaddr_un() silently truncates the supplied path if it won't
+fit into the sun_path member of sockaddr_un.
+
+This may change in the future, but for now check the path in the
+sockaddr matches the desired path, and skip if it doesn't.
+---
+ dist/IO/t/cachepropagate-unix.t | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/dist/IO/t/cachepropagate-unix.t b/dist/IO/t/cachepropagate-unix.t
+index e3e438e..20c70dd 100644
+--- dist/IO/t/cachepropagate-unix.t.orig
++++ dist/IO/t/cachepropagate-unix.t
+@@ -14,10 +14,21 @@ use Test::More;
+ plan skip_all => "UNIX domain sockets not implemented on $^O"
+   if ($^O =~ m/^(?:qnx|nto|vos|MSWin32|VMS)$/);
+ 
+-plan tests => 15;
+-
+ my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock');
+ 
++# check the socketpath fits in sun_path.
++#
++# pack_sockaddr_un() just truncates the path, this may change, but how
++# it will handle such a condition is undetermined (and we might need
++# to work with older versions of Socket outside of a perl build)
++# https://rt.cpan.org/Ticket/Display.html?id=116819
++
++my $name = eval { pack_sockaddr_un($socketpath) };
++defined $name && (unpack_sockaddr_un($name))[0] eq $socketpath
++  or plan skip_all => "socketpath too long for sockaddr_un";
++
++plan tests => 15;
++
+ # start testing stream sockets:
+ my $listener = IO::Socket::UNIX->new(Type => SOCK_STREAM,
+ 				     Listen => 1,
+-- 
+2.1.4
+

Added: trunk/dports/lang/perl5/files/5.24/patch-dist-IO-t-cachepropagate-unix.t.diff
===================================================================
--- trunk/dports/lang/perl5/files/5.24/patch-dist-IO-t-cachepropagate-unix.t.diff	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.24/patch-dist-IO-t-cachepropagate-unix.t.diff	2016-08-17 12:37:47 UTC (rev 151547)
@@ -0,0 +1,45 @@
+From 4b09738d6af9f9ed8890fd7af0868339e4a3fda9 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony at develop-help.com>
+Date: Mon, 15 Aug 2016 10:39:22 +1000
+Subject: (perl #128095) check pack_sockaddr_un()'s return value
+
+pack_sockaddr_un() silently truncates the supplied path if it won't
+fit into the sun_path member of sockaddr_un.
+
+This may change in the future, but for now check the path in the
+sockaddr matches the desired path, and skip if it doesn't.
+---
+ dist/IO/t/cachepropagate-unix.t | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/dist/IO/t/cachepropagate-unix.t b/dist/IO/t/cachepropagate-unix.t
+index e3e438e..20c70dd 100644
+--- dist/IO/t/cachepropagate-unix.t.orig
++++ dist/IO/t/cachepropagate-unix.t
+@@ -14,10 +14,21 @@ use Test::More;
+ plan skip_all => "UNIX domain sockets not implemented on $^O"
+   if ($^O =~ m/^(?:qnx|nto|vos|MSWin32|VMS)$/);
+ 
+-plan tests => 15;
+-
+ my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock');
+ 
++# check the socketpath fits in sun_path.
++#
++# pack_sockaddr_un() just truncates the path, this may change, but how
++# it will handle such a condition is undetermined (and we might need
++# to work with older versions of Socket outside of a perl build)
++# https://rt.cpan.org/Ticket/Display.html?id=116819
++
++my $name = eval { pack_sockaddr_un($socketpath) };
++defined $name && (unpack_sockaddr_un($name))[0] eq $socketpath
++  or plan skip_all => "socketpath too long for sockaddr_un";
++
++plan tests => 15;
++
+ # start testing stream sockets:
+ my $listener = IO::Socket::UNIX->new(Type => SOCK_STREAM,
+ 				     Listen => 1,
+-- 
+2.1.4
+

Added: trunk/dports/lang/perl5/files/5.24/patch-dist-Time-HiRes-HiRes.xs.diff
===================================================================
--- trunk/dports/lang/perl5/files/5.24/patch-dist-Time-HiRes-HiRes.xs.diff	                        (rev 0)
+++ trunk/dports/lang/perl5/files/5.24/patch-dist-Time-HiRes-HiRes.xs.diff	2016-08-17 12:37:47 UTC (rev 151547)
@@ -0,0 +1,14 @@
+https://trac.macports.org/ticket/52012
+https://github.com/Homebrew/homebrew-core/issues/1957#issuecomment-226850273
+
+--- dist/Time-HiRes/HiRes.xs.orig
++++ dist/Time-HiRes/HiRes.xs
+@@ -940,7 +940,7 @@ BOOT:
+   }
+ #   endif
+ #endif
+-#if defined(PERL_DARWIN)
++#if defined(PERL_DARWIN) && !defined(CLOCK_REALTIME)
+ #  ifdef USE_ITHREADS
+   MUTEX_INIT(&darwin_time_mutex);
+ #  endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160817/50ba6d43/attachment.html>


More information about the macports-changes mailing list