Alien-spatialite

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

              ->name( qr/^(lib|mod_)spatialite.so.?/ )
              ->in( getcwd() );
  
  eval 'require Alien::patchelf'
    or do {
      warn 'Unable to load Alien::patchelf ($@), cannot update rpaths';
      return;
    };
  my $pe = Alien::patchelf->new;
  foreach my $so_file (@so_files) {
    my ($old_rpath, $result, $stderr, @errors);
    ($old_rpath, $stderr, @errors)
      = $pe->patchelf ('--print-rpath', $so_file);
    $old_rpath //= '';
    #  prepend our paths
    my $rpath = $alien_rpath_text . ($old_rpath ? (':' . $old_rpath) : '');
    $build->log("Updating rpath for $so_file to $rpath, was $old_rpath");
    ($result, $stderr, @errors)
      = $pe->patchelf ('--set-rpath', $rpath, $so_file);
    warn $stderr if $stderr;
  }
  
  return;
}


sub set_compiler_flags {
  my ($orig, $build, @args) = @_;

  local $ENV{CFLAGS}   = "-O2 " . ($ENV{CFLAGS} // '');



( run in 1.150 second using v1.01-cache-2.11-cpan-49f99fa48dc )