Skip to contentSkip to conversation

qt4: add target qmake to qt4-tools package

RFC PATCH In review Ilya Yanok 4 participants 6 messages May 11, 2011 – May 13, 2011

lore
Share & tools
lore

Ilya Yanok

author
#0 lore raw

RFC PATCH 1/1 qt4: add target qmake to qt4-tools package

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

---

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(-)
meta/recipes-qt/qt4/qt-4.6.3.inc +2 -0
index 37a15f1..8f8fcc3 100644
@@ -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})
 }
meta/recipes-qt/qt4/qt-4.7.2.inc +2 -0
index 0f75a46..e07d7da 100644
@@ -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})
 }
meta/recipes-qt/qt4/qt4.inc +2 -5
index b86f89f..8a6e91a 100644
@@ -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 \
Signature · 1 line
1.7.4.4
#1 lore raw

This exclusion of qmake of course comes from OE, and I'm not sure but I'm guessing the reason this was not installed is because qmake is already provided by the qmake2 package in OE. We don't have that currently in oe-core and the question is do we want to bring that over rather than simply installing it as part of qt4*tools?

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw

Putting it in qttools would be fine by me

Op 13 mei 2011 om 12:17 heeft Paul Eggleton <[email protected]> het volgende geschreven:

Quoted 17 lines

This exclusion of qmake of course comes from OE, and I'm not sure but I'm guessing the reason this was not installed is because qmake is already provided by the qmake2 package in OE. We don't have that currently in oe-core and the question is do we want to bring that over rather than simply installing it as part of qt4*tools?

Cheers,
Paul

Signature · 6 lines
Paul Eggleton
Intel Open Source Technology Centre
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
#3 lore raw
Quoted 1 line · Koen Kooi

Putting it in qttools would be fine by me

It would be much better to use qt4-native as being done on OE dev currently.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#4 lore raw

Hi Otavio,

Quoted 4 lines · Otavio Salvador
Quoted 1 line · Koen Kooi

Putting it in qttools would be fine by me

It would be much better to use qt4-native as being done on OE dev currently.

To use qt4-native for what? We are talking about _target_ version of qmake which is currently not provided by any package...

Regards, Ilya.

#5 lore raw
Quoted 2 lines · Ilya Yanok

To use qt4-native for what? We are talking about _target_ version of qmake which is currently not provided by any package...

Oh ok; I missed this.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br