Alien-bz2-Installer
view release on metacpan or search on metacpan
lib/Alien/bz2/Installer.pm view on Meta::CPAN
require File::Copy;
my $make = $Config::Config{make};
system $make, -f => 'Makefile-libbz2_so';
die "make -f Makefile-libbz2_so failed" if $?;
system $make, 'all';
die "make all failed" if $?;
system $make, 'install', "PREFIX=$prefix";
die "make install failed" if $?;
mkdir(_catdir($prefix, 'dll'));
File::Copy::copy('libbz2.so.1.0.6', _catfile($prefix, 'dll', 'libbz2.so.1.0.6'));
eval { chmod 0755, _catfile($prefix, 'dll', 'libbz2.so.1.0.6') };
}
my $build = bless {
cflags => [ "-I" . _catdir($prefix, 'include') ],
libs => [ "-L" . _catdir($prefix, 'lib'), '-lbz2' ],
prefix => $prefix,
dll_dir => [ 'dll' ],
dlls => do {
opendir(my $dh, File::Spec->catdir($prefix, 'dll'));
[grep { ! -l File::Spec->catfile($prefix, 'dll', $_) } grep { /\.so/ || /\.(dll|dylib)$/ } grep !/^\./, readdir $dh];
( run in 0.257 second using v1.01-cache-2.11-cpan-496ff517765 )