Update of /cvsroot/fink/experimental/dmacks/misc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20836
Added Files:
perllinktest.pl
Log Message:
hack together this thing
--- NEW FILE: perllinktest.pl ---
# must be run by an explicit perl interp (with /usr/bin/arch as usual)
use Config;
use File::Temp qw(tempfile);
if(!@ARGV) {
die "Usage: $0 [list of perlmodule .bundle files]\n";
}
my $libperl="$Config{archlibexp}/CORE/$Config{libperl}";
if($libperl =~ /\.a$/) {
print "building shared libperl...\n";
my( $dylibFH, $dylib ) = tempfile( 'libperl_XXXXXX', SUFFIX=>'.dylib' ) or
die "unstable to get temporary file: $!\n";
my @cmd = ( 'gcc', '-dynamiclib', $libperl, '-all_load', '-o', $dylib );
print "@cmd\n";
system @cmd;
$? >>= 8 if defined $? and $? >= 256;
if ($?) {
die "failed: $!\n";
}
$libperl = $dylib;
}
print "testing loadability of perl-dependent binaries...\n";
foreach my $bundle (@ARGV) {
my @cmd;
if ($Config{"byteorder"} =~ /^1/) {
# little-endian means intel (not powerpc), so need to force
# the correct arch
push @cmd, '/usr/bin/arch';
if ( $Config{"longsize"} == 4 ) {
push @cmd, '-i386'; # 32-bit
} else {
push @cmd, '-x86_64'; # 64-bit
}
}
push @cmd, ( './loadability', $libperl, $bundle );
print "@cmd\n";
system @cmd;
$? >>= 8 if defined $? and $? >= 256;
if ($?) {
print "failed: $!\n";
exit 1;
}
}
exit 0;
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs