From 98fca3531841221b566d6799951dd9b1fe9cde75 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 25 Nov 2013 09:54:41 +0000 Subject: build: fix construction of args to pkg-config This makes it work with pkgconf (https://github.com/pkgconf/pkgconf) Signed-off-by: Natanael Copa --- waftools/checks/generic.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'waftools/checks') 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"] -- cgit v1.2.3