-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.PL
73 lines (65 loc) · 1.83 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
BEGIN {
if (-e '.git') {
do 'tools/check_mi_mods.pl';
} else {
unshift @INC, 'inc';
require inc::Module::Install;
Module::Install->import;
}
}
name 'ZeroMQ';
{ # M::I is silly about multiple authors:
my $mainpm = 'lib/ZeroMQ.pm';
name_from $mainpm;
version_from $mainpm;
perl_version_from $mainpm;
license_from $mainpm;
abstract_from $mainpm;
author 'Daisuke Maki <[email protected]>';
author 'Steffen Mueller <[email protected]>';
if ($Module::Install::AUTHOR) {
readme_from $mainpm;
}
}
do 'tools/detect_zmq.pl';
print "Detected the following ZMQ settings:\n";
foreach my $env (qw(ZMQ_HOME ZMQ_H ZMQ_INCLUDES ZMQ_LIBS ZMQ_TRACE)) {
printf " + %s = %s\n", $env, exists $ENV{$env} ? $ENV{$env} : "(null)";
}
# XXX As of Devel::CheckLib 0.93, it seems like LIBS = "-L/path/to/foo"
# gets ignored (unlike what the docs say). So we manually strip and
# re-arrange the paths here
assertlibs
lib => 'zmq',
header => 'zmq.h',
incpath => [ split /\s+/, $ENV{ZMQ_INCLUDES} ],
libpath => [ grep { -d $_ } map { s/^-L//; $_ } split /\s+/, $ENV{ZMQ_LIBS} ]
;
repository 'http://github.com/lestrrat/ZeroMQ-Perl';
requires 'Task::Weaken';
test_requires 'Test::More', '0.98';
test_requires 'Test::TCP' => '1.08';
test_requires 'Test::Requires';
test_requires 'Test::Fatal';
recommends 'JSON' => '2.00';
use_xshelper '-clean';
use_ppport;
cc_warnings;
cc_include_paths split/\s+/, $ENV{ZMQ_INCLUDES};
cc_libs $ENV{ZMQ_LIBS};
cc_include_paths 'xs';
cc_src_paths 'xs';
cc_assert_lib 'zmq';
cc_libs 'zmq', 'uuid'; # uuid for cygwin, but can't hurt
if ($ENV{ZMQ_TRACE}) {
cc_define qq|-DPERLZMQ_TRACE=$ENV{ZMQ_TRACE}|;
}
default_test_target
env => {
LC_ALL => 'C'
}
;
author_tests 'xt';
clean_files "xs/*.inc";
do 'tools/genfiles.pl';
WriteAll;