diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-03-30 04:04:20 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-17 16:10:02 +0200 |
commit | 85b0bb644509e04c0132dc027f288d6f22ffb19e (patch) | |
tree | 4ba4d82365fb1b2b103339ee91c5c6a862d14aee /recipes-qt/qt5/qtbase.inc | |
parent | 2b5c531b22703025e67b2f207db91ea178f7ead5 (diff) | |
download | meta-qt5-85b0bb644509e04c0132dc027f288d6f22ffb19e.tar.gz |
qtbase: correctly configure
Diffstat (limited to 'recipes-qt/qt5/qtbase.inc')
-rw-r--r-- | recipes-qt/qt5/qtbase.inc | 61 |
1 files changed, 33 insertions, 28 deletions
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 += " \ | |||
12 | DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}" | 12 | DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}" |
13 | 13 | ||
14 | # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h | 14 | # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h |
15 | # DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" | 15 | XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus" |
16 | # reenable when we switch to "-qt-xcb" and build of | 16 | # reenable when we switch to "-qt-xcb" and build of |
17 | # DEPENDS += "${XCB_DEPENDS}" | ||
18 | # QT_MODULE_FLAGS = "-qt-xcb" | ||
17 | # src/platformsupport/glxconvenience/ is resolved to be before build of | 19 | # src/platformsupport/glxconvenience/ is resolved to be before build of |
18 | # src/plugins/platforms/xcb/ | 20 | # src/plugins/platforms/xcb/ |
19 | 21 | ||
20 | QT_MODULE_FLAGS = "-no-xcb" | 22 | QT_MODULE_FLAGS = "-no-xcb" |
21 | 23 | ||
24 | |||
22 | INC_PR = "r0" | 25 | INC_PR = "r0" |
23 | 26 | ||
24 | QT_BASE_NAME = "qt5" | 27 | QT_BASE_NAME = "qt5" |
@@ -29,28 +32,32 @@ ARM_INSTRUCTION_SET = "arm" | |||
29 | 32 | ||
30 | inherit qmake5 | 33 | inherit qmake5 |
31 | 34 | ||
32 | do_configure_append() { | 35 | do_generate_qt_config_file() { |
33 | ### Make sure that our mkspecs will eventually end up in STAGING_DATADIR | 36 | : |
34 | ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_DATA ${datadir}/${QT_DIR_NAME} | 37 | cat > ${WORKDIR}/qt.conf <<EOF |
35 | sed -i '/mkspecs\.path/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' qtbase.pro | 38 | [Paths] |
36 | sed -i '/pritarget/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' mkspecs/features/qt_installs.prf | 39 | Binaries = ${bindir} |
37 | 40 | Libraries = ${libdir} | |
38 | ### Same applies to the module headers... | 41 | Prefix = ${prefix} |
39 | ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_HEADERS ${includedir}/${QT_DIR_NAME} | 42 | Headers = ${includedir}/${QT_DIR_NAME} |
40 | sed -i 's/QT_INSTALL_HEADERS/OE_CROSS_INSTALL_HEADERS/g' mkspecs/features/qt_installs.prf | 43 | Data = ${datadir}/${QT_DIR_NAME} |
41 | 44 | ArchData = ${libdir}/${QT_DIR_NAME} | |
42 | ### Create the mkspec for the target | 45 | Documentation = ${docdir}/${QT_DIR_NAME} |
43 | mkdir -p mkspecs/${TARGET_OS}-oe-g++ | 46 | HostData = ${S} |
44 | cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++ | 47 | HostSpecPath = ${QMAKE_MKSPEC_PATH_NATIVE} |
45 | bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf | 48 | HostBinaries = ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME} |
49 | EOF | ||
50 | } | ||
46 | 51 | ||
47 | ### Fix up prl and pkgconfig lib paths, by default they will point to /usr/lib | 52 | # qtbase is exception, we need to use mkspecs from ${S} |
48 | ${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_LIBS ${STAGING_LIBDIR} | 53 | OE_XQMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" |
49 | sed -i 's/QT_INSTALL_LIBS\/raw/OE_CROSS_INSTALL_LIBS/g' mkspecs/features/qt_module.prf | ||
50 | 54 | ||
51 | # in qtbase case we want to find qmodule.pri in ${S}/mkspec | 55 | do_configure_append() { |
52 | # ./features/qt_build_config.prf: QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri | 56 | # qtbase is exception, create mkspecs for it |
53 | echo "HostData = ${S}" >> ${QT_CONF_PATH} | 57 | if [ ! -e ${OE_XQMAKESPEC} ]; then |
58 | mkdir -p ${OE_XQMAKESPEC} | ||
59 | bash ${WORKDIR}/qmake.conf.sh > ${OE_XQMAKESPEC}/qmake.conf | ||
60 | fi | ||
54 | 61 | ||
55 | ./configure -v \ | 62 | ./configure -v \ |
56 | -dont-process \ | 63 | -dont-process \ |
@@ -58,7 +65,7 @@ do_configure_append() { | |||
58 | -prefix ${prefix} \ | 65 | -prefix ${prefix} \ |
59 | -bindir ${bindir} \ | 66 | -bindir ${bindir} \ |
60 | -libdir ${libdir} \ | 67 | -libdir ${libdir} \ |
61 | -datadir ${datadir}/${QT_DIR_NAME} \ | 68 | -datadir ${S} \ |
62 | -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ | 69 | -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ |
63 | -docdir ${docdir}/${QT_DIR_NAME} \ | 70 | -docdir ${docdir}/${QT_DIR_NAME} \ |
64 | -headerdir ${includedir}/${QT_DIR_NAME} \ | 71 | -headerdir ${includedir}/${QT_DIR_NAME} \ |
@@ -66,20 +73,18 @@ do_configure_append() { | |||
66 | -importdir ${libdir}/${QT_DIR_NAME}/imports \ | 73 | -importdir ${libdir}/${QT_DIR_NAME}/imports \ |
67 | -translationdir ${datadir}/${QT_DIR_NAME}/translations \ | 74 | -translationdir ${datadir}/${QT_DIR_NAME}/translations \ |
68 | -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ | 75 | -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ |
69 | -platform ${TARGET_OS}-oe-g++ \ | 76 | -hostdatadir ${S} \ |
70 | -xplatform ${TARGET_OS}-oe-g++ \ | 77 | -hostbindir ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME} \ |
78 | -platform ${OE_QMAKESPEC} \ | ||
79 | -xplatform ${OE_XQMAKESPEC} \ | ||
71 | ${QT_CONFIG_FLAGS} | 80 | ${QT_CONFIG_FLAGS} |
72 | 81 | ||
73 | ### As we provided the '-dont-process' switch inorder to allow us to stage a few files | ||
74 | ### generated by the configure we need to manually run qmake the generate _all_ the Makefiles (-r) | ||
75 | export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" | ||
76 | ${OE_QMAKE_QMAKE} -r -d | 82 | ${OE_QMAKE_QMAKE} -r -d |
77 | } | 83 | } |
78 | 84 | ||
79 | do_compile_append() { | 85 | do_compile_append() { |
80 | # Build qmake for the target arch | 86 | # Build qmake for the target arch |
81 | cd ${S}/qmake | 87 | cd ${S}/qmake |
82 | export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" | ||
83 | ${OE_QMAKE_QMAKE} | 88 | ${OE_QMAKE_QMAKE} |
84 | oe_runmake CC="${CC}" CXX="${CXX}" | 89 | oe_runmake CC="${CC}" CXX="${CXX}" |
85 | cd ${S} | 90 | cd ${S} |