Skip to contentSkip to conversation

qmake5_base.bbclass: Add the Qt5 tools in the search path

PATCH New Otavio Salvador 1 participant 3 messages Jun 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 qmake5_base.bbclass: Add the Qt5 tools in the search path

Every recipe using Qt5 needs to know where the Qt5 tools are installed and have them in the search path.

Originally it was being done in qt5.inc file but a better place for it is inside qmake5_base.bbclass. We now use the native bindir as every recipe needs to use the native one (be it native, nativesdk or target).

---
 classes/qmake5_base.bbclass | 3 +++
 recipes-qt/qt5/qt5.inc      | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
classes/qmake5_base.bbclass +3 -0
index 3861cd0..3b8c3bd 100644
@@ -113,6 +113,9 @@ B = "${SEPB}"
 
 CONFIGURESTAMPFILE = "${WORKDIR}/qmake5_base_configure.sstate"
 
+# The Qt5 tools binaries need to be included into the search path
+PATH_prepend = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}:"
+
 qmake5_base_preconfigure() {
         if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
                 if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
recipes-qt/qt5/qt5.inc +0 -2
index bb0bcdc..7b7526a 100644
@@ -161,5 +161,3 @@ FILES_${PN}-examples-staticdev = " \
     ${OE_QMAKE_PATH_EXAMPLES}/*/*/*/*/*/*/*.a \
     ${OE_QMAKE_PATH_EXAMPLES}/*/*/*/*/*/*/*/*.a \
 "
-
-PATH_prepend = "${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}:"
Signature · 1 line
2.0.0.rc4
#1 lore raw

PATCH 2/3 cmake_qt5.bbclass: Use qmake_qt5_base.bbclass

The CMake uses QMake internally to query system settings so we ought to have it using the same variable contents and settings.

---
 classes/cmake_qt5.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
classes/cmake_qt5.bbclass +8 -1
index 94a60dc..aaead5d 100644
@@ -1,5 +1,12 @@
+#
+# QMake variables for Qt
+#
+inherit qmake5_base
+
+QT5TOOLSDEPENDS ?= "qtbase-native"
+DEPENDS_prepend = "${QT5TOOLSDEPENDS} "
+
 inherit cmake
-inherit qmake5_paths
 
 EXTRA_OECMAKE += " \
     -DOE_QMAKE_PATH_PREFIX=${OE_QMAKE_PATH_PREFIX} \
Signature · 1 line
2.0.0.rc4
#2 lore raw

PATCH 3/3 tufao: Add recipe

In reply to Otavio Salvador

Tufão is an asynchronous web framework for C++ built on top of Qt inspired in Node.js.

---
 ...kspecs-and-CMake-module-install-directori.patch | 42 ++++++++++++++++++++++
 recipes-qt/tufao/tufao_1.2.1.bb                    | 31 ++++++++++++++++
 2 files changed, 73 insertions(+)
 create mode 100644 recipes-qt/tufao/tufao/build-Fix-mkspecs-and-CMake-module-install-directori.patch
 create mode 100644 recipes-qt/tufao/tufao_1.2.1.bb
recipes-qt/tufao/tufao/build-Fix-mkspecs-and-CMake-module-install-directori.patch new file +42 -0
new file mode 100644
index 0000000..a6da1ae
@@ -0,0 +1,42 @@
+From 878c5a2a47d620f36dd281d4b0eb6677a8a1fbd4 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <[email protected]>
+Date: Sat, 7 Jun 2014 18:13:14 -0300
+Subject: [PATCH] build: Fix mkspecs and CMake module install directories
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Inapropriate [configuration]
+
+Signed-off-by: Otavio Salvador <[email protected]>
+---
+ CMakeLists.txt     | 2 +-
+ pkg/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d78fedf..1f4db6b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,7 +27,7 @@ endfunction(QUERY_QMAKE)
+ query_qmake(QT_INSTALL_PLUGINS QT_PLUGINS_DIR)
+ query_qmake(QT_HOST_DATA QT_DATA_DIR)
+ 
+-set(QT_MKSPECS_DIR ${QT_DATA_DIR}/mkspecs)
++set(QT_MKSPECS_DIR ${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs)
+ 
+ # Configure options
+ option(GENERATE_DOC
+diff --git a/pkg/CMakeLists.txt b/pkg/CMakeLists.txt
+index 25891a5..a87fedd 100644
+--- a/pkg/CMakeLists.txt
++++ b/pkg/CMakeLists.txt
+@@ -19,6 +19,6 @@ if(PKG_CONFIG_FOUND)
+     )
+ endif(PKG_CONFIG_FOUND)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/FindTufao${TUFAO_VERSION_MAJOR}.cmake"
+-    DESTINATION "${CMAKE_ROOT}/Modules"
++    DESTINATION "${libdir}/cmake"
+     COMPONENT development
+ )
+-- 
+2.0.0.rc4
+
recipes-qt/tufao/tufao_1.2.1.bb new file +31 -0
new file mode 100644
index 0000000..34b28b7
@@ -0,0 +1,31 @@
+SUMMARY = "An asynchronous web framework for C++ built on top of Qt"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=4fbd65380cdd255951079008b364516c"
+DEPENDS = "qtbase"
+
+SRCREV = "a4832b4c941b5ff3f5fab23adcff39e6ad6cb4e5"
+SRC_URI = "git://github.com/vinipsmaker/tufao.git;protocol=http \
+           file://build-Fix-mkspecs-and-CMake-module-install-directori.patch"
+
+# This includes bugfixes from 1.x branch
+PV_append = "+${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit cmake_qt5
+
+PACKAGES += "${PN}-mkspecs"
+
+FILES_${PN}-mkspecs = "\
+    ${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs \
+"
+
+FILES_${PN}-dev += " \
+    ${OE_QMAKE_PATH_LIBS}/lib*${SOLIBSDEV} \
+    ${OE_QMAKE_PATH_LIBS}/pkgconfig \
+    ${OE_QMAKE_PATH_LIBS}/cmake/* \
+    ${OE_QMAKE_PATH_LIBS}/*.prl \
+    ${OE_QMAKE_PATH_LIBS}/*.la \
+    ${OE_QMAKE_PATH_DATA}/* \
+    ${OE_QMAKE_PATH_HEADERS}/* \
+"
Signature · 1 line
2.0.0.rc4