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