diff options
author | Mikko Levonmaa <mikko.levonmaa@gmail.com> | 2012-12-09 13:48:29 -0800 |
---|---|---|
committer | Mikko Levonmaa <mikko.levonmaa@gmail.com> | 2012-12-09 13:50:26 -0800 |
commit | bd6c9c28c2aa789a7f906a7ffb5bc2c18cc77884 (patch) | |
tree | a7cd2f5e827755acf96d5e21d8988ade235b807b | |
parent | 5dc4d0616a4dd00dfaaafe37317cb606a3e3863d (diff) |
qtbase: fix installations
Created new variables OE_CROSS_INSTALL_DATA and OE_CROSS_HOST_DATA
to support the installation and configuration of qtbase and dependant
modules.
Added paths for Qml2Imports
Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
-rw-r--r-- | classes/qmake5_base.bbclass | 15 | ||||
-rw-r--r-- | recipes-qt/qt5/qt5.inc | 29 |
2 files changed, 27 insertions, 17 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 014d4618..09cb3ea5 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -14,21 +14,22 @@ export OE_QMAKE_RPATH="-Wl,-rpath-link," STRIP[unexport] = "1" do_generate_qt_config_file() { - export QT_CONF_PATH=${WORKDIR}/qt.conf - cat > ${WORKDIR}/qt.conf <<EOF + + export QT_CONF_PATH=${WORKDIR}/qt.conf + cat > ${WORKDIR}/qt.conf <<EOF [Paths] Binaries = ${bindir} -Headers = ${includedir}/qt5 +Headers = ${STAGING_INCDIR}/qt5 Plugins = ${libdir}/qt5/plugins Libraries = ${libdir} +Imports = ${datadir}/qt5/imports +Qml2Imports = ${libdir}/qt5/qml +Documentation=${docdir}/qt5 Data = ${datadir}/qt5 HostData = ${STAGING_DATADIR}/qt5 HostBinaries = ${STAGING_BINDIR_NATIVE} EOF + } addtask generate_qt_config_file after do_patch before do_configure - -#EXPORT_FUNCTIONS do_configure - -#addtask configure after do_unpack do_patch before do_compile diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc index ee2175ac..ef4dbd36 100644 --- a/recipes-qt/qt5/qt5.inc +++ b/recipes-qt/qt5/qt5.inc @@ -80,23 +80,32 @@ do_configure() { # Avoid problems with the linkers, since we want the linker to be g++ unset LD + ### Make sure that our mkspecs will eventually end up in STAGING_DATADIR + ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_DATA ${datadir}/${QT_DIR_NAME} + sed -i '/mkspecs\.path/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' qtbase.pro + sed -i '/pritarget/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' mkspecs/features/qt_installs.prf + + ### Same applies to the module headers... + ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_HEADERS ${includedir}/${QT_DIR_NAME} + sed -i 's/QT_INSTALL_HEADERS/OE_CROSS_INSTALL_HEADERS/g' mkspecs/features/qt_installs.prf + + ### Create the mkspec for the target mkdir -p mkspecs/${TARGET_OS}-oe-g++ cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++ bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf - ### This copying needs to take place every time as the installation will - ### change.. CHECK THIS + ### Stage the base mkspecs so that 'HostData' will find them mkdir -p ${STAGING_DATADIR}/${QT_DIR_NAME} 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 + ### Make sure that modules are installed correctly. During configure they will pick this one + ### instead of the one from ${S}/mkspecs... + sed -i '/pritarget/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' \ + ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/features/qt_installs.prf rm -rf ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/modules* + + ### Remove the old pri files 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 @@ -109,7 +118,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}/${QT_DIR_NAME}" >> $QT_CONF_PATH + echo "HostData=${STAGING_DATADIR}/${QT_DIR_NAME}" >> $QT_CONF_PATH ./configure -v \ -dont-process \ @@ -129,7 +138,7 @@ do_configure() { -xplatform ${TARGET_OS}-oe-g++ \ ${QT_CONFIG_FLAGS} - ### Since we are pointing our host data we need to get them there before compile + ### Since we are pointing our host data we need to get them there before compilation 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 |