/
Makefile.PL
169 lines (131 loc) · 5.33 KB
/
Makefile.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#
# Task::BeLike::HMA::Toolchain - Makefile.PL
#
# Copyright (c) 2010-2011 Henning Manske. All rights reserved.
#
# This program is free software. You can redistribute it and/or modify it
# under the terms of either: the GNU General Public License as published
# by the Free Software Foundation; or the Artistic License.
#
# See http://dev.perl.org/licenses/
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
use 5.006001;
use strict;
use warnings;
use inc::Module::Install 1.00;
#
# preliminary special setup for this Task
#
# hack required to let Module::AutoInstall detect Term::ReadLine::Perl
eval { require Term::ReadLine };
# setup message if update of CPAN.pm config is required
unless ($ENV{PERL5_CPAN_IS_RUNNING}) {
require CPAN;
delete $ENV{PERL5_CPAN_IS_RUNNING};
delete $ENV{PERL5_CPANPLUS_IS_RUNNING};
}
my $cpan = eval { CPAN->VERSION } || 0;
my $mb = eval { require Module::Build; Module::Build->VERSION } || 0;
my $WANT_CPAN = '1.9301'; # version in Perl 5.8.9 core
if ($cpan < $WANT_CPAN) {
no warnings 'once';
*MY::postamble = sub {
print "\n*** Please run 'cpan' after 'make' to update CPAN.pm config.\n\n";
return "all ::\n"
. "\t\$(NOECHO) \$(ECHO)\n"
. "\t\$(NOECHO) \$(ECHO) \"*** Please run 'cpan' to update CPAN.pm config.\"\n"
. "\t\$(NOECHO) \$(ECHO)\n";
}
}
# force Module::AutoInstall to use CPAN.pm
$ENV{PERL_AUTOINSTALL_PREFER_CPAN} = 1;
#
# module metadata
#
my $NAME = 'Task::BeLike::HMA::Toolchain';
(my $dist = $NAME) =~ s|::|-|g;
(my $path = $NAME) =~ s|::|/|g;
name $dist;
license 'perl';
all_from "lib/$path.pm";
bugtracker "https://github.com/hma/$dist/issues";
repository "https://github.com/hma/$dist";
#
# notes
#
# * LWP 5.836 base/message.t test 125 fails if Encode < 2.03
# * YAML::XS 0.33 t/regexp fails 5 tests of 18 if Perl < 5.8.5
# * YAML::XS 0.34 fails with 'undefined symbol: SvPV_const' if Perl < 5.8.8
# (RT #62054)
# * Term::ReadLine::Perl fails under CPANPLUS 0.88
# * DBI 1.616 t/51dbm_file.t fails on Perl 5.8.1
# * URI 1.56 t/iri.t fails on Perl 5.8.1
# * Storable 2.20, 2.25 t/dclone.t fail on Perl 5.8.0, pass on 5.6.2, 5.8.1
# * YAML::Syck 1.14, 1.17 t/3-objects.t fail on Perl 5.8.0, pass on 5.6.2, 5.8.1
# * YAML::Syck 1.17 requires Test::More 0.88
# * clean run only on Perls >= 5.8.3
#
#
# udate Perl toolchain modules to recent versions
#
requires 'version' => '0.77'; # 5.10.1 core
requires 'Net::FTP' => '2.75'; # 5.8.5 core
requires 'Encode' => '2.03' if $] >= 5.007_003;
requires 'Test' => '1.25'; # 5.8.5 core
requires 'Pod::Simple' => '3.11';
requires 'Pod::Man' => '2.22'; # 5.10.1 core
requires 'Compress::Zlib' => '2.024'; # 5.12.0 core
requires 'Digest::MD5' => '2.39'; # 5.10.1 core
requires 'HTML::Parser' => '3.62';
requires 'URI' => '1.40';
requires 'LWP' => '5.836';
requires 'ExtUtils::MakeMaker' => '6.56'; # 5.12.0 core
requires 'Digest::SHA' => '5.47'; # 5.10.1 core
requires 'File::Spec' => '3.29'; # 5.8.9 core
requires 'File::Path' => '2.08'; # 5.11.1 core
requires 'File::Temp' => '0.22'; # 5.10.1 core
if ($] >= 5.008) {
requires 'File::Which';
requires 'File::HomeDir' => '0.93';
}
requires 'Storable' => '2.19' if $] != 5.008; # 5.8.9 core
requires 'YAML' => '0.71' if $] >= 5.008_001;
requires 'Test::More' => '0.94'; # 5.12.0 core
if ($] >= 5.008_008) {
requires 'YAML::XS' => '0.34';
}
elsif ($] != 5.008) {
requires 'YAML::Syck' => '1.14';
}
requires 'Test::Harness' => '3.17'; # 5.10.1 core
requires 'ExtUtils::CBuilder' => '0.27'; # 5.12.0 core
requires 'ExtUtils::Install' => '1.54'; # 5.10.1 core
requires 'ExtUtils::Manifest' => '1.58'; # 5.13.3 core
requires 'ExtUtils::ParseXS' => '2.21'; # 5.12.0 core
requires 'IO::File' => '1.13' if $] >= 5.008; # 5.8.8 core
requires 'Scalar::Util' => '1.18'; # fix for YAML::Tiny 1.48+
requires 'YAML::Tiny' => '1.41';
requires 'Archive::Tar' => '1.52'; # 5.10.1 core
if ($mb < 0.36) {
requires 'Perl::OSType' => '1.000'; # fix for Module::Build 0.36_19+
requires 'Module::Metadata' => '1.000002'; # fix for Module::Build 0.36_20+
}
requires 'Module::Build' => '0.36'; # 5.11.3 core
requires 'Text::Glob';
requires 'CPAN' => $WANT_CPAN;
if ($] >= 5.008_001) {
requires 'DBI' => '1.615';
requires 'DBD::SQLite' => '1.30_06';
requires 'CPAN::SQLite' => '0.199';
}
requires 'Term::ReadKey';
requires 'Term::ReadLine::Perl';
build_requires 'Test::More';
clean_files "$dist-* Debian_CPANTS.txt";
makemaker_args dist => { COMPRESS => 'gzip -9f' };
auto_install;
WriteAll;