Commit | Line | Data |
38a56c0f |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
bd5c78da |
3 | |
88f5410d |
4 | my %META = ( |
5 | name => 'Import-Into', |
6 | license => 'perl_5', |
7 | dynamic_config => 0, |
8 | resources => { |
9 | # r/w: p5sagit@git.shadowcat.co.uk:Import-Into.git |
10 | repository => { |
11 | url => 'git://git.shadowcat.co.uk/p5sagit/Import-Into.git', |
12 | web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Import-Into.git', |
13 | type => 'git', |
14 | }, |
15 | bugtracker => { |
16 | mailto => 'bug-Import-Into@rt.cpan.org', |
17 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Import-Into', |
bd5c78da |
18 | }, |
f84a529e |
19 | }, |
88f5410d |
20 | prereqs => { |
21 | configure => { |
22 | requires => { |
23 | 'ExtUtils::MakeMaker' => 0, |
cc906f81 |
24 | }, |
88f5410d |
25 | }, |
26 | runtime => { |
27 | requires => { |
28 | 'strict' => '0', |
29 | 'warnings' => '0', |
30 | 'Module::Runtime' => '0', |
31 | 'perl' => '5.006', |
3dd3d1b9 |
32 | }, |
88f5410d |
33 | }, |
34 | test => { |
35 | requires => { |
36 | 'Exporter' => '0', |
37 | 'base' => '0', |
38 | 'Test::More' => '0', |
3dd3d1b9 |
39 | }, |
40 | }, |
bd5c78da |
41 | }, |
88f5410d |
42 | ); |
dcc104db |
43 | |
88f5410d |
44 | my %MM_ARGS = ( |
38a56c0f |
45 | ); |
f84a529e |
46 | |
d3cffdfe |
47 | ## BOILERPLATE ############################################################### |
88f5410d |
48 | require ExtUtils::MakeMaker; |
49 | (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
50 | |
51 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
f84a529e |
52 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
88f5410d |
53 | my $mymeta = $eumm_version >= 6.57_02; |
54 | my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; |
55 | |
56 | ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; |
57 | ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; |
d3cffdfe |
58 | $META{license} = [ $META{license} ] |
59 | if $META{license} && !ref $META{license}; |
60 | $MM_ARGS{LICENSE} = $META{license}[0] |
61 | if $META{license} && $eumm_version >= 6.30; |
88f5410d |
62 | $MM_ARGS{NO_MYMETA} = 1 |
63 | if $mymeta_broken; |
64 | $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } |
65 | unless -f 'META.yml'; |
f84a529e |
66 | |
67 | for (qw(configure build test runtime)) { |
68 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
88f5410d |
69 | my $r = $MM_ARGS{$key} = { |
70 | %{$META{prereqs}{$_}{requires} || {}}, |
71 | %{delete $MM_ARGS{$key} || {}}, |
f84a529e |
72 | }; |
73 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
74 | } |
75 | |
88f5410d |
76 | $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; |
f84a529e |
77 | |
88f5410d |
78 | delete $MM_ARGS{MIN_PERL_VERSION} |
79 | if $eumm_version < 6.47_01; |
80 | $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} |
81 | if $eumm_version < 6.63_03; |
82 | $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} |
83 | if $eumm_version < 6.55_01; |
84 | delete $MM_ARGS{CONFIGURE_REQUIRES} |
f84a529e |
85 | if $eumm_version < 6.51_03; |
86 | |
88f5410d |
87 | ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); |
d3cffdfe |
88 | ## END BOILERPLATE ########################################################### |