Games-Mahjongg-Solver-deBondt-FFI
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
use File::Basename qw(dirname);
use File::Spec;
use strict;
use File::Path qw(make_path); unless (-e "ffi") { make_path("ffi") or die "could not mkdir ffi: $$!"; }
my $version_diff = 0; # we'll have to die if this becomes true
my $version_from;
my $trial = 0;
my $version;
{
local $^W;
$ExtUtils::MakeMaker::VERSION = eval $ExtUtils::MakeMaker::VERSION;
}
$version_from = File::Spec->catfile(split m{/}, "lib/Games/Mahjongg/Solver/deBondt/FFI.pm");
unshift @INC, "lib";
my $version = MM->parse_version($version_from); # MM is in MakeMaker
if ($trial) {
$version .= "-TRIAL";
if ($trial > 1) {
$version .= $trial;
}
}
{
my $version_set_manually = 1;
if ($ARGV[0] && $ARGV[0] eq "--setversion") {
require Module::Signature;
die "Your Module::Signature is a bit dated[$Module::Signature::VERSION].\nDo not make a release with it\n"
if $Module::Signature::VERSION < 0.83;
shift @ARGV;
my $st;
local $ENV{LANG} = "C";
my $dirty = `git status --porcelain --untracked-files=no`;
die "Not everything checked in or out?\n====\n$dirty====\n" if $dirty;
if ($version_set_manually) {
# we must control that the VERSION in this .pm is the same as in the Makefile
open my $fh, "make the-release-name|" or die;
my $have_version;
while (<$fh>) {
next unless /^version\s+([\d\._]+(?:-TRIAL)?)/;
$have_version = $1;
}
}
exit unless $version_diff;
}
}
my @sign = (MM->can("signature_target") ? (SIGN => 1) : ());
use FFI::Build::MM;
my $fbmm = FFI::Build::MM->new;
WriteMakefile(
$fbmm->mm_args(
AUTHOR => 'Andreas Koenig <andk@cpan.org>',
ABSTRACT_FROM => $version_from, # retrieve abstract from module
NAME => 'Games::Mahjongg::Solver::deBondt::FFI',
DISTNAME => 'Games-Mahjongg-Solver-deBondt-FFI',
VERSION => $version,
PREREQ_PM => {
'FFI::Platypus' => 1,
'FFI::Platypus::Lang::CPP' => 1,
'FFI::Platypus::Memory' => 0,
'FFI::CheckLib' => 0,
'File::Path' => 0,
},
TEST_REQUIRES => {
'Test::More' => 0,
'YAML::XS' => 0,
},
CONFIGURE_REQUIRES => {
'FFI::Build::MM' => 0,
},
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
( run in 0.532 second using v1.01-cache-2.11-cpan-71847e10f99 )