aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-03-30 04:04:20 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-17 16:10:02 +0200
commit85b0bb644509e04c0132dc027f288d6f22ffb19e (patch)
tree4ba4d82365fb1b2b103339ee91c5c6a862d14aee
parent2b5c531b22703025e67b2f207db91ea178f7ead5 (diff)
qtbase: correctly configure
-rw-r--r--recipes-qt/qt5/qt5.inc11
-rw-r--r--recipes-qt/qt5/qtbase.inc61
-rw-r--r--recipes-qt/qt5/qtbase/qmake.conf.sh1
3 files changed, 38 insertions, 35 deletions
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index 8ed4c288..2a0ae591 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 ec46db12..f92d37ea 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_configure_append() {
- ### 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
+do_generate_qt_config_file() {
+ :
+ cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Binaries = ${bindir}
+Libraries = ${libdir}
+Prefix = ${prefix}
+Headers = ${includedir}/${QT_DIR_NAME}
+Data = ${datadir}/${QT_DIR_NAME}
+ArchData = ${libdir}/${QT_DIR_NAME}
+Documentation = ${docdir}/${QT_DIR_NAME}
+HostData = ${S}
+HostSpecPath = ${QMAKE_MKSPEC_PATH_NATIVE}
+HostBinaries = ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}
+EOF
+}
- ### 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
+# qtbase is exception, we need to use mkspecs from ${S}
+OE_XQMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
- # 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}
+do_configure_append() {
+ # 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 49d9de2a..a3164d68 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