Commit | Line | Data |
e6995dc6 |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
3 | use 5.008001; |
4 | use ExtUtils::MakeMaker; |
f11115fb |
5 | (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
e6995dc6 |
6 | |
74a7df2b |
7 | my %WriteMakefileArgs = ( |
dcf9b5b3 |
8 | NAME => 'Safe::Isa', |
e6995dc6 |
9 | VERSION_FROM => 'lib/Safe/Isa.pm', |
944651ea |
10 | |
74a7df2b |
11 | META_MERGE => { |
6c703264 |
12 | 'meta-spec' => { version => 2 }, |
13 | dynamic_config => 0, |
6c703264 |
14 | resources => { |
7423cd2f |
15 | # GitHub mirrors from Shadowcat. We list it so we can get pull requests. |
16 | # The canonical repo is: |
17 | # r/o: git://git.shadowcat.co.uk/p5sagit/Safe-Isa.git |
6c703264 |
18 | # r/w: p5sagit@git.shadowcat.co.uk:Safe-Isa.git |
7423cd2f |
19 | # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Safe-Isa.git |
6c703264 |
20 | repository => { |
7423cd2f |
21 | url => 'https://github.com/p5sagit/Safe-Isa.git', |
22 | web => 'https://github.com/p5sagit/Safe-Isa', |
6c703264 |
23 | type => 'git', |
24 | }, |
25 | bugtracker => { |
26 | mailto => 'bug-Safe-Isa@rt.cpan.org', |
27 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Safe-Isa', |
28 | }, |
29 | }, |
74a7df2b |
30 | }, |
31 | |
32 | META_ADD => { |
5c638b01 |
33 | 'meta-spec' => { version => 2 }, |
74a7df2b |
34 | prereqs => { |
35 | configure => { |
36 | requires => { |
37 | 'ExtUtils::MakeMaker' => '0', |
38 | }, |
39 | }, |
40 | runtime => { |
41 | requires => { |
42 | 'Exporter' => '5.57', |
43 | 'Scalar::Util' => 0, |
44 | perl => '5.006', |
45 | }, |
46 | }, |
b1878734 |
47 | test => { |
48 | requires => { |
49 | 'Test::More' => '0', |
50 | }, |
51 | }, |
944651ea |
52 | }, |
74a7df2b |
53 | }, |
e6995dc6 |
54 | ); |
74a7df2b |
55 | |
56 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
57 | |
58 | for (qw(configure build test runtime)) { |
59 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
60 | next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_} |
61 | or exists $WriteMakefileArgs{$key}; |
62 | my $r = $WriteMakefileArgs{$key} = { |
63 | %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}}, |
64 | %{delete $WriteMakefileArgs{$key} || {}}, |
65 | }; |
66 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
67 | } |
68 | |
69 | # dynamic prereqs get added here. |
70 | |
71 | $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; |
72 | |
73 | die 'attention developer: you need to do a sane meta merge here!' |
74 | if keys %{$WriteMakefileArgs{BUILD_REQUIRES}}; |
75 | |
76 | $WriteMakefileArgs{BUILD_REQUIRES} = { |
77 | %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, |
78 | %{delete $WriteMakefileArgs{TEST_REQUIRES}} |
79 | } if $eumm_version < 6.63_03; |
80 | |
81 | $WriteMakefileArgs{PREREQ_PM} = { |
82 | %{$WriteMakefileArgs{PREREQ_PM}}, |
83 | %{delete $WriteMakefileArgs{BUILD_REQUIRES}} |
84 | } if $eumm_version < 6.55_01; |
85 | |
86 | delete $WriteMakefileArgs{CONFIGURE_REQUIRES} |
87 | if $eumm_version < 6.51_03; |
88 | |
89 | delete $WriteMakefileArgs{MIN_PERL_VERSION} |
90 | if $eumm_version < 6.48; |
91 | |
92 | delete @WriteMakefileArgs{qw(META_ADD META_MERGE)} |
93 | if $eumm_version < 6.46; |
94 | |
95 | delete $WriteMakefileArgs{LICENSE} |
96 | if $eumm_version < 6.31; |
97 | |
98 | WriteMakefile(%WriteMakefileArgs); |