diff options
-rw-r--r-- | giscanner/dumper.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py index 2ffb0286..d72e40e0 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -197,8 +197,12 @@ class DumpCompiler(object): # Search the current directory first args.append('-L.') - libtool_args = [] uninst_builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') + if not uninst_builddir: + proc = subprocess.Popen([self._pkgconfig_cmd, '--libs', + 'gobject-introspection-1.0'], + stdout=subprocess.PIPE) + args.extend(proc.communicate()[0].split()) # hack for building GIRepository.gir, skip -lgirepository-1.0 since # libgirepository-1.0.la is not in current directory and we refer to it # explicitly below anyway @@ -207,7 +211,7 @@ class DumpCompiler(object): self._options.libraries[0] == 'girepository-1.0'): continue if library.endswith(".la"): # explicitly specified libtool library - libtool_args.append(library) + args.append(library) else: args.append('-l' + library) @@ -222,8 +226,6 @@ class DumpCompiler(object): if not os.path.exists(source): raise CompilerError( "Could not find object file: %s" % (source, )) - # need to be late - cf. bug#605156 - args.extend(libtool_args) args.extend(list(sources)) subprocess.check_call(args) |