Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 185 lines (158 sloc) 6.112 kB
fe65023 @shadowcat-mst improvements to the META.yml magic
shadowcat-mst authored
1 use strict;
2 use warnings;
3
55087b9 @ribasushi 5.8.1 is minimum required perl
ribasushi authored
4 use 5.008001;
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
5 use inc::Module::Install 1.00;
ce4c07d @ashb Moved from M::B to M::I
ashb authored
6
d1dc7a9 @ribasushi Disable author mode during cpanX --installdeps .
ribasushi authored
7 ##
8 ## DO NOT USE THIS HACK IN YOUR DISTS!!! (it makes #toolchain sad)
9 ##
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
10 # get cpanX --installdeps . to behave in a checkout (most users do not expect
11 # the deps for a full test suite run, and if they do - there's MI::AutoInstall
12 # for that)
13 BEGIN {
14 $Module::Install::AUTHOR = 0 if (grep { $ENV{"PERL5_${_}_IS_RUNNING"} } (qw/CPANM CPANPLUS CPAN/) );
15 }
4b5544a @ribasushi Scary warning
ribasushi authored
16
ce4c07d @ashb Moved from M::B to M::I
ashb authored
17 name 'DBIx-Class';
b50d0dd @rkitover bump perl_version to 5.8.1
rkitover authored
18 perl_version '5.008001';
8e0f16f @shadowcat-mst ordering change to squash an M::I warning
shadowcat-mst authored
19 all_from 'lib/DBIx/Class.pm';
ce4c07d @ashb Moved from M::B to M::I
ashb authored
20
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
21 tests_recursive (qw|
22 t
23 |);
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
24
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
25 install_script (qw|
26 script/dbicadmin
27 |);
90cfe42 @ribasushi Several 5.8.old fixes
ribasushi authored
28
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
29 homepage 'http://www.dbix-class.org/';
30 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
31 resources 'license' => 'http://dev.perl.org/licenses/';
32 resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class.git';
33 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
34 resources 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class';
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
35
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
36 ###
37 ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
38 ### All of them *MUST* go to DBIx::Class::Optional::Dependencies
39 ###
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
40 my $runtime_requires = {
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
41 # FIXME - temporary, needs throwing out for something more efficient
42 'Data::Compare' => '1.22',
43
44 # DBI itself should be capable of installation and execution in pure-perl
45 # mode. However it has never been tested yet, so consider XS for the time
46 # being
47 'DBI' => '1.57',
48
49 # XS (or XS-dependent) libs
50 'Sub::Name' => '0.04',
51
52 # pure-perl (FatPack-able) libs
b8d22f1 @ribasushi Fix Class::Accessor::Grouped and Hash::Merge dependencies
ribasushi authored
53 'Class::Accessor::Grouped' => '0.10002',
9c1700e @ribasushi Cleanup that namespacing mess
ribasushi authored
54 'Class::C3::Componentised' => '1.0009',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
55 'Class::Inspector' => '1.24',
79680fc @ribasushi Order core dependencies, bump CAG to the rewritten fastiness
ribasushi authored
56 'Config::Any' => '0.20',
57 'Context::Preserve' => '0.01',
2b8cc2f @rkitover add quote_names connect_info option
rkitover authored
58 'Data::Dumper::Concise' => '2.020',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
59 'Data::Page' => '2.00',
b8d22f1 @ribasushi Fix Class::Accessor::Grouped and Hash::Merge dependencies
ribasushi authored
60 'Hash::Merge' => '0.12',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
61 'MRO::Compat' => '0.09',
62 'Module::Find' => '0.06',
cd12282 @ribasushi Remove the transparrent hook lazy-pager-count experiment
ribasushi authored
63 'namespace::clean' => '0.20',
f4d7449 @ribasushi Test fixes
ribasushi authored
64 'Path::Class' => '0.18',
b7b18f3 @rkitover improve with_deferred_fk_checks for Oracle, add tests
rkitover authored
65 'Scope::Guard' => '0.03',
bf51641 @abraxxa support INSERT ... RETURNING in Oracle 8i and later
abraxxa authored
66 'SQL::Abstract' => '1.72',
20674fc Conversion of eval => try (part 1)
Ton Voon authored
67 'Try::Tiny' => '0.04',
79680fc @ribasushi Order core dependencies, bump CAG to the rewritten fastiness
ribasushi authored
68
c7d50a7 @ribasushi Switch the shortener (used only by oracle) reqs to an optional depend…
ribasushi authored
69 # dual-life corelibs needing a specific bugfixed version
79680fc @ribasushi Order core dependencies, bump CAG to the rewritten fastiness
ribasushi authored
70 'File::Path' => '2.07',
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
71 };
cd12282 @ribasushi Remove the transparrent hook lazy-pager-count experiment
ribasushi authored
72
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
73 my $build_requires = {
74 # needed for testing only, not for operation
75 # we will move away from this dep eventually, perhaps to DBD::CSV or something
76 'DBD::SQLite' => '1.29',
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
77 };
78
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
79 my $test_requires = {
80 'File::Temp' => '0.22',
81 'Test::Exception' => '0.31',
82 'Test::Warn' => '0.21',
83 'Test::More' => '0.94',
84 # not sure if this is necessary at all, ask schwern some day
85 'Test::Builder' => '0.94',
86
87 # this is already a dep of n::c, but just in case - used by t/55namespaces_cleaned.t
88 # remove and do a manual glob-collection if n::c is no longer a dep
89 'Package::Stash' => '0.28',
90 };
bb7950c @ribasushi Reshuffle Makefile.PL a bit and add parallel-testing exception
ribasushi authored
91
92 # Bail out on parallel testing
93 if (
94 ($ENV{HARNESS_OPTIONS}||'') =~ / (?: ^ | \: ) j(\d+) /x
95 and
96 $1 > 1
97 ) { die <<EOP }
98
99 ******************************************************************************
100 ******************************************************************************
101 *** ***
102 *** PARALLEL TESTING DETECTED ( \$ENV{HARNESS_OPTIONS} = 'j$1' ) ***
103 *** ***
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
104 *** DBIC tests WILL FAIL. It is harder to make them parallel-friendly than ***
bb7950c @ribasushi Reshuffle Makefile.PL a bit and add parallel-testing exception
ribasushi authored
105 *** it should be (though work is underway). In the meantime you will have ***
106 *** to adjust your environment and re-run the installation. Sorry! ***
107 *** ***
108 ******************************************************************************
109 ******************************************************************************
110
111 EOP
112
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
113 # this is so we can order requires alphabetically
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
114 # copies are needed for potential author requires injection
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
115 my $reqs = {
116 build_requires => { %$build_requires },
117 requires => { %$runtime_requires },
118 test_requires => { %$test_requires },
119 };
3a4251e @ribasushi Cleanup dependency handling a bit
ribasushi authored
120
c78f9f5 @ribasushi Only invoke the author Makefile.PL includes if we are not part of a `…
ribasushi authored
121 # only do author-includes if not part of a `make` run
122 if ($Module::Install::AUTHOR and ! $ENV{MAKELEVEL}) {
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
123 # get options here, make $args available to all snippets
124 require Getopt::Long;
125 my $getopt = Getopt::Long::Parser->new(
126 config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
127 );
128 my $args = {
129 skip_author_deps => undef,
130 };
df65d4d @ribasushi Normalize -'s and _'s in maint names and Makefile options
ribasushi authored
131 $getopt->getoptions($args, qw/
132 skip_author_deps|skip-author-deps
133 /);
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
134 if (@ARGV) {
135 warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored
136 }
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
137
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
138 require File::Spec;
139 # string-eval, not do(), because we need to provide the
140 # $reqs and $*_requires lexicals to the included file
141 # (some includes *do* modify $reqs above)
142 for (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) {
143 eval scalar do { local (@ARGV, $/) = $_; <> }
144 or die ($@ || $!);
0424d17 @ribasushi Relax developer policy, allowing to skip optional dependencies when i…
ribasushi authored
145 }
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
146 }
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
147 else {
148 # make sure this Makefile can not be used to make a dist
0e01621 @ribasushi Forgotten diag and some clarifications of fc4b0448
ribasushi authored
149 # (without the author includes there are no meta cleanup, no sanity checks, etc)
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
150 postamble <<EOP;
151 .PHONY: nonauthor_stop_distdir_creation
152 create_distdir: nonauthor_stop_distdir_creation
153 nonauthor_stop_distdir_creation:
154 \t\$(NOECHO) \$(ECHO) Creation of dists in non-author mode is not allowed
155 \t\$(NOECHO) \$(FALSE)
156 EOP
157 }
8057ed0 @ribasushi Move optional deps out of the Makefile
ribasushi authored
158
159 # compose final req list, for alphabetical ordering
160 my %final_req;
161 for my $rtype (keys %$reqs) {
162 for my $mod (keys %{$reqs->{$rtype}} ) {
163
164 # sanity check req duplications
165 if ($final_req{$mod}) {
b718fd0 @ribasushi Cleanup dependencies / Admin inheritance
ribasushi authored
166 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
167 }
168
169 $final_req{$mod} = [ $rtype, $reqs->{$rtype}{$mod}||0 ],
170 }
171 }
172
173 # actual require
174 for my $mod (sort keys %final_req) {
175 my ($rtype, $ver) = @{$final_req{$mod}};
176 no strict 'refs';
177 $rtype->($mod, $ver);
178 }
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored
179
fc4b044 @ribasushi Factor out the Makefile.PL into easily digestable snippets
ribasushi authored
180 # author-mode or not - this is where we show a list of missing deps
181 # IFF we are running interactively
92f8f62 @ribasushi Reorder makefile author actions to make output more readable
ribasushi authored
182 auto_install();
a410299 @ribasushi Streamline makefile dep handling
ribasushi authored
183
713cc98 @ribasushi Refactor the (almost obsolete) DBD::SQLite check not to fork() within…
ribasushi authored
184 WriteAll();
Something went wrong with that request. Please try again.