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