summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-10-04 16:16:35 -0400
committerColin Walters <walters@verbum.org>2010-10-19 08:47:24 -0400
commitaea515709e0b608d6fa7c7de4dd555b8ac034969 (patch)
tree99ee9a819c729fa1a0dd5988441a5d3895c89a9c
parent2e8e7530fc66b3222525a236a395b8d24eecf404 (diff)
downloadgobject-introspection-aea515709e0b608d6fa7c7de4dd555b8ac034969.tar.gz
scanner: Don't process pkg-config libs twice
Before, we were adding the --libs-only-L from pkg-config files during initial scanning, as if --library-path was specified, *and* inside the dumper, we used --libs. Fix this by always doing -L. <introspected libraries> <pkg-config libs> This should ensure we don't duplicate the search path anyways. https://bugzilla.gnome.org/show_bug.cgi?id=631348
-rw-r--r--giscanner/dumper.py6
-rw-r--r--giscanner/scannermain.py10
2 files changed, 3 insertions, 13 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index c3a7be7b..773dec95 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -216,9 +216,6 @@ class DumpCompiler(object):
# Search the current directory first
args.append('-L.')
- for library_path in self._options.library_paths:
- args.append('-L' + library_path)
-
# https://bugzilla.gnome.org/show_bug.cgi?id=625195
if not libtool:
args.append('-Wl,-rpath=.')
@@ -229,6 +226,9 @@ class DumpCompiler(object):
else:
args.append('-l' + library)
+ for library_path in self._options.library_paths:
+ args.append('-L' + library_path)
+
args.extend(self._run_pkgconfig('--libs'))
for source in sources:
if not os.path.exists(source):
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 259a5ee4..fc52715f 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -215,16 +215,6 @@ def process_packages(options, packages):
options.cpp_defines.extend(pkg_options.cpp_defines)
options.cpp_undefines.extend(pkg_options.cpp_undefines)
- args = ['pkg-config', '--libs-only-L']
- args.extend(packages)
- output = subprocess.Popen(args,
- stdout=subprocess.PIPE).communicate()[0]
- if output is None:
- return 1
- filtered_output = list(process_options(output, options_whitelist))
- pkg_options, unused = parser.parse_args(filtered_output)
- options.library_paths.extend(pkg_options.library_paths)
-
def extract_filenames(args):
filenames = []
for arg in args: