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