-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalienfile
58 lines (49 loc) · 1.42 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
use alienfile;
use Env qw(@PKG_CONFIG_PATH);
requires 'Alien::zix';
requires 'Alien::Serd';
plugin PkgConfig => 'sord-0';
eval {
require Alien::Meson;
Alien::Meson->_apply_destdir_prefix_hack;
};
share {
requires 'Alien::Build::Plugin::Download::GitLab';
requires 'Alien::Meson' => '0.06';
requires 'Alien::Ninja';
# https://gitlab.com/drobilla/sord
# https://drobilla.net/software/sord.html
plugin 'Download::GitLab' => (
gitlab_user => 'drobilla',
gitlab_project => 'sord',
);
plugin Extract => 'tar.gz';
eval {
require Alien::zix;
require Alien::Serd;
push @PKG_CONFIG_PATH, map { $_->pkg_config_path }
qw(Alien::zix Alien::Serd);
} or warn "Unable to add to \$PKG_CONFIG_PATH (@PKG_CONFIG_PATH): $@";
meta->prop->{destdir} = 1;
my $build_dir = '_build';
build [
map {
my $linkage = $_; (
sub {
my $build = shift;
Alien::Build::CommandSequence->new([
Alien::Meson->exe, 'setup',
"-Ddefault_library=$linkage",
'--prefix=%{.install.prefix}',
'--libdir=lib',
'--buildtype=release',
'-Ddocs=disabled', # no docs
"${build_dir}_$linkage",
])->execute($build);
},
[ '%{ninja}', qw(-C), "${build_dir}_$linkage", "test" ],
[ '%{ninja}', qw(-C), "${build_dir}_$linkage", 'install' ],
) } qw(shared static)
];
plugin 'Gather::IsolateDynamic';
}