mirror of
https://github.com/thead-yocto-mirror/meta-qt5
synced 2026-09-17 20:51:54 +02:00
115 lines
4.6 KiB
Diff
115 lines
4.6 KiB
Diff
From 8c5554c1ee9a18548c166f6c3a7b487b9d3cdc3e 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 04/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>
|
|
|
|
* to debug this, rebuild qtbase and read build/src/corelib/Makefile
|
|
* this is example of broken install_target rule (added line feeds):
|
|
-$(SED) -e s,/OE/5.3.1-r0/build/lib,/usr/lib,g
|
|
-e 's,/OE/5.3.1-r0/build/include,$$\{includedir},g'
|
|
-e 's,/OE/5.3.1-r0/build/lib,$$\{libdir},g'
|
|
"../../lib/pkgconfig/Qt5Core.pc"
|
|
>"$(INSTALL_ROOT)/usr/lib/pkgconfig/Qt5Core.pc"
|
|
change .prf files, create copy of WORKDIR, re-excecute only
|
|
do_configure task and compare generated Makefile, repeat until
|
|
replace in generated Makefile works ok, then refresh patch and
|
|
try complete rebuild for qtbase
|
|
* if everything is ok, then try:
|
|
image $ grep -R "\-L/usr" .
|
|
image $ grep -R "\-I/usr" .
|
|
and it should return only few cases of
|
|
qmake.conf:QMAKE_LFLAGS_THREAD = -L/usr/lib/threads
|
|
for aix* platformas
|
|
|
|
Change-Id: Ie1c94b15f2a4e736b65b4d0924d99eb2a7d92a6c
|
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
|
---
|
|
mkspecs/features/qt_common.prf | 2 +-
|
|
mkspecs/features/qt_module.prf | 15 +++++++++++++++
|
|
2 files changed, 16 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
|
|
index eb65e73..4db40d0 100644
|
|
--- a/mkspecs/features/qt_common.prf
|
|
+++ b/mkspecs/features/qt_common.prf
|
|
@@ -33,7 +33,7 @@ contains(TEMPLATE, .*lib) {
|
|
lib_replace.replace =
|
|
} else {
|
|
lib_replace.match = $$rplbase/lib
|
|
- lib_replace.replace = $$qt_libdir
|
|
+ lib_replace.replace = "\$$\\{libdir}"
|
|
}
|
|
lib_replace.CONFIG = path
|
|
QMAKE_PRL_INSTALL_REPLACE += lib_replace
|
|
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
|
|
index d213f9e..915c596 100644
|
|
--- a/mkspecs/features/qt_module.prf
|
|
+++ b/mkspecs/features/qt_module.prf
|
|
@@ -192,10 +192,25 @@ 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
|
|
+
|
|
unix {
|
|
CONFIG += create_libtool explicitlib
|
|
QMAKE_LIBTOOL_LIBDIR = $$qt_libdir
|
|
QMAKE_LIBTOOL_INSTALL_REPLACE += lib_replace
|
|
+ # add '=' as sysroot in .la files
|
|
+ lafile_replace.match = "-L\$${libdir}"
|
|
+ lafile_replace.replace = "-L=\$$\\{libdir}"
|
|
+ lafile_replace.CONFIG = path
|
|
+ QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace
|
|
+ # drop -L/usr/lib in .prl files
|
|
+ prl_replace.match = "-L\$${libdir}"
|
|
+ prl_replace.replace = ""
|
|
+ prl_replace.CONFIG = path
|
|
+ QMAKE_PRL_INSTALL_REPLACE += prl_replace
|
|
}
|
|
}
|
|
|
|
--
|
|
2.3.1
|
|
|