diff -Nurd -x'*~' CPAN-SQLite-0.199.orig/lib/CPAN/SQLite/META.pm CPAN-SQLite-0.199/lib/CPAN/SQLite/META.pm --- CPAN-SQLite-0.199.orig/lib/CPAN/SQLite/META.pm 2009-12-29 12:25:53.000000000 -0500 +++ CPAN-SQLite-0.199/lib/CPAN/SQLite/META.pm 2010-08-16 04:56:52.000000000 -0400 @@ -3,6 +3,7 @@ use strict; use warnings; use base qw(Exporter); +use Config; our @EXPORT_OK; @EXPORT_OK = qw(setup update); our $global_id; @@ -300,7 +301,21 @@ warn qq{Database locked - cannot update.}; return; } - my @args = ($^X, '-MCPAN::SQLite::META=setup,update', '-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);