Commit | Line | Data |
d4705371 |
1 | use strict; |
b5f5aae4 |
2 | use warnings FATAL => 'all'; |
1a6addf7 |
3 | use 5.006; |
d4705371 |
4 | |
b5f5aae4 |
5 | my %META = ( |
6 | name => 'SQL-Abstract', |
7 | license => 'perl_5', |
8 | prereqs => { |
9 | configure => { |
10 | requires => { |
11 | 'ExtUtils::MakeMaker' => 0, |
12 | } |
13 | }, |
14 | build => { |
15 | requires => {} |
16 | }, |
17 | test => { |
18 | requires => { |
19 | "Test::More" => '0.88', |
20 | "Test::Exception" => '0.31', |
21 | "Test::Warn" => '0', |
22 | "Test::Deep" => '0.101', |
23 | "Storable" => '0', # for cloning in tests |
24 | }, |
25 | }, |
26 | runtime => { |
27 | requires => { |
28 | 'List::Util' => '0', |
29 | 'Scalar::Util' => '0', |
30 | 'Exporter' => '5.57', |
31 | 'MRO::Compat' => '0.12', |
32 | 'Moo' => '2.000001', |
33 | 'Sub::Quote' => '2.000001', |
34 | 'Hash::Merge' => '0.12', |
35 | 'Text::Balanced' => '2.00', |
36 | }, |
37 | }, |
38 | develop => { |
39 | requires => {}, |
40 | }, |
41 | }, |
42 | resources => { |
43 | repository => { |
44 | url => 'https://github.com/dbsrgits/sql-abstract.git', |
45 | web => 'https://github.com/dbsrgits/sql-abstract', |
46 | type => 'git', |
47 | }, |
48 | x_IRC => 'irc://irc.perl.org/#dbix-class', |
49 | bugtracker => { |
50 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=SQL-Abstract', |
51 | mailto => 'bug-SQL-Abstract@rt.cpan.org', |
52 | }, |
53 | license => [ 'http://dev.perl.org/licenses/' ], |
54 | }, |
55 | no_index => { |
56 | package => 'DBIx::Class::Storage::Debug::PrettyPrint', |
57 | directory => [ 't', 'xt', 'examples' ], |
58 | }, |
59 | ); |
d4705371 |
60 | |
b5f5aae4 |
61 | my %MM_ARGS = ( |
62 | test => { TESTS => 't/*.t t/*/*.t' }, |
63 | ); |
d4705371 |
64 | |
b5f5aae4 |
65 | ## BOILERPLATE ############################################################### |
66 | require ExtUtils::MakeMaker; |
67 | (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
b5f4fb92 |
68 | |
b5f5aae4 |
69 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
70 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
71 | my $mymeta = $eumm_version >= 6.57_02; |
72 | my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; |
187f46da |
73 | |
b5f5aae4 |
74 | ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; |
75 | ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; |
76 | $META{license} = [ $META{license} ] |
77 | if $META{license} && !ref $META{license}; |
78 | $MM_ARGS{LICENSE} = $META{license}[0] |
79 | if $META{license} && $eumm_version >= 6.30; |
80 | $MM_ARGS{NO_MYMETA} = 1 |
81 | if $mymeta_broken; |
82 | $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } |
83 | unless -f 'META.yml'; |
d4705371 |
84 | |
b5f5aae4 |
85 | for (qw(configure build test runtime)) { |
86 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
87 | my $r = $MM_ARGS{$key} = { |
88 | %{$META{prereqs}{$_}{requires} || {}}, |
89 | %{delete $MM_ARGS{$key} || {}}, |
90 | }; |
91 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
92 | } |
1dc93d17 |
93 | |
b5f5aae4 |
94 | $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; |
d4705371 |
95 | |
b5f5aae4 |
96 | delete $MM_ARGS{MIN_PERL_VERSION} |
97 | if $eumm_version < 6.47_01; |
98 | $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} |
99 | if $eumm_version < 6.63_03; |
100 | $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} |
101 | if $eumm_version < 6.55_01; |
102 | delete $MM_ARGS{CONFIGURE_REQUIRES} |
103 | if $eumm_version < 6.51_03; |
536dbae1 |
104 | |
b5f5aae4 |
105 | ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); |
106 | ## END BOILERPLATE ########################################################### |