-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalienfile
47 lines (36 loc) · 1 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
use alienfile;
plugin 'PkgConfig' => 'udunits';
share {
requires 'Alien::gmake' => 0.14;
plugin Download => (
url => 'https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-udunits/',
version => qr/udunits-([\d\.]+)\.tar\.gz/,
);
plugin Extract => 'tar.gz';
plugin 'Build::Autoconf';
build [
"%{configure}",
'%{make}',
'%{make} install',
];
# There is no pkg-config .pc file in the original upstream version.
after 'gather' => sub {
my($build) = @_;
my $prefix = $build->runtime_prop->{prefix};
my $cflags = do {
'-I' . File::Spec->catfile($prefix, qw(include))
};
my $libs = do {
my $path = '-L' . File::Spec->catfile($prefix, qw(lib));
join ' ', (
$path,
'-ludunits2',
( $^O eq 'darwin' || $^O eq 'MSWin32' ? '-lexpat' : '')
);
};
$build->runtime_prop->{cflags} = $cflags;
$build->runtime_prop->{cflags_static} = $cflags;
$build->runtime_prop->{libs} = $libs;
$build->runtime_prop->{libs_static} = $libs;
};
};