diff options
| -rw-r--r-- | classes/qmake5_base.bbclass | 23 | ||||
| -rw-r--r-- | recipes-qt/qt5/qt5.inc | 4 | ||||
| -rw-r--r-- | recipes-qt/qt5/qt5module.inc | 6 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase.inc | 24 |
4 files changed, 46 insertions, 11 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 5f83d12d..dd58dacf 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass | |||
| @@ -91,3 +91,26 @@ EOF | |||
| 91 | # HostSpec The location where to install host mkspec | 91 | # HostSpec The location where to install host mkspec |
| 92 | 92 | ||
| 93 | addtask generate_qt_config_file after do_patch before do_configure | 93 | addtask generate_qt_config_file after do_patch before do_configure |
| 94 | |||
| 95 | qmake5_base_do_configure () { | ||
| 96 | if [ -z "${QMAKE_PROFILES}" ]; then | ||
| 97 | PROFILES="`ls ${S}/*.pro`" | ||
| 98 | else | ||
| 99 | PROFILES="${QMAKE_PROFILES}" | ||
| 100 | bbnote "qmake using profiles: '${QMAKE_PROFILES}'" | ||
| 101 | fi | ||
| 102 | |||
| 103 | if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then | ||
| 104 | AFTER="-after" | ||
| 105 | QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}" | ||
| 106 | bbnote "qmake postvar substitution: '${EXTRA_QMAKEVARS_POST}'" | ||
| 107 | fi | ||
| 108 | |||
| 109 | if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then | ||
| 110 | QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}" | ||
| 111 | bbnote "qmake prevar substitution: '${EXTRA_QMAKEVARS_PRE}'" | ||
| 112 | fi | ||
| 113 | |||
| 114 | CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} -r $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST" | ||
| 115 | $CMD || die "Error calling $CMD" | ||
| 116 | } | ||
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc index a4ac90b6..4e78577a 100644 --- a/recipes-qt/qt5/qt5.inc +++ b/recipes-qt/qt5/qt5.inc | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Copyright (C) 2012 O.S. Systems Software LTDA. | 1 | # Copyright (C) 2012 O.S. Systems Software LTDA. |
| 2 | 2 | ||
| 3 | inherit qmake5_base | 3 | inherit qmake5 |
| 4 | 4 | ||
| 5 | # Qt5 is dependent on icu for localization | 5 | # Qt5 is dependent on icu for localization |
| 6 | ICU = "icu " | 6 | ICU = "icu " |
| @@ -71,6 +71,8 @@ do_configure() { | |||
| 71 | # Existing separate build directory, exists, remove | 71 | # Existing separate build directory, exists, remove |
| 72 | rm -rf "${B}/*" | 72 | rm -rf "${B}/*" |
| 73 | fi | 73 | fi |
| 74 | |||
| 75 | qmake5_base_do_configure | ||
| 74 | } | 76 | } |
| 75 | 77 | ||
| 76 | do_compile() { | 78 | do_compile() { |
diff --git a/recipes-qt/qt5/qt5module.inc b/recipes-qt/qt5/qt5module.inc index 45053f0b..bbb05a65 100644 --- a/recipes-qt/qt5/qt5module.inc +++ b/recipes-qt/qt5/qt5module.inc | |||
| @@ -1,9 +1,3 @@ | |||
| 1 | require qt5.inc | 1 | require qt5.inc |
| 2 | 2 | ||
| 3 | DEPENDS += "qtbase" | 3 | DEPENDS += "qtbase" |
| 4 | |||
| 5 | inherit qmake5 | ||
| 6 | |||
| 7 | do_configure_append () { | ||
| 8 | ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S} | ||
| 9 | } | ||
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 0a8b7397..531c88fe 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc | |||
| @@ -49,12 +49,28 @@ EXTRA_ENV = 'QMAKE="bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} -after \ | |||
| 49 | # qtbase is exception, we need to use mkspecs from ${S} | 49 | # qtbase is exception, we need to use mkspecs from ${S} |
| 50 | QMAKE_MKSPEC_PATH = "${B}" | 50 | QMAKE_MKSPEC_PATH = "${B}" |
| 51 | 51 | ||
| 52 | do_configure_append() { | 52 | # another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location |
| 53 | OE_QMAKE_QMAKE_ORIG := "${OE_QMAKE_QMAKE}" | ||
| 54 | OE_QMAKE_QMAKE = "bin/qmake" | ||
| 55 | |||
| 56 | do_configure() { | ||
| 57 | set_arch | ||
| 58 | set_endian | ||
| 59 | |||
| 60 | # Avoid problems with the linkers, since we want the linker to be g++ | ||
| 61 | unset LD | ||
| 62 | |||
| 63 | # Similar logic is in autotools.bbclass | ||
| 64 | if [ -d ${B} -a "${S}" != "${B}" ] ; then | ||
| 65 | # Existing separate build directory, exists, remove | ||
| 66 | rm -rf "${B}/*" | ||
| 67 | fi | ||
| 68 | |||
| 53 | # we need symlink in path relative to source, because | 69 | # we need symlink in path relative to source, because |
| 54 | # EffectivePaths:Prefix is relative to qmake location | 70 | # EffectivePaths:Prefix is relative to qmake location |
| 55 | if [ ! -e ${B}/bin/qmake ]; then | 71 | if [ ! -e ${B}/bin/qmake ]; then |
| 56 | mkdir ${B}/bin | 72 | mkdir ${B}/bin |
| 57 | ln -sf ${OE_QMAKE_QMAKE} ${B}/bin/qmake | 73 | ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake |
| 58 | fi | 74 | fi |
| 59 | 75 | ||
| 60 | ${S}/configure -v \ | 76 | ${S}/configure -v \ |
| @@ -83,8 +99,8 @@ do_configure_append() { | |||
| 83 | -platform ${OE_QMAKESPEC} \ | 99 | -platform ${OE_QMAKESPEC} \ |
| 84 | -xplatform linux-oe-g++ \ | 100 | -xplatform linux-oe-g++ \ |
| 85 | ${QT_CONFIG_FLAGS} | 101 | ${QT_CONFIG_FLAGS} |
| 86 | 102 | ||
| 87 | bin/qmake -r ${OE_QMAKE_DEBUG_OUTPUT} ${S} | 103 | qmake5_base_do_configure |
| 88 | } | 104 | } |
| 89 | 105 | ||
| 90 | do_compile_append() { | 106 | do_compile_append() { |
