summaryrefslogtreecommitdiff
path: root/meta/recipes-qt
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:14:49 +0000
commit4306606489a2d922595d4c86a21c496bbd8a607e (patch)
treeac51f2fb9e058cfd67af16eff29484dde8e73d72 /meta/recipes-qt
parentf29bb5b2a99ecef46e5570bf3336e9680c0b6705 (diff)
downloadopenembedded-core-4306606489a2d922595d4c86a21c496bbd8a607e.tar.gz
openembedded-core-4306606489a2d922595d4c86a21c496bbd8a607e.tar.bz2
openembedded-core-4306606489a2d922595d4c86a21c496bbd8a607e.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/recipes-qt')
-rw-r--r--meta/recipes-qt/qt4/files/target_qmake.patch27
-rw-r--r--meta/recipes-qt/qt4/qt-4.7.4.inc11
-rw-r--r--meta/recipes-qt/qt4/qt-4.8.0.inc12
-rw-r--r--meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch51
-rw-r--r--meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb2
-rw-r--r--meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb2
-rw-r--r--meta/recipes-qt/qt4/qt4.inc47
7 files changed, 126 insertions, 26 deletions
diff --git a/meta/recipes-qt/qt4/files/target_qmake.patch b/meta/recipes-qt/qt4/files/target_qmake.patch
new file mode 100644
index 0000000000..9b53aff172
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/target_qmake.patch
@@ -0,0 +1,27 @@
+From e4b27237386b3dd864dd603de2ae54a707f5419f Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Mon, 27 Feb 2012 00:13:05 +0000
+Subject: [PATCH] Allow building a separate qmake for the target
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [config]
+---
+ qmake/qmake.pro | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/qmake/qmake.pro b/qmake/qmake.pro
+index b602afa..b59f7fb 100644
+--- a/qmake/qmake.pro
++++ b/qmake/qmake.pro
+@@ -7,6 +7,7 @@ CONFIG += console bootstrap
+ CONFIG -= qt shared app_bundle uic
+ DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
+ DESTDIR = ../bin/
++TARGET = qmake2
+
+ OBJECTS_DIR = .
+ MOC_DIR = .
+--
+1.7.5.4
+
diff --git a/meta/recipes-qt/qt4/qt-4.7.4.inc b/meta/recipes-qt/qt4/qt-4.7.4.inc
index 9ddb055777..216472c3c3 100644
--- a/meta/recipes-qt/qt4/qt-4.7.4.inc
+++ b/meta/recipes-qt/qt4/qt-4.7.4.inc
@@ -15,6 +15,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
file://blacklist-diginotar-certs.diff \
file://fix-translations.patch \
file://add_nostrip_for_debug_packages.diff \
+ file://target_qmake.patch \
file://g++.conf \
file://linux.conf \
file://fix-qtbug-20925.patch \
@@ -43,13 +44,3 @@ do_configure_prepend() {
${S}/configure
}
-do_compile() {
- # Fixup missing wsegl header in some SGX SDKs
- if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
- cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
- fi
-
- unset CFLAGS CXXFLAGS
-
- oe_runmake ${EXTRA_ENV}
-}
diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
index 532f1ff40c..28586be66e 100644
--- a/meta/recipes-qt/qt4/qt-4.8.0.inc
+++ b/meta/recipes-qt/qt4/qt-4.8.0.inc
@@ -15,6 +15,8 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
file://add_nostrip_for_debug_packages.diff \
file://qmake_cxx_eval.patch \
file://configure_oe_compiler.patch \
+ file://target_qmake.patch \
+ file://qmake_pri_fixes.patch \
file://g++.conf \
file://linux.conf \
"
@@ -50,13 +52,3 @@ do_configure_prepend() {
unset LD
}
-do_compile() {
- # Fixup missing wsegl header in some SGX SDKs
- if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
- cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
- fi
-
- unset CFLAGS CXXFLAGS
-
- oe_runmake ${EXTRA_ENV}
-}
diff --git a/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
new file mode 100644
index 0000000000..82bff04974
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
@@ -0,0 +1,51 @@
+From c56ed5f64a5f47cf8d539aa4ca9bedbe1fea2264 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Fri, 10 Feb 2012 15:32:12 +0000
+Subject: [PATCH] qmake: fix source file references in qmake.pri
+
+Fix duplicate entries in SOURCES and HEADERS, and fix the source file
+list for the split of qlocale.cpp.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ qmake/qmake.pri | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/qmake/qmake.pri b/qmake/qmake.pri
+index f2a3705..2d4e94c 100644
+--- a/qmake/qmake.pri
++++ b/qmake/qmake.pri
+@@ -22,8 +22,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
+ generators/symbian/initprojectdeploy_symbian.cpp \
+ generators/integrity/gbuild.cpp \
+ windows/registry.cpp \
+- symbian/epocroot.cpp \
+- generators/integrity/gbuild.cpp
++ symbian/epocroot.cpp
+
+ HEADERS += project.h property.h generators/makefile.h \
+ generators/unix/unixmake.h meta.h option.h cachekeys.h \
+@@ -40,8 +39,7 @@ HEADERS += project.h property.h generators/makefile.h \
+ generators/symbian/initprojectdeploy_symbian.h \
+ generators/integrity/gbuild.h \
+ windows/registry_p.h \
+- symbian/epocroot_p.h \
+- generators/integrity/gbuild.h
++ symbian/epocroot_p.h
+
+ contains(QT_EDITION, OpenSource) {
+ DEFINES += QMAKE_OPENSOURCE_EDITION
+@@ -72,6 +70,8 @@ bootstrap { #Qt code
+ qlist.cpp \
+ qlinkedlist.cpp \
+ qlocale.cpp \
++ qlocale_tools.cpp \
++ qlocale_unix.cpp \
+ qmalloc.cpp \
+ qmap.cpp \
+ qmetatype.cpp \
+--
+1.7.5.4
+
diff --git a/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb b/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
index 9b66d0327c..a1fcafb0a0 100644
--- a/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
+++ b/meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb
@@ -1,7 +1,7 @@
require qt-${PV}.inc
require qt4-embedded.inc
-PR = "${INC_PR}.6"
+PR = "${INC_PR}.7"
QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
diff --git a/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb b/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
index 6dedf0048a..e7f848e889 100644
--- a/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
+++ b/meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb
@@ -1,7 +1,7 @@
require qt4-x11-free.inc
require qt-${PV}.inc
-PR = "${INC_PR}.6"
+PR = "${INC_PR}.7"
QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
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 += " \
RRECOMMENDS_${QT_BASE_NAME}-doc += " \
${QT_BASE_NAME}-demos-doc"
-FILES_${QT_BASE_NAME}-tools = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
-FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
+FILES_${QT_BASE_NAME}-tools = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
+FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
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"
@@ -172,7 +172,7 @@ FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer"
FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer"
FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf"
FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf"
-FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*"
+FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/* ${datadir}/${QT_DIR_NAME}/environment-setup"
FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*"
FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*"
FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*"
@@ -236,6 +236,24 @@ do_configure() {
-I${STAGING_INCDIR}/freetype2
}
+do_compile() {
+ # Fixup missing wsegl header in some SGX SDKs
+ if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
+ cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
+ fi
+
+ unset CFLAGS CXXFLAGS
+
+ oe_runmake ${EXTRA_ENV}
+
+ # Build target qmake
+ export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
+ cd ${S}/qmake
+ ${OE_QMAKE_QMAKE}
+ oe_runmake CC="${CC}" CXX="${CXX}"
+ cd ${S}
+}
+
python populate_packages_prepend() {
translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
@@ -295,8 +313,9 @@ python populate_packages_prepend() {
do_install() {
oe_runmake install INSTALL_ROOT=${D}
- # These are host binaries, we should only use them in staging
+ # Install a proper target version of qmake
rm ${D}/${bindir}/qmake
+ install -m 0755 bin/qmake2 ${D}${bindir}/qmake
# fix pkgconfig, libtool and prl files
sed -i -e 's#-L${S}/lib/\?##g' \
@@ -333,4 +352,24 @@ do_install() {
if [ -n "${QT_LIBINFIX}" ] ; then
[ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
fi
+
+ script="${D}/${datadir}/${QT_DIR_NAME}/environment-setup"
+ touch $script
+ echo 'export QT_DIR_NAME=${QT_DIR_NAME}' >> $script
+ echo 'export QT_LIBINFIX=${QT_LIBINFIX}' >> $script
+ echo 'export OE_QMAKE_AR=ar' >> $script
+ echo 'export OE_QMAKE_CC=gcc' >> $script
+ echo 'export OE_QMAKE_CXX=g++' >> $script
+ echo 'export OE_QMAKE_LINK=g++' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=${includedir}/${QT_DIR_NAME}' >> $script
+ echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
+ echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
+ echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
+ echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
+ echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
+ echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+ chmod 0755 $script
}