diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc index 03bb29fd4e..e39604cf1e 100644 --- a/recipes-qt/qt5/qtbase-native.inc +++ b/recipes-qt/qt5/qtbase-native.inc @@ -17,6 +17,9 @@ SRC_URI += " \ file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0003-Add-external-hostbindir-option.patch \ file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ + file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \ + file://0009-qt_module-Fix-pkgconfig-replacement.patch \ + file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \ " SEPB = "${WORKDIR}/build" diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 9487f7e97a..5b41bded56 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc @@ -7,6 +7,9 @@ SRC_URI += " \ file://0004-qmake-is-already-built-in-qtbase-native.patch \ file://0005-Allow-building-a-separate-qmake-for-the-target.patch \ file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ + file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \ + file://0009-qt_module-Fix-pkgconfig-replacement.patch \ + file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \ " DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev" diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch index ba4badca12..338b1c32f2 100644 --- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch +++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch @@ -118,7 +118,7 @@ index bbd4734..dca0c58 100644 { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true }, { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, -+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, ++ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, false }, { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, }; diff --git a/recipes-qt/qt5/qtbase/0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch b/recipes-qt/qt5/qtbase/0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch new file mode 100644 index 0000000000..b9f8cb733f --- /dev/null +++ b/recipes-qt/qt5/qtbase/0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch @@ -0,0 +1,28 @@ +From 1548dbf04ab1dbc45e514478fb82b4a0827140b1 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 27 Apr 2013 22:33:33 +0200 +Subject: [PATCH 8/8] configureapp: Prefix default LIBDIRS and INCDIRS with + SYSROOT + +--- + tools/configure/configureapp.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp +index 0e01ab5..6bb7986 100644 +--- a/tools/configure/configureapp.cpp ++++ b/tools/configure/configureapp.cpp +@@ -3061,8 +3061,8 @@ void Configure::generateQConfigPri() + configStream << "QT_HOST_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl; + if (!dictionary["XQMAKESPEC"].isEmpty() && !dictionary["XQMAKESPEC"].startsWith("wince")) { + // FIXME: add detection +- configStream << "QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; +- configStream << "QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; ++ configStream << "QMAKE_DEFAULT_LIBDIRS = $$[QT_SYSROOT]/lib $$[QT_SYSROOT]/usr/lib" << endl; ++ configStream << "QMAKE_DEFAULT_INCDIRS = $$[QT_SYSROOT]/usr/include $$[QT_SYSROOT]/usr/local/include" << endl; + } + if (dictionary["QT_EDITION"].contains("OPENSOURCE")) + configStream << "QT_EDITION = " << QLatin1String("OpenSource") << endl; +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtbase/0009-qt_module-Fix-pkgconfig-replacement.patch b/recipes-qt/qt5/qtbase/0009-qt_module-Fix-pkgconfig-replacement.patch new file mode 100644 index 0000000000..e833cc5cf0 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0009-qt_module-Fix-pkgconfig-replacement.patch @@ -0,0 +1,67 @@ +From 1120258fc6a60972523186e85c2c762b79e7a6c2 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 27 Apr 2013 23:15:37 +0200 +Subject: [PATCH 9/9] qt_module: Fix pkgconfig replacement + +* in situation like this: + QT_SYSROOT:/OE/oe-core/tmp-eglibc/sysroots/qemuarm + QT_INSTALL_LIBS:/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib + QT_INSTALL_LIBS/raw:/usr/lib + QT_INSTALL_LIBS/get:/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib + + I don't want the replacement like this: + sed + -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/include,/usr/include/qt5,g" + -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib,/usr/lib,g" + "../../lib/pkgconfig/Qt5Core.pc" + >"/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/image/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib/pkgconfig/Qt5Core.pc" + because that way I'll end with -L/usr/lib in .pc file which is + cross-compile unfriendly, keeping ${libdir}/${includedir} works better + in my case + +Change-Id: Id0f9143c012b7fe7bb7bab0055687f4e0517f653 +Signed-off-by: Martin Jansa +--- + mkspecs/features/qt_module.prf | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf +index 50e9469..9532377 100644 +--- a/mkspecs/features/qt_module.prf ++++ b/mkspecs/features/qt_module.prf +@@ -191,18 +191,30 @@ unix|win32-g++* { + rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* + else: \ + rplbase = $$[QT_INSTALL_PREFIX/get] ++ pkgconfig_include_replace.match = $$rplbase/include ++ pkgconfig_include_replace.replace = "\$$\\{includedir}" ++ pkgconfig_lib_replace.match = $$rplbase/lib ++ pkgconfig_lib_replace.replace = "\$$\\{libdir}" + include_replace.match = $$rplbase/include + include_replace.replace = $$[QT_INSTALL_HEADERS/raw] + lib_replace.match = $$rplbase/lib + lib_replace.replace = $$[QT_INSTALL_LIBS/raw] +- QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace ++ lafile_replace.match = $$rplbase ++ lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]" ++ ++ !isEmpty(SYSROOT): \ ++ rplbase = $$[SYSROOT] \ ++ lafile_replace.match = $$rplbase \ ++ lafile_replace.replace = "=" \ ++ ++ QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace + } + + unix { + CONFIG += create_libtool explicitlib + QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace + QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw] +- QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace ++ QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace + } + + unix|win32-g++* { +-- +1.8.2.1 + diff --git a/recipes-qt/qt5/qtbase/0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch b/recipes-qt/qt5/qtbase/0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch new file mode 100644 index 0000000000..fcecc720d4 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch @@ -0,0 +1,30 @@ +From b00e2fa5ade9bed1b75f4629cc7ba2c3ec9e429f Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 27 Apr 2013 22:51:54 +0200 +Subject: [PATCH 10/10] qmake/property: rename QT_INSTALL_CONFIGURATION to + QT_INSTALL_SETTINGS + +* this variable is referenced from configure and configureapp.cpp as QT_INSTALL_SETTINGS + property.cpp was only place using name QT_INSTALL_CONFIGURATION + +Change-Id: I3ba40d5f8773fe9aea728c5b2418aa55cecc92da +--- + qmake/property.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/qmake/property.cpp b/qmake/property.cpp +index dca0c58..8ebba3b 100644 +--- a/qmake/property.cpp ++++ b/qmake/property.cpp +@@ -68,7 +68,7 @@ static const struct { + { "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false }, + { "QT_INSTALL_QML", QLibraryInfo::Qml2ImportsPath, false }, + { "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false }, +- { "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false }, ++ { "QT_INSTALL_SETTINGS", QLibraryInfo::SettingsPath, false }, + { "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false }, + { "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false }, // Just backwards compat + { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true }, +-- +1.8.2.1 +