line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
use alienfile; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# see xz.alienfile for a more reliable and portable |
4
|
|
|
|
|
|
|
# example that uses plugins. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Use pkg-config to check if the library exists. |
7
|
|
|
|
|
|
|
# also, use which to check that the xz command is |
8
|
|
|
|
|
|
|
# in the path. |
9
|
|
|
|
|
|
|
probe [ |
10
|
|
|
|
|
|
|
'pkg-config --exists liblzma', |
11
|
|
|
|
|
|
|
'which xz', |
12
|
|
|
|
|
|
|
]; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
share { |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
start_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# the first one which succeeds will be used |
19
|
|
|
|
|
|
|
download [ 'wget %{.meta.start_url}' ]; |
20
|
|
|
|
|
|
|
download [ 'curl -O %{.meta.start_url}' ]; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# use tar to extract the tarball |
23
|
|
|
|
|
|
|
extract [ 'tar zxf %{.install.download}' ]; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# use the standard build process |
26
|
|
|
|
|
|
|
build [ |
27
|
|
|
|
|
|
|
'./configure --prefix=%{.install.prefix} --disable-shared', |
28
|
|
|
|
|
|
|
'%{make}', |
29
|
|
|
|
|
|
|
'%{make} install', |
30
|
|
|
|
|
|
|
]; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# This package doesn't build a dynamic library by default, but if |
33
|
|
|
|
|
|
|
# it did this would make sure that it wasn't used with XS. |
34
|
|
|
|
|
|
|
# (See Alien::Build::Manual::AlienAuthor for details). |
35
|
|
|
|
|
|
|
plugin 'Gather::IsolateDynamic'; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# You can specify individual gather steps in share {} or |
40
|
|
|
|
|
|
|
# sys {} too, but for many cases the same procedure can |
41
|
|
|
|
|
|
|
# be used for both. |
42
|
|
|
|
|
|
|
gather [ |
43
|
|
|
|
|
|
|
# store the (chomped) output into the appropriate runtime properties |
44
|
|
|
|
|
|
|
[ 'pkg-config', '--modversion', 'liblzma', \'%{.runtime.version}' ], |
45
|
|
|
|
|
|
|
[ 'pkg-config', '--cflags', 'liblzma', \'%{.runtime.cflags}' ], |
46
|
|
|
|
|
|
|
[ 'pkg-config', '--libs', 'liblzma', \'%{.runtime.libs}' ], |
47
|
|
|
|
|
|
|
]; |