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

Signed-off-by: young <young@yang.(none)>
This commit is contained in:
Dariusz Pelowski 2013-10-11 13:56:40 +02:00 committed by young
parent 6f6c284bec
commit bc9cd753d4
1 changed files with 10 additions and 10 deletions

View File

@ -303,6 +303,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)
@ -316,16 +326,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: