Alien-geos-af
view release on metacpan or search on metacpan
#\&pause,
\&update_hilbert_encoder_h,
'mkdir _build',
'cd _build',
$cmake_cmd,
$make_cmd,
($run_tests ? '%{make} test' : ()),
#\&pause,
\&update_geos_config,
$make_inst_cmd,
\&rename_la_files,
];
};
gather [
\©_geos_c_dll,
#\&pause,
# get all the geos-config fields
\&set_runtime_props_from_config,
my $part2 = $line =~ /`escape/
? 'prefix=`escape "${BASEPATH}"`'
: 'prefix="${BASEPATH}"';
my $part3 = 'prefix=$(dirname ${prefix})';
$line = "$part1\n$part2\n$part3\n";
}
$file_contents .= $line;
}
$fh->close;
my $permissions = (stat ($geos_config))[2];
rename $geos_config, "$geos_config.bak";
open my $ofh, '>', $geos_config
or die "Could not open $geos_config for writing, $!";
print {$ofh} $file_contents;
$ofh->close or die $!;
# make sure we get the same permissions
chmod $permissions, $geos_config or die $!;
return;
}
sub set_runtime_props_from_config {
$build->runtime_prop->{$flag} =~ s|(?<=-[IL])/C/|C:/|i;
}
if ($^O =~ /bsd/i) {
# maybe will help?
$build->runtime_prop->{$flag} =~ s/-\d+$//;
}
$build->log ("Runtime prop $flag is " . $build->runtime_prop->{$flag});
}
}
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) {
say "Renaming $file so it will not interfere with gdal compilation";
rename $file, $file . '.bak';
}
}
sub pause {
#return; # disable
#return if !$on_windows || $on_automated_rig;
say "CONTINUE?";
my $response = <>;
( run in 0.855 second using v1.01-cache-2.11-cpan-e9daa2b36ef )