X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=f9437ad2e615fd9e51c3bd45ac9a8e8ba9705ed0;hb=53b371651d8702e78774947049fcebfe61d3c4bb;hp=738998b5c3e420d8670ded0db34cbf7ac0c88c65;hpb=bd4ee63a21890b955bfa475cda4fbba1066ef048;p=catagits%2FCatalyst-View-TT.git diff --git a/Makefile.PL b/Makefile.PL index 738998b..f9437ad 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,13 +1,79 @@ -use inc::Module::Install; +use strict; +use warnings; -name 'Catalyst-View-TT'; -all_from 'lib/Catalyst/View/TT.pm'; +use ExtUtils::MakeMaker; -requires Catalyst => '5.7'; -requires Template => 0; -requires Class::Accessor => 0; -requires Template::Timer => 0; -requires Path::Class => 0; +ExtUtils::MakeMaker->VERSION('7.00') unless -f 'META.yml'; +(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -auto_install; -WriteAll; \ No newline at end of file +my %WriteMakefileArgs = ( + NAME => 'Catalyst::View::TT', + VERSION_FROM => 'lib/Catalyst/View/TT.pm', + AUTHOR => 'Sebastian Riedel ', + LICENSE => 'perl_5', + MIN_PERL_VERSION => 5.008001, # catalyst minimum + PREREQ_PM => { + 'Catalyst' => '5.7', + 'Template' => 0, + 'Class::Accessor' => 0, + 'Template::Timer' => 0, + 'Path::Class' => 0, + 'MRO::Compat' => 0, + 'Data::Dump' => 0, + }, + TEST_REQUIRES => { + 'Test::More' => '0.88', + 'File::Spec' => '0', + }, + + META_MERGE => { + 'meta-spec' => { version => 2 }, + dynamic_config => 0, + resources => { + # r/w: catagits@git.shadowcat.co.uk:Catalyst-View-TT + # r/o: git://git.shadowcat.co.uk:catagits/Catalyst-View-TT + # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-View-TT.git + repository => { + url => 'https://github.com/perl-catalyst/Catalyst-View-TT.git', + web => 'https://github.com/perl-catalyst/Catalyst-View-TT', + type => 'git', + }, + bugtracker => { + mailto => 'bug-Catalyst-View-TT@rt.cpan.org', + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-View-TT', + }, + x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst', + x_IRC => 'irc://irc.perl.org/#catalyst', + }, + }, +); + +die 'need to do a merge with CPAN::Meta::Requirements!!' + if !-f 'META.yml' && exists $WriteMakefileArgs{BUILD_REQUIRES}; + +if (!eval { ExtUtils::MakeMaker->VERSION('6.6303') }) { + $WriteMakefileArgs{BUILD_REQUIRES} = $WriteMakefileArgs{TEST_REQUIRES}; + delete $WriteMakefileArgs{TEST_REQUIRES}; +} + +if (!eval { ExtUtils::MakeMaker->VERSION('6.5501') }) { + @{$WriteMakefileArgs{PREREQ_PM}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} } = + @{$WriteMakefileArgs{BUILD_REQUIRES}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} }; + + delete $WriteMakefileArgs{BUILD_REQUIRES}; +} + +my %mm_req = ( + LICENCE => 6.31, + META_MERGE => 6.45, + META_ADD => 6.45, + MIN_PERL_VERSION => 6.48, +); +for (keys %mm_req) { + unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) { + warn "$_ $@" if not -f 'Makefile.PL'; + delete $WriteMakefileArgs{$_}; + } +} + +WriteMakefile(%WriteMakefileArgs);