[gobject-introspection] scanner: Don't process pkg-config libs twice
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Don't process pkg-config libs twice
- Date: Tue, 19 Oct 2010 12:49:01 +0000 (UTC)
commit aea515709e0b608d6fa7c7de4dd555b8ac034969
Author: Colin Walters <walters verbum org>
Date: Mon Oct 4 16:16:35 2010 -0400
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
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 c3a7be7..773dec9 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 259a5ee..fc52715 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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]