diff -Nurd -x'*~' CPAN-SQLite-0.203.orig/lib/CPAN/SQLite/META.pm CPAN-SQLite-0.203/lib/CPAN/SQLite/META.pm --- CPAN-SQLite-0.203.orig/lib/CPAN/SQLite/META.pm 2013-06-29 16:15:33.000000000 -0400 +++ CPAN-SQLite-0.203/lib/CPAN/SQLite/META.pm 2014-01-07 12:59:51.000000000 -0500 @@ -10,6 +10,7 @@ require CPAN::SQLite; use DBI; use File::Spec; +use Config; use parent 'Exporter'; our @EXPORT_OK; @@ -315,7 +316,21 @@ $CPAN::FrontEnd->mywarn('Database locked - cannot update.'); return; } - my @args = ($^X, '-MCPAN::SQLite::META=setup,update,check', '-e'); + my @args; + 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 @args, '/usr/bin/arch'; + if ( $Config{"longsize"} == 4 ) { + push @args, '-i386'; # 32-bit + } else { + push @args, '-x86_64'; # 64-bit + } + } + push @args, ($^X, '-MCPAN::SQLite::META=setup,update', '-e'); if (-e $db && -s _) { my $mtime_db = (stat(_))[9]; my $time_string = gmtime_string($mtime_db); diff -Nurd -x'*~' CPAN-SQLite-0.203.orig/t/00compile.t CPAN-SQLite-0.203/t/00compile.t --- CPAN-SQLite-0.203.orig/t/00compile.t 2012-03-24 23:18:24.000000000 -0400 +++ CPAN-SQLite-0.203/t/00compile.t 2014-01-07 12:59:13.000000000 -0500 @@ -6,6 +6,7 @@ use Test::More; use File::Find; use File::Temp qw{ tempdir }; +use Config; my @modules; find( @@ -30,7 +31,21 @@ # fake home for cpan-testers # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); - like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) + 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 + } + } + like( qx{ @command $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: {