-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.PL
More file actions
124 lines (111 loc) · 3.1 KB
/
Makefile.PL
File metadata and controls
124 lines (111 loc) · 3.1 KB
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
use strict;
use warnings;
use ExtUtils::MakeMaker;
unless ($^O eq "MSWin32" || $^O eq "cygwin") {
die "OS unsupported\n";
}
WriteMakefile1(
NAME => 'Win32API::Console',
VERSION_FROM => 'lib/Win32API/Console.pm',
ABSTRACT_FROM => 'lib/Win32API/Console.pod',
MIN_PERL_VERSION => '5.014',
AUTHOR => 'J. Schneider',
LICENSE => 'mit',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => 6.56,
},
PREREQ_PM => {
'Win32' => 0.44,
'Win32::API' => 0.77,
'Win32::Console' => '0.10',
},
TEST_REQUIRES => {
'Test::More' => 0.88,
'File::Basename' => 0,
},
META_MERGE => {
'meta-spec' => {
version => 2
},
resources => {
repository => {
type => 'git',
url => 'https://github.com/brickpool/Win32API-Console.git',
web => 'https://github.com/brickpool/Win32API-Console',
},
bugtracker => {
web => 'https://github.com/brickpool/Win32API-Console/issues',
},
},
prereqs => {
runtime => {
# requires => {
# 'bytes' => 0,
# 'Carp' => 0,
# 'Encode' => 0,
# 'Exporter' => 0,
# 'Hash::Util' => 0,
# 'Scalar::Util' => 0,
# 'Win32API::File' => 0.08,
# 'version' => 0,
# },
recommends => {
'Pod::Autopod' => 0,
'Pod::Usage' => 0,
'Types::Standard' => 0,
'Win32::GuiTest' => 0,
'Win32API::Registry' => 0.21,
},
},
# test => {
# requires => {
# 'Config' => 0,
# },
# },
},
},
$^O =~/win/i ? (
dist => {
TARFLAGS => '-cvzf',
COMPRESS => 'perl -MExtUtils::Command -e test_f',
POSTOP => 'perl -MExtUtils::Command -e mv $(DISTVNAME).tar ' .
'$(DISTVNAME).tar$(SUFFIX)'
},
) : (),
clean => {
FILES => 'Win32API-*',
},
test => {
TESTS => 't/*.t t/*/*.t'
},
);
# Taken from eumm-upgrade by Alexandr Ciornii
sub WriteMakefile1 { # void (%params)
my %params = @_;
my $eumm_version = $ExtUtils::MakeMaker::VERSION;
$eumm_version = eval $eumm_version;
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;
delete $params{AUTHOR} if $] < 5.005;
delete $params{ABSTRACT_FROM} if $] < 5.005;
delete $params{BINARY_LOCATION} if $] < 5.005;
WriteMakefile(%params);
}