diff options
-rw-r--r-- | recipes-qt/qt5/qt5.inc | 11 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase.inc | 61 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase/qmake.conf.sh | 1 |
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 += " \ | |||
56 | " | 56 | " |
57 | 57 | ||
58 | do_configure() { | 58 | do_configure() { |
59 | # set_arch | ||
59 | set_endian | 60 | set_endian |
60 | 61 | ||
61 | if [ ! -e bin/qmake ]; then | 62 | if [ ! -e bin/qmake ]; then |
@@ -66,13 +67,9 @@ do_configure() { | |||
66 | ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++ | 67 | ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++ |
67 | fi | 68 | fi |
68 | 69 | ||
69 | if [ -f mkspecs/common/g++-unix.conf ] ; then | 70 | # replace common files with our version |
70 | # mkspecs were refactored for 4.8.0 | 71 | cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf |
71 | cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf | 72 | cp -f ${WORKDIR}/linux.conf mkspecs/common/linux.conf |
72 | else | ||
73 | cp -f ${WORKDIR}/g++.conf mkspecs/common/g++.conf | ||
74 | fi | ||
75 | cp -f ${WORKDIR}/linux.conf mkspecs/common/ | ||
76 | 73 | ||
77 | # Avoid problems with the linkers, since we want the linker to be g++ | 74 | # Avoid problems with the linkers, since we want the linker to be g++ |
78 | unset LD | 75 | 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 += " \ | |||
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} |
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} | |||
35 | QMAKE_LINK = ${OE_QMAKE_LINK} | 35 | QMAKE_LINK = ${OE_QMAKE_LINK} |
36 | QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK} | 36 | QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK} |
37 | QMAKE_CONF_COMPILER = ${OE_QMAKE_CONF_COMPILER} | 37 | QMAKE_CONF_COMPILER = ${OE_QMAKE_CONF_COMPILER} |
38 | QMAKE_QT_CONFIG = ${OE_QMAKE_QT_CONFIG} | ||
38 | 39 | ||
39 | load(qt_config) | 40 | load(qt_config) |
40 | EOF | 41 | EOF |