chmod -x test scripts
[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'                 => '1.03',
30         'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24',
31         'MooseX::Role::WithOverloading' => '0.09',
32         'Carp'                  => '1.25',
33         'Class::C3::Adopt::NEXT' => '0.07',
34         'CGI::Simple::Cookie'   => '1.109',
35         'Data::Dump'            => 0,
36         'Data::OptList'         => 0,
37         'HTML::Entities'        => 0,
38         'HTML::HeadParser'      => 0,
39         'HTTP::Body'            => '1.22',
40         'HTTP::Headers'         => '1.64',
41         'HTTP::Request'         => '5.814',
42         'HTTP::Response'        => '5.813',
43         'Module::Pluggable'     => '4.7',
44         'Path::Class'           => '0.09',
45         'Scalar::Util'          => 0,
46         'Sub::Exporter'         => 0,
47         'Text::SimpleTable'     => '0.03',
48         'Time::HiRes'           => 0,
49         'Tree::Simple'          => '1.15',
50         'Tree::Simple::Visitor::FindByUID' => 0,
51         'Try::Tiny'             => '0.17',
52         'Safe::Isa'             => 0,
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       },
82     },
83     develop   => {
84       requires => {
85         'CatalystX::LeakChecker'  => '0.05',
86         'Catalyst::Devel'         => '1.0', # For http server test
87         'Test::WWW::Mechanize::Catalyst' => '0.51',
88         'Test::TCP'               => '2.00', # ditto, ships Net::EmptyPort
89         'File::Copy::Recursive'   => '0.40',
90         'Starman'                 => 0,
91         'MooseX::Daemonize'       => 0,
92         'Test::NoTabs'            => 0,
93         'Test::Pod'               => 0,
94         'Test::Pod::Coverage'     => 0,
95         'Test::Spelling'          => 0,
96         'Pod::Coverage::TrustPod' => 0,
97         'Catalyst::Plugin::Params::Nested' => 0,
98         'Catalyst::Plugin::ConfigLoader' => 0,
99         'Compress::Zlib'          => 0,
100         'Catalyst::Action::REST'  => 0,
101         'Type::Tiny'              => 0,
102         'Proc::ProcessTable'      => 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 -MCPAN -e 'install Catalyst::Devel'     # or
229         cpanm Catalyst::Devel
230
231     To get some commonly used plugins, as well as the TT view and DBIC
232     model, install Task::Catalyst in the same way.
233
234  Have fun!
235 EOF