Alien-FLTK

 view release on metacpan or  search on metacpan

inc/MBTFLTK.pm  view on Meta::CPAN

            or die $!;
        copy
            rel2abs(catdir('config.h')),
            catdir($archdir, 'include', 'config.h')
            or die $!;
        dircopy rel2abs('lib'), catdir($archdir, 'lib')
            or die $!;
        #

        write_file(catfile($archdir, qw[config.json]),
                   'utf8', encode_json(\%libinfo));
    }
}

sub find {
    my ($pattern, $dir) = @_;
    my @ret;
    File::Find::find(sub { push @ret, $File::Find::name if /$pattern/ && -f },
                     $dir)
        if -d $dir;
    return @ret;

inc/MBTFLTK.pm  view on Meta::CPAN

        my %opt = @_;
        die "Must run `./Build build` first\n" if not -d 'blib';
        install($opt{install_paths}->install_map,
                @opt{qw/verbose dry_run uninst/});
    },
);

sub Build {
    my $action = @ARGV && $ARGV[0] =~ /\A\w+\z/ ? shift @ARGV : 'build';
    die "No such action '$action'\n" if not $actions{$action};
    unshift @ARGV, @{decode_json(read_file('_build_params', 'utf8'))};
    GetOptions(\my %opt,
               qw/install_base=s install_path=s% installdirs=s destdir=s prefix=s config=s% uninst:1 verbose:1 dry_run:1 pureperl-only:1 create_packlist=i/
    );
    $_ = detildefy($_)
        for grep {defined} @opt{qw/install_base destdir prefix/},
        values %{$opt{install_path}};
    @opt{'config', 'meta'}
        = (ExtUtils::Config->new($opt{config}), get_meta());
    $actions{$action}->(
          %opt,

inc/MBTFLTK.pm  view on Meta::CPAN

    printf "Creating new 'Build' script for '%s' version '%s'\n",
        $meta->name, $meta->version;
    my $dir = $meta->name eq 'MBTFLTK' ? '' : "use lib 'inc';";
    write_file('Build', 'raw',
               "#!perl\n$dir\nuse MBTFLTK;\n\$|++;\nBuild();\n");
    make_executable('Build');
    my @env
        = defined $ENV{PERL_MB_OPT} ?
        split_like_shell($ENV{PERL_MB_OPT})
        : ();
    write_file('_build_params', 'utf8', encode_json([@env, @ARGV]));
    $meta->save(@$_) for ['MYMETA.json'], ['MYMETA.yml' => {version => 1.4}];
}
1;

=head1 SEE ALSO

L<Module::Build::Tiny>

=head1 ORIGINAL AUTHORS



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