diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-28 02:21:55 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-28 13:39:57 +0200 |
commit | b3abb65f6af9e6a48410f53d69444ffb026b39bb (patch) | |
tree | 92e67104720849ede5178b8ec5e0a05e5817ac06 | |
parent | 92705869f74b6e20ef006a2b9c79fbcdc9ff4a5b (diff) | |
download | meta-qt5-b3abb65f6af9e6a48410f53d69444ffb026b39bb.tar.gz |
qtbase: add patches to fix wrong libdir/include dirs in pkgconfig and libtool files
* qt_module.prf replacements were creating -L/usr/lib in .pc files which is bad for cross-compilation
* also use '=' for sysroot in libtool files
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
6 files changed, 132 insertions, 1 deletions
diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc index 03bb29fd..e39604cf 100644 --- a/recipes-qt/qt5/qtbase-native.inc +++ b/recipes-qt/qt5/qtbase-native.inc | |||
@@ -17,6 +17,9 @@ SRC_URI += " \ | |||
17 | file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ | 17 | file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ |
18 | file://0003-Add-external-hostbindir-option.patch \ | 18 | file://0003-Add-external-hostbindir-option.patch \ |
19 | file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ | 19 | file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ |
20 | file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \ | ||
21 | file://0009-qt_module-Fix-pkgconfig-replacement.patch \ | ||
22 | file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \ | ||
20 | " | 23 | " |
21 | 24 | ||
22 | SEPB = "${WORKDIR}/build" | 25 | SEPB = "${WORKDIR}/build" |
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 9487f7e9..5b41bded 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc | |||
@@ -7,6 +7,9 @@ SRC_URI += " \ | |||
7 | file://0004-qmake-is-already-built-in-qtbase-native.patch \ | 7 | file://0004-qmake-is-already-built-in-qtbase-native.patch \ |
8 | file://0005-Allow-building-a-separate-qmake-for-the-target.patch \ | 8 | file://0005-Allow-building-a-separate-qmake-for-the-target.patch \ |
9 | file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ | 9 | file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ |
10 | file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \ | ||
11 | file://0009-qt_module-Fix-pkgconfig-replacement.patch \ | ||
12 | file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \ | ||
10 | " | 13 | " |
11 | 14 | ||
12 | DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev" | 15 | 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 ba4badca..338b1c32 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 | |||
118 | { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true }, | 118 | { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true }, |
119 | { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, | 119 | { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, |
120 | { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, | 120 | { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, |
121 | + { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, | 121 | + { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, false }, |
122 | { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, | 122 | { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, |
123 | { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, | 123 | { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, |
124 | }; | 124 | }; |
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 00000000..b9f8cb73 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 1548dbf04ab1dbc45e514478fb82b4a0827140b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 27 Apr 2013 22:33:33 +0200 | ||
4 | Subject: [PATCH 8/8] configureapp: Prefix default LIBDIRS and INCDIRS with | ||
5 | SYSROOT | ||
6 | |||
7 | --- | ||
8 | tools/configure/configureapp.cpp | 4 ++-- | ||
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp | ||
12 | index 0e01ab5..6bb7986 100644 | ||
13 | --- a/tools/configure/configureapp.cpp | ||
14 | +++ b/tools/configure/configureapp.cpp | ||
15 | @@ -3061,8 +3061,8 @@ void Configure::generateQConfigPri() | ||
16 | configStream << "QT_HOST_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl; | ||
17 | if (!dictionary["XQMAKESPEC"].isEmpty() && !dictionary["XQMAKESPEC"].startsWith("wince")) { | ||
18 | // FIXME: add detection | ||
19 | - configStream << "QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; | ||
20 | - configStream << "QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; | ||
21 | + configStream << "QMAKE_DEFAULT_LIBDIRS = $$[QT_SYSROOT]/lib $$[QT_SYSROOT]/usr/lib" << endl; | ||
22 | + configStream << "QMAKE_DEFAULT_INCDIRS = $$[QT_SYSROOT]/usr/include $$[QT_SYSROOT]/usr/local/include" << endl; | ||
23 | } | ||
24 | if (dictionary["QT_EDITION"].contains("OPENSOURCE")) | ||
25 | configStream << "QT_EDITION = " << QLatin1String("OpenSource") << endl; | ||
26 | -- | ||
27 | 1.8.2.1 | ||
28 | |||
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 00000000..e833cc5c --- /dev/null +++ b/recipes-qt/qt5/qtbase/0009-qt_module-Fix-pkgconfig-replacement.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 1120258fc6a60972523186e85c2c762b79e7a6c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 27 Apr 2013 23:15:37 +0200 | ||
4 | Subject: [PATCH 9/9] qt_module: Fix pkgconfig replacement | ||
5 | |||
6 | * in situation like this: | ||
7 | QT_SYSROOT:/OE/oe-core/tmp-eglibc/sysroots/qemuarm | ||
8 | QT_INSTALL_LIBS:/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib | ||
9 | QT_INSTALL_LIBS/raw:/usr/lib | ||
10 | QT_INSTALL_LIBS/get:/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib | ||
11 | |||
12 | I don't want the replacement like this: | ||
13 | sed | ||
14 | -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/include,/usr/include/qt5,g" | ||
15 | -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib,/usr/lib,g" | ||
16 | "../../lib/pkgconfig/Qt5Core.pc" | ||
17 | >"/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" | ||
18 | because that way I'll end with -L/usr/lib in .pc file which is | ||
19 | cross-compile unfriendly, keeping ${libdir}/${includedir} works better | ||
20 | in my case | ||
21 | |||
22 | Change-Id: Id0f9143c012b7fe7bb7bab0055687f4e0517f653 | ||
23 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
24 | --- | ||
25 | mkspecs/features/qt_module.prf | 16 ++++++++++++++-- | ||
26 | 1 file changed, 14 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf | ||
29 | index 50e9469..9532377 100644 | ||
30 | --- a/mkspecs/features/qt_module.prf | ||
31 | +++ b/mkspecs/features/qt_module.prf | ||
32 | @@ -191,18 +191,30 @@ unix|win32-g++* { | ||
33 | rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* | ||
34 | else: \ | ||
35 | rplbase = $$[QT_INSTALL_PREFIX/get] | ||
36 | + pkgconfig_include_replace.match = $$rplbase/include | ||
37 | + pkgconfig_include_replace.replace = "\$$\\{includedir}" | ||
38 | + pkgconfig_lib_replace.match = $$rplbase/lib | ||
39 | + pkgconfig_lib_replace.replace = "\$$\\{libdir}" | ||
40 | include_replace.match = $$rplbase/include | ||
41 | include_replace.replace = $$[QT_INSTALL_HEADERS/raw] | ||
42 | lib_replace.match = $$rplbase/lib | ||
43 | lib_replace.replace = $$[QT_INSTALL_LIBS/raw] | ||
44 | - QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace | ||
45 | + lafile_replace.match = $$rplbase | ||
46 | + lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]" | ||
47 | + | ||
48 | + !isEmpty(SYSROOT): \ | ||
49 | + rplbase = $$[SYSROOT] \ | ||
50 | + lafile_replace.match = $$rplbase \ | ||
51 | + lafile_replace.replace = "=" \ | ||
52 | + | ||
53 | + QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace | ||
54 | } | ||
55 | |||
56 | unix { | ||
57 | CONFIG += create_libtool explicitlib | ||
58 | QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace | ||
59 | QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw] | ||
60 | - QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace | ||
61 | + QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace | ||
62 | } | ||
63 | |||
64 | unix|win32-g++* { | ||
65 | -- | ||
66 | 1.8.2.1 | ||
67 | |||
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 00000000..fcecc720 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From b00e2fa5ade9bed1b75f4629cc7ba2c3ec9e429f Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 27 Apr 2013 22:51:54 +0200 | ||
4 | Subject: [PATCH 10/10] qmake/property: rename QT_INSTALL_CONFIGURATION to | ||
5 | QT_INSTALL_SETTINGS | ||
6 | |||
7 | * this variable is referenced from configure and configureapp.cpp as QT_INSTALL_SETTINGS | ||
8 | property.cpp was only place using name QT_INSTALL_CONFIGURATION | ||
9 | |||
10 | Change-Id: I3ba40d5f8773fe9aea728c5b2418aa55cecc92da | ||
11 | --- | ||
12 | qmake/property.cpp | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/qmake/property.cpp b/qmake/property.cpp | ||
16 | index dca0c58..8ebba3b 100644 | ||
17 | --- a/qmake/property.cpp | ||
18 | +++ b/qmake/property.cpp | ||
19 | @@ -68,7 +68,7 @@ static const struct { | ||
20 | { "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false }, | ||
21 | { "QT_INSTALL_QML", QLibraryInfo::Qml2ImportsPath, false }, | ||
22 | { "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false }, | ||
23 | - { "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false }, | ||
24 | + { "QT_INSTALL_SETTINGS", QLibraryInfo::SettingsPath, false }, | ||
25 | { "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false }, | ||
26 | { "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false }, // Just backwards compat | ||
27 | { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true }, | ||
28 | -- | ||
29 | 1.8.2.1 | ||
30 | |||