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