From 048d31708544bc076da5e5b5b07db95c2fca9af7 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 13 Jun 2015 20:12:20 +0200 Subject: gnome/generate_gir: No reason to append soversion to libname. It just won't work like that --- modules/gnome.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'modules') diff --git a/modules/gnome.py b/modules/gnome.py index bcbbeb6..179a3f2 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -118,8 +118,6 @@ class GnomeModule: elif isinstance(girtarget, build.SharedLibrary): scan_command += ["-L", os.path.join (state.environment.get_build_dir(), girtarget.subdir)] libname = girtarget.get_basename() - if girtarget.soversion: - libname += "-%s" % girtarget.soversion scan_command += ['--library', libname] scankwargs = {'output' : girfile, 'input' : libsources, -- cgit v1.1 From acb78ce8e6ca8364043a343513c2e5213ba71099 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 13 Jun 2015 20:13:11 +0200 Subject: gnome:generate_gir: Parse "link_with" In case g-ir-scanner has to link with other dependencies. --- modules/gnome.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gnome.py b/modules/gnome.py index 179a3f2..7a0ef4b 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -55,6 +55,7 @@ class GnomeModule: nsversion = kwargs.pop('nsversion') libsources = kwargs.pop('sources') girfile = '%s-%s.gir' % (ns, nsversion) + depends = [girtarget] scan_command = ['g-ir-scanner', '@INPUT@'] scan_command += pkgargs @@ -65,6 +66,17 @@ class GnomeModule: for incdir in incdirs.get_incdirs(): scan_command += ['-I%s' % os.path.join(state.environment.get_source_dir(), incdir)] + if 'link_with' in kwargs: + link_with = kwargs.pop('link_with') + for link in link_with: + lib = link.held_object + scan_command += ['-l%s' % lib.name] + if isinstance(lib, build.SharedLibrary): + scan_command += ['-L%s' % + os.path.join(state.environment.get_build_dir(), + lib.subdir)] + depends.append(lib) + if 'includes' in kwargs: includes = kwargs.pop('includes') if isinstance(includes, str): @@ -122,7 +134,7 @@ class GnomeModule: scankwargs = {'output' : girfile, 'input' : libsources, 'command' : scan_command, - 'depends' : girtarget, + 'depends' : depends, } if kwargs.get('install'): scankwargs['install'] = kwargs['install'] -- cgit v1.1