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 | }, |
e5a678c6 |
30 | x_contributors => [ # manually added, from git shortlog -e -s -n |
31 | 'Karen Etheridge <ether@cpan.org>', |
32 | 'Matt S Trout <mst@shadowcat.co.uk>', |
33 | 'Graham Knop <haarg@haarg.org>', |
34 | 'David Steinbrunner <dsteinbrunner@pobox.com>', |
35 | ], |
74a7df2b |
36 | }, |
37 | |
38 | META_ADD => { |
5c638b01 |
39 | 'meta-spec' => { version => 2 }, |
74a7df2b |
40 | prereqs => { |
41 | configure => { |
42 | requires => { |
43 | 'ExtUtils::MakeMaker' => '0', |
44 | }, |
45 | }, |
46 | runtime => { |
47 | requires => { |
48 | 'Exporter' => '5.57', |
49 | 'Scalar::Util' => 0, |
50 | perl => '5.006', |
51 | }, |
52 | }, |
b1878734 |
53 | test => { |
54 | requires => { |
55 | 'Test::More' => '0', |
56 | }, |
57 | }, |
944651ea |
58 | }, |
74a7df2b |
59 | }, |
e6995dc6 |
60 | ); |
74a7df2b |
61 | |
62 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
63 | |
64 | for (qw(configure build test runtime)) { |
65 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
66 | next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_} |
67 | or exists $WriteMakefileArgs{$key}; |
68 | my $r = $WriteMakefileArgs{$key} = { |
69 | %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}}, |
70 | %{delete $WriteMakefileArgs{$key} || {}}, |
71 | }; |
72 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
73 | } |
74 | |
75 | # dynamic prereqs get added here. |
76 | |
77 | $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; |
78 | |
79 | die 'attention developer: you need to do a sane meta merge here!' |
80 | if keys %{$WriteMakefileArgs{BUILD_REQUIRES}}; |
81 | |
82 | $WriteMakefileArgs{BUILD_REQUIRES} = { |
83 | %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, |
84 | %{delete $WriteMakefileArgs{TEST_REQUIRES}} |
85 | } if $eumm_version < 6.63_03; |
86 | |
87 | $WriteMakefileArgs{PREREQ_PM} = { |
88 | %{$WriteMakefileArgs{PREREQ_PM}}, |
89 | %{delete $WriteMakefileArgs{BUILD_REQUIRES}} |
90 | } if $eumm_version < 6.55_01; |
91 | |
92 | delete $WriteMakefileArgs{CONFIGURE_REQUIRES} |
93 | if $eumm_version < 6.51_03; |
94 | |
95 | delete $WriteMakefileArgs{MIN_PERL_VERSION} |
96 | if $eumm_version < 6.48; |
97 | |
98 | delete @WriteMakefileArgs{qw(META_ADD META_MERGE)} |
99 | if $eumm_version < 6.46; |
100 | |
101 | delete $WriteMakefileArgs{LICENSE} |
102 | if $eumm_version < 6.31; |
103 | |
104 | WriteMakefile(%WriteMakefileArgs); |