-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalienfile
46 lines (35 loc) · 1.08 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
use alienfile;
plugin 'PkgConfig' => (
pkg_name => $^O eq 'linux' ? 'hidapi-libusb' : 'hidapi'
);
share {
requires 'Alien::autoconf' => '0.03';
requires 'Alien::automake' => '0.05';
requires 'Alien::libtool' => '0.02';
requires 'Alien::m4' => '0.11';
if ($^O eq 'darwin') {
meta->after_hook(gather_share => sub {
my($build) = @_;
$build->runtime_prop->{$_} .= '-framework CoreFoundation -framework IOKit' for qw( libs libs_static );
});
} elsif ($^O eq 'linux') {
requires 'Alien::LibUSB' => '0.2';
requires 'Alien::libudev' => '0.11';
meta->after_hook(gather_share => sub {
my($build) = @_;
$build->runtime_prop->{$_} .= ' ' . Alien::LibUSB->libs . ' ' . Alien::libudev->libs for qw( libs libs_static );
});
}
plugin Download => (
url => 'https://github.com/libusb/hidapi/archive/hidapi-0.11.0.tar.gz'
);
plugin Extract => 'tar.gz';
plugin 'Build::Autoconf' => ();
build [
'./bootstrap',
'%{configure}',
'%{make}',
'%{make} install',
];
plugin 'Gather::IsolateDynamic' => ();
};