diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase/0005-qt_module-Fix-pkgconfig-replacement.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase/0005-qt_module-Fix-pkgconfig-replacement.patch | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0005-qt_module-Fix-pkgconfig-replacement.patch b/recipes-qt/qt5/qtbase/0005-qt_module-Fix-pkgconfig-replacement.patch new file mode 100644 index 00000000..f85fb33b --- /dev/null +++ b/recipes-qt/qt5/qtbase/0005-qt_module-Fix-pkgconfig-replacement.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | From 33bbb10c66df59abfad9f4576462f63dfb500149 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 05/14] qt_module: Fix pkgconfig replacement | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-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 | enable path replacement in installed prl files on all platforms | ||
37 | Task-number: QTBUG-33794 | ||
38 | Change-Id: Id0d38715673b8a1c0c034e9c15783eb255c4315b | ||
39 | Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> | ||
40 | |||
41 | Upstream-Status: Pending | ||
42 | |||
43 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
44 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
45 | --- | ||
46 | mkspecs/features/qt_module.prf | 43 ++++++++++++++++++++++++++++++------------ | ||
47 | 1 file changed, 31 insertions(+), 12 deletions(-) | ||
48 | |||
49 | diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf | ||
50 | index 11509ee..2f95684 100644 | ||
51 | --- a/mkspecs/features/qt_module.prf | ||
52 | +++ b/mkspecs/features/qt_module.prf | ||
53 | @@ -135,30 +135,49 @@ load(qt_installs) | ||
54 | rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* | ||
55 | else: \ | ||
56 | rplbase = $$MODULE_BASE_OUTDIR | ||
57 | -include_replace.match = $$rplbase/include | ||
58 | -include_replace.replace = $$[QT_INSTALL_HEADERS/raw] | ||
59 | -include_replace.CONFIG = path | ||
60 | -lib_replace.match = $$rplbase/lib | ||
61 | -host_build: \ | ||
62 | - lib_replace.replace = $$[QT_HOST_LIBS] | ||
63 | -else: \ | ||
64 | +pkgconfig_include_replace.match = $$rplbase/include | ||
65 | +pkgconfig_include_replace.replace = "\$$\\{includedir}" | ||
66 | +pkgconfig_lib_replace.match = $$rplbase/lib | ||
67 | +pkgconfig_lib_replace.replace = "\$$\\{libdir}" | ||
68 | +!exists($$[QT_SYSROOT]) { | ||
69 | + include_replace.match = $$rplbase/include | ||
70 | + include_replace.replace = $$[QT_INSTALL_HEADERS/raw] | ||
71 | + include_replace.CONFIG = path | ||
72 | + lib_replace.match = $$rplbase/lib | ||
73 | lib_replace.replace = $$[QT_INSTALL_LIBS/raw] | ||
74 | -lib_replace.CONFIG = path | ||
75 | + lib_replace.CONFIG = path | ||
76 | + lafile_replace.match = $$rplbase | ||
77 | + lafile_replace.replace = "$$[QT_INSTALL_PREFIX/raw]" | ||
78 | +} else { | ||
79 | + # include_replace and lib_replace are duplicate, but we don't want to | ||
80 | + # make QMAKE_PKGCONFIG_INSTALL_REPLACE, QMAKE_PRL_INSTALL_REPLACE conditional | ||
81 | + include_replace.match = $$rplbase | ||
82 | + include_replace.replace = $$[QT_SYSROOT]$$[QT_INSTALL_PREFIX/raw] | ||
83 | + include_replace.CONFIG = path | ||
84 | + lib_replace.match = $$rplbase | ||
85 | + lib_replace.replace = $$[QT_SYSROOT]$$[QT_INSTALL_PREFIX/raw] | ||
86 | + lib_replace.CONFIG = path | ||
87 | + lafile_replace.match = $$rplbase | ||
88 | + lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]" | ||
89 | +} | ||
90 | QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace | ||
91 | |||
92 | unix|win32-g++* { | ||
93 | CONFIG += create_pc | ||
94 | - QMAKE_PKGCONFIG_LIBDIR = $$lib_replace.replace | ||
95 | - QMAKE_PKGCONFIG_INCDIR = $$include_replace.replace | ||
96 | + host_build: \ | ||
97 | + QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS] | ||
98 | + else: \ | ||
99 | + QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] | ||
100 | + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] | ||
101 | QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME | ||
102 | QMAKE_PKGCONFIG_DESTDIR = pkgconfig | ||
103 | - QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace | ||
104 | + QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace | ||
105 | } | ||
106 | |||
107 | unix { | ||
108 | CONFIG += create_libtool explicitlib | ||
109 | QMAKE_LIBTOOL_LIBDIR = $$lib_replace.replace | ||
110 | - QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace | ||
111 | + QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace lafile_replace | ||
112 | } | ||
113 | |||
114 | unix|win32-g++* { | ||
115 | -- | ||
116 | 1.8.5.2 | ||
117 | |||