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