-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile.PL
More file actions
43 lines (36 loc) · 904 Bytes
/
Makefile.PL
File metadata and controls
43 lines (36 loc) · 904 Bytes
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
use strict;
use ExtUtils::MakeMaker;
my $PLEDGE_CHECK = <<EOC
#include <unistd.h>
int main() {
pledge("", NULL);
return 0;
}
EOC
;
my $aout = `mktemp`;
system("echo '$PLEDGE_CHECK' | cc -x c - -o \"$aout\" > /dev/null 2>&1");
{
local $?;
unlink $aout;
}
die "ERROR: unable to find pledge, platform not supported" if $?;
WriteMakefile(
NAME => 'Unix::Pledge',
VERSION_FROM => 'lib/Unix/Pledge.pm',
PREREQ_PM => {},
AUTHOR => 'Richard Farr',
LICENSE => 'perl',
dist => {
PREOP => 'pod2text $(VERSION_FROM) > $(DISTVNAME)/README',
},
META_MERGE => {
resources => {
repository => 'git://github.com/rfarr/Unix-Pledge.git',
bugtracker => 'https://github.com/rfarr/Unix-Pledge/issues',
},
},
TEST_REQUIRES => {
'BSD::Resource' => '1',
},
);