fix for missing package name argument for 'pkg-config' call during fetching custom variables

Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>
This commit is contained in:
Dariusz Pelowski 2013-10-11 13:56:40 +02:00 committed by
parent 4c3af52305
commit 53ab568fe5
1 changed files with 10 additions and 10 deletions

View File

@ -305,6 +305,16 @@ def exec_cfg(self, kw):
for key, val in defi.items():
lst.append('--define-variable=%s=%s' % (key, val))
static = False
if 'args' in kw:
args = Utils.to_list(kw['args'])
if '--static' in args or '--static-libs' in args:
static = True
lst += args
# tools like pkgconf expect the package argument after the -- ones -_-
lst.extend(Utils.to_list(kw['package']))
# retrieving variables of a module
if 'variables' in kw:
env = kw.get('env', self.env)
@ -318,16 +328,6 @@ def exec_cfg(self, kw):
kw['okmsg'] = 'yes'
return
static = False
if 'args' in kw:
args = Utils.to_list(kw['args'])
if '--static' in args or '--static-libs' in args:
static = True
lst += args
# tools like pkgconf expect the package argument after the -- ones -_-
lst.extend(Utils.to_list(kw['package']))
# so we assume the command-line will output flags to be parsed afterwards
ret = self.cmd_and_log(lst)
if not 'okmsg' in kw: