[poky] [RFC][PATCH] qt4: add target qmake to qt4-tools package

Ilya Yanok yanok at emcraft.com
Wed May 11 16:42:50 PDT 2011


Target qmake is needed to build Qt program natively on target.

Signed-off-by: Ilya Yanok <yanok at emcraft.com>
---

Hello everybody,

I've just found that we don't have qmake in any target package. Still
qmake is necessary to build Qt applications natively on the target.

This patch tries to address this by calling qmake and make in the qmake
subdirectory after the main build. I'm not sure if it's a perfect
solution though. Any comments are welcome.

BTW, also I've found that qt4-tools and qt4-embedded-tools packages
contain the same files (I'm not sure if the actual programs are the
same but at least filenames are). Isn't it a problem?

Regards, Ilya.

 meta/recipes-qt/qt4/qt-4.6.3.inc |    2 ++
 meta/recipes-qt/qt4/qt-4.7.2.inc |    2 ++
 meta/recipes-qt/qt4/qt4.inc      |    7 ++-----
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-qt/qt4/qt-4.6.3.inc b/meta/recipes-qt/qt4/qt-4.6.3.inc
index 37a15f1..8f8fcc3 100644
--- a/meta/recipes-qt/qt4/qt-4.6.3.inc
+++ b/meta/recipes-qt/qt4/qt-4.6.3.inc
@@ -54,4 +54,6 @@ do_compile() {
 
 	unset CFLAGS CXXFLAGS
 	oe_runmake ${EXTRA_ENV}
+	# build qmake for target
+	(cd qmake; QMAKESPEC=${S}/mkspecs/${TARGET_OS}-oe-g++ ../bin/qmake; oe_runmake ${EXTRA_ENV})
 }
diff --git a/meta/recipes-qt/qt4/qt-4.7.2.inc b/meta/recipes-qt/qt4/qt-4.7.2.inc
index 0f75a46..e07d7da 100644
--- a/meta/recipes-qt/qt4/qt-4.7.2.inc
+++ b/meta/recipes-qt/qt4/qt-4.7.2.inc
@@ -56,4 +56,6 @@ do_compile() {
     install -m 0755 ${STAGING_BINDIR_NATIVE}/lrelease4 ${S}/bin/lrelease
 
     oe_runmake ${EXTRA_ENV}
+    # build qmake for target
+    (cd qmake; QMAKESPEC=${S}/mkspecs/${TARGET_OS}-oe-g++ ../bin/qmake; oe_runmake ${EXTRA_ENV})
 }
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index b86f89f..8a6e91a 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -124,8 +124,8 @@ RRECOMMENDS_${QT_BASE_NAME}-examples += " \
             ${QT_BASE_NAME}-plugin-sqldriver-sqlite \
             ${QT_BASE_NAME}-plugin-imageformat-jpeg"
 
-FILES_${QT_BASE_NAME}-tools                = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*"
-FILES_${QT_BASE_NAME}-tools-dbg            = "${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc ${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc*"
+FILES_${QT_BASE_NAME}-tools                = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake"
+FILES_${QT_BASE_NAME}-tools-dbg            = "${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc ${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake"
 FILES_${QT_BASE_NAME}-assistant            = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
 FILES_${QT_BASE_NAME}-assistant-dbg        = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
 FILES_${QT_BASE_NAME}-common               = "${bindir}/qtconfig"
@@ -264,9 +264,6 @@ python populate_packages_prepend() {
 do_install() {
 	oe_runmake install INSTALL_ROOT=${D}
 
-	# These are host binaries, we should only use them in staging
-	rm -rf ${D}/${bindir}/qmake
-
 	# fix pkgconfig, libtool and prl files
 	sed -i -e s#-L${S}/lib##g \
 			-e s#-L${STAGING_LIBDIR}##g \
-- 
1.7.4.4




More information about the poky mailing list