forked from igorcoding/EV-Tarantool16
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile.PL
More file actions
68 lines (61 loc) · 2.05 KB
/
Makefile.PL
File metadata and controls
68 lines (61 loc) · 2.05 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
use strict;
use 5.008008;
use ExtUtils::MakeMaker;
use Config;
=for rpm
BuildRequires: c-ares19-devel
BuildRequires: libev-devel
Requires: c-ares19
Requires: perl-EV
=cut
my $preop =
'perldoc -uT $(VERSION_FROM) | tee $(DISTVNAME)/README.pod > README.pod;' .
'pod2text README.pod | tee $(DISTVNAME)/README > README';
my $ARES_CFLAGS = $ENV{ARES_CFLAGS} // '-I/usr/include';
my $ARES_LDFLAGS = $ENV{ARES_LDFLAGS} // '-lcares';
$ARES_CFLAGS .= join '', map { -d && " -I$_" } split ' ', $Config{incpth};
$ARES_LDFLAGS .= join '', map { -d && " -L$_" } split ' ', $Config{libsdirs};
print "# CFLAGS= $ARES_CFLAGS\n";
print "# LDFLAGS= $ARES_LDFLAGS\n";
WriteMakefile(
NAME => 'EV::Tarantool16',
AUTHOR => ['Mons Anderson <mons@cpan.org>', 'igorcoding <igorcoding@gmail.com>'],
VERSION_FROM => 'lib/EV/Tarantool16.pm',
ABSTRACT_FROM => 'lib/EV/Tarantool16.pm',
PREREQ_PM => {
'EV' => 4,
'Types::Serialiser' => 0
},
BUILD_REQUIRES => {
'Test::More' => 0,
'Test::Deep' => 0,
'AnyEvent' => 0,
'Proc::ProcessTable' => 0,
'Time::HiRes' => 0,
'Scalar::Util' => 0,
'Data::Dumper' => 0,
'Carp' => 0,
'constant' => 0,
},
TEST_REQUIRES => {
'Test::Tarantool16' => 0,
},
LIBS => [ $ARES_LDFLAGS ],
DEFINE => '-g -ggdb -O1 -std=c99 -Wall -Wno-format -Wno-self-assign',
LICENSE => 'GPL',
depend => {
'Tarantool16.c' => 'hints.o msgpuck.o',
'hints.o' => 'libs/msgpuck/hints.c',
'msgpuck.o' => 'libs/msgpuck/msgpuck.c',
},
OBJECT => 'Tarantool16.o hints.o msgpuck.o',
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', PREOP => $preop },
CONFIGURE => sub {
require EV::MakeMaker;
return {EV::MakeMaker::ev_args(
INC => '-I. -I./xstarantool -I./libs/evcnn/src -I./libs/msgpuck -I./libs/crypto '. $ARES_CFLAGS,
OBJECT => '$(O_FILES) ./libs/msgpuck/msgpuck.o ./libs/msgpuck/hints.o',
LDFROM => '$(O_FILES) msgpuck.o hints.o'
)};
},
);