-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
executable file
·54 lines (41 loc) · 1.16 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
use strict;
use warnings;
use ExtUtils::MakeMaker;
my $file = 'cpp2xs';
open RD, '<', 'cpp_script.in' or die "Can't open cpp_script.in for reading: $!";
open OUT, '>', $file or die "Can't open $file for writing: $!";
print OUT <<"!GROK!THIS!";
$Config::Config{'startperl'}
eval 'exec perl -S \$0 "\$@"'
if 0;
!GROK!THIS!
while(<RD>) { print OUT $_ }
close RD or die "Can't close cpp_script.in after reading: $!";
close OUT or die "Can't close $file after writing: $!";
chmod 0555, $file;
my $twv = $] > 5.013 ? 0.23 : 0.21;
$twv = 0.24 if $] > 5.015;
my %options =
(
NAME => 'InlineX::CPP2XS',
PREREQ_PM => {
'Inline' => 0.50,
'Inline::CPP' => 0.39,
'Test::Warn' => $twv,
},
VERSION_FROM => 'CPP2XS.pm',
LICENSE => 'perl',
EXE_FILES => ['cpp2xs'],
clean => { FILES => 'cpp2xs' },
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/sisyphus/inlinex-cpp2xs.git',
web => 'https://github.com/sisyphus/inlinex-cpp2xs',
},
},
},
);
WriteMakefile(%options);