From c2e163e655e0307787bfb2cba6f9018de2583fcd Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 10 Dec 2015 17:47:09 +0100 Subject: [PATCH] gnome: Link against dependencies when building the gir files --- dependencies.py | 2 ++ modules/gnome.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/dependencies.py b/dependencies.py index 492fee0c9..87c1ba1a8 100644 --- a/dependencies.py +++ b/dependencies.py @@ -71,6 +71,7 @@ class PkgConfigDependency(Dependency): def __init__(self, name, environment, kwargs): Dependency.__init__(self) + self.is_libtool = False self.required = kwargs.get('required', True) if 'native' in kwargs and environment.is_cross_build(): want_cross = not kwargs['native'] @@ -150,6 +151,7 @@ class PkgConfigDependency(Dependency): 'but we could not compute the actual shared' 'library path' % lib) lib = shared_lib + self.is_libtool = True self.libs.append(lib) diff --git a/modules/gnome.py b/modules/gnome.py index b7330d9be..60c994eb5 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -168,6 +168,15 @@ class GnomeModule: girdir = dep.held_object.get_variable ("girdir") if girdir: scan_command += ["--add-include-path=%s" % girdir] + for lib in dep.held_object.libs: + if os.path.isabs(lib) and dep.held_object.is_libtool: + scan_command += ["-L%s" % os.path.dirname(lib)] + libname = os.path.basename(lib) + if libname.startswith("lib"): + libname = libname[3:] + libname = libname.split(".so")[0] + lib = "-l%s" % libname + scan_command += [lib] inc_dirs = None if kwargs.get('include_directories'):