aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0005-qt_module-Fix-pkgconfig-and-libtool-replacements.patch
blob: 29108cde32265206231a653802c219e6d3a15094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
From 1e87c127c5d268870c51894c955bf24cde83ff69 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 27 Apr 2013 23:15:37 +0200
Subject: [PATCH 05/12] qt_module: Fix pkgconfig and libtool replacements
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* 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

* qt_module: Fix paths in .prl files
* qmake does not prefix them with QT_SYSROOT when using them
  so e.g. when building qtdeclarative we get -L/usr/lib to LINKAGE
  variable, which is unsafe for cross-compilation
* writting QT_SYSROOT in .prl files is dangerous for sstate when
  builds are in different directories, so we need
  SSTATE_SCAN_FILES += "*.pri *.prl"
  to make them relocateble

* fix paths in packageconfig files
  This reverts parts of:

  enable path replacement in installed prl files on all platforms

  Task-number: QTBUG-33794
  Change-Id: Id0d38715673b8a1c0c034e9c15783eb255c4315b
  Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>

Change-Id: Ie1c94b15f2a4e736b65b4d0924d99eb2a7d92a6c
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 mkspecs/features/qt_module.prf | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 8bf4c92..9737f8c 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -188,10 +188,24 @@ unix|mingw {
         QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
     QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
 
+    pkgconfig_include_replace.match = $$rplbase/include
+    pkgconfig_include_replace.replace = "\$$\\{includedir}"
+    pkgconfig_include_replace.CONFIG = path
+    QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace
+
+    pkgconfig_lib_replace.match = $$rplbase/lib
+    pkgconfig_lib_replace.replace = "\$$\\{libdir}"
+    pkgconfig_lib_replace.CONFIG = path
+    QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_lib_replace
+
     unix {
         CONFIG += create_libtool explicitlib
         QMAKE_LIBTOOL_LIBDIR = $$qt_libdir
         QMAKE_LIBTOOL_INSTALL_REPLACE += lib_replace
+        lafile_replace.match = "-L$$[QT_INSTALL_LIBS/raw]"
+        lafile_replace.replace = ""
+        lafile_replace.CONFIG = path
+        QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace
     }
 }
 
-- 
2.0.0