From aea515709e0b608d6fa7c7de4dd555b8ac034969 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 4 Oct 2010 16:16:35 -0400 Subject: 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. This should ensure we don't duplicate the search path anyways. https://bugzilla.gnome.org/show_bug.cgi?id=631348 --- giscanner/dumper.py | 6 +++--- giscanner/scannermain.py | 10 ---------- 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: -- cgit v1.2.1