From 8a97079c1b17f27256a4a816e5cc85344c29ac6f Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 27 Apr 2013 23:15:37 +0200 Subject: [PATCH 08/12] qt_module: Fix pkgconfig replacement * 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 Upstream-Status: Pending Signed-off-by: Martin Jansa --- mkspecs/features/qt_module.prf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 1132943..7fbfd8d 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -128,18 +128,30 @@ unix|win32-g++* { rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ rplbase = $$MODULE_BASE_OUTDIR + pkgconfig_include_replace.match = $$rplbase/include + 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] - QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace + lafile_replace.match = $$rplbase + lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]" + + !isEmpty(SYSROOT): \ + rplbase = $$[SYSROOT] \ + lafile_replace.match = $$rplbase \ + lafile_replace.replace = "=" \ + + QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace } unix { CONFIG += create_libtool explicitlib QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw] - QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace + QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace } unix|win32-g++* { -- 1.8.2.1