-
Notifications
You must be signed in to change notification settings - Fork 0
/
alienfile
40 lines (32 loc) · 923 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;
plugin 'PkgConfig' => 'libsecp256k1';
share {
my $run_tests = $ENV{ALIEN_LIBSECP256K1_RUN_TESTS};
start_url 'https://github.com/bitcoin-core/secp256k1/archive/refs/tags/v0.5.1.tar.gz';
plugin Download => (
version => qr/v([0-9\.]+)\.tar/,
);
plugin Extract => 'tar.gz';
plugin 'Build::CMake';
plugin 'Gather::IsolateDynamic';
build [
[
'%{cmake}',
@{meta->prop->{plugin_build_cmake}->{args}},
'-DBUILD_SHARED_LIBS=OFF',
'-DSECP256K1_VALGRIND=' . ($run_tests ? 'ON' : 'OFF'),
'-DSECP256K1_BUILD_TESTS=' . ($run_tests ? 'ON' : 'OFF'),
'-DSECP256K1_BUILD_EXHAUSTIVE_TESTS=' . ($run_tests ? 'ON' : 'OFF'),
'-DSECP256K1_BUILD_CTIME_TESTS=' . ($run_tests ? 'ON' : 'OFF'),
'-DSECP256K1_BUILD_BENCHMARK=OFF',
'-DCMAKE_BUILD_TYPE=Release',
'%{.install.extract}'
],
'%{make}',
'%{make} install',
];
test [
'%{make} test',
] if $run_tests;
};
# vim: ft=perl