summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-08 17:00:25 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-28 12:27:25 (GMT)
commit6be627fd5f2d1c0ef29d052164f23bc94f914b31 (patch)
tree7215368734f32fff9f0f79fe90e332e2e394a000
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>
-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 0000000..9b53aff
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/target_qmake.patch
@@ -0,0 +1,27 @@
1From e4b27237386b3dd864dd603de2ae54a707f5419f Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Mon, 27 Feb 2012 00:13:05 +0000
4Subject: [PATCH] Allow building a separate qmake for the target
5
6Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
7
8Upstream-Status: Inappropriate [config]
9---
10 qmake/qmake.pro | 1 +
11 1 files changed, 1 insertions(+), 0 deletions(-)
12
13diff --git a/qmake/qmake.pro b/qmake/qmake.pro
14index b602afa..b59f7fb 100644
15--- a/qmake/qmake.pro
16+++ b/qmake/qmake.pro
17@@ -7,6 +7,7 @@ CONFIG += console bootstrap
18 CONFIG -= qt shared app_bundle uic
19 DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
20 DESTDIR = ../bin/
21+TARGET = qmake2
22
23 OBJECTS_DIR = .
24 MOC_DIR = .
25--
261.7.5.4
27
diff --git a/meta/recipes-qt/qt4/qt-4.7.4.inc b/meta/recipes-qt/qt4/qt-4.7.4.inc
index 9ddb055..216472c 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}.
15 file://blacklist-diginotar-certs.diff \ 15 file://blacklist-diginotar-certs.diff \
16 file://fix-translations.patch \ 16 file://fix-translations.patch \
17 file://add_nostrip_for_debug_packages.diff \ 17 file://add_nostrip_for_debug_packages.diff \
18 file://target_qmake.patch \
18 file://g++.conf \ 19 file://g++.conf \
19 file://linux.conf \ 20 file://linux.conf \
20 file://fix-qtbug-20925.patch \ 21 file://fix-qtbug-20925.patch \
@@ -43,13 +44,3 @@ do_configure_prepend() {
43 ${S}/configure 44 ${S}/configure
44} 45}
45 46
46do_compile() {
47 # Fixup missing wsegl header in some SGX SDKs
48 if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
49 cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
50 fi
51
52 unset CFLAGS CXXFLAGS
53
54 oe_runmake ${EXTRA_ENV}
55}
diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
index 532f1ff..28586be 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}.
15 file://add_nostrip_for_debug_packages.diff \ 15 file://add_nostrip_for_debug_packages.diff \
16 file://qmake_cxx_eval.patch \ 16 file://qmake_cxx_eval.patch \
17 file://configure_oe_compiler.patch \ 17 file://configure_oe_compiler.patch \
18 file://target_qmake.patch \
19 file://qmake_pri_fixes.patch \
18 file://g++.conf \ 20 file://g++.conf \
19 file://linux.conf \ 21 file://linux.conf \
20 " 22 "
@@ -50,13 +52,3 @@ do_configure_prepend() {
50 unset LD 52 unset LD
51} 53}
52 54
53do_compile() {
54 # Fixup missing wsegl header in some SGX SDKs
55 if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
56 cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
57 fi
58
59 unset CFLAGS CXXFLAGS
60
61 oe_runmake ${EXTRA_ENV}
62}
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 0000000..82bff04
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch
@@ -0,0 +1,51 @@
1From c56ed5f64a5f47cf8d539aa4ca9bedbe1fea2264 Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Fri, 10 Feb 2012 15:32:12 +0000
4Subject: [PATCH] qmake: fix source file references in qmake.pri
5
6Fix duplicate entries in SOURCES and HEADERS, and fix the source file
7list for the split of qlocale.cpp.
8
9Upstream-Status: Pending
10
11Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
12---
13 qmake/qmake.pri | 8 ++++----
14 1 files changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/qmake/qmake.pri b/qmake/qmake.pri
17index f2a3705..2d4e94c 100644
18--- a/qmake/qmake.pri
19+++ b/qmake/qmake.pri
20@@ -22,8 +22,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
21 generators/symbian/initprojectdeploy_symbian.cpp \
22 generators/integrity/gbuild.cpp \
23 windows/registry.cpp \
24- symbian/epocroot.cpp \
25- generators/integrity/gbuild.cpp
26+ symbian/epocroot.cpp
27
28 HEADERS += project.h property.h generators/makefile.h \
29 generators/unix/unixmake.h meta.h option.h cachekeys.h \
30@@ -40,8 +39,7 @@ HEADERS += project.h property.h generators/makefile.h \
31 generators/symbian/initprojectdeploy_symbian.h \
32 generators/integrity/gbuild.h \
33 windows/registry_p.h \
34- symbian/epocroot_p.h \
35- generators/integrity/gbuild.h
36+ symbian/epocroot_p.h
37
38 contains(QT_EDITION, OpenSource) {
39 DEFINES += QMAKE_OPENSOURCE_EDITION
40@@ -72,6 +70,8 @@ bootstrap { #Qt code
41 qlist.cpp \
42 qlinkedlist.cpp \
43 qlocale.cpp \
44+ qlocale_tools.cpp \
45+ qlocale_unix.cpp \
46 qmalloc.cpp \
47 qmap.cpp \
48 qmetatype.cpp \
49--
501.7.5.4
51
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 9b66d03..a1fcafb 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 @@
1require qt-${PV}.inc 1require qt-${PV}.inc
2require qt4-embedded.inc 2require qt4-embedded.inc
3 3
4PR = "${INC_PR}.6" 4PR = "${INC_PR}.7"
5 5
6QT_CONFIG_FLAGS_append_armv6 = " -no-neon " 6QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
7 7
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 6dedf00..e7f848e 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 @@
1require qt4-x11-free.inc 1require qt4-x11-free.inc
2require qt-${PV}.inc 2require qt-${PV}.inc
3 3
4PR = "${INC_PR}.6" 4PR = "${INC_PR}.7"
5 5
6QT_CONFIG_FLAGS_append_armv6 = " -no-neon " 6QT_CONFIG_FLAGS_append_armv6 = " -no-neon "
7 7
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index ea868ff..1e76dec 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}