2 use warnings FATAL => 'all';
5 name => 'Package-Variant',
7 test => { requires => {
10 runtime => { requires => {
15 'Module::Runtime' => '0.013',
20 # r/w: p5sagit@git.shadowcat.co.uk:Package-Variant.git
22 url => 'git://git.shadowcat.co.uk/p5sagit/Package-Variant.git',
23 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Package-Variant.git',
27 mailto => 'bug-Package-Variant@rt.cpan.org',
28 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Variant',
31 no_index => { directory => [ 't', 'xt', ], package => [ 'string' ] },
33 realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
38 ##############################################################################
39 require ExtUtils::MakeMaker;
40 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
42 # have to do this since old EUMM dev releases miss the eval $VERSION line
43 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
44 my $mymeta = $eumm_version >= 6.57_02;
45 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
47 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
48 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
49 $MM_ARGS{LICENSE} = $META{license}
50 if $eumm_version >= 6.30;
51 $MM_ARGS{NO_MYMETA} = 1
53 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
56 for (qw(configure build test runtime)) {
57 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
58 my $r = $MM_ARGS{$key} = {
59 %{$META{prereqs}{$_}{requires} || {}},
60 %{delete $MM_ARGS{$key} || {}},
62 defined $r->{$_} or delete $r->{$_} for keys %$r;
65 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
67 delete $MM_ARGS{MIN_PERL_VERSION}
68 if $eumm_version < 6.47_01;
69 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
70 if $eumm_version < 6.63_03;
71 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
72 if $eumm_version < 6.55_01;
73 delete $MM_ARGS{CONFIGURE_REQUIRES}
74 if $eumm_version < 6.51_03;
76 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);