mirror of
https://github.com/mpv-player/mpv
synced 2024-08-04 14:59:58 +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:
parent
4aab1d23e6
commit
98fca35318
@ -56,8 +56,14 @@ def check_cc(**kw_ext):
|
|||||||
def check_pkg_config(*args, **kw_ext):
|
def check_pkg_config(*args, **kw_ext):
|
||||||
def fn(ctx, dependency_identifier, **kw):
|
def fn(ctx, dependency_identifier, **kw):
|
||||||
argsl = list(args)
|
argsl = list(args)
|
||||||
packages = [el for (i, el) in enumerate(args) if even(i)]
|
packages = args[::2]
|
||||||
sargs = [i for i in args if i] # remove None
|
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"]
|
pkgc_args = ["--libs", "--cflags"]
|
||||||
if ctx.dependency_satisfied('static-build'):
|
if ctx.dependency_satisfied('static-build'):
|
||||||
pkgc_args += ["--static"]
|
pkgc_args += ["--static"]
|
||||||
|
Loading…
Reference in New Issue
Block a user