1
mirror of https://github.com/mpv-player/mpv synced 2024-07-11 23:47:56 +02: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:
Natanael Copa 2013-11-25 09:54:41 +00:00 committed by Stefano Pigozzi
parent 4aab1d23e6
commit 98fca35318

View File

@ -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"]