summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt4.inc
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-08 17:00:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-28 12:27:25 +0000
commit6be627fd5f2d1c0ef29d052164f23bc94f914b31 (patch)
tree7215368734f32fff9f0f79fe90e332e2e394a000 /meta/recipes-qt/qt4/qt4.inc
parent76c17122024e49fdc84e237b9d5dde6525778d6b (diff)
downloadpoky-6be627fd5f2d1c0ef29d052164f23bc94f914b31.tar.gz
qt4: build qmake for the target
qmake was not being built at all (since we had the host version from qt4-native) and the default is to build for the host machine within configure. With a minor hack we can build qmake for the target as well, which is useful if you want to build Qt 4 software on an actual device. This is now installed as part of the tools package (together with uic, moc etc.) Additionally, add an environment setup script (installed in /usr/share/qt4/environment-setup or /usr/share/qtopia/environment-setup for the embedded version) as part of the mkspecs package since the mkspecs will not work without the paths set up by this script. The code to create this script was adapted from the qmake2 recipe in meta-oe. Also move do_compile() from qt-${PV}.inc up to qt4.inc as both versions have the exact same content. (From OE-Core rev: 4306606489a2d922595d4c86a21c496bbd8a607e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-qt/qt4/qt4.inc')
-rw-r--r--meta/recipes-qt/qt4/qt4.inc47
1 files changed, 43 insertions, 4 deletions
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index ea868ff23c..1e76decff1 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -142,8 +142,8 @@ RRECOMMENDS_${QT_BASE_NAME}-qmlviewer += " \
142RRECOMMENDS_${QT_BASE_NAME}-doc += " \ 142RRECOMMENDS_${QT_BASE_NAME}-doc += " \
143 ${QT_BASE_NAME}-demos-doc" 143 ${QT_BASE_NAME}-demos-doc"
144 144
145FILES_${QT_BASE_NAME}-tools = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/moc ${bindir}/uic* ${bindir}/rcc" 145FILES_${QT_BASE_NAME}-tools = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
146FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc" 146FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
147FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator" 147FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
148FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator" 148FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
149FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" 149FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig"
@@ -172,7 +172,7 @@ FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer"
172FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer" 172FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer"
173FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" 173FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf"
174FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" 174FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf"
175FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" 175FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/* ${datadir}/${QT_DIR_NAME}/environment-setup"
176FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*" 176FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*"
177FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*" 177FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*"
178FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*" 178FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*"
@@ -236,6 +236,24 @@ do_configure() {
236 -I${STAGING_INCDIR}/freetype2 236 -I${STAGING_INCDIR}/freetype2
237} 237}
238 238
239do_compile() {
240 # Fixup missing wsegl header in some SGX SDKs
241 if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
242 cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
243 fi
244
245 unset CFLAGS CXXFLAGS
246
247 oe_runmake ${EXTRA_ENV}
248
249 # Build target qmake
250 export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
251 cd ${S}/qmake
252 ${OE_QMAKE_QMAKE}
253 oe_runmake CC="${CC}" CXX="${CXX}"
254 cd ${S}
255}
256
239python populate_packages_prepend() { 257python populate_packages_prepend() {
240 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) 258 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
241 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d) 259 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
@@ -295,8 +313,9 @@ python populate_packages_prepend() {
295do_install() { 313do_install() {
296 oe_runmake install INSTALL_ROOT=${D} 314 oe_runmake install INSTALL_ROOT=${D}
297 315
298 # These are host binaries, we should only use them in staging 316 # Install a proper target version of qmake
299 rm ${D}/${bindir}/qmake 317 rm ${D}/${bindir}/qmake
318 install -m 0755 bin/qmake2 ${D}${bindir}/qmake
300 319
301 # fix pkgconfig, libtool and prl files 320 # fix pkgconfig, libtool and prl files
302 sed -i -e 's#-L${S}/lib/\?##g' \ 321 sed -i -e 's#-L${S}/lib/\?##g' \
@@ -333,4 +352,24 @@ do_install() {
333 if [ -n "${QT_LIBINFIX}" ] ; then 352 if [ -n "${QT_LIBINFIX}" ] ; then
334 [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} 353 [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
335 fi 354 fi
355
356 script="${D}/${datadir}/${QT_DIR_NAME}/environment-setup"
357 touch $script
358 echo 'export QT_DIR_NAME=${QT_DIR_NAME}' >> $script
359 echo 'export QT_LIBINFIX=${QT_LIBINFIX}' >> $script
360 echo 'export OE_QMAKE_AR=ar' >> $script
361 echo 'export OE_QMAKE_CC=gcc' >> $script
362 echo 'export OE_QMAKE_CXX=g++' >> $script
363 echo 'export OE_QMAKE_LINK=g++' >> $script
364 echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
365 echo 'export OE_QMAKE_INCDIR_QT=${includedir}/${QT_DIR_NAME}' >> $script
366 echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
367 echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
368 echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
369 echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
370 echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
371 echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
372 echo 'export OE_QMAKE_QT_CONFIG=${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
373 echo 'export QMAKESPEC=${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
374 chmod 0755 $script
336} 375}