summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-25 09:54:41 +0000
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-25 11:00:43 +0100
commit98fca3531841221b566d6799951dd9b1fe9cde75 (patch)
tree1d5ec483b94ac88025df5ea6e931936dc3175887
parent4aab1d23e6c3822be365eb218818f4ed49bb2ee4 (diff)
downloadmpv-98fca3531841221b566d6799951dd9b1fe9cde75.tar.bz2
mpv-98fca3531841221b566d6799951dd9b1fe9cde75.tar.xz
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>
-rw-r--r--waftools/checks/generic.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/waftools/checks/generic.py b/waftools/checks/generic.py
index 7a82ce0148..65145ef635 100644
--- a/waftools/checks/generic.py
+++ b/waftools/checks/generic.py
@@ -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"]