-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile.PL
156 lines (142 loc) · 4.8 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
#!/usr/bin/perl
use strict;
use warnings;
use ExtUtils::MakeMaker;
use ExtUtils::CBuilder;
use Config;
if ($] == 5.010000) {
# 5.10.0 breaks how PAR intercepts loading of shared libraries
warn <<'...';
*** Perl version 5.10.0 is not supported.
Please upgrade to 5.10.1 or better.
...
exit 0;
}
sub for_win32 { return ($^O eq 'MSWin32') ? @_ : (); }
my $have_cc = ExtUtils::CBuilder->new->have_compiler;
warn "No compiler found, won't generate 'script/parl$Config{_exe}!\n"
unless $have_cc;
WriteMakefile1(
NAME => 'PAR::Packer',
VERSION_FROM => 'lib/PAR/Packer.pm',
ABSTRACT_FROM => 'lib/PAR/Packer.pm',
LICENSE => 'perl_5',
AUTHOR => [ 'Audrey Tang <cpan@audreyt.org>' ],
MIN_PERL_VERSION => '5.008009',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '6.31', # for INSTALL_BASE
'ExtUtils::Embed' => 0,
'ExtUtils::CBuilder' => 0,
'DynaLoader' => 0,
'File::Basename' => 0,
'File::Glob' => 0,
'File::Spec::Functions' => 0,
},
PREREQ_PM => {
'File::Temp' => '0.05',
'Compress::Zlib' => ($^O eq 'MSWin32') ? '1.16' : '1.30',
'IO::Compress::Gzip' => 0,
'Archive::Zip' => '1.02',
'Module::ScanDeps' => '1.21',
'PAR::Dist' => '0.22',
'PAR' => '1.020',
'Digest::SHA' => '5.40',
'Text::ParseWords' => 0,
'Getopt::ArgvFile' => '1.07',
},
TEST_REQUIRES => {
'Test::More' => 0,
'IPC::Run3' => '0.048',
for_win32(
'ExtUtils::Depends' => 0,
# 'Win32::Exe' => '0.17'
),
},
NEEDS_LINKING => $have_cc,
MAN1PODS => {
'script/par.pl' => 'blib/man1/par.pl.1',
'script/pp' => 'blib/man1/pp.1',
'script/tkpp' => 'blib/man1/tkpp.1',
$have_cc ? (
'script/parl.pod' => 'blib/man1/parl.1' ) : (),
},
EXE_FILES => [
'script/par.pl',
'script/pp',
'script/tkpp',
],
DIR => [
't/data/XSFoo',
$have_cc ? 'myldr' : ()
],
clean => { FILES => 't/data/blib' },
META_MERGE => {
'meta-spec' => { version => 2 },
prereqs => {
runtime => {
recommends => {
# for digital signature support
'Digest' => 0,
'Module::Signature' => 0,
# for tkpp
'Tk' => 0,
'Tk::ColoredButton' => 0,
'Tk::EntryCheck' => 0,
'Tk::Getopt' => 0,
for_win32(
'Win32::Process' => 0),
},
},
},
resources => {
repository => {
type => 'git',
url => 'git://github.com/rschupp/PAR-Packer.git',
web => 'https://github.com/rschupp/PAR-Packer',
},
MailingList => 'mailto:par@perl.org',
bugtracker => { web => 'https://github.com/rschupp/PAR-Packer/issues' },
},
no_index => {
directory => [ 'contrib' ],
},
},
);
# inhibit parallel make as modules must be installed into blib *before*
# recursing into myldr (i.e. target pm_to_blib must have finished
# before subdirs is started)
sub MY::postamble
{
return <<'...'
# GNU make and others
.NOTPARALLEL:
# dmake
.SEQUENTIAL:
...
}
sub WriteMakefile1 { #Compatibility code for old versions of EU::MM. Written by Alexandr Ciornii, version 2. Added by eumm-upgrade.
my %params=@_;
my $eumm_version=$ExtUtils::MakeMaker::VERSION;
$eumm_version=eval $eumm_version;
die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
die "License not specified" if not exists $params{LICENSE};
if ($params{AUTHOR} and ref($params{AUTHOR}) eq 'ARRAY' and $eumm_version < 6.5705) {
$params{META_ADD}->{author}=$params{AUTHOR};
$params{AUTHOR}=join(', ',@{$params{AUTHOR}});
}
if ($params{TEST_REQUIRES} and $eumm_version < 6.64) {
$params{BUILD_REQUIRES}={ %{$params{BUILD_REQUIRES} || {}} , %{$params{TEST_REQUIRES}} };
delete $params{TEST_REQUIRES};
}
if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
#EUMM 6.5502 has problems with BUILD_REQUIRES
$params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
delete $params{BUILD_REQUIRES};
}
delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
delete $params{META_MERGE} if $eumm_version < 6.46;
delete $params{META_ADD} if $eumm_version < 6.46;
delete $params{LICENSE} if $eumm_version < 6.31;
WriteMakefile(%params);
}