Alien-FFI

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN


      requires 'Path::Tiny' => '0.077';
      patch sub {
        my($build) = @_;
        my $libffi_pc = Path::Tiny->new('libffi.pc.in');
        if(-f $libffi_pc)
        {
          # I think the actual error is somewhere other
          # than the .pc file, but this works around it
          # at least in the way that we use it.
          $build->log('edit libffi.pc.in');
          $libffi_pc->copy('libffi.pc.in.orig');
          $libffi_pc->edit_lines(sub {
            s/^toolexeclibdir=.*$/toolexeclibdir=\${libdir\}/;
          });
        }
      };

      meta->after_hook( gather_share => sub {
        my($build) = @_;
        $build->runtime_prop->{$_} .= " -DFFI_BUILDING" for qw( cflags cflags_static );
        $build->runtime_prop->{$_} =~ s{-L}{-LIBPATH:}g for qw( libs libs_static );
        $build->runtime_prop->{$_} =~ s{-l([A-Za-z]+)}{$1.LIB}g for qw( libs libs_static );



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