/
Build.PL
67 lines (52 loc) · 1.79 KB
/
Build.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
# Build.PL
use strict; use warnings;
use Module::Build;
# we trust Fuse.pm to correctly install + detect versions so we don't do it here
my $inc = '-Wall -DFUSE_USE_VERSION=25 ' . `pkg-config --cflags fuse` || '-I ../include -D_FILE_OFFSET_BITS=64';
my $obj = `pkg-config --libs fuse` || '-lfuse';
chomp $inc; chomp $obj; # sometimes pkg-config prints out extra newline
#$inc .= '-g -ggdb'; # used for debugging
$inc .= ' -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64' if $^O eq 'darwin';
my $build = Module::Build->new(
# look up Module::Build::API for the info!
'dynamic_config' => 0,
'module_name' => 'POE::Component::Fuse',
'license' => 'perl',
'dist_abstract' => "Using FUSE in POE",
'dist_author' => 'Apocalypse <APOCAL@cpan.org>',
'create_packlist' => 1,
'create_makefile_pl' => 'passthrough', # not traditional, because it won't compile XS correctly
'create_readme' => 1,
'test_files' => 't/*.t',
'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README', 'Makefile' ], # automatically generated
# set our XS stuff
'extra_compiler_flags' => $inc,
'extra_linker_flags' => $obj,
'requires' => {
# POE Stuff
'POE' => 0,
'POE::Session::AttributeBased' => 0,
# FIXME POE stuff that Test::Dependencies needs to see
'POE::Session' => 0,
'POE::Wheel::Run' => 0,
'POE::Filter::Reference' => 0,
'POE::Filter::Line' => 0,
# system constants
'Errno' => 0,
'Fcntl' => 0,
'Config' => 0,
'Carp' => 0,
'DynaLoader' => 0,
# to find out stuff about $fh
'Scalar::Util' => 0,
# Filesys::Virtual wrapper
'Fuse::Filesys::Virtual' => 0,
# Async stuff for better integration with POE
'Filesys::Virtual::Async' => 0,
'POE::Component::AIO' => 0,
# set our minimum perl version
'perl' => '5.006',
},
);
# all done!
$build->create_build_script;