forked from hdp/module-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.PL
129 lines (119 loc) · 4.2 KB
/
Build.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
use 5.006001;
use strict;
# On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" doesn't
# find the local "lib" directory, so we use File::Spec to do it properly.
use File::Spec 0.82;
use lib File::Spec->catdir('lib'); # use our self to install
# XXX This doesn't carry over to sub processes
use lib File::Spec->catdir('t', 'bundled'); # use bundled modules
use lib File::Spec->catdir('t', 'lib'); # our utilities
# We use Module::Build to test & install itself.
use Module::Build;
# <remove_me> This code is only present for M::B developers, not on CPAN
use lib File::Spec->catdir('inc');
# A custom builder that does some special stuff during the 'dist' phase
use ModuleBuildBuilder;
# </remove_me>
my $build = ModuleBuildBuilder->new(
module_name => 'Module::Build',
license => 'perl',
build_requires => {
'File::Temp' => 0.15, # tmpdir() + fixes
'Test::More' => 0.49,
'Test::Harness' => 3.16, # PERL5LIB fixes
},
# KEEP 'requires' as low as possible and target Build/test/install
# Requirements for authors should be implemented as optional features
requires => {
'perl' => '5.006001',
'Data::Dumper' => 0,
'File::Basename' => 0,
'File::Compare' => 0,
'File::Copy' => 0,
'File::Find' => 0,
'File::Path' => 0,
'File::Spec' => ($^O eq 'MSWin32' ? 3.30 : '0.82'), # rel2abs()
'ExtUtils::CBuilder' => 0.27, # major platform fixes
'ExtUtils::Install' => 0,
'ExtUtils::Manifest' => 0,
'ExtUtils::Mkbootstrap' => 0,
'ExtUtils::ParseXS' => 2.21, # various bug fixes
'IO::File' => 0,
'Cwd' => 0,
'Text::Abbrev' => 0,
'Text::ParseWords' => 0,
'Getopt::Long' => 0,
'Test::Harness' => 0,
},
recommends => {
'ExtUtils::Install' => 0.30,
'ExtUtils::Manifest' => 1.54, # public maniskip()
'version' => 0.74,
},
recursive_test_files => 1,
sign => 1,
create_readme => 1,
create_license => 1,
# overwrite the M::B that shipped in core
installdirs => ($] >= 5.009004 ? 'core' : 'site'),
# Some CPANPLUS::Dist::Build versions need to allow mismatches
# On logic: thanks to Module::Install, CPAN.pm must set both keys, but
# CPANPLUS sets only the one
allow_mb_mismatch => (
$ENV{PERL5_CPANPLUS_IS_RUNNING} && ! $ENV{PERL5_CPAN_IS_RUNNING} ? 1 : 0
),
auto_features => {
dist_authoring => {
description => "Create new distributions",
requires => {
'Archive::Tar' => 1.09,
},
recommends => {
'Pod::Readme' => 0.04,
'Module::Signature' => 0.21,
},
},
license_creation => {
description => "Create licenses automatically in distributions",
requires => {
'Software::License' => 0,
},
},
PPM_support => {
description => "Generate PPM files for distributions",
requires => {'IO::File' => 1.13}, # binmode bug in older core IO::File
},
inc_bundling_support => {
description => "Bundle Module::Build in inc/",
requires => {
'ExtUtils::Install' => 1.54, # also gets us ExtUtils::Installed 1.999_001
'ExtUtils::Installed' => 1.999, # technically 1.999_001 is what's available
},
},
YAML_support => {
description => "Use YAML::Tiny to write META.yml files",
requires => {'YAML::Tiny' => 1.38},
},
manpage_support => {
description => "Create Unix man pages",
requires => {'Pod::Man' => 0 },
},
HTML_support => {
description => "Create HTML documentation",
requires => {'Pod::Html' => 0},
},
},
add_to_cleanup => ['t/Sample/pod2htm*'],
script_files => ['scripts/config_data'],
meta_merge => {
resources => {
homepage => 'http://sourceforge.net/projects/module-build',
bugtracker =>
'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Build',
MailingList => 'mailto:module-build@perl.org',
repository => 'http://svn.perl.org/modules/Module-Build/'
}
},
);
$build->create_build_script;
# vim:ts=2:sw=2:et:sta