Update of /cvsroot/fink/experimental/dmacks/finkinfo In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20480
Modified Files: net-daemon-pm.info Added Files: net-daemon-pm5100+.patch Removed Files: net-daemon-pm.patch Log Message: Seems to be not version-portable, so better to variant so each can be fixed (or at least not more broken) by others' fixes Index: net-daemon-pm.info =================================================================== RCS file: /cvsroot/fink/experimental/dmacks/finkinfo/net-daemon-pm.info,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- net-daemon-pm.info 16 Aug 2010 06:24:25 -0000 1.2 +++ net-daemon-pm.info 17 Aug 2010 06:15:51 -0000 1.3 @@ -1,27 +1,47 @@ Info2: << -Package: net-daemon-pm +Package: net-daemon-pm%type_pkg[perl] Version: 0.43 -Revision: 1022 +Revision: 1101 Description: Perl extension for portable daemons -Type: perl +Type: perl (5.8.8 5.10.0) License: Artistic Maintainer: Benjamin Reed <net-daemon...@fink.raccoonfink.com> -Depends: system-perl +Depends: perl%type_pkg[perl]-core BuildDepends: << fink (>= 0.29.7-1), - system-perl + perl%type_pkg[perl]-core << Source: mirror:cpan:modules/by-module/Net/Net-Daemon-%v.tar.gz Source-MD5: a173a8407fb7b049aa465598eca6dfd7 SourceDirectory: Net-Daemon -PatchFile: %{ni}.patch +PatchFile: %{ni}5100+.patch PatchFile-MD5: 0d97cf5fc8ba3b48be9792982f53d895 +PatchScript: << +#!/bin/sh -ev + perlversion=%type_raw[perl] + + # fix for new threading model in perl5.10.0 and beyond (not + # sure why the if/else controls in it don't fall back to + # correct previous-perl implementation) + if dpkg --compare-versions "$perlversion" ">=" "5.10.0"; then + patch -p1 < %{PatchFile} + fi + + # use correct single-arch of universal interp + if dpkg --compare-versions "$perlversion" ">=" "5.10.0" && [ "%m" != "powerpc" ]; then + perl -pi -e 's#(\$\^X)#"/usr/bin/arch", "-%m", \1#' t/*.t + fi +<< UseMaxBuildJobs: true UpdatePOD: true +InstallScript: << + %{default_script} + mv %i/share/man %i/lib/perl5/%type_raw[perl] +<< DocFiles: ChangeLog MANIFEST README Homepage: http://search.cpan.org/dist/Net-Daemon --- net-daemon-pm.patch DELETED --- --- NEW FILE: net-daemon-pm5100+.patch --- diff -Nurd Net-Daemon/ChangeLog Net-Daemon-new/ChangeLog --- Net-Daemon/ChangeLog 2007-06-17 14:42:36.000000000 -0400 +++ Net-Daemon-new/ChangeLog 2010-08-16 02:13:05.000000000 -0400 @@ -1,4 +1,6 @@ - +2009-03-12 Joe McMahon <mcma...@blekko.com> (0.44) + * Added necessary thread sharing to work with 5.10 + threads model: regexp-threads, 2007-06-17 Malcolm Nooning <m.noon...@comcast.net> (0.43) * lib/Net/Daemon.pm Needed to up the VERSION number 2007-06-16 Malcolm Nooning <m.noon...@comcast.net> (0.42) diff -Nurd Net-Daemon/lib/Net/Daemon.pm Net-Daemon-new/lib/Net/Daemon.pm --- Net-Daemon/lib/Net/Daemon.pm 2007-06-17 14:39:46.000000000 -0400 +++ Net-Daemon-new/lib/Net/Daemon.pm 2010-08-16 02:16:42.000000000 -0400 @@ -34,6 +34,18 @@ package Net::Daemon; $Net::Daemon::VERSION = '0.43'; +# Dummy share() in case we're not 5.10. If we are, require/import of +# threads::shared will replace it appropriately. +my $this_is_510 = $^V ge v5.10.0; +if ($this_is_510) { + no warnings 'redefine'; + eval { require threads; }; + eval { require threads::shared; }; +} +else { + eval { require Threads; }; +} + @Net::Daemon::ISA = qw(Net::Daemon::Log); # @@ -41,6 +53,7 @@ # regexp-threads.) # $Net::Daemon::RegExpLock = 1; +threads::shared::share(\$Net::Daemon::RegExpLock) if $this_is_510; use vars qw($exit); diff -Nurd Net-Daemon/regexp-threads Net-Daemon-new/regexp-threads --- Net-Daemon/regexp-threads 2007-05-23 09:56:02.000000000 -0400 +++ Net-Daemon-new/regexp-threads 2010-08-16 02:13:09.000000000 -0400 @@ -13,9 +13,18 @@ # # +my $this_is_510 = $^V ge v5.10.0; + use Thread (); +if ($this_is_510) { + eval {require threads::shared}; +} my $numChilds; +if ($this_is_510) { + eval { threads::shared::share($numChilds) }; +} + my $regExpLock = @ARGV ? 1 : 0; # Repeat generating a random number and check if it contains the ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs