[oe] [meta-qt5][PATCH v2 03/11] qt5: improve support for native and nativesdk modules
Samuli Piippo
samuli.piippo at theqtcompany.com
Tue Aug 25 11:43:45 UTC 2015
Change qmake.bbclass to support building native and nativesdk packages,
so that qmake or qt5-module can be inherited and BBCLASSEXTEND used to
create native and nativesdk packages.
qtxmlpatterns and qtdeclarative native and nativesdk modules are required
for Qt Quick Compiler.
Signed-off-by: Samuli Piippo <samuli.piippo at theqtcompany.com>
---
classes/qmake5.bbclass | 8 ++++++++
classes/qmake5_base.bbclass | 11 +++++++++++
recipes-qt/qt5/qt5.inc | 2 +-
recipes-qt/qt5/qtdeclarative_git.bb | 2 ++
recipes-qt/qt5/qtxmlpatterns_git.bb | 2 ++
5 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index b056ea7..2b43f2e 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -13,3 +13,11 @@ do_configure() {
do_install() {
qmake5_base_do_install
}
+
+do_install_class-native() {
+ qmake5_base_native_do_install
+}
+
+do_install_class-nativesdk() {
+ qmake5_base_nativesdk_do_install
+}
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 44575c4..ffb3103 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -166,6 +166,17 @@ qmake5_base_do_configure () {
${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
}
+qmake5_base_native_do_install() {
+ oe_runmake install INSTALL_ROOT=${D}
+}
+
+qmake5_base_nativesdk_do_install() {
+ # Fix install paths for all
+ find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
+
+ oe_runmake install INSTALL_ROOT=${D}
+}
+
qmake5_base_do_install() {
# Fix install paths for all
find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index ef849bf..4c58ad6 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -50,7 +50,7 @@ PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplu
ALLOW_EMPTY_${PN} = "1"
ALLOW_EMPTY_${PN}-dbg = "1"
-RRECOMMENDS_${PN} = " \
+RRECOMMENDS_${PN}_class-target = " \
${PN}-plugins \
${PN}-qmlplugins \
"
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
index 421c482..f9689e6 100644
--- a/recipes-qt/qt5/qtdeclarative_git.bb
+++ b/recipes-qt/qt5/qtdeclarative_git.bb
@@ -33,3 +33,5 @@ do_configure_prepend() {
EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}"
SRCREV = "cc0df64bb0e1dea2fe37950816095802f527a241"
+
+BBCLASSEXTEND =+ "native nativesdk"
diff --git a/recipes-qt/qt5/qtxmlpatterns_git.bb b/recipes-qt/qt5/qtxmlpatterns_git.bb
index cb6bf9d..3c273db 100644
--- a/recipes-qt/qt5/qtxmlpatterns_git.bb
+++ b/recipes-qt/qt5/qtxmlpatterns_git.bb
@@ -13,3 +13,5 @@ LIC_FILES_CHKSUM = " \
DEPENDS += "qtbase"
SRCREV = "ae6504efc85adf754d60a02f81413e5949282d78"
+
+BBCLASSEXTEND =+ "native nativesdk"
--
1.9.1
More information about the Openembedded-devel
mailing list