[oe] [meta-qt5][PATCH] qttools: fix cmake usage of linguist tools

Cody P Schafer dev at codyps.com
Thu Jul 9 16:06:47 UTC 2015


Without this, Qt5LinguistTools/Qt5LinguistToolsConfig.cmake would
attempt to locate lrelease and lupdate under prefix, even while we were
cross-compiling and prefix points at the native system's root dirs.

Signed-off-by: Cody P Schafer <dev at codyps.com>
---
 recipes-qt/qt5/qttools-native_git.bb               |  5 +++-
 ...ols-cmake-allow-overriding-the-location-f.patch | 30 ++++++++++++++++++++++
 recipes-qt/qt5/qttools_git.bb                      |  1 +
 3 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch

diff --git a/recipes-qt/qt5/qttools-native_git.bb b/recipes-qt/qt5/qttools-native_git.bb
index 13e1b79..679c03e 100644
--- a/recipes-qt/qt5/qttools-native_git.bb
+++ b/recipes-qt/qt5/qttools-native_git.bb
@@ -13,7 +13,10 @@ QT_MODULE = "qttools"
 require qt5-native.inc
 require qt5-git.inc
 
-SRC_URI += "file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch"
+SRC_URI += "\
+	file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch \
+	file://0004-linguist-tools-cmake-allow-overriding-the-location-f.patch \
+"
 
 do_configure() {
     ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S} CONFIG+=linguistonly
diff --git a/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch b/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch
new file mode 100644
index 0000000..6870736
--- /dev/null
+++ b/recipes-qt/qt5/qttools/0004-linguist-tools-cmake-allow-overriding-the-location-f.patch
@@ -0,0 +1,30 @@
+From 9af593b50b61679f1ac40321c5afdf23f4cf395a Mon Sep 17 00:00:00 2001
+From: Cody P Schafer <dev at codyps.com>
+Date: Thu, 9 Jul 2015 11:28:19 -0400
+Subject: [PATCH] linguist-tools cmake: allow overriding the location for
+ lupdate and lrelease
+
+---
+ src/linguist/Qt5LinguistToolsConfig.cmake.in | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in
+index 4318b16..02651c3 100644
+--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in
++++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in
+@@ -22,7 +22,11 @@ unset(_realCurr)
+ unset(_IMPORT_PREFIX)
+ !!ENDIF
+ !!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
++if (OE_QMAKE_PATH_QT_BINS)
++   set(_qt5_linguisttools_install_prefix \"${OE_QMAKE_PATH_QT_BINS}\")
++else()
++   get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
++endif()
+ !!ELSE
+ set(_qt5_linguisttools_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+ !!ENDIF
+-- 
+2.4.5
+
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb
index a4f63c7..a40b969 100644
--- a/recipes-qt/qt5/qttools_git.bb
+++ b/recipes-qt/qt5/qttools_git.bb
@@ -14,6 +14,7 @@ DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
 SRC_URI += " \
     file://0002-assistant-help-fix-linking-of-dependent-libraries.patch \
     file://0003-add-noqtwebkit-configuration.patch \
+    file://0004-linguist-tools-cmake-allow-overriding-the-location-f.patch \
 "
 
 FILES_${PN}-tools += "${datadir}/${QT_DIR_NAME}/phrasebooks"
-- 
2.4.5




More information about the Openembedded-devel mailing list