summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2015-02-27 11:12:46 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-02-27 18:28:08 +0100
commit4d4a34c5d29ef7b730eb9da87b39f91352ef66fa (patch)
tree8df0894830a43956bbf1c629dc3938f3f41ca10a /recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
parentfa521467249da68e89c762a178550c8109bccae3 (diff)
downloadmeta-qt5-4d4a34c5d29ef7b730eb9da87b39f91352ef66fa.tar.gz
recipes: Refresh patches to match git recipes
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch')
-rw-r--r--recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch114
1 files changed, 114 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
new file mode 100644
index 00000000..45fca3aa
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
@@ -0,0 +1,114 @@
1From 55e85e61eb93bce5b84f856ea5cc47af73e01a1d Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 27 Apr 2013 23:15:37 +0200
4Subject: [PATCH 04/13] qt_module: Fix pkgconfig and libtool replacements
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9* in situation like this:
10 QT_SYSROOT:/OE/oe-core/tmp-eglibc/sysroots/qemuarm
11 QT_INSTALL_LIBS:/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib
12 QT_INSTALL_LIBS/raw:/usr/lib
13 QT_INSTALL_LIBS/get:/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib
14
15 I don't want the replacement like this:
16 sed
17 -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/include,/usr/include/qt5,g"
18 -e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib,/usr/lib,g"
19 "../../lib/pkgconfig/Qt5Core.pc"
20 >"/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"
21 because that way I'll end with -L/usr/lib in .pc file which is
22 cross-compile unfriendly, keeping ${libdir}/${includedir} works better
23 in my case
24
25* qt_module: Fix paths in .prl files
26* qmake does not prefix them with QT_SYSROOT when using them
27 so e.g. when building qtdeclarative we get -L/usr/lib to LINKAGE
28 variable, which is unsafe for cross-compilation
29* writting QT_SYSROOT in .prl files is dangerous for sstate when
30 builds are in different directories, so we need
31 SSTATE_SCAN_FILES += "*.pri *.prl"
32 to make them relocateble
33
34* fix paths in packageconfig files
35 This reverts parts of:
36
37 enable path replacement in installed prl files on all platforms
38
39 Task-number: QTBUG-33794
40 Change-Id: Id0d38715673b8a1c0c034e9c15783eb255c4315b
41 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
42
43* to debug this, rebuild qtbase and read build/src/corelib/Makefile
44* this is example of broken install_target rule (added line feeds):
45 -$(SED) -e s,/OE/5.3.1-r0/build/lib,/usr/lib,g
46 -e 's,/OE/5.3.1-r0/build/include,$$\{includedir},g'
47 -e 's,/OE/5.3.1-r0/build/lib,$$\{libdir},g'
48 "../../lib/pkgconfig/Qt5Core.pc"
49 >"$(INSTALL_ROOT)/usr/lib/pkgconfig/Qt5Core.pc"
50 change .prf files, create copy of WORKDIR, re-excecute only
51 do_configure task and compare generated Makefile, repeat until
52 replace in generated Makefile works ok, then refresh patch and
53 try complete rebuild for qtbase
54* if everything is ok, then try:
55 image $ grep -R "\-L/usr" .
56 image $ grep -R "\-I/usr" .
57 and it should return only few cases of
58 qmake.conf:QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
59 for aix* platformas
60
61Change-Id: Ie1c94b15f2a4e736b65b4d0924d99eb2a7d92a6c
62Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
63Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
64---
65 mkspecs/features/qt_common.prf | 2 +-
66 mkspecs/features/qt_module.prf | 15 +++++++++++++++
67 2 files changed, 16 insertions(+), 1 deletion(-)
68
69diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
70index eb65e73..4db40d0 100644
71--- a/mkspecs/features/qt_common.prf
72+++ b/mkspecs/features/qt_common.prf
73@@ -33,7 +33,7 @@ contains(TEMPLATE, .*lib) {
74 lib_replace.replace =
75 } else {
76 lib_replace.match = $$rplbase/lib
77- lib_replace.replace = $$qt_libdir
78+ lib_replace.replace = "\$$\\{libdir}"
79 }
80 lib_replace.CONFIG = path
81 QMAKE_PRL_INSTALL_REPLACE += lib_replace
82diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
83index d213f9e..915c596 100644
84--- a/mkspecs/features/qt_module.prf
85+++ b/mkspecs/features/qt_module.prf
86@@ -192,10 +192,25 @@ unix|mingw {
87 QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
88 QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
89
90+ pkgconfig_include_replace.match = $$rplbase/include
91+ pkgconfig_include_replace.replace = "\$$\\{includedir}"
92+ pkgconfig_include_replace.CONFIG = path
93+ QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace
94+
95 unix {
96 CONFIG += create_libtool explicitlib
97 QMAKE_LIBTOOL_LIBDIR = $$qt_libdir
98 QMAKE_LIBTOOL_INSTALL_REPLACE += lib_replace
99+ # add '=' as sysroot in .la files
100+ lafile_replace.match = "-L\$${libdir}"
101+ lafile_replace.replace = "-L=\$$\\{libdir}"
102+ lafile_replace.CONFIG = path
103+ QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace
104+ # drop -L/usr/lib in .prl files
105+ prl_replace.match = "-L\$${libdir}"
106+ prl_replace.replace = ""
107+ prl_replace.CONFIG = path
108+ QMAKE_PRL_INSTALL_REPLACE += prl_replace
109 }
110 }
111
112--
1132.3.1
114