Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/4] Qt4 qmake & other fixes
@ 2012-02-26 22:27 Paul Eggleton
  2012-02-26 22:27 ` [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:27 UTC (permalink / raw)
  To: openembedded-core

This patchset enables building qmake for the target with other target
utilities. I also fixed a couple of build failures in the process.

In addition I've used the same method to build qmake in the
qt4-tools-nativesdk recipe. This wasn't strictly necessary, however I
think it would be good to be consistent and incidentally the resulting
qmake executable is slightly smaller.

Since the RFC version, a few issues were fixed:
* Ensure the qmake changes work when the platform is different e.g.
  linux-gnueabi-oe-g++ instead of linux-oe-g++
* Install an appropriate environment setup script adapted from the
  former separate qmake2 recipe
* Fix the gcc 4.6 error by fixing the root cause (inability to correctly
  detect the C++ compiler as g++) rather than hacking around it.
* Format some of the patches so they can be used with git am

Thanks to Philip Balister for helping me test the qmake improvements.


The following changes since commit 30253358f5e76fb7b25be27198b4c125e0dbdf2c:

  Quoting fixes (2012-02-26 12:50:36 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/qmake-target
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/qmake-target

Paul Eggleton (4):
  qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  qt4: build qmake for the target
  qt4-tools-nativesdk: fix build of 4.7.4
  qt4-tools-nativesdk: improve and tidy up qmake build

 meta/recipes-qt/qt4/files/qmake-exists-check.patch |   19 -------
 meta/recipes-qt/qt4/files/target_qmake.patch       |   16 ++++++
 meta/recipes-qt/qt4/qt-4.7.4.inc                   |   11 +----
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |   13 +----
 .../qt4/qt-4.8.0/configure_oe_compiler.patch       |   31 ++++++++++++
 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch |   51 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc        |   29 +++++++----
 meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb   |    2 +
 meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4.inc                        |   47 ++++++++++++++++--
 12 files changed, 168 insertions(+), 57 deletions(-)
 delete mode 100644 meta/recipes-qt/qt4/files/qmake-exists-check.patch
 create mode 100644 meta/recipes-qt/qt4/files/target_qmake.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-26 22:27 [PATCH 0/4] Qt4 qmake & other fixes Paul Eggleton
@ 2012-02-26 22:27 ` Paul Eggleton
  2012-02-26 22:55   ` Koen Kooi
  2012-02-26 22:27 ` [PATCH 2/4] qt4: build qmake for the target Paul Eggleton
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:27 UTC (permalink / raw)
  To: openembedded-core

Ensure the Qt configure script can can detect the compiler correctly as
g++. This fixes the following compile error with gcc 4.6:

./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |    1 +
 .../qt4/qt-4.8.0/configure_oe_compiler.patch       |   31 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb          |    2 +-
 3 files changed, 33 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch

diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
index 2addbb2..532f1ff 100644
--- a/meta/recipes-qt/qt4/qt-4.8.0.inc
+++ b/meta/recipes-qt/qt4/qt-4.8.0.inc
@@ -14,6 +14,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
            file://fix-translations.patch \
            file://add_nostrip_for_debug_packages.diff \
            file://qmake_cxx_eval.patch \
+           file://configure_oe_compiler.patch \
            file://g++.conf \
            file://linux.conf \
            "
