Alien-Meson

 view release on metacpan or  search on metacpan

alienfile  view on Meta::CPAN

  );
  patch sub {
    my @tests = Path::Tiny::path('.')->children( qr/.*test.*/ );
    $_->remove_tree for @tests;
    Path::Tiny::path('graphics')->remove_tree;
    Path::Tiny::path('setup.py')->remove_tree;
  };
  plugin 'Build::Copy';
  after build => sub {
    my($build) = @_;
    $build->runtime_prop->{'style'} = 'source';
    $build->runtime_prop->{'python-source'} = 1;
    $build->runtime_prop->{command} = 'meson.py';
    $build->runtime_prop->{python_bin} = $python_bin;
  };
}

my ($binary_release_name_re, $binary_release_format);
sub can_binary {
  if( $^O eq 'MSWin32' && $Config{ptrsize} == 8 ) {
    # Windows 64-bit

alienfile  view on Meta::CPAN

      my $Meson = $cwd->child('Meson');
      $Meson->child('ninja.exe')->remove;
      File::Copy::Recursive::rmove( "$Meson/*", $cwd );
      $Meson->remove_tree;
    };

    plugin 'Build::Copy';

    after build => sub {
      my($build) = @_;
      $build->runtime_prop->{'style'} = 'binary';
      $build->runtime_prop->{command} = 'meson';
    };
  } elsif( $binary_release_format eq '.pkg' ) {
    extract sub {
      my ($build) = @_;

      Alien::Build::CommandSequence->new([
        qw(pkgutil --expand-full),
        $build->install_prop->{download},
        'meson'

alienfile  view on Meta::CPAN

      #$_->remove_tree for $cwd->children( qr/^(Distribution|Resources)$/ );
      $meson_top->child('bin', 'ninja')->remove;
      File::Copy::Recursive::rmove( "$meson_top/*", $cwd );
      $meson_top->remove_tree;
    };

    plugin 'Build::Copy';

    after build => sub {
      my($build) = @_;
      $build->runtime_prop->{'style'} = 'binary';
      $build->runtime_prop->{command} = 'meson';
    };
  }
}

share {
  requires 'Path::Tiny';
  requires 'File::Which';
  requires 'Capture::Tiny';
  requires 'Alien::Build::CommandSequence';

alienfile  view on Meta::CPAN

    $release_types->{ $ENV{ALIEN_MESON_SHARE_PREFER} }{$_}->() for qw(can do);
  } else {
    die "Unknown value for ALIEN_MESON_SHARE_PREFER: $ENV{ALIEN_MESON_SHARE_PREFER}";
  }

};

sys {
  meta->after_hook( probe => sub {
    my($build) = @_;
    $build->runtime_prop->{'style'} = 'system';
  });
};

t/alien_meson.t  view on Meta::CPAN

use Test2::V0;
use Test::Alien;
use Test::Alien::Diag;
use Alien::Meson;
use Data::Dumper;

alien_diag 'Alien::Meson';
diag "Alien::Meson {style} : ", Alien::Meson->runtime_prop->{'style'};
alien_ok 'Alien::Meson';

diag "Alien::Meson->runtime_prop ", Dumper( [ Alien::Meson->runtime_prop ] );

diag "Alien::Meson->exe: ", Dumper( [ Alien::Meson->exe ] );

like warning {
  helper_ok 'meson';
  interpolate_template_is '%{meson}', join " ", Alien::Meson->exe;
}, qr/deprecated/, 'helper is deprecated';



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