Skip to content
Newer
Older
100644 271 lines (222 sloc) 8.18 KB
47a4aa5 @ribasushi Bump M::I
ribasushi authored Jul 4, 2010
1 use inc::Module::Install 1.00;
fe65023 @shadowcat-mst improvements to the META.yml magic
shadowcat-mst authored May 5, 2008
2 use strict;
3 use warnings;
4
55087b9 @ribasushi 5.8.1 is minimum required perl
ribasushi authored Jan 7, 2010
5 use 5.008001;
ce4c07d @ashb Moved from M::B to M::I
ashb authored Nov 12, 2006
6
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
7 use FindBin;
8 use lib "$FindBin::Bin/lib";
93c5088 @shadowcat-mst make it clear that we are not supposed to have optional deps
shadowcat-mst authored Sep 11, 2009
9
97f9f16 @ribasushi Cleanup the makefile regen a bit
ribasushi authored Feb 21, 2010
10 # adjust ENV for $AUTHOR system() calls
11 use Config;
12 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
13
347275d @rkitover remove import of GetOptions symbol into Makefile.PL
rkitover authored Jun 16, 2010
14 use Getopt::Long ();
15
16 my $getopt = Getopt::Long::Parser->new(
17 config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
18 );
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
19 my $args = {
20 skip_author_deps => undef,
21 };
347275d @rkitover remove import of GetOptions symbol into Makefile.PL
rkitover authored Jun 17, 2010
22 $getopt->getoptions($args, 'skip_author_deps');
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
23 if (@ARGV) {
24 warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
25 }
97f9f16 @ribasushi Cleanup the makefile regen a bit
ribasushi authored Feb 21, 2010
26
4b5544a @ribasushi Scary warning
ribasushi authored Feb 13, 2010
27 ###
28 ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
29 ### All of them should go to DBIx::Class::Optional::Dependencies
30 ###
31
ce4c07d @ashb Moved from M::B to M::I
ashb authored Nov 12, 2006
32 name 'DBIx-Class';
b50d0dd @rkitover bump perl_version to 5.8.1
rkitover authored Jan 6, 2010
33 perl_version '5.008001';
8e0f16f @shadowcat-mst ordering change to squash an M::I warning
shadowcat-mst authored Jun 20, 2007
34 all_from 'lib/DBIx/Class.pm';
ce4c07d @ashb Moved from M::B to M::I
ashb authored Nov 12, 2006
35
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
36 my $build_requires = {
b9df8e3 @ribasushi Some TODO test revisions prompted by RT#59565
ribasushi authored Aug 8, 2010
37 'DBD::SQLite' => '1.29',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
38 };
39
40 my $test_requires = {
30da837 @ribasushi Merge 'trunk' into 'dephandling'
ribasushi authored Feb 12, 2010
41 'File::Temp' => '0.22',
42 'Test::Builder' => '0.33',
43 'Test::Exception' => '0',
44 'Test::More' => '0.92',
45 'Test::Warn' => '0.21',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
46 };
47
48 my $runtime_requires = {
49 'Carp::Clan' => '6.0',
7653fda @rkitover add proper test for column names with punctuation, bump CAG dep for fix
rkitover authored Jun 12, 2010
50 'Class::Accessor::Grouped' => '0.09004',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
51 'Class::C3::Componentised' => '1.0005',
52 'Class::Inspector' => '1.24',
53 'Data::Page' => '2.00',
54 'DBI' => '1.609',
c1fdb46 @frioux RT58184: Depends on File::Path 2.06_05 (or so)
frioux authored Jun 6, 2010
55 'File::Path' => '2.07',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
56 'MRO::Compat' => '0.09',
57 'Module::Find' => '0.06',
f4d7449 @ribasushi Test fixes
ribasushi authored Feb 13, 2010
58 'Path::Class' => '0.18',
887d8da @ribasushi Fix update/delete on prefetching resultsets
ribasushi authored May 31, 2010
59 'SQL::Abstract' => '1.67',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
60 'Sub::Name' => '0.04',
61 'Data::Dumper::Concise' => '1.000',
b7b18f3 @rkitover improve with_deferred_fk_checks for Oracle, add tests
rkitover authored Feb 22, 2010
62 'Scope::Guard' => '0.03',
63 'Context::Preserve' => '0.01',
20674fc Conversion of eval => try (part 1)
Ton Voon authored May 14, 2010
64 'Try::Tiny' => '0.04',
ecb6874 @frioux add namespace::clean as regular dep
frioux authored May 31, 2010
65 'namespace::clean' => '0.14',
3b5c273 @ribasushi Older (5.8 core) Math::BigInt do not have from_hex
ribasushi authored Jun 12, 2010
66 'Math::BigInt' => '1.89',
63ca94e @abraxxa Factor out the oracle shortener code, and apply it to both
abraxxa authored Jun 10, 2010
67 'Math::Base36' => '0.07',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
68 };
69
70 # this is so we can order requires alphabetically
71 # copies are needed for author requires injection
72 my $reqs = {
73 build_requires => { %$build_requires },
74 requires => { %$runtime_requires },
75 test_requires => { %$test_requires },
76 };
3a4251e @ribasushi Cleanup dependency handling a bit
ribasushi authored Jun 30, 2009
77
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
78
92f8f62 @ribasushi Reorder makefile author actions to make output more readable
ribasushi authored Feb 21, 2010
79 # require extra modules for testing if we're in a checkout
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
80 my $optdep_msg;
92f8f62 @ribasushi Reorder makefile author actions to make output more readable
ribasushi authored Feb 21, 2010
81 if ($Module::Install::AUTHOR) {
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
82 if ($args->{skip_author_deps}) {
83 $optdep_msg = <<'EOW';
84
85 ******************************************************************************
86 ******************************************************************************
87 *** ***
88 *** IGNORING AUTHOR MODE: no optional test dependencies will be forced. ***
89 *** ***
90 *** If you are using this checkout with the intention of submitting a DBIC ***
91 *** patch, you are *STRONGLY ENCOURAGED* to install all dependencies, so ***
92 *** that every possible unit-test will run. ***
93 *** ***
94 ******************************************************************************
95 ******************************************************************************
96
97 EOW
98 }
99 else {
100 $optdep_msg = <<'EOW';
101
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
102 ******************************************************************************
103 ******************************************************************************
104 *** ***
105 *** AUTHOR MODE: all optional test dependencies converted to hard requires ***
7adae31 @ribasushi Lern to spel
ribasushi authored Jul 5, 2010
106 *** ( to disable re-run Makefile.PL with --skip_author_deps ) ***
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
107 *** ***
108 ******************************************************************************
109 ******************************************************************************
110
111 EOW
112
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
113 require DBIx::Class::Optional::Dependencies;
114 $reqs->{test_requires} = {
115 %{$reqs->{test_requires}},
116 map { %$_ } (values %{DBIx::Class::Optional::Dependencies->req_group_list}),
117 };
118 }
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
119 }
120
121 # compose final req list, for alphabetical ordering
122 my %final_req;
123 for my $rtype (keys %$reqs) {
124 for my $mod (keys %{$reqs->{$rtype}} ) {
125
126 # sanity check req duplications
127 if ($final_req{$mod}) {
b718fd0 @ribasushi Cleanup dependencies / Admin inheritance
ribasushi authored Feb 14, 2010
128 die "$mod specified as both a '$rtype' and a '$final_req{$mod}[0]'\n";
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
129 }
130
131 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
132 }
133 }
134
135 # actual require
136 for my $mod (sort keys %final_req) {
137 my ($rtype, $ver) = @{$final_req{$mod}};
138 no strict 'refs';
139 $rtype->($mod, $ver);
140 }
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
141
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
142 # output twice since the deplist is > 70 lines
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
143 warn $optdep_msg if $Module::Install::AUTHOR;
92f8f62 @ribasushi Reorder makefile author actions to make output more readable
ribasushi authored Feb 21, 2010
144 auto_install();
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
145 warn $optdep_msg if $Module::Install::AUTHOR;
92f8f62 @ribasushi Reorder makefile author actions to make output more readable
ribasushi authored Feb 21, 2010
146
147 # re-create various autogenerated documentation bits
148 if ($Module::Install::AUTHOR) {
149
150 print "Regenerating README\n";
151 system('pod2text lib/DBIx/Class.pm > README');
152
153 if (-f 'MANIFEST') {
154 print "Removing MANIFEST\n";
155 unlink 'MANIFEST';
156 }
157
158 print "Regenerating Optional/Dependencies.pod\n";
159 require DBIx::Class::Optional::Dependencies;
160 DBIx::Class::Optional::Dependencies->_gen_pod;
161
162 # FIXME Disabled due to unsolved issues, ask theorbtwo
163 # require Module::Install::Pod::Inherit;
164 # PodInherit();
165 }
166
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
167
7eaae8d @ribasushi Looks like the distdir wrapping is finally taken care of
ribasushi authored Feb 23, 2010
168 tests_recursive (qw|
169 t
170 |);
171
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
172 # temporary(?) until I get around to fix M::I wrt xt/
173 # needs Module::Install::AuthorTests
c1fdb46 @frioux RT58184: Depends on File::Path 2.06_05 (or so)
frioux authored Jun 7, 2010
174 eval {
7f2c37b @ribasushi Be gentler to checkout users
ribasushi authored Jun 3, 2010
175 recursive_author_tests (qw/xt/);
176 1;
177 } || do {
22a2062 @ribasushi skip_author_deps should not require M::I::AT
ribasushi authored Jun 8, 2010
178 unless ($args->{skip_author_deps}) {
179 my $err = $@;
180 eval { require Module::Install::AuthorTests }
eeaf870 @ribasushi Clearer non-dev makefile error
ribasushi authored Jun 12, 2010
181 || die "\nYou need Module::Install::AuthorTests installed to run this Makefile.PL in author mode (or supply --skip_author_deps):\n\n$@\n";
22a2062 @ribasushi skip_author_deps should not require M::I::AT
ribasushi authored Jun 8, 2010
182 die $@;
183 }
7f2c37b @ribasushi Be gentler to checkout users
ribasushi authored Jun 3, 2010
184 };
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
185
186
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
187 install_script (qw|
188 script/dbicadmin
189 |);
190
7eaae8d @ribasushi Looks like the distdir wrapping is finally taken care of
ribasushi authored Feb 23, 2010
191
192 ### Mangle makefile - read the comments for more info
193 #
194 postamble <<"EOP";
195
196 # This will add an extra dep-spec for the distdir target,
197 # which `make` will fold together in a first-come first-serve
198 # fashion. What we do here is essentially adding extra
199 # commands to execute once the distdir is assembled (via
200 # create_distdir), but before control is returned to a higher
201 # calling rule.
202 distdir : dbicadmin_pod_inject
203
204 # The pod self-injection code is in fact a hidden option in
205 # dbicadmin itself
206 dbicadmin_pod_inject :
207 \tcd \$(DISTVNAME) && \$(ABSPERL) -Ilib script/dbicadmin --selfinject-pod
208
209 # Regenerate manifest before running create_distdir.
210 create_distdir : manifest
211
212 EOP
213
f90896a @ribasushi enter xt/ (RT#56698)
ribasushi authored Jun 3, 2010
214 homepage 'http://www.dbix-class.org/';
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
215 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
216 resources 'license' => 'http://dev.perl.org/licenses/';
aeb669b @frioux update repository information from svn to git
frioux authored Jun 2, 2010
217 resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class.git';
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
218 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
70fbb0b @ribasushi Add META resource as per RT#58549
ribasushi authored Aug 8, 2010
219 resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class';
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
220
974fe5e @ribasushi Fix no_index entries
ribasushi authored Dec 18, 2009
221 # Deprecated/internal modules need no exposure
222 no_index directory => $_ for (qw|
bc6f129 @ribasushi More index exclusions
ribasushi authored Feb 23, 2010
223 lib/DBIx/Class/Admin
281738a @frioux add test to ensure no tabs in perl files
frioux authored Jan 19, 2010
224 lib/DBIx/Class/PK/Auto
bc6f129 @ribasushi More index exclusions
ribasushi authored Feb 23, 2010
225 lib/DBIx/Class/CDBICompat
974fe5e @ribasushi Fix no_index entries
ribasushi authored Dec 18, 2009
226 |);
227 no_index package => $_ for (qw/
d5dedbd @ribasushi Rename SQLAHacks to SQLMaker, shuffle around files, add extensive
ribasushi authored Aug 27, 2010
228 DBIx::Class::Storage::DBIHacks
974fe5e @ribasushi Fix no_index entries
ribasushi authored Dec 18, 2009
229 /);
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored Aug 7, 2009
230
713cc98 @ribasushi Refactor the (almost obsolete) DBD::SQLite check not to fork() within…
ribasushi authored Apr 27, 2009
231 WriteAll();
09d4665 @ashb Fix depend on Time::Piece for cdbi
ashb authored Mar 11, 2008
232
80ff5ae @ribasushi Last set of Makefile.PL optimizations
ribasushi authored May 31, 2009
233 # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
234 # We are also not using M::I::AuthorRequires as this will be an extra dep, and
235 # deps in Makefile.PL suck (no autoinstall)
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored Jun 2, 2010
236 if ($Module::Install::AUTHOR && ! $args->{skip_author_deps} ) {
713cc98 @ribasushi Refactor the (almost obsolete) DBD::SQLite check not to fork() within…
ribasushi authored Apr 27, 2009
237
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
238 # FIXME test_requires is not yet part of META
239 my %original_build_requires = ( %$build_requires, %$test_requires );
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
240 my @all_build_requires = @{delete Meta->{values}{build_requires}};
241 my %removed_build_requires;
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored Feb 12, 2010
242
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
243 for (@all_build_requires) {
244 if ($original_build_requires{$_->[0]}) {
245 push @{Meta->{values}{build_requires}}, $_;
246 }
247 else {
248 $removed_build_requires{$_->[0]} = $_->[1]
249 unless $_->[0] eq 'ExtUtils::MakeMaker';
250 }
251 }
713cc98 @ribasushi Refactor the (almost obsolete) DBD::SQLite check not to fork() within…
ribasushi authored Apr 27, 2009
252
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
253 print "Regenerating META with author requires excluded\n";
713cc98 @ribasushi Refactor the (almost obsolete) DBD::SQLite check not to fork() within…
ribasushi authored Apr 27, 2009
254 Meta->write;
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
255
256 # test that we really took things away (just in case)
257 my $meta = do { local @ARGV = 'META.yml'; local $/; <> };
258 for (keys %removed_build_requires) {
259 delete $removed_build_requires{$_}
260 unless $meta =~ /^ \s+ $_: \s+ $removed_build_requires{$_} \s* $/mx
261 }
262
263 if (keys %removed_build_requires) {
3ac9a26 @ribasushi Clarify why Makefile.PL failed
ribasushi authored Jun 21, 2010
264 die join ("\n",
265 "\n\nFATAL FAIL! It looks like some author dependencies made it to the META.yml:",
266 "(most likely a broken Module::Install)\n",
1278e5f @ribasushi A guard to make sure we don't ship with a ton of deps ever again
ribasushi authored Jun 12, 2010
267 map { "\t$_" } (keys %removed_build_requires)
268 ) . "\n\n";
269 }
09d4665 @ashb Fix depend on Time::Piece for cdbi
ashb authored Mar 11, 2008
270 }
Something went wrong with that request. Please try again.