diff --git a/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch b/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
new file mode 100644
index 0000000..d455d0a
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
@@ -0,0 +1,31 @@
+Ensure we identify the compiler as g++ in configure
+
+Our PLATFORM in OE is ${TARGET_OS}-oe-g++, and previously the configure
+script was interpreting from this that the compiler was "oe-g++" and thus
+g++ specific checks were not being run since this string did not match;
+among other things this resulted in a compiler version check in the
+QtWebKit build code not working, and hence the following error at build
+time:
+
+./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
+
+The easiest thing since our PLATFORM is entirely artificial is to just
+force COMPILER to "g++" in the configure script if it is detected as
+"oe-g++".
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+--- qt-everywhere-opensource-src-4.8.0.orig/configure
++++ qt-everywhere-opensource-src-4.8.0/configure
+@@ -7444,6 +7444,9 @@ elif [ "$XPLATFORM" != "$PLATFORM" ]; th
+ else
+     COMPILER=`echo $PLATFORM | cut -f 2- -d-`
+ fi
++case $COMPILER in
++    *oe-g++) COMPILER="g++" ;;
++esac
+ if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
+     CFG_EXCEPTIONS=no
+ fi
diff --git a/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb b/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
index 5c1c97e..efbc02a 100644
--- a/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
+++ b/meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb
@@ -1,7 +1,7 @@
 require qt-${PV}.inc
 require qt4-embedded.inc
 
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] qt4: build qmake for the target
  2012-02-26 22:27 [PATCH 0/4] Qt4 qmake & other fixes Paul Eggleton
  2012-02-26 22:27 ` [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
@ 2012-02-26 22:27 ` Paul Eggleton
  2012-02-26 22:27 ` [PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
  2012-02-26 22:27 ` [PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton
  3 siblings, 0 replies; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:27 UTC (permalink / raw)
  To: openembedded-core

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>
---
 meta/recipes-qt/qt4/files/target_qmake.patch       |   16 ++++++
 meta/recipes-qt/qt4/qt-4.7.4.inc                   |   11 +----
 meta/recipes-qt/qt4/qt-4.8.0.inc                   |   12 +----
 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch |   51 ++++++++++++++++++++
 meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb          |    2 +-
 meta/recipes-qt/qt4/qt4.inc                        |   47 ++++++++++++++++--
 7 files changed, 115 insertions(+), 26 deletions(-)
 create mode 100644 meta/recipes-qt/qt4/files/target_qmake.patch
 create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch

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..a4650c8
--- /dev/null
+++ b/meta/recipes-qt/qt4/files/target_qmake.patch
@@ -0,0 +1,16 @@
+Allow building a separate qmake for the target
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Upstream-Status: Inappropriate [config]
+
+--- qt-everywhere-opensource-src-4.8.0.orig/qmake/qmake.pro
++++ qt-everywhere-opensource-src-4.8.0/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 = .
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}.
            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 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}.
            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 0000000..82bff04
--- /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 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 @@
 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 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 @@
 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 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 += " \
 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
 }
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4
  2012-02-26 22:27 [PATCH 0/4] Qt4 qmake & other fixes Paul Eggleton
  2012-02-26 22:27 ` [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
  2012-02-26 22:27 ` [PATCH 2/4] qt4: build qmake for the target Paul Eggleton
