diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-03 14:13:27 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-26 00:04:56 +0200 |
| commit | fe65aed3393cf32efe6158c615e72aea407a4bc6 (patch) | |
| tree | a51b0d621ad910b499a1ea5d84e349c8cbf3e4b7 /recipes-qt/qt5/qtbase-native.inc | |
| parent | 97738e9d62b613ea46cf8c5edb6accdff0d0b19a (diff) | |
| download | meta-qt5-fe65aed3393cf32efe6158c615e72aea407a4bc6.tar.gz | |
qtbase: improve internal build system to support OE way of building qt
* add linux-oe-g++ mkspec directly with patch
* add functions to read and eval OE_QMAKE functions from mkspec and
also export them with QMakeVar to be available also for config.tests
* add external-host-bindir parameter to skip building native tools
even when we're in fact cross-compiling (because we have them from
qtbase-native build already).
* use separated ${B} and ${S} and clean ${B} when reconfiguring
stalled qmake cache can be used when configure is reexecuted
cleaning ${B} prevents that and provide cleaner separation
* OE_QMAKE_AR cqs is added by Makefile, having it here too was causing
issues
* isEmpty(QT_EXTERNAL_HOST_BINS) doesn't work, so lets use exist()
even when it allows to incorrectly set wrong directory and build
native tools again (instead of skipping them)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase-native.inc')
| -rw-r--r-- | recipes-qt/qt5/qtbase-native.inc | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc index d601d2ce..06320aae 100644 --- a/recipes-qt/qt5/qtbase-native.inc +++ b/recipes-qt/qt5/qtbase-native.inc | |||
| @@ -5,7 +5,7 @@ HOMEPAGE = "http://qt-project.org" | |||
| 5 | 5 | ||
| 6 | INC_PR = "r1" | 6 | INC_PR = "r1" |
| 7 | 7 | ||
| 8 | inherit native | 8 | inherit native qmake5_base |
| 9 | 9 | ||
| 10 | QT_MODULE = "qtbase" | 10 | QT_MODULE = "qtbase" |
| 11 | 11 | ||
| @@ -13,18 +13,30 @@ SSTATE_SCAN_FILES += "*.pri *.prl" | |||
| 13 | QT_DIR_NAME ?= "qt5" | 13 | QT_DIR_NAME ?= "qt5" |
| 14 | 14 | ||
| 15 | SRC_URI += " \ | 15 | SRC_URI += " \ |
| 16 | file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ | 16 | file://0001-Add-linux-oe-g-platform.patch \ |
| 17 | file://0001-Always-build-uic.patch \ | 17 | file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ |
| 18 | file://qmake.conf \ | 18 | file://0003-Add-external-hostbindir-option.patch \ |
| 19 | file://0006-qt_functions-temporary-remove-isEmpty-check.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 22 | SEPB = "${WORKDIR}/build" | ||
| 23 | B = "${SEPB}" | ||
| 24 | |||
| 21 | EXTRA_ENV = 'MAKE="make -e ${PARALLEL_MAKE}"' | 25 | EXTRA_ENV = 'MAKE="make -e ${PARALLEL_MAKE}"' |
| 22 | EXTRA_OEMAKE = " MAKEFLAGS='${PARALLEL_MAKE}'" | 26 | EXTRA_OEMAKE = " MAKEFLAGS='${PARALLEL_MAKE}'" |
| 23 | 27 | ||
| 28 | QT_CONF_PATH = "${B}/qt.conf" | ||
| 29 | |||
| 30 | do_generate_qt_config_file() { | ||
| 31 | : | ||
| 32 | # echo >> ${WORKDIR}/qt.conf | ||
| 33 | } | ||
| 34 | |||
| 35 | #-dont-process | ||
| 24 | EXTRA_OECONF = " \ | 36 | EXTRA_OECONF = " \ |
| 25 | -prefix ${prefix} \ | 37 | -prefix ${prefix} \ |
| 26 | -L ${STAGING_LIBDIR_NATIVE} \ | 38 | -sysroot ${STAGING_DIR_NATIVE} \ |
| 27 | -I ${STAGING_INCDIR_NATIVE} \ | 39 | -no-gcc-sysroot \ |
| 28 | -system-zlib \ | 40 | -system-zlib \ |
| 29 | -no-libjpeg \ | 41 | -no-libjpeg \ |
| 30 | -no-libpng \ | 42 | -no-libpng \ |
| @@ -39,15 +51,14 @@ EXTRA_OECONF = " \ | |||
| 39 | -no-opengl \ | 51 | -no-opengl \ |
| 40 | -no-openssl \ | 52 | -no-openssl \ |
| 41 | -no-xcb \ | 53 | -no-xcb \ |
| 42 | -verbose -release \ | 54 | -verbose \ |
| 55 | -release \ | ||
| 43 | -prefix ${prefix} \ | 56 | -prefix ${prefix} \ |
| 44 | -bindir ${bindir}/${QT_DIR_NAME} \ | 57 | -bindir ${bindir}/${QT_DIR_NAME} \ |
| 45 | -headerdir ${includedir}/${QT_DIR_NAME} \ | 58 | -headerdir ${includedir}/${QT_DIR_NAME} \ |
| 46 | -archdatadir ${libdir}/${QT_DIR_NAME} \ | 59 | -archdatadir ${libdir}/${QT_DIR_NAME} \ |
| 47 | -datadir ${datadir}/${QT_DIR_NAME} \ | 60 | -datadir ${datadir}/${QT_DIR_NAME} \ |
| 48 | -docdir ${docdir}/${QT_DIR_NAME} \ | 61 | -docdir ${docdir}/${QT_DIR_NAME} \ |
| 49 | -hostdatadir ${datadir}/${QT_DIR_NAME} \ | ||
| 50 | -hostbindir ${bindir}/${QT_DIR_NAME} \ | ||
| 51 | -no-glib \ | 62 | -no-glib \ |
| 52 | -no-iconv \ | 63 | -no-iconv \ |
| 53 | -silent \ | 64 | -silent \ |
| @@ -55,27 +66,21 @@ EXTRA_OECONF = " \ | |||
| 55 | -nomake tests \ | 66 | -nomake tests \ |
| 56 | -nomake demos \ | 67 | -nomake demos \ |
| 57 | -no-rpath \ | 68 | -no-rpath \ |
| 69 | -platform linux-oe-g++ \ | ||
| 58 | " | 70 | " |
| 59 | 71 | ||
| 60 | # qtbase is exception, we need to use mkspecs from ${S} | ||
| 61 | QMAKE_MKSPEC_PATH_NATIVE = "${S}/mkspecs" | ||
| 62 | |||
| 63 | do_configure_prepend() { | 72 | do_configure_prepend() { |
| 64 | if [ ! -e ${OE_QMAKESPEC} ]; then | 73 | # Similar logic is in autotools.bbclass |
| 65 | mkdir -p ${OE_QMAKESPEC} | 74 | if [ -d ${B} -a "${S}" != "${B}" ] ; then |
| 66 | fi | 75 | # Existing separate build directory, exists, remove |
| 67 | # use default qplatformdefs.h from linux-g++ | 76 | rm -rf "${B}/*" |
| 68 | cp -va ${QMAKE_MKSPEC_PATH_NATIVE}/linux-g++/qplatformdefs.h ${OE_QMAKESPEC}/ | 77 | fi |
| 69 | # use modified qmake.conf which is using OE_QMAKE_* shell variables | ||
| 70 | # exported from qmake5_base.bbclass to define toolchain and flags | ||
| 71 | cp -va ${WORKDIR}/qmake.conf ${OE_QMAKESPEC}/ | ||
| 72 | } | ||
| 73 | 78 | ||
| 74 | do_configure() { | ||
| 75 | # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) | 79 | # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) |
| 76 | unset LD | 80 | unset LD |
| 77 | 81 | ||
| 78 | (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}" | 82 | (echo o; echo yes) | ${S}/configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}" |
| 83 | # bin/qmake -r -d ${S} || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}" | ||
| 79 | } | 84 | } |
| 80 | 85 | ||
| 81 | do_install() { | 86 | do_install() { |
