forked from pmurias/javascript-v8
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile.PL
68 lines (62 loc) · 1.76 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
use 5.008;
use ExtUtils::MakeMaker;
use ExtUtils::CppGuess;
use Devel::CheckLib;
my $V8_DIR = $ENV{V8_DIR};
check_lib_or_exit(
lib => ['v8'],
$V8_DIR
? ( libpath => $V8_DIR, incpath => "$V8_DIR/include" )
: (),
);
my $guess = ExtUtils::CppGuess->new;
WriteMakefile(
NAME => 'JavaScript::V8',
VERSION_FROM => 'lib/JavaScript/V8.pm',
BUILD_REQUIRES => {
'ExtUtils::XSpp' => '0.11',
},
TEST_REQUIRES => {
'Test::Number::Delta' => 0,
},
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '6.64', # TEST_REQUIRES
'ExtUtils::CppGuess' => '0.19',
'Devel::CheckLib' => '0.92',
},
ABSTRACT_FROM => 'lib/JavaScript/V8.pm',
AUTHOR => 'Pawel Murias <[email protected]>',
LIBS => [($V8_DIR ? "-L$V8_DIR " : '') . '-lv8'],
INC => '-I.' . ($V8_DIR ? " -I$V8_DIR/include" : ''),
OBJECT => '$(O_FILES)', # link all the C files too
XSOPT => '-C++ -hiertype',
TYPEMAPS => ['perlobject.map'],
depend => { 'WithV8Context.c' => 'JavaScript-V8-Context.xsp' },
META_MERGE => {
"meta-spec" => { version => 2 },
resources => {
x_IRC => 'irc://irc.perl.org/#v8',
repository => {
type => 'git',
url => '[email protected]:dgl/javascript-v8.git',
web => 'http://github.com/dgl/javascript-v8',
},
},
prereqs => {
develop => {
requires => {
'Test::Pod' => '1.22',
'Pod::Markdown' => 0,
},
},
},
},
$guess->makemaker_options,
);
sub MY::postamble {
<<EOF;
pure_all :: README.md
README.md : \$(VERSION_FROM)
\tpod2markdown \$< >\$\@
EOF
}