-
Notifications
You must be signed in to change notification settings - Fork 0
/
alienfile
39 lines (31 loc) · 902 Bytes
/
alienfile
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
use alienfile;
use autodie;
use Path::Tiny;
use IPC::Run3;
configure {
requires 'Path::Tiny';
requires 'IPC::Run3';
};
share {
start_url 'cadical/';
plugin 'Fetch::LocalDir';
plugin 'Extract::Directory';
build [
'sh configure -p --competition -O2 -fPIC CXXFLAGS="-Wno-array-bounds"',
'make EXE_FLAGS=-static',
'install -t %{.install.prefix} build/cadical build/libcadical.so build/libcadical.a',
];
plugin 'Gather::IsolateDynamic';
};
gather sub {
my $build = shift;
my $exename = $build->runtime_prop->{exename} =
'cadical';
my $exe = path($build->install_prop->{prefix}, $exename);
run3 [$exe, '--version'], \undef, \my $stdout;
$stdout =~ /^([0-9.a-z]+)$/;
$build->runtime_prop->{version} = $1;
$build->runtime_prop->{libs} =
" -L'@{[ $build->install_prop->{prefix} ]}'" .
" -lcadical";
};