X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=ac2bc108fe7fc28abbcbd70ddbf0f172b61ba5ac;hb=0f4cdbe7d72ea656b2627c47d22abb584c8add80;hp=51d31fd328d6b81a957ec0c78db136d5abdba5e7;hpb=d6d29b9b2c7db9ccfd3ea8cb3b304b3b017395e7;p=catagits%2FCatalyst-Plugin-Static-Simple.git diff --git a/Makefile.PL b/Makefile.PL index 51d31fd..ac2bc10 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,31 +1,109 @@ -# Note: this file was auto-generated by Module::Build::Compat version 0.03 - - unless (eval "use Module::Build::Compat 0.02; 1" ) { - print "This module requires Module::Build to install itself.\n"; - - require ExtUtils::MakeMaker; - my $yn = ExtUtils::MakeMaker::prompt - (' Install Module::Build now from CPAN?', 'y'); - - unless ($yn =~ /^y/i) { - die " *** Cannot install without Module::Build. Exiting ...\n"; - } - - require Cwd; - require File::Spec; - require CPAN; - - # Save this 'cause CPAN will chdir all over the place. - my $cwd = Cwd::cwd(); - my $makefile = File::Spec->rel2abs($0); - - CPAN::Shell->install('Module::Build::Compat') - or die " *** Cannot install without Module::Build. Exiting ...\n"; - - chdir $cwd or die "Cannot chdir() back to $cwd: $!"; - } - eval "use Module::Build::Compat 0.02; 1" or die $@; - use lib '_build/lib'; - Module::Build::Compat->run_build_pl(args => \@ARGV); - require Module::Build; - Module::Build::Compat->write_makefile(build_class => 'Module::Build'); +use strict; +use warnings; +use 5.006; + +my %META = ( + name => 'Catalyst-Plugin-Static-Simple', + license => 'perl_5', + prereqs => { + configure => { requires => { + 'ExtUtils::MakeMaker' => 0, + } }, + test => { + requires => { + 'Test::More' => 0, + }, + }, + runtime => { + requires => { + 'Catalyst::Runtime' => '5.80008', + 'MIME::Types' => '2.03', + 'Moose' => 0, + 'MooseX::Types' => 0, + 'namespace::autoclean' => 0, + }, + }, + develop => { + requires => { + 'Test::NoTabs' => 0, + 'Test::Pod' => '1.14', + 'Test::Pod::Coverage' => '1.04', + }, + }, + }, + resources => { + repository => { + url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Static-Simple.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Static-Simple.git', + type => 'git', + }, + bugtracker => { + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Static-Simple', + mailto => 'bug-Catalyst-Plugin-Static-Simple@rt.cpan.org', + }, + license => [ 'http://dev.perl.org/licenses/' ], + }, + no_index => { + directory => [ 't', 'xt' ] + }, +); + +my %MM_ARGS = (); + +if ( + eval { require Catalyst::Plugin::SubRequest } + && !eval { Catalyst::Plugin::SubRequest->VERSION(0.08) } +) { + print "** WARNING **\n" + . "You appear to have a version of Catalyst::Plugin::SubRequest " + . "older than 0.08.\n" + . "You must upgrade to SubRequest 0.08 or later if you use it " + . "in any applications with Static::Simple.\n"; + $MM_ARGS{PREREQ_PM}{'Catalyst::Plugin::SubRequest'} = '0.08'; +} + +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; + +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; + +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; +$MM_ARGS{PL_FILES} ||= {}; +$MM_ARGS{NORECURS} = 1 + if not exists $MM_ARGS{NORECURS}; + +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; +} + +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; + +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; + +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ###########################################################