Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/libs/perlmods
In directory vz-cvs-3.sog:/tmp/cvs-serv32308

Added Files:
        cpan-pm.patch 
Log Message:
probably committing the patch would be useful too


--- NEW FILE: cpan-pm.patch ---
diff -Nurd -x'*~' CPAN-1.9800.orig/t/00signature.t CPAN-1.9800/t/00signature.t
--- CPAN-1.9800.orig/t/00signature.t    2011-03-12 05:18:21.000000000 -0500
+++ CPAN-1.9800/t/00signature.t 2011-08-31 12:53:22.000000000 -0400
@@ -69,7 +69,7 @@
     print "ok 1 # Valid signature\n";
 }
 else {
-    print "1..0 # SKIP verify failed, so only collect diagnostics\n";
+    print "1..0 # SKIP verify failed, so only collect diagnostics (expected 
for fink because test incompatible with local patches)\n";
 }
 
 # Local Variables:
diff -Nurd -x'*~' CPAN-1.9800.orig/t/04clean_load.t CPAN-1.9800/t/04clean_load.t
--- CPAN-1.9800.orig/t/04clean_load.t   2011-01-21 01:57:48.000000000 -0500
+++ CPAN-1.9800/t/04clean_load.t        2011-08-31 12:53:22.000000000 -0400
@@ -2,6 +2,7 @@
 
 use strict;
 eval 'use warnings';
+use Config;
 
 my %has_deps = (
     'blib/lib/CPAN/HTTP/Client.pm' => {
@@ -17,7 +18,21 @@
 plan(tests => scalar @modules);
 foreach my $file (@modules) {
     #diag $file;
-    system("$^X -c $file >out 2>err");
+    my @command;
+    if ($] >= 5.010 && $Config{"byteorder"} =~ /^1/) {
+        # little-endian means intel (not powerpc), for which fink has
+        # multiple single-arch distros that are seen by a single (fat)
+        # perl interp from apple for a perl version supported by fink
+        # (i.e., starting with 5.10.0). This is the logic taken from
+        # Fink::PkgVersion as of fink-0.29.13.
+        push @command, '/usr/bin/arch';
+        if ( $Config{"longsize"} == 4 ) {
+            push @command, '-i386';   # 32-bit
+        } else {
+            push @command, '-x86_64'; # 64-bit
+        }
+    }
+    system("@command $^X -c $file >out 2>err");
     my $fail;
     if (open ERR, '<err') {
         my $stderr = join('', <ERR>);
diff -Nurd -x'*~' CPAN-1.9800.orig/t/30shell.t CPAN-1.9800/t/30shell.t
--- CPAN-1.9800.orig/t/30shell.t        2011-01-16 10:23:40.000000000 -0500
+++ CPAN-1.9800/t/30shell.t     2011-08-31 12:53:22.000000000 -0400
@@ -72,7 +72,9 @@
 {
     local *FH;
     open *FH, (">"._f"t/dot-cpan/build/Something-From-Builddir-0.00.yml") or 
die;
-    my @stat = stat $^X;
+    my $interp = `which $^X`; # $^X might be found in PATH not rel/abs path
+    chomp $interp;
+    my @stat = stat $interp;
     my $dll = eval {OS2::DLLname()};
     my $mtime_dll = 0;
     if (defined $dll) {
diff -Nurd -x'*~' CPAN-1.9800.orig/t/local_utils.pm CPAN-1.9800/t/local_utils.pm
--- CPAN-1.9800.orig/t/local_utils.pm   2011-01-09 14:39:39.000000000 -0500
+++ CPAN-1.9800/t/local_utils.pm        2011-08-31 12:54:05.000000000 -0400
@@ -78,8 +78,22 @@
 sub run_shell_cmd_lit ($) {
     my $cwd = shift;
     my $t = File::Spec->catfile($cwd,"t");
+    my @command;
+    if ($] >= 5.010 && $Config{"byteorder"} =~ /^1/) {
+        # little-endian means intel (not powerpc), for which fink has
+        # multiple single-arch distros that are seen by a single (fat)
+        # perl interp from apple for a perl version supported by fink
+        # (i.e., starting with 5.10.0). This is the logic taken from
+        # Fink::PkgVersion as of fink-0.29.13.
+        push @command, '/usr/bin/arch';
+        if ( $Config{"longsize"} == 4 ) {
+            push @command, '-i386';   # 32-bit
+        } else {
+            push @command, '-x86_64'; # 64-bit
+        }
+    }
     my @system = (
-                  $^X,
+                  @command, $^X,
                   "-I$t",                 # get this test's own MyConfig
                   "-Mblib",
                   "-MCPAN::MyConfig",


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to