fix META file generation by working around rt#85406
[gitmo/Role-Tiny.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3 use 5.006;
4 use ExtUtils::MakeMaker;
5 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
6
7 my %BUILD_DEPS = (
8   'Test::More' => 0.96,
9   'Test::Fatal' => 0.003,
10 );
11
12 # have to do this since old EUMM dev releases miss the eval $VERSION line
13 my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 };
14
15 WriteMakefile(
16   NAME => 'Role::Tiny',
17   VERSION_FROM => 'lib/Role/Tiny.pm',
18   PREREQ_PM => {
19     Exporter => '5.57',
20     ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
21     ($mymeta_works ? () : (%BUILD_DEPS)),
22   },
23   $mymeta_works ? (BUILD_REQUIRES => \%BUILD_DEPS) : (),
24
25   -f 'META.yml' ? () : (META_MERGE => {
26     'meta-spec' => { version => 2 },
27     no_index => {
28       directory => [ 'xt' ]
29     },
30     resources => {
31       # r/w: gitmo@git.shadowcat.co.uk:Role-Tiny.git
32       repository => {
33         url => 'git://git.shadowcat.co.uk/gitmo/Role-Tiny.git',
34         web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Role-Tiny.git',
35         type => 'git',
36       },
37       bugtracker => {
38           mailto => 'bug-Role-Tiny@rt.cpan.org',
39           web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Role-Tiny',
40       },
41     },
42   }),
43 );