mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
build: fix construction of args to pkg-config
This makes it work with pkgconf (https://github.com/pkgconf/pkgconf) Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
This commit is contained in:
parent
4aab1d23e6
commit
98fca35318
@ -56,8 +56,14 @@ def check_cc(**kw_ext):
|
||||
def check_pkg_config(*args, **kw_ext):
|
||||
def fn(ctx, dependency_identifier, **kw):
|
||||
argsl = list(args)
|
||||
packages = [el for (i, el) in enumerate(args) if even(i)]
|
||||
sargs = [i for i in args if i] # remove None
|
||||
packages = args[::2]
|
||||
verchecks = args[1::2]
|
||||
sargs = []
|
||||
for i in range(0, len(packages)):
|
||||
if i < len(verchecks):
|
||||
sargs.append(packages[i] + ' ' + verchecks[i])
|
||||
else:
|
||||
sargs.append(packages[i])
|
||||
pkgc_args = ["--libs", "--cflags"]
|
||||
if ctx.dependency_satisfied('static-build'):
|
||||
pkgc_args += ["--static"]
|
||||
|
Loading…
Reference in New Issue
Block a user