#! perl
plugin
PkgConfig
=>
'xpa'
;
probe [
'pkg-config --exists xpa'
];
share {
plugin
Download
=> (
filter
=>
qr/(?:\d+\.\d+\.\d+).tar.gz$/
,
version
=>
qr/(\d+\.\d+\.\d+).tar.gz$/
,
);
plugin
Extract
=>
'tar.gz'
;
patch
sub
{
my
(
$build
) =
@_
;
path(
'Makefile.in'
)->edit_lines(
sub
{
s/^INSTALL_ROOT\s*=\s*$//;
s/INSTALL_ROOT/DESTDIR/g;
} );
};
plugin
'Build::Autoconf'
;
build [
'%{configure}'
,
'%{make} CFLAGS=-fPIC'
,
'%{make} install'
,
];
};
gather [
[
'pkg-config --modversion libcxcregion'
, \
'%{.runtime.version}'
],
[
'pkg-config --cflags libcxcregion'
, \
'%{.runtime.cflags}'
],
[
'pkg-config --libs libcxcregion'
, \
'%{.runtime.libs}'
],
];