From 53794d94994cb3149581b1a91762dfa2d6defac0 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 19 Aug 2011 09:03:51 +1000 Subject: Do not unconditionally use pkg-config in .pro files Using the first pkg-config in PATH is prone to errors when cross compiling. This is a known issue, and `configure' already avoids using pkg-config for cross compiling (unless -force-pkg-config is used). However, there was previously no way for a .pro file to test whether or not the user had passed -force-pkg-config. Let !contains(QT_CONFIG, no-pkg-config) be used to test whether or not it is safe to run pkg-config. --- configure | 4 ++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri | 2 +- src/3rdparty/webkit/Source/WebCore/features.pri | 2 +- src/plugins/platforms/wayland/wayland.pro | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index ec04414..a0e237e 100755 --- a/configure +++ b/configure @@ -3269,6 +3269,10 @@ if [ "$QT_CROSS_COMPILE" = "yes" ]; then fi fi +if [ ! -n "$PKG_CONFIG" ]; then + QT_CONFIG="$QT_CONFIG no-pkg-config" +fi + # process CFG_MAC_ARCHS if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri index 5e48f9a..5af613e 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri @@ -42,7 +42,7 @@ SOURCES += \ wtf/unicode/UTF8.cpp linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) { - system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): { + !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) { DEFINES += ENABLE_GLIB_SUPPORT=1 PKGCONFIG += glib-2.0 gio-2.0 CONFIG += link_pkgconfig diff --git a/src/3rdparty/webkit/Source/WebCore/features.pri b/src/3rdparty/webkit/Source/WebCore/features.pri index 2db8eb5..3e397a1 100644 --- a/src/3rdparty/webkit/Source/WebCore/features.pri +++ b/src/3rdparty/webkit/Source/WebCore/features.pri @@ -168,7 +168,7 @@ symbian|maemo5|maemo6 { DEFINES += WTF_USE_QTKIT=1 DEFINES -= WTF_USE_QTKIT=0 } else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) { - system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): { + !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) { DEFINES -= ENABLE_VIDEO=0 DEFINES += ENABLE_VIDEO=1 DEFINES += WTF_USE_GSTREAMER=1 diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro index 5b20a87..cbd67ea 100644 --- a/src/plugins/platforms/wayland/wayland.pro +++ b/src/plugins/platforms/wayland/wayland.pro @@ -33,7 +33,7 @@ INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND LIBS += $$QMAKE_LIBS_WAYLAND QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND -!isEmpty(QMAKE_LFLAGS_RPATH) { +!isEmpty(QMAKE_LFLAGS_RPATH):!contains(QT_CONFIG, no-pkg-config) { WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-client) !isEmpty(WAYLAND_NEEDS_RPATH) { !isEmpty(QMAKE_LIBDIR_WAYLAND):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${QMAKE_LIBDIR_WAYLAND} -- cgit v0.12