Alien-spatialite
view release on metacpan or search on metacpan
}
);
meta->before_hook( build => \&update_configure_freebsd );
build [
"%{configure} $with_local $with_cpp11 $build_static $extra_build_args",
\&pause,
$make_cmd,
\&patch_rpaths,
\&rename_la_files,
$make_inst_cmd,
#@make_clean
];
};
sub update_configure_freebsd {
my ($build) = @_;
->in( '.' );
foreach my $fname (@configures) {
$build->log ($fname);
my $permissions = (stat ($fname))[2];
open my $fh, $fname or die $!;
my $text = do {local $/ = undef; <$fh>};
$fh->close;
$text =~ s/(freebsd[12])\*/$1.*/gms;
$text =~ s/(freebsd\[123?\])\*/$1.*/gms;
rename $fname, "$fname.bak";
open my $ofh, '>', $fname or die $!;
print {$ofh} $text;
$ofh->close;
chmod $permissions, $fname;
}
return;
}
sub rename_la_files {
# need to return if not share
return if !$on_windows;
use File::Find::Rule;
my @la_files
= File::Find::Rule->file()
->name( '*.la' )
->in( '.' );
foreach my $file (@la_files) {
Alien::Build->log("Renaming $file so it will not interfere with gdal compilation");
rename $file, $file . '.bak';
}
}
# should be a gather hook working on the stage dir
sub patch_rpaths {
my ($build) = @_;
# only run on unices - incomplete check but
# I don't think aliens work on VMS or zOS
( run in 0.436 second using v1.01-cache-2.11-cpan-131fc08a04b )