[oe] [meta-qt5][PATCH] qt5: add Qml support to lupdate

Samuli Piippo samuli.piippo at theqtcompany.com
Fri Feb 12 16:04:55 UTC 2016


Add dependency to qtdeclarative to qttools' native and nativesdk builds.
This gives us lupdate with a support for Qml files. The nativesdk builds
of qtdeclarative depend on more modules (Xml, Sql) from nativesdk-qtbase,
so preserve all libs that are already built. This brings few extra libs
to the package that might not be needed, but keeps the recipe simpler.

Signed-off-by: Samuli Piippo <samuli.piippo at theqtcompany.com>
---
 .../nativesdk-packagegroup-qt5-toolchain-host.bb      |  2 +-
 recipes-qt/qt5/nativesdk-qtbase_git.bb                | 19 ++-----------------
 recipes-qt/qt5/qttools_git.bb                         |  3 +--
 3 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb
index 4cc0b93..71746f0 100644
--- a/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb
+++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb
@@ -9,6 +9,6 @@ PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
 
 RDEPENDS_${PN} += " \
     nativesdk-packagegroup-sdk-host \
-    nativesdk-qttools \
+    nativesdk-qttools-tools \
     nativesdk-qtbase-tools \
 "
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 3d4900e..4ac80be 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -49,6 +49,7 @@ PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
 FILES_${PN}-tools-dev = " \
     ${includedir} \
     ${FILES_SOLIBSDEV} ${libdir}/*.la \
+    ${libdir}/*.prl \
     ${OE_QMAKE_PATH_ARCHDATA}/mkspecs \
 "
 
@@ -201,16 +202,6 @@ do_configure() {
     bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}"
 }
 
-# Set the EXTRA_QTLIB variable to e.g. Xml, in order to not remove libQt5Xml.so.*
-EXTRA_QTLIB ?= ""
-
-python __anonymous () {
-    templibs = ""
-    for e in d.getVar("EXTRA_QTLIB", True).split():
-        templibs = "%s -not -name 'libQt5%s.so*' -and" % (templibs, e)
-    d.setVar("QTLIBSPRESERVE", templibs)
-}
-
 do_install() {
     # Fix install paths for all
     find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
@@ -223,17 +214,11 @@ do_install() {
     # e.g. qt3d, qtwayland
     ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
 
-    # remove things unused in nativesdk, we need the headers, Qt5Core
-    # and Qt5Bootstrap.
+    # remove things unused in nativesdk, we need the headers and libs
     rm -rf ${D}${datadir} \
            ${D}/${OE_QMAKE_PATH_PLUGINS} \
            ${D}${libdir}/cmake \
            ${D}${libdir}/pkgconfig
-    find ${D}${libdir} -maxdepth 1 -name 'lib*' -and -not -type d -and \
-                                   -not -name 'libQt5Core.so*' -and \
-                                   ${QTLIBSPRESERVE} \
-                                   -not -name 'libQt5Bootstrap.a' \
-                                   -exec rm '{}' ';'
 
     # Install CMake's toolchain configuration
     mkdir -p ${D}${datadir}/cmake/OEToolchainConfig.cmake.d/
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb
index 5ee1e86..8c22e75 100644
--- a/recipes-qt/qt5/qttools_git.bb
+++ b/recipes-qt/qt5/qttools_git.bb
@@ -10,8 +10,7 @@ LIC_FILES_CHKSUM = " \
     file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
 "
 
-DEPENDS += "qtbase"
-DEPENDS_class-target = "qtdeclarative qtxmlpatterns"
+DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
 
 SRC_URI += " \
     file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch \
-- 
1.9.1




More information about the Openembedded-devel mailing list