X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Fstrictures.git;a=blobdiff_plain;f=Makefile.PL;h=cfb4e6d12e9c37a3849defd964a4abbcacc4ede9;hp=958347e0bff059789d71c1d48ad7410df745b3c7;hb=ae3262c93038592ea07e02f42c194e59d0ce810d;hpb=91be28bc591c8b01cb9bbdf2084a9914f72480c5 diff --git a/Makefile.PL b/Makefile.PL index 958347e..cfb4e6d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,15 +4,63 @@ use ExtUtils::MakeMaker; (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; +my %extra_prereqs = ( + indirect => 0, + multidimensional => 0, + 'bareword::filehandles' => 0, +); + +use Text::ParseWords; +sub parse_args { + # copied from EUMM + ExtUtils::MakeMaker::parse_args( + my $tmp = {}, + Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''), + @ARGV, + ); + return $tmp->{ARGS} || {}; +} + +my $have_compiler + = ! parse_args()->{PUREPERL_ONLY} + && eval { require ExtUtils::CBuilder; 1 } + && ExtUtils::CBuilder->new->have_compiler; + WriteMakefile( NAME => 'strictures', VERSION_FROM => 'lib/strictures.pm', + MIN_PERL_VERSION => '5.006', + + META_MERGE => { + 'meta-spec' => { version => 2 }, + dynamic_config => 1, - META_ADD => { resources => { # r/w: p5sagit@git.shadowcat.co.uk:strictures.git - repository => 'git://git.shadowcat.co.uk/p5sagit/strictures.git', - homepage => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git', + repository => { + url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git', + type => 'git', + }, + bugtracker => { + mailto => 'bug-strictures@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures', + }, + }, + + prereqs => { + configure => { + requires => { + 'ExtUtils::CBuilder' => 0, + }, + }, + runtime => { + ( $] >= 5.008004 && !$have_compiler + ? ( recommends => \%extra_prereqs ) : () ), + }, }, }, + + ($] >= 5.008004 && $have_compiler + ? ( PREREQ_PM => \%extra_prereqs ) : () ), );