From b514c5d67a259457383db532151a4bf6f482d158 Mon Sep 17 00:00:00 2001 From: Mikko Levonmaa Date: Wed, 5 Dec 2012 13:50:46 -0800 Subject: [PATCH] Updated QT_CONF_PATH default values in qmake5_base This allows the subsequent modules to install correctly. Also during do_configure we stage target specific file into the staging area and modify some prf files inorder to make the module (qt_lib_.pri) files install correctly Signed-off-by: Mikko Levonmaa --- classes/qmake5_base.bbclass | 12 ++++++------ recipes-qt/qt5/qt5.inc | 38 ++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 7012d0d741..014d46183a 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -17,13 +17,13 @@ do_generate_qt_config_file() { export QT_CONF_PATH=${WORKDIR}/qt.conf cat > ${WORKDIR}/qt.conf < mkspecs/${TARGET_OS}-oe-g++/qmake.conf + ### This copying needs to take place every time as the installation will + ### change.. CHECK THIS mkdir -p ${STAGING_DATADIR}/${QT_DIR_NAME} - cp -r ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs + cp -r ${STAGING_DATADIR_NATIVE}/${QT_DIR_NAME}/mkspecs ${STAGING_DATADIR}/${QT_DIR_NAME}/ + ### Make sure that modules are installed correctly + sed -i '/pritarget/s/HOST_DATA/INSTALL_DATA/' ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/features/qt_installs.prf + rm -rf ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/modules* + rm ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/*.pri + + ### This will make sure that our mkspecs wil leventually end up in STAGING_DATADIR + ### Consider doing this as a patch!! + sed -i '/mkspecs\.path/s/HOST_DATA/INSTALL_DATA/' qtbase.pro + sed -i '/pritarget/s/HOST_DATA/INSTALL_DATA/' mkspecs/features/qt_installs.prf echo "[Paths]" > $QT_CONF_PATH echo "Binaries=${bindir}" >> $QT_CONF_PATH @@ -101,6 +112,7 @@ do_configure() { echo "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH ./configure -v \ + -dont-process \ -opensource -confirm-license \ -prefix ${prefix} \ -bindir ${bindir} \ @@ -124,9 +136,14 @@ do_configure() { ### 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 + + ### As we provided the '-dont-process' switch inorder to allow us to stage a few files + ### generated by the configure we need to manually run qmake the generate _all_ the Makefiles (-r) + ${OE_QMAKE_QMAKE} -r -d } do_compile() { + unset CFLAGS CXXFLAGS AR oe_runmake ${EXTRA_ENV} @@ -141,7 +158,8 @@ do_compile() { do_install() { oe_runmake install INSTALL_ROOT=${D} - # Fix up the binaries to the right location + ### Fix up the binaries to the right location + ### TODO: FIX install -d ${D}${bindir}/ mv ${D}/${STAGING_BINDIR_NATIVE}/* ${D}${bindir}/ rm -rf ${D}/${STAGING_BINDIR_NATIVE}/ @@ -153,11 +171,17 @@ do_install() { FILES_${PN} = "${libdir}/*.so.*" FILES_${PN}-dbg = "${libdir}/.debug/*.so.*" -FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/platforms/*" -FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/platforms/.debug/*" +FILES_${PN}-plugins = "${libdir}/${QT_DIR_NAME}/plugins/*" +FILES_${PN}-plugins-dbg = "${libdir}/${QT_DIR_NAME}/plugins/.debug/*" -FILES_${PN}-dev = "${libdir}/cmake/* ${libdir}/pkgconfig/*.pc ${libdir}/*.la ${libdir}/*.prl ${includedir}/qt5/*" +FILES_${PN}-dev = " \ + ${libdir}/cmake/* \ + ${libdir}/pkgconfig/*.pc \ + ${libdir}/*.la \ + ${libdir}/*.prl \ + ${includedir}/qt5/* \ + ${datadir}/qt5/* \ +" FILES_${PN}-staticdev = "${libdir}/libQt*.a" FILES_${PN}-tools = "${bindir}/*" -FILES_${PN}-mkspecs = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/*" -FILES_${PN}-doc = "${STAGING_DATADIR}/doc/*" +FILES_${PN}-doc = "${datadir}/doc/*"