fix dev mode when no dot in @INC
[catagits/Catalyst-View-TT.git] / Makefile.PL
1 use strict;
2 use warnings;
3
4 use ExtUtils::MakeMaker;
5
6 ExtUtils::MakeMaker->VERSION('7.00') unless -f 'META.yml';
7 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
8
9 my %WriteMakefileArgs = (
10     NAME => 'Catalyst::View::TT',
11     VERSION_FROM => 'lib/Catalyst/View/TT.pm',
12     AUTHOR => 'Sebastian Riedel <sri@cpan.org>',
13     LICENSE => 'perl_5',
14     MIN_PERL_VERSION => 5.008001,  # catalyst minimum
15     PREREQ_PM => {
16         'Catalyst'          => '5.7',
17         'Template'          => 0,
18         'Class::Accessor'   => 0,
19         'Template::Timer'   => 0,
20         'Path::Class'       => 0,
21         'MRO::Compat'       => 0,
22         'Data::Dump'        => 0,
23     },
24     TEST_REQUIRES => {
25         'Test::More'        => '0.88',
26         'File::Spec'        => '0',
27     },
28
29     META_MERGE => {
30         'meta-spec' => { version => 2 },
31         dynamic_config => 0,
32         resources => {
33             # r/w: catagits@git.shadowcat.co.uk:Catalyst-View-TT
34             # r/o: git://git.shadowcat.co.uk:catagits/Catalyst-View-TT
35             # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-View-TT.git
36             repository => {
37                 url => 'https://github.com/perl-catalyst/Catalyst-View-TT.git',
38                 web => 'https://github.com/perl-catalyst/Catalyst-View-TT',
39                 type => 'git',
40             },
41             bugtracker => {
42                 mailto => 'bug-Catalyst-View-TT@rt.cpan.org',
43                 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-View-TT',
44             },
45             x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
46             x_IRC => 'irc://irc.perl.org/#catalyst',
47         },
48     },
49 );
50
51 die 'need to do a merge with CPAN::Meta::Requirements!!'
52     if !-f 'META.yml' && exists $WriteMakefileArgs{BUILD_REQUIRES};
53
54 if (!eval { ExtUtils::MakeMaker->VERSION('6.6303') }) {
55     $WriteMakefileArgs{BUILD_REQUIRES} = $WriteMakefileArgs{TEST_REQUIRES};
56     delete $WriteMakefileArgs{TEST_REQUIRES};
57 }
58
59 if (!eval { ExtUtils::MakeMaker->VERSION('6.5501') }) {
60     @{$WriteMakefileArgs{PREREQ_PM}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} } =
61         @{$WriteMakefileArgs{BUILD_REQUIRES}}{ keys %{$WriteMakefileArgs{BUILD_REQUIRES}} };
62
63     delete $WriteMakefileArgs{BUILD_REQUIRES};
64 }
65
66 my %mm_req = (
67     LICENCE => 6.31,
68     META_MERGE => 6.45,
69     META_ADD => 6.45,
70     MIN_PERL_VERSION => 6.48,
71 );
72 for (keys %mm_req) {
73     unless (eval { ExtUtils::MakeMaker->VERSION($mm_req{$_}) }) {
74         warn "$_ $@" if not -f 'Makefile.PL';
75         delete $WriteMakefileArgs{$_};
76     }
77 }
78
79 WriteMakefile(%WriteMakefileArgs);