[gobject-introspection] build: use the detected pkg-config
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] build: use the detected pkg-config
- Date: Tue, 24 Mar 2015 09:12:28 +0000 (UTC)
commit 0f210321c4afdcf70debba42bebf5077932d7056
Author: Saleem Abdulrasool <compnerd compnerd org>
Date: Sun Mar 22 14:04:56 2015 -0700
build: use the detected pkg-config
Rather than assuming that pkg-config is spelt pkg-config, use the environment
variable $PKG_CONFIG which is the actual detected pkg-config spelling. This is
particularly important when cross-compiling, where the pkg-config may be
prefixed with the target and will actually provide a different result from the
build pkg-config which may be available unprefixed.
https://bugzilla.gnome.org/show_bug.cgi?id=746669
Makefile-gir.am | 18 +++++++++---------
giscanner/scannermain.py | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/Makefile-gir.am b/Makefile-gir.am
index 52f7ee3..9aca664 100644
--- a/Makefile-gir.am
+++ b/Makefile-gir.am
@@ -55,8 +55,8 @@ else
endif
# glib
-GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
-GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
+GLIB_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
+GLIB_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
GLIB_LIBRARY=glib-2.0
@@ -92,8 +92,8 @@ GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
gir/DBusGLib-1.0.typelib: GObject-2.0.gir
# gobject
-GOBJECT_INCLUDEDIR=$(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
-GOBJECT_LIBDIR=$(shell pkg-config --variable=libdir gobject-2.0)
+GOBJECT_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
+GOBJECT_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
GOBJECT_LIBRARY=gobject-2.0
@@ -120,8 +120,8 @@ GObject_2_0_gir_FILES = \
BUILT_GIRSOURCES += GObject-2.0.gir
# gmodule
-GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
-GMODULE_LIBDIR=$(shell pkg-config --variable=libdir gmodule-2.0)
+GMODULE_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
+GMODULE_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
GMODULE_LIBRARY=gmodule-2.0
@@ -146,13 +146,13 @@ GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h \
BUILT_GIRSOURCES += GModule-2.0.gir
# gio
-GIO_INCLUDEDIR=$(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
-GIO_LIBDIR=$(shell pkg-config --variable=libdir gio-2.0)
+GIO_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
+GIO_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
GIO_LIBRARY=gio-2.0
if HAVE_GIO_UNIX
-GIO_UNIX_HDRS=$(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+GIO_UNIX_HDRS=$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
GIO_UNIX_PACKAGES = gio-unix-2.0
else
GIO_UNIX_HDRS=
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index bca4a88..b36284d 100755
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -280,7 +280,7 @@ def process_options(output, allowed_flags):
def process_packages(options, packages):
- args = ['pkg-config', '--cflags']
+ args = [os.environ.get('PKG_CONFIG', 'pkg-config'), '--cflags']
args.extend(packages)
output = subprocess.Popen(args,
stdout=subprocess.PIPE).communicate()[0]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]