diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc index 8ed4c2883c..2a0ae591f3 100644 --- a/recipes-qt/qt5/qt5.inc +++ b/recipes-qt/qt5/qt5.inc @@ -56,6 +56,7 @@ QT_CONFIG_FLAGS += " \ " do_configure() { +# set_arch set_endian if [ ! -e bin/qmake ]; then @@ -66,13 +67,9 @@ do_configure() { ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++ fi - if [ -f mkspecs/common/g++-unix.conf ] ; then - # mkspecs were refactored for 4.8.0 - cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf - else - cp -f ${WORKDIR}/g++.conf mkspecs/common/g++.conf - fi - cp -f ${WORKDIR}/linux.conf mkspecs/common/ + # replace common files with our version + cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf + cp -f ${WORKDIR}/linux.conf mkspecs/common/linux.conf # Avoid problems with the linkers, since we want the linker to be g++ unset LD diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index ec46db129d..f92d37ea33 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc @@ -12,13 +12,16 @@ SRC_URI += " \ DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}" # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h -# DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" +XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" # reenable when we switch to "-qt-xcb" and build of +# DEPENDS += "${XCB_DEPENDS}" +# QT_MODULE_FLAGS = "-qt-xcb" # src/platformsupport/glxconvenience/ is resolved to be before build of # src/plugins/platforms/xcb/ QT_MODULE_FLAGS = "-no-xcb" + INC_PR = "r0" QT_BASE_NAME = "qt5" @@ -29,28 +32,32 @@ ARM_INSTRUCTION_SET = "arm" inherit qmake5 +do_generate_qt_config_file() { + : + cat > ${WORKDIR}/qt.conf < mkspecs/${TARGET_OS}-oe-g++/qmake.conf - - ### Fix up prl and pkgconfig lib paths, by default they will point to /usr/lib - ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_LIBS ${STAGING_LIBDIR} - sed -i 's/QT_INSTALL_LIBS\/raw/OE_CROSS_INSTALL_LIBS/g' mkspecs/features/qt_module.prf - - # in qtbase case we want to find qmodule.pri in ${S}/mkspec - # ./features/qt_build_config.prf: QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri - echo "HostData = ${S}" >> ${QT_CONF_PATH} + # qtbase is exception, create mkspecs for it + if [ ! -e ${OE_XQMAKESPEC} ]; then + mkdir -p ${OE_XQMAKESPEC} + bash ${WORKDIR}/qmake.conf.sh > ${OE_XQMAKESPEC}/qmake.conf + fi ./configure -v \ -dont-process \ @@ -58,7 +65,7 @@ do_configure_append() { -prefix ${prefix} \ -bindir ${bindir} \ -libdir ${libdir} \ - -datadir ${datadir}/${QT_DIR_NAME} \ + -datadir ${S} \ -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ -docdir ${docdir}/${QT_DIR_NAME} \ -headerdir ${includedir}/${QT_DIR_NAME} \ @@ -66,20 +73,18 @@ do_configure_append() { -importdir ${libdir}/${QT_DIR_NAME}/imports \ -translationdir ${datadir}/${QT_DIR_NAME}/translations \ -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ - -platform ${TARGET_OS}-oe-g++ \ - -xplatform ${TARGET_OS}-oe-g++ \ + -hostdatadir ${S} \ + -hostbindir ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME} \ + -platform ${OE_QMAKESPEC} \ + -xplatform ${OE_XQMAKESPEC} \ ${QT_CONFIG_FLAGS} - ### 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) - export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" ${OE_QMAKE_QMAKE} -r -d } do_compile_append() { # Build qmake for the target arch cd ${S}/qmake - export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" ${OE_QMAKE_QMAKE} oe_runmake CC="${CC}" CXX="${CXX}" cd ${S} diff --git a/recipes-qt/qt5/qtbase/qmake.conf.sh b/recipes-qt/qt5/qtbase/qmake.conf.sh index 49d9de2ad8..a3164d6893 100644 --- a/recipes-qt/qt5/qtbase/qmake.conf.sh +++ b/recipes-qt/qt5/qtbase/qmake.conf.sh @@ -35,6 +35,7 @@ QMAKE_CXX = ${OE_QMAKE_CXX} QMAKE_LINK = ${OE_QMAKE_LINK} QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK} QMAKE_CONF_COMPILER = ${OE_QMAKE_CONF_COMPILER} +QMAKE_QT_CONFIG = ${OE_QMAKE_QT_CONFIG} load(qt_config) EOF