qmake/qt4-tools-nativesdk fixes
cover qmake/qt4-tools-nativesdk fixes
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.
NOTE: This patchset is an RFC - please do not merge until people have had a chance to test. I haven't thoroughly tested these myself yet.
Please review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.
The following changes since commit 4ef5e70f531f48cef90805402c16ec02ad3f2b92:
tcmode-default: add preference for gdb/gdbserver (2012-02-08 10:16:48 -0600)
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 +----- meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch | 40 ++++++++++++++++++++ .../recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch | 19 +++++++++ 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-x11-free_4.8.0.bb | 2 +- meta/recipes-qt/qt4/qt4.inc | 25 +++++++++++- 13 files changed, 125 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/qmake_pri_fixes.patch create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch
Signature · 1 line
1.7.5.4
RFC PATCH 1/4 qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Fix the following compile error (by disabling -Werror for QtWebKit):
./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword in C++0x [-Werror=c++0x-compat]
--- meta/recipes-qt/qt4/qt-4.8.0.inc | 1 + .../recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch | 19 +++++++++++++++++++ meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb | 2 +- meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch
meta/recipes-qt/qt4/qt-4.8.0.inc +1 -0
@@ -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://webkit_no_werror.patch \ file://g++.conf \ file://linux.conf \ "
meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch new file +19 -0
@@ -0,0 +1,19 @@ +Fix the following error during compiling 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 <[email protected]> + +Upstream-Status: Pending + +--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/WebKit.pri ++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/WebKit.pri +@@ -102,8 +102,6 @@ CONFIG -= warn_on + + # Treat warnings as errors on x86/Linux/GCC + linux-g++* { +- isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror +- + greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) { + if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) { + # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
meta/recipes-qt/qt4/qt4-embedded_4.8.0.bb +1 -1
@@ -1,7 +1,7 @@ require qt-${PV}.inc require qt4-embedded.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEFAULT_PREFERENCE = "-1"
meta/recipes-qt/qt4/qt4-x11-free_4.8.0.bb +1 -1
@@ -1,7 +1,7 @@ require qt4-x11-free.inc require qt-${PV}.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEFAULT_PREFERENCE = "-1"
Signature · 1 line
1.7.5.4
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Quoted 6 lines · Paul Eggleton
meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch new file +6
-0+Fix the following error during compiling 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 <[email protected]> +
meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch line 16
Quoted 10 lines
meta/recipes-qt/qt4/qt-4.8.0/webkit_no_werror.patch new file +10
-0+Upstream-Status: Pending + +--- qt-everywhere-opensource-src-4.8.0.orig/src/3rdparty/webkit/Source/WebKit.pri ++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/WebKit.pri +@@ -102,8 +102,6 @@ CONFIG -= warn_on + + # Treat warnings as errors on x86/Linux/GCC + linux-g++* { +- isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror +-
since there is a namespace conflict that should be fixed IMO removing Wrror is not quite the right
thing to do here IMO. Its a workaround but probably upstream wont accept it. So change
nullptr here to something like qt_nullptr in source tree
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Quoted 2 lines · On Thursday 09 February 2012 13:19:22 Khem Raj wrote:
since there is a namespace conflict that should be fixed IMO removing Wrror is not quite the right thing to do here IMO.
So removing -Werror is somewhat heavy-handed, yes; perhaps we can simply add -Wno-error=c++0x-compat and mark this patch as inappropriate for upstreaming instead?
Quoted 3 lines
Its a workaround but probably upstream wont
accept it. So change nullptr here to something likeqt_nullptrin source tree
What the code is attempting to do is provide its own "nullptr" if it isn't being provided as part of the language:
------------------------------
#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
#define HAVE_NULLPTR 1
#else
namespace std {
class nullptr_t { };
}extern std::nullptr_t nullptr;
#endif
------------------------------
gcc 4.6 is preempting this and complaining about the use of the identifier. I don't think renaming it is going to be acceptable upstream either.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Quoted 14 lines · Paul Eggleton
What the code is attempting to do is provide its own "nullptr" if it isn't being provided as part of the language:
------------------------------
#if__has_feature(cxx_nullptr)|| (GCC_VERSION_AT_LEAST(4, 6, 0)&&defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER)&&_MSC_VER>= 1600 && !COMPILER(INTEL))#define
HAVE_NULLPTR1#else
namespace std { class nullptr_t { }; }
Quoted 7 lines
extern
std::nullptr_tnullptr;#endif
------------------------------gcc 4.6 is preempting this and complaining about the use of the identifier. I don't think renaming it is going to be acceptable upstream either.
Does it work if you build with -std=c++0x? If Qt is doing the above then presumably it is at least attempting to be compatible with C++0X.
p.
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Quoted 21 lines · On Friday 10 February 2012 14:03:06 Phil Blundell wrote:
Quoted 20 lines · Paul Eggleton
What the code is attempting to do is provide its own "nullptr" if it isn't being provided as part of the language:
------------------------------
#if__has_feature(cxx_nullptr)|| (GCC_VERSION_AT_LEAST(4, 6, 0)&&defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER)&&_MSC_VER>= 1600 && !COMPILER(INTEL))#define
HAVE_NULLPTR1#else
namespace std {
class nullptr_t { };}
extern
std::nullptr_tnullptr;
Quoted 8 lines
Quoted 6 lines
#endif
------------------------------gcc 4.6 is preempting this and complaining about the use of the identifier. I don't think renaming it is going to be acceptable upstream either.
Does it work if you build with -std=c++0x?
It does, yes (well, compiling the above code on its own anyway).
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
In reply to Paul EggletonQuoted 7 lines · On Friday 10 February 2012 13:56:44 Paul Eggleton wrote:
Quoted 2 lines · On Thursday 09 February 2012 13:19:22 Khem Raj wrote:
since there is a namespace conflict that should be fixed IMO removing Wrror is not quite the right thing to do here IMO.
So removing -Werror is somewhat heavy-handed, yes; perhaps we can simply add -Wno-error=c++0x-compat and mark this patch as inappropriate for upstreaming instead?
So, I dug further into this, and I discovered that the reason for this breaking was that the Qt configure script thought we were not using g++ as the C++ compiler (!) thus it did not detect the gcc version, and therefore when it came to the check to see if gcc 4.6+ was being used in order to add the -Wno- c++0x-compat option to CXXFLAGS (which it already has code to do), the version was not set and the option was not added.
I've updated the contrib branch to fix this as well as reformat the other patch as Koen requested.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [RFC PATCH 1/4] qt4: fix compile error in Qt 4.8.0 with gcc 4.6
Quoted 10 lines · Paul Eggleton
So, I dug further into this, and I discovered that the reason for this breaking was that the Qt configure script thought we were not using g++ as the C++ compiler (!) thus it did not detect the gcc version, and therefore when it came to the check to see if gcc 4.6+ was being used in order to add the -Wno- c++0x-compat option to CXXFLAGS (which it already has code to do), the version was not set and the option was not added.
I've updated the contrib branch to fix this as well as reformat the other patch as Koen requested.
Thanks for redoing it.
RFC PATCH 2/4 qt4: build qmake for the target
In reply to Paul Eggletonqmake 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.
Also move do_compile() from qt-${PV}.inc up to qt4.inc as both versions have the exact same content.
--- 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 | 40 ++++++++++++++++++++ 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 | 25 +++++++++++- 7 files changed, 83 insertions(+), 25 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
meta/recipes-qt/qt4/files/target_qmake.patch new file +16 -0
@@ -0,0 +1,16 @@ +Allow building a separate qmake for the target + +Signed-off-by: Paul Eggleton <[email protected]> + +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 = .
meta/recipes-qt/qt4/qt-4.7.4.inc +1 -10
@@ -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} -}
meta/recipes-qt/qt4/qt-4.8.0.inc +2 -10
@@ -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://webkit_no_werror.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} -}
meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch new file +40 -0
@@ -0,0 +1,40 @@ +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. + +Signed-off-by: Paul Eggleton <[email protected]> + +Upstream-Status: Pending + +--- qt-everywhere-opensource-src-4.8.0.orig/qmake/qmake.pri ++++ qt-everywhere-opensource-src-4.8.0/qmake/qmake.pri +@@ -22,8 +22,7 @@ SOURCES += project.cpp property.cpp main + 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 generato + 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 \
meta/recipes-qt/qt4/qt4-embedded_4.7.4.bb +1 -1
@@ -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 "
meta/recipes-qt/qt4/qt4-x11-free_4.7.4.bb +1 -1
@@ -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 "
meta/recipes-qt/qt4/qt4.inc +22 -3
@@ -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"
@@ -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/linux-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' \
Signature · 1 line
1.7.5.4
Re: [RFC PATCH 2/4] qt4: build qmake for the target
Op 9 feb. 2012, om 18:57 heeft Paul Eggleton het volgende geschreven:
meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch line 8
Quoted 11 lines
+++
b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patchmeta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch new file +8
-0@@ -0,0 +1,40 @@ +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. + +Signed-off-by: Paul Eggleton <[email protected]> + +Upstream-Status: Pending
Since qt upstream is git and you're including a SOB can you please add the git-am'able version of the patches? That will also give us some more info on how old the patch is since git is really bad at tracking renames.
regards,
Koen
Re: [RFC PATCH 2/4] qt4: build qmake for the target
Quoted 15 lines · On Thursday 09 February 2012 19:18:19 Koen Kooi wrote:
Op 9 feb. 2012, om 18:57 heeft Paul Eggleton het volgende geschreven:
meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch line 8
Quoted 10 lines
+++
b/meta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patchmeta/recipes-qt/qt4/qt-4.8.0/qmake_pri_fixes.patch new file +8
-0@@ -0,0 +1,40 @@ +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. + +Signed-off-by: Paul Eggleton <[email protected]> + +Upstream-Status: PendingSince qt upstream is git and you're including a SOB can you please add the git-am'able version of the patches? That will also give us some more info on how old the patch is since git is really bad at tracking renames.
Ah yes, I recall you asking for this last time as well. Once I've heard from more people testing this I'll redo the patch against Qt git.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
RFC PATCH 3/4 qt4-tools-nativesdk: fix build of 4.7.4
In reply to Paul EggletonThe previous commit uses sed 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.
--- meta/recipes-qt/qt4/qt4-tools-nativesdk.inc | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
meta/recipes-qt/qt4/qt4-tools-nativesdk.inc +7 -4
@@ -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
Signature · 1 line
1.7.5.4
RFC PATCH 4/4 qt4-tools-nativesdk: improve and tidy up qmake build
In reply to Paul Eggleton* 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
--- 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
meta/recipes-qt/qt4/files/qmake-exists-check.patch deleted +0 -19
@@ -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 <[email protected]> -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=
meta/recipes-qt/qt4/qt4-tools-nativesdk.inc +13 -9
@@ -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/linux-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
meta/recipes-qt/qt4/qt4-tools-nativesdk_4.8.0.bb +2 -0
@@ -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"
Signature · 1 line
1.7.5.4
Quoted 6 lines · Paul Eggleton
Please review the following changes for suitability for inclusion. If you have
any objections or suggestions for improvement, please respond to the patches. If
you agree with the changes, please provide your Acked-by.
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