qtbase: Fix INCDIR/LIBDIR paths in .prl files

This commit is contained in:
Martin Jansa 2013-04-28 12:58:41 +02:00
parent e88c694530
commit 783c979664
3 changed files with 63 additions and 0 deletions

View File

@ -20,6 +20,7 @@ SRC_URI += " \
file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \
file://0009-qt_module-Fix-pkgconfig-replacement.patch \
file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \
file://0011-qt_module-Fix-paths-in-.prl-files.patch \
"
SEPB = "${WORKDIR}/build"

View File

@ -10,6 +10,7 @@ SRC_URI += " \
file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \
file://0009-qt_module-Fix-pkgconfig-replacement.patch \
file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \
file://0011-qt_module-Fix-paths-in-.prl-files.patch \
"
DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev"

View File

@ -0,0 +1,61 @@
From 4af56553508993944e8ba6688c182d0e49eee1a1 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sun, 28 Apr 2013 12:56:55 +0200
Subject: [PATCH 11/11] 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
Change-Id: I4b66dcad539a3ba876d8e4ee2eb2ccd626cd03ea
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
mkspecs/features/qt_module.prf | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 9532377..73053f7 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -195,17 +195,23 @@ unix|win32-g++* {
pkgconfig_include_replace.replace = "\$$\\{includedir}"
pkgconfig_lib_replace.match = $$rplbase/lib
pkgconfig_lib_replace.replace = "\$$\\{libdir}"
- include_replace.match = $$rplbase/include
- include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
- lib_replace.match = $$rplbase/lib
- lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
- lafile_replace.match = $$rplbase
- lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]"
-
- !isEmpty(SYSROOT): \
- rplbase = $$[SYSROOT] \
- lafile_replace.match = $$rplbase \
- lafile_replace.replace = "=" \
+ !exists($$[QT_SYSROOT]) {
+ include_replace.match = $$rplbase/include
+ include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
+ lib_replace.match = $$rplbase/lib
+ lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
+ lafile_replace.match = $$rplbase
+ lafile_replace.replace = "$$[QT_INSTALL_PREFIX/raw]"
+ } else {
+ # include_replace and lib_replace are duplicate, but we don't want to
+ # make QMAKE_PKGCONFIG_INSTALL_REPLACE, QMAKE_PRL_INSTALL_REPLACE conditional
+ include_replace.match = $$rplbase
+ include_replace.replace = $$[QT_SYSROOT]$$[QT_INSTALL_PREFIX/raw]
+ lib_replace.match = $$rplbase
+ lib_replace.replace = $$[QT_SYSROOT]$$[QT_INSTALL_PREFIX/raw]
+ lafile_replace.match = $$rplbase
+ lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]"
+ }
QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace
}
--
1.8.2.1