Alien-geos-af

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

sub update_hilbert_encoder_h {
  my $build = shift;

  my @files
    = File::Find::Rule->file()
                      ->name( 'HilbertEncoder.h' )
                      ->in( '.' );

  log ("Updating " . path ($files[0])->absolute);
  my $replace = '#include <cstdint>';
  path($files[0])->edit (
    sub {
      s{(\Qinclude <vector>\E)([\r\n]+)}{$1\n$replace$2}xms;
    }
  );

}

#  a bit brute force
sub copy_geos_c_dll {
  my $build = shift;

alienfile  view on Meta::CPAN

    use File::Find::Rule;
    use Path::Tiny qw /path/;
    my (@files)
      = File::Find::Rule
                ->file()
                ->name( 'Geometry.cpp' )
                ->in( $base_dir );
    #  loop is brute force
    foreach my $file (@files) {
        say "Modifying file $file";
        path($file)->edit (
            sub {
              s{^//(#define USE_RECTANGLE_INTERSECTION 1)}{$1}ms;
            }
        );
    }
}

sub update_geos_config {
    my ($build) = @_;



( run in 0.769 second using v1.01-cache-2.11-cpan-de7293f3b23 )