-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalienfile
48 lines (38 loc) · 1.13 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
use alienfile;
plugin 'Probe::Vcpkg' => (
name => 'hunspell',
ffi_name => 'libhunspell',
include => 'hunspell',
);
plugin 'PkgConfig' => (
pkg_name => 'hunspell',
);
share {
requires 'Alien::Build' => '0.75';
plugin 'Prefer::BadVersion' => ['1.7.0'] if $^O eq 'MSWin32';
my $version = $^O eq 'MSWin32' ? '1.6.2.1' : '1.7.0.1';
plugin 'Download' => (
# trying to autoreconf + patch + whatnot hunspell has jus become too much
# trouble, so we're using a prepatched copy that already has been autoreconf'd
url => "https://github.com/PerlAlien/hunspell/archive/alien-$version.tar.gz",
version => qr/^([0-9\.]+)\\.[0-9]+.tar\.gz$/,
);
plugin 'Extract' => 'tar.gz';
plugin 'Build::Autoconf' => (
ffi => 1,
);
my @acflags;
unshift @acflags, '--disable-nls' if $^O =~ /^(?:MSWin32|darwin|freebsd)/;
build [
"%{configure} --disable-shared --enable-static @acflags",
'%{make}',
'%{make} install',
];
ffi {
build [
"%{configure} --disable-static --enable-shared --libdir=%{.install.autoconf_prefix}/dynamic @acflags",
'%{make}',
'%{make} install',
];
};
};