Merge pull request #170 from perl-catalyst/haarg/no-dev-circ-deps
[catagits/Catalyst-Runtime.git] / Makefile.PL
1 use strict;
2 use warnings;
3 use 5.008003;
4
5 my %META = (
6   name => 'Catalyst-Runtime',
7   license => 'perl_5',
8   prereqs => {
9     configure => { requires => {
10       'ExtUtils::MakeMaker'   => 0,
11     } },
12     build => { requires => {
13     } },
14     test => {
15       requires => {
16         'Test::Fatal' => 0,
17         'Test::More' => '0.88',
18         'HTTP::Request::Common' => 0,
19         'HTTP::Status' => 0,
20       },
21     },
22     runtime => {
23       requires => {
24         'perl'                  => 5.008003,
25         'List::Util'            => '1.45',
26         'namespace::clean'      => '0.23',
27         'MooseX::Emulate::Class::Accessor::Fast' => '0.00903',
28         'Class::Load'           => '0.12',
29         'Moose'                 => '2.1400',
30         'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24',
31         'Carp'                  => '1.25',
32         'Class::C3::Adopt::NEXT' => '0.07',
33         'CGI::Simple::Cookie'   => '1.109',
34         'Data::Dump'            => 0,
35         'Data::OptList'         => 0,
36         'HTML::Entities'        => 0,
37         'HTML::HeadParser'      => 0,
38         'HTTP::Body'            => '1.22',
39         'HTTP::Headers'         => '1.64',
40         'HTTP::Request'         => '5.814',
41         'HTTP::Response'        => '5.813',
42         'Module::Pluggable'     => '4.7',
43         'Path::Class'           => '0.09',
44         'Scalar::Util'          => 0,
45         'Sub::Exporter'         => 0,
46         'Text::SimpleTable'     => '0.03',
47         'Time::HiRes'           => 0,
48         'Tree::Simple'          => '1.15',
49         'Tree::Simple::Visitor::FindByUID' => 0,
50         'Try::Tiny'             => '0.17',
51         'Safe::Isa'             => 0,
52         'Socket'                => '1.96',
53         'Task::Weaken'          => 0,
54         'Text::Balanced'        => 0, # core in 5.8.x but mentioned for completeness
55         'MRO::Compat'           => 0,
56         'MooseX::Getopt'        => '0.48',
57         'String::RewritePrefix' => '0.004', # Catalyst::Utils::resolve_namespace
58         'Devel::InnerPackage'   => 0, # No longer core in blead
59         'Plack'                 => '0.9991', # IIS6+7 fix middleware
60         'Plack::Middleware::ReverseProxy' => '0.04',
61         'Plack::Test::ExternalServer' => 0,
62         'Encode'                => '2.49',
63         'LWP'                   => '5.837', # LWP had unicode fail in 5.8.26
64         'URI'                   => '1.65',
65         'URI::ws'               => '0.03',
66         'JSON::MaybeXS'         => '1.000000',
67         'Stream::Buffered'      => 0,
68         'Hash::MultiValue'      => 0,
69         'Plack::Request::Upload' => 0,
70         'CGI::Struct'           => 0,
71         "Plack::Middleware::Conditional" => 0,
72         "Plack::Middleware::IIS6ScriptNameFix" => 0,
73         "Plack::Middleware::IIS7KeepAliveFix" => 0,
74         "Plack::Middleware::LighttpdScriptNameFix" => 0,
75         "Plack::Middleware::ContentLength" => 0,
76         "Plack::Middleware::Head" => 0,
77         "Plack::Middleware::HTTPExceptions" => 0,
78         "Plack::Middleware::FixMissingBodyInRedirect" => '0.09',
79         "Plack::Middleware::MethodOverride" => '0.12',
80         "Plack::Middleware::RemoveRedundantBody" => '0.03',
81         'PerlIO::utf8_strict' => 0,
82       },
83     },
84     develop   => {
85       requires => {
86         'Test::TCP'               => '2.00',
87         'File::Copy::Recursive'   => '0.40',
88         'Starman'                 => 0,
89         'MooseX::Daemonize'       => 0,
90         'Test::NoTabs'            => 0,
91         'Test::Pod'               => 0,
92         'Test::Pod::Coverage'     => 0,
93         'Test::Spelling'          => 0,
94         'Pod::Coverage::TrustPod' => 0,
95         'Compress::Zlib'          => 0,
96         'Type::Tiny'              => 0,
97         'Proc::ProcessTable'      => 0,
98       },
99     },
100   },
101   resources => {
102     repository => {
103       # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
104       url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
105       web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Runtime.git;a=summary',
106       type => 'git',
107     },
108     x_IRC => 'irc://irc.perl.org/#catalyst',
109     bugtracker => {
110       web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Runtime',
111       mailto => 'bug-Catalyst-Runtime@rt.cpan.org',
112     },
113     license => [ 'http://dev.perl.org/licenses/' ],
114     x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
115     homepage => 'http://dev.catalyst.perl.org/',
116   },
117   no_index => {
118     directory => [ 't', 'xt' ]
119   },
120   x_breaks => {
121     'Catalyst::Plugin::SubRequest' => '<= 0.14',
122     'Catalyst::Model::Akismet' => '<= 0.02',
123     'Catalyst::Component::ACCEPT_CONTEXT' => '<= 0.06',
124     'Catalyst::Plugin::ENV' => 0, # This plugin is just stupid, full stop
125                                   # should have been a core fix.
126     'Catalyst::Plugin::Unicode::Encoding' => '<= 0.2',
127     'Catalyst::Plugin::Authentication' => '<= 0.10010', # _config accessor in ::Credential::Password
128     'Catalyst::Authentication::Credential::HTTP' => '<= 1.009',
129     'Catalyst::Plugin::Session::Store::File'     => '<= 0.16',
130     'Catalyst::Plugin::Session'                  => '<= 0.21',
131     'Catalyst::Plugin::Session::State::Cookie'   => '<= 0.10',
132     'Catalyst::Plugin::Session::Store::FastMmap' => '<= 0.09',
133     'Catalyst::Controller::AllowDisable'         => '<= 0.03',
134     'Reaction'                                   => '<= 0.001999',
135     'Catalyst::Plugin::Upload::Image::Magick'    => '<= 0.03',
136     'Catalyst::Plugin::ConfigLoader'             => '<= 0.22', # Older versions work but
137                                                   # throw Data::Visitor warns
138     'Catalyst::Devel'                            => '<= 1.19',
139     'Catalyst::Plugin::SmartURI'                 => '<= 0.032',
140     'CatalystX::CRUD'                            => '<= 0.37',
141     'Catalyst::Action::RenderView'               => '<= 0.07',
142     'Catalyst::Plugin::DebugCookie'              => '<= 0.999002',
143     'Catalyst::Plugin::Authentication'           => '<= 0.100091',
144     'CatalystX::Imports'                         => '<= 0.03',
145     'Catalyst::Plugin::HashedCookies'            => '<= 1.03',
146     'Catalyst::Action::REST'                     => '<= 0.67',
147     'CatalystX::CRUD'                            => '<= 0.42',
148     'CatalystX::CRUD::Model::RDBO'               => '<= 0.20',
149     'Catalyst::View::Mason'                      => '<= 0.17',
150 #    Note these are not actually needed - they fail tests against the
151 #    new version, but still work fine..
152 #    'Catalyst::ActionRole::ACL'                  => '<= 0.05',
153 #    'Catalyst::Plugin::Session::Store::DBIC'     => '<= 0.11',
154     'Test::WWW::Mechanize::Catalyst'            => '<= 0.53', # Dep warnings unless upgraded.
155   },
156   x_authority => 'cpan:MSTROUT',
157 );
158
159 my $tests = 't/*.t t/aggregate/*.t';
160
161 my %MM_ARGS = (
162   test => { TESTS => $tests },
163   EXE_FILES => [ glob 'script/*.pl' ],
164 );
165
166 ## BOILERPLATE ###############################################################
167 require ExtUtils::MakeMaker;
168 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
169
170 # have to do this since old EUMM dev releases miss the eval $VERSION line
171 my $eumm_version  = eval $ExtUtils::MakeMaker::VERSION;
172 my $mymeta        = $eumm_version >= 6.57_02;
173 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
174
175 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
176 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
177 $META{license} = [ $META{license} ]
178   if $META{license} && !ref $META{license};
179 $MM_ARGS{LICENSE} = $META{license}[0]
180   if $META{license} && $eumm_version >= 6.30;
181 $MM_ARGS{NO_MYMETA} = 1
182   if $mymeta_broken;
183 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
184   unless -f 'META.yml';
185
186 for (qw(configure build test runtime)) {
187   my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
188   my $r = $MM_ARGS{$key} = {
189     %{$META{prereqs}{$_}{requires} || {}},
190     %{delete $MM_ARGS{$key} || {}},
191   };
192   defined $r->{$_} or delete $r->{$_} for keys %$r;
193 }
194
195 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
196
197 delete $MM_ARGS{MIN_PERL_VERSION}
198   if $eumm_version < 6.47_01;
199 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
200   if $eumm_version < 6.63_03;
201 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
202   if $eumm_version < 6.55_01;
203 delete $MM_ARGS{CONFIGURE_REQUIRES}
204   if $eumm_version < 6.51_03;
205
206 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
207 ## END BOILERPLATE ###########################################################
208
209 print <<"EOF";
210
211  Important:
212
213     This library is for running Catalyst applications.
214
215     For development and use of catalyst.pl and myapp_create.pl, make sure
216     you also install the development tools package Catalyst::Devel.
217
218         perl -MCPAN -e 'install Catalyst::Devel'     # or
219         cpanm Catalyst::Devel
220
221     To get some commonly used plugins, as well as the TT view and DBIC
222     model, install Task::Catalyst in the same way.
223
224  Have fun!
225 EOF