-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.PL
77 lines (72 loc) · 2.18 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
use 5.008;
use strict;
use warnings;
use ExtUtils::MakeMaker 6.3002;
use ExtUtils::CBuilder 0.27;
# Should we build the XS version?
my $make_xs = undef;
$make_xs = 1 if ExtUtils::CBuilder->new( quiet => 1 )->have_compiler;
foreach (@ARGV) {
if (/^-pm/) {
$make_xs = 0;
}
elsif (/^PUREPERL_ONLY=(.*)/) {
$make_xs = !$1;
}
}
if ($make_xs) {
print <<EOM;
*****************************************
* Building XS version of the parser. *
* If build failed, you can try to *
* build PP version by running *
* *
* perl Makefile.PL PUREPERL_ONLY = 1 *
* make *
*****************************************
EOM
}
WriteMakefile(
NAME => 'RedisDB::Parser',
AUTHOR => q{Pavel Shaydo <[email protected]>},
VERSION_FROM => 'lib/RedisDB/Parser.pm',
ABSTRACT => 'Redis protocol parser',
LICENSE => 'perl',
PL_FILES => {},
OBJECT => "rdb_parser.o Parser.o",
PREREQ_PM => {
'Try::Tiny' => 0,
'Encode' => 2.10,
},
BUILD_REQUIRES => {
'Test::More' => 0.94,
'Test::Most' => 0.22,
'Test::FailWarnings' => 0,
},
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => 6.3002,
'ExtUtils::CBuilder' => 0.27,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'RedisDB-Parser-*' },
META_MERGE => {
requires => { perl => 5.008004, },
resources => {
homepage => 'https://github.com/trinitum/perl-RedisDB-Parser',
bugtracker => 'https://github.com/trinitum/perl-RedisDB-Parser/issues',
repository => 'git://github.com/trinitum/perl-RedisDB-Parser',
license => 'http://dev.perl.org/licenses/',
},
keywords => [ 'redis', 'protocol', 'parser', ],
x_contributors => [ 'Pavel Shaydo <[email protected]>', ],
},
CONFIGURE => sub {
my $hash = $_[1];
unless ($make_xs) {
$hash->{XS} = {};
$hash->{C} = [];
$hash->{OBJECT} = '';
}
return $hash;
},
);