From dcd663d2d31463b6b50c364177e3f202388675c4 Mon Sep 17 00:00:00 2001 From: Mikko Levonmaa Date: Tue, 4 Dec 2012 16:32:32 -0800 Subject: [PATCH] qtbase: mkspecs are now staged correctly They are placed under STAGING_DATADIR as they need to be kept separate from the native side. The reason for doing so is that some qt modules require native tools and the mkspecs in STAGING_DATADIR_NATIVE cannot be polluted with the target mkspecs There are still some packaging issues (From meta-qt5 rev: 17d2bf1cdd6a6b23a88a8e07dcb640e8f01115d2) Signed-off-by: Mikko Levonmaa Signed-off-by: Patrick Ohly --- meta-qt5/classes/qmake5.bbclass | 2 +- meta-qt5/classes/qmake5_base.bbclass | 3 +-- meta-qt5/recipes-qt/qt5/qt5-native.inc | 1 + meta-qt5/recipes-qt/qt5/qt5.inc | 27 ++++++++++--------- .../{files => qtbase}/0001-Always-build-uic.patch | 0 ...Allow-qt.conf-override-when-bootstrapping.patch | 31 ++++++++++++++++++++++ 6 files changed, 49 insertions(+), 15 deletions(-) rename meta-qt5/recipes-qt/qt5/{files => qtbase}/0001-Always-build-uic.patch (100%) create mode 100644 meta-qt5/recipes-qt/qt5/qtbase/0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch diff --git a/meta-qt5/classes/qmake5.bbclass b/meta-qt5/classes/qmake5.bbclass index b30b150..180cedc 100644 --- a/meta-qt5/classes/qmake5.bbclass +++ b/meta-qt5/classes/qmake5.bbclass @@ -6,7 +6,7 @@ inherit qmake5_base QT5TOOLSDEPENDS ?= "qt5-native " DEPENDS_prepend = "${QT5TOOLSDEPENDS}" -export QMAKESPEC = "${STAGING_DATADIR_NATIVE}/qt5/mkspecs/${TARGET_OS}-oe-g++" +export QMAKESPEC = "${STAGING_DATADIR}/qt5/mkspecs/${TARGET_OS}-oe-g++" export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic" export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc" export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc" diff --git a/meta-qt5/classes/qmake5_base.bbclass b/meta-qt5/classes/qmake5_base.bbclass index 5601bb9..7012d0d 100644 --- a/meta-qt5/classes/qmake5_base.bbclass +++ b/meta-qt5/classes/qmake5_base.bbclass @@ -22,8 +22,7 @@ Binaries = ${STAGING_BINDIR_NATIVE} Headers = ${STAGING_INCDIR}/qt5 Plugins = ${STAGING_LIBDIR}/qt5/plugins/ Libraries = ${STAGING_LIBDIR} -Mkspecs = ${STAGING_DATADIR}/qt5/mkspecs/ -HostData = ${STAGING_DATADIR_NATIVE}/qt5 +HostData = ${STAGING_DATADIR}/qt5 HostBinaries = ${STAGING_BINDIR_NATIVE}/ EOF } diff --git a/meta-qt5/recipes-qt/qt5/qt5-native.inc b/meta-qt5/recipes-qt/qt5/qt5-native.inc index 040b643..11cfcff 100644 --- a/meta-qt5/recipes-qt/qt5/qt5-native.inc +++ b/meta-qt5/recipes-qt/qt5/qt5-native.inc @@ -14,6 +14,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:" SRC_URI += " \ file://0001-qlibraryinfo-Allow-the-specification-of-where-to-loa.patch \ + file://0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch \ file://0001-Always-build-uic.patch \ " diff --git a/meta-qt5/recipes-qt/qt5/qt5.inc b/meta-qt5/recipes-qt/qt5/qt5.inc index 9f29792..af933de 100644 --- a/meta-qt5/recipes-qt/qt5/qt5.inc +++ b/meta-qt5/recipes-qt/qt5/qt5.inc @@ -84,6 +84,9 @@ do_configure() { cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++ bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf + mkdir -p ${STAGING_DATADIR}/${QT_DIR_NAME} + cp -r ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs + echo "[Paths]" > $QT_CONF_PATH echo "Binaries=${bindir}" >> $QT_CONF_PATH echo "Headers=${includedir}/${QT_DIR_NAME}" >> $QT_CONF_PATH @@ -95,7 +98,7 @@ do_configure() { echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH echo "HostBinaries=${STAGING_BINDIR_NATIVE}" >> $QT_CONF_PATH - echo "HostData=${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}" >> $QT_CONF_PATH + echo "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH ./configure -v \ -opensource -confirm-license \ @@ -114,13 +117,13 @@ do_configure() { -xplatform ${TARGET_OS}-oe-g++ \ ${QT_CONFIG_FLAGS} - ### Since we are utilizing the native tree for the mkspecs, update the target mkspecs there - if [ ! -e ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ ]; then - cp -rf mkspecs/${TARGET_OS}-oe-g++ ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ + ### Since we are pointing our host data we need to get them there before compile + if [ ! -e ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ ]; then + cp -rf mkspecs/${TARGET_OS}-oe-g++ ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++ fi - ### qmodule.pri and qconfig.pri contain target specific stuff - cp -f mkspecs/qmodule.pri ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs/qmodule.pri - cp -f mkspecs/qconfig.pri ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs/qconfig.pri + ### qmodule.pri and qconfig.pri contain target specific stuff copy them over as well + cp -f mkspecs/qmodule.pri ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/qmodule.pri + cp -f mkspecs/qconfig.pri ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/qconfig.pri } do_compile() { @@ -150,11 +153,11 @@ do_install() { FILES_${PN} = "${libdir}/*.so.*" FILES_${PN}-dbg = "${libdir}/.debug/*.so.*" -FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/platforms/*.so" -FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/platforms/.debug/*.so" +FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/platforms/*" +FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/platforms/.debug/*" FILES_${PN}-dev = "${libdir}/cmake/* ${libdir}/pkgconfig/*.pc ${libdir}/*.la ${libdir}/*.prl ${includedir}/qt5/*" FILES_${PN}-staticdev = "${libdir}/libQt*.a" -FILES_${PN}-tools = "${bindir}/qmake" -FILES_${PN}-mkspecs = "${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs/*" -FILES_${PN}-doc = "${STAGING_DATADIR_NATIVE}/doc/*" +FILES_${PN}-tools = "${bindir}/*" +FILES_${PN}-mkspecs = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/*" +FILES_${PN}-doc = "${STAGING_DATADIR}/doc/*" diff --git a/meta-qt5/recipes-qt/qt5/files/0001-Always-build-uic.patch b/meta-qt5/recipes-qt/qt5/qtbase/0001-Always-build-uic.patch similarity index 100% rename from meta-qt5/recipes-qt/qt5/files/0001-Always-build-uic.patch rename to meta-qt5/recipes-qt/qt5/qtbase/0001-Always-build-uic.patch diff --git a/meta-qt5/recipes-qt/qt5/qtbase/0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch b/meta-qt5/recipes-qt/qt5/qtbase/0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch new file mode 100644 index 0000000..6c9affa --- /dev/null +++ b/meta-qt5/recipes-qt/qt5/qtbase/0003-qtbase-Allow-qt.conf-override-when-bootstrapping.patch @@ -0,0 +1,31 @@ +From 40e6c0f88774b55111c63ed28bba626141797476 Mon Sep 17 00:00:00 2001 +From: Mikko Levonmaa +Date: Tue, 4 Dec 2012 15:32:33 -0800 +Subject: [PATCH 3/3] qtbase: Allow qt.conf override when bootstrapping + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Mikko Levonmaa +--- + qmake/option.cpp | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/qmake/option.cpp b/qmake/option.cpp +index 91c154a..a4f3a85 100644 +--- a/qmake/option.cpp ++++ b/qmake/option.cpp +@@ -647,6 +647,11 @@ qmakeAddCacheClear(qmakeCacheClearFunc func, void **data) + + QString qt_libraryInfoFile() + { ++ QString qtconfig = QFile::decodeName(getenv("QT_CONF_PATH")); ++ if (QFile::exists(qtconfig)) { ++ printf("Overriding with qt.conf from: %s\n", qtconfig.toLatin1().data()); ++ return qtconfig; ++ } + if (!Option::globals->qmake_abslocation.isEmpty()) + return QDir(QFileInfo(Option::globals->qmake_abslocation).absolutePath()).filePath("qt.conf"); + return QString(); +-- +1.7.4.1 + -- 2.7.4