@ 2012-02-26 22:27 ` Paul Eggleton
  2012-02-26 22:27 ` [PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton
  3 siblings, 0 replies; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:27 UTC (permalink / raw)
  To: openembedded-core

Commit 4ccae37db1aa77a1d15098c3720ea6e2d383fbdc introduced a sed command
line to modify a file that only exists in 4.8.0, thus do_configure of
4.7.4 was failing; so make this conditional upon the file existing.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
index 4b097cf..64cc1ae 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
@@ -4,7 +4,7 @@ SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 LICENSE = "LGPLv2.1 | GPLv3"
 
-INC_PR = "r8"
+INC_PR = "r9"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-${PV}:"
 
@@ -59,9 +59,12 @@ do_configure() {
 
     cp ../g++.conf mkspecs/common
     cp ../linux.conf mkspecs/common
-    # don't use host g++ even during configure
-    sed -i -e "s#g++#${CXX}#" mkspecs/common/g++-base.conf
-    sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
+
+    if [ -f mkspecs/common/g++-base.conf ] ; then
+        # don't use host g++ even during configure (4.8.0+)
+        sed -i -e "s#g++#${CXX}#" mkspecs/common/g++-base.conf
+        sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
+    fi
 
     # first launch configure to get qmake compiled for the nativesdk
     (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || true
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build
  2012-02-26 22:27 [PATCH 0/4] Qt4 qmake & other fixes Paul Eggleton
                   ` (2 preceding siblings ...)
  2012-02-26 22:27 ` [PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
@ 2012-02-26 22:27 ` Paul Eggleton
  3 siblings, 0 replies; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:27 UTC (permalink / raw)
  To: openembedded-core

* Use the same method to build qmake as in the qt4 target recipes
* We always have qmake from qt4-native so don't check if it exists -
  just skip the check like we do in the qt4 target recipes. This
  saves us a patch.
* Replace qt4-tools-native in DEPENDS with qt4-native

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-qt/qt4/files/qmake-exists-check.patch |   19 -----------------
 meta/recipes-qt/qt4/qt4-tools-nativesdk.inc        |   22 +++++++++++--------
 meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb   |    2 +
 3 files changed, 15 insertions(+), 28 deletions(-)
 delete mode 100644 meta/recipes-qt/qt4/files/qmake-exists-check.patch

diff --git a/meta/recipes-qt/qt4/files/qmake-exists-check.patch b/meta/recipes-qt/qt4/files/qmake-exists-check.patch
deleted file mode 100644
index 27d21e0..0000000
--- a/meta/recipes-qt/qt4/files/qmake-exists-check.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-qt4-tools-nativesdk: avoid rebuilding qmake
-
-qt4-tools-nativesdk patch to avoids building qmake in configure if it already exists 
-(as it will, since we symlink it in from the native sysroot in do_configure)
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Upstream-Status: Inappropriate [configuration]
-
---- qt-everywhere-opensource-src-4.6.3.orig/configure	2011-01-10 12:01:56.260607001 +0000
-+++ qt-everywhere-opensource-src-4.6.3/configure	2011-01-10 12:02:20.584607015 +0000
-@@ -4286,7 +4286,7 @@
- }
- 
- # build qmake
--if true; then ###[ '!' -f "$outpath/bin/qmake" ];
-+if [ '!' -f "$outpath/bin/qmake" ]; then
-     echo "Creating qmake. Please wait..."
- 
-     OLD_QCONFIG_H=
diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
index 64cc1ae..efb61bf 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk.inc
@@ -1,21 +1,22 @@
 DESCRIPTION = "SDK tools for Qt/[X11|Mac|Embedded] version 4.x"
-DEPENDS = "zlib-nativesdk dbus-nativesdk libx11-nativesdk qt4-tools-native"
+DEPENDS = "zlib-nativesdk dbus-nativesdk libx11-nativesdk qt4-native"
 SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 LICENSE = "LGPLv2.1 | GPLv3"
 
-INC_PR = "r9"
+INC_PR = "r10"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt-${PV}:"
 
 inherit nativesdk qmake2
 
 SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
+           file://0004-no-qmake.patch \
            file://configure-lflags.patch \
            file://qt-config.patch \
-           file://qmake-exists-check.patch \
            file://configure-paths.patch \
            file://qt-dbus-const.patch \
+           file://target_qmake.patch \
            file://g++.conf \
            file://linux.conf"
 
@@ -66,11 +67,7 @@ do_configure() {
         sed -i -e "s#gcc#${CC}#" mkspecs/common/g++-base.conf
     fi
 
-    # first launch configure to get qmake compiled for the nativesdk
-    (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || true
-
-    # then backup the binary and start again with a qmake which can run on the build host
-    mv bin/qmake bin/qmake_nativesdk
+    # Use qmake from qt4-native for building
     if [ ! -e bin/qmake ]; then
         ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
     fi
@@ -99,11 +96,18 @@ do_compile() {
     for i in ${TOBUILD}; do
         cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
     done
+
+    # Build nativesdk qmake
+    export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
+    cd ${S}/qmake
+    ${OE_QMAKE_QMAKE}
+    oe_runmake CC="${CC}" CXX="${CXX}"
+    cd ${S}
 }
 
 do_install() {
     install -d ${D}${bindir}
-    install -m 0755 bin/qmake_nativesdk ${D}${bindir}/qmake2
+    install -m 0755 bin/qmake2 ${D}${bindir}/qmake2
     for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
         install -m 0755 bin/${i} ${D}${bindir}/${i}4
     done
diff --git a/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb b/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
index e615d36..02917fe 100644
--- a/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
+++ b/meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb
@@ -2,6 +2,8 @@ require qt4-tools-nativesdk.inc
 
 PR = "${INC_PR}.0"
 
+SRC_URI += "file://qmake_pri_fixes.patch"
+
 DEFAULT_PREFERENCE = "-1"
 
 SRC_URI[md5sum] = "e8a5fdbeba2927c948d9f477a6abe904"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-26 22:27 ` [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
@ 2012-02-26 22:55   ` Koen Kooi
  2012-02-26 22:59     ` Paul Eggleton
  0 siblings, 1 reply; 9+ messages in thread
From: Koen Kooi @ 2012-02-26 22:55 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 26 feb. 2012, om 23:27 heeft Paul Eggleton het volgende geschreven:

> Ensure the Qt configure script can can detect the compiler correctly as
> g++. This fixes the following compile error with gcc 4.6:
> 
> ./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> meta/recipes-qt/qt4/qt-4.8.0.inc                   |    1 +
> .../qt4/qt-4.8.0/configure_oe_compiler.patch       |   31 ++++++++++++++++++++
> meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb          |    2 +-
> 3 files changed, 33 insertions(+), 1 deletions(-)
> create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
> 
> diff --git a/meta/recipes-qt/qt4/qt-4.8.0.inc b/meta/recipes-qt/qt4/qt-4.8.0.inc
> index 2addbb2..532f1ff 100644
> --- a/meta/recipes-qt/qt4/qt-4.8.0.inc
> +++ b/meta/recipes-qt/qt4/qt-4.8.0.inc
> @@ -14,6 +14,7 @@ SRC_URI = "http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${PV}.
>            file://fix-translations.patch \
>            file://add_nostrip_for_debug_packages.diff \
>            file://qmake_cxx_eval.patch \
> +           file://configure_oe_compiler.patch \
>            file://g++.conf \
>            file://linux.conf \
>            "
> diff --git a/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch b/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
> new file mode 100644
> index 0000000..d455d0a
> --- /dev/null
> +++ b/meta/recipes-qt/qt4/qt-4.8.0/configure_oe_compiler.patch
> @@ -0,0 +1,31 @@
> +Ensure we identify the compiler as g++ in configure
> +
> +Our PLATFORM in OE is ${TARGET_OS}-oe-g++, and previously the configure
> +script was interpreting from this that the compiler was "oe-g++" and thus
> +g++ specific checks were not being run since this string did not match;
> +among other things this resulted in a compiler version check in the
> +QtWebKit build code not working, and hence the following error at build
> +time:
> +
> +./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
> +
> +The easiest thing since our PLATFORM is entirely artificial is to just
> +force COMPILER to "g++" in the configure script if it is detected as
> +"oe-g++".
> +
> +Upstream-Status: Inappropriate [configuration]
> +
> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Can I bribe you to make those proper git patches? :)

regards,

Koen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-26 22:55   ` Koen Kooi
@ 2012-02-26 22:59     ` Paul Eggleton
  2012-02-26 23:05       ` Koen Kooi
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggleton @ 2012-02-26 22:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

On Sunday 26 February 2012 23:55:25 Koen Kooi wrote:
> > +Upstream-Status: Inappropriate [configuration]
> > +
> > +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> 
> Can I bribe you to make those proper git patches? :)

Is it useful given that it's not suitable for sending upstream?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-26 22:59     ` Paul Eggleton
@ 2012-02-26 23:05       ` Koen Kooi
  2012-02-27  0:32         ` Paul Eggleton
  0 siblings, 1 reply; 9+ messages in thread
From: Koen Kooi @ 2012-02-26 23:05 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core


Op 26 feb. 2012, om 23:59 heeft Paul Eggleton het volgende geschreven:

> On Sunday 26 February 2012 23:55:25 Koen Kooi wrote:
>>> +Upstream-Status: Inappropriate [configuration]
>>> +
>>> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>> 
>> Can I bribe you to make those proper git patches? :)
> 
> Is it useful given that it's not suitable for sending upstream?

It's useful for people like me that have a custom PATCHTOOL that uses git-am. It also makes git am -3 work when updating to a newer version.

regards,

Koen


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
  2012-02-26 23:05       ` Koen Kooi
@ 2012-02-27  0:32         ` Paul Eggleton
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Eggleton @ 2012-02-27  0:32 UTC (permalink / raw)
  To: Koen Kooi; +Cc: openembedded-core

On Monday 27 February 2012 00:05:53 Koen Kooi wrote:
> It's useful for people like me that have a custom PATCHTOOL that uses
> git-am. It also makes git am -3 work when updating to a newer version.

OK, I've done this and pushed a new branch. I'm not going to send a new patch 
series though unless there are other changes.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-02-27  0:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-26 22:27 [PATCH 0/4] Qt4 qmake & other fixes Paul Eggleton
2012-02-26 22:27 ` [PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6 Paul Eggleton
2012-02-26 22:55   ` Koen Kooi
2012-02-26 22:59     ` Paul Eggleton
2012-02-26 23:05       ` Koen Kooi
2012-02-27  0:32         ` Paul Eggleton
2012-02-26 22:27 ` [PATCH 2/4] qt4: build qmake for the target Paul Eggleton
2012-02-26 22:27 ` [PATCH 3/4] qt4-tools-nativesdk: fix build of 4.7.4 Paul Eggleton
2012-02-26 22:27 ` [PATCH 4/4] qt4-tools-nativesdk: improve and tidy up qmake build Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox