From 84609174186f0d44de517b7b29e19d082eea128d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 15 May 2015 17:45:39 +0200 Subject: [PATCH 1/2] gnome: Pass girtarget include dirs to g-ir-scanner --- modules/gnome.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/gnome.py b/modules/gnome.py index afd07a099..e3174bb68 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -55,10 +55,16 @@ class GnomeModule: nsversion = kwargs.pop('nsversion') libsources = kwargs.pop('sources') girfile = '%s-%s.gir' % (ns, nsversion) + scan_command = ['g-ir-scanner', '@INPUT@'] scan_command += pkgargs scan_command += ['--namespace='+ns, '--nsversion=' + nsversion, '--warn-all', '--output', '@OUTPUT@'] + + for incdirs in girtarget.include_dirs: + for incdir in incdirs.get_incdirs(): + scan_command += ['-I%s' % os.path.join(state.environment.get_source_dir(), incdir)] + if 'includes' in kwargs: includes = kwargs.pop('includes') if isinstance(includes, str): From 25d5cf14efea86b7b20d5d821ac5d31cad6c18f9 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 15 May 2015 18:39:14 +0200 Subject: [PATCH 2/2] gnome: Take the gittarget.soversion into account to compute library name Otherwize g-ir-scanner won't have the right library name --- modules/gnome.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gnome.py b/modules/gnome.py index e3174bb68..55eec17f4 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -105,7 +105,10 @@ class GnomeModule: if isinstance(girtarget, build.Executable): scan_command += ['--program', girtarget] elif isinstance(girtarget, build.SharedLibrary): - scan_command += ['--library', girtarget.get_basename()] + libname = girtarget.get_basename() + if girtarget.soversion: + libname += "-%s" % girtarget.soversion + scan_command += ['--library', libname] scankwargs = {'output' : girfile, 'input' : libsources, 'command' : scan_command}