summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2016-03-15 13:07:11 +0200
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2016-04-13 08:18:45 +0000
commitfc91b16ed2a877412cd3a67023a6217e8671c3e4 (patch)
tree79e0af3098fc82423d36bfc25176f2b85f2607b3
parente088f366191f9a4cadc815c3d72d85086619a184 (diff)
downloadmeta-qt5-fc91b16ed2a877412cd3a67023a6217e8671c3e4.tar.gz
qt5: Add mingw support
Change-Id: Ibd6449396be71761e10c84bdb9a9b1888affc618 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r--classes/qmake5.bbclass4
-rw-r--r--classes/qmake5_base.bbclass70
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb43
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb10
-rw-r--r--recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch6
-rw-r--r--recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch55
-rw-r--r--recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch39
-rw-r--r--recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch231
-rw-r--r--recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch134
-rw-r--r--recipes-qt/qt5/qtbase_git.bb31
-rw-r--r--recipes-qt/qt5/qtdeclarative_git.bb5
-rw-r--r--recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch6
-rw-r--r--recipes-qt/qt5/qtwayland-native_git.bb2
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
14 files changed, 136 insertions, 502 deletions
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index 2b43f2e3..1a960e8f 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -17,7 +17,3 @@ do_install() {
17do_install_class-native() { 17do_install_class-native() {
18 qmake5_base_native_do_install 18 qmake5_base_native_do_install
19} 19}
20
21do_install_class-nativesdk() {
22 qmake5_base_nativesdk_do_install
23}
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index c2a84985..eb070a0a 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -30,8 +30,6 @@ EXTRA_OEMAKE = " \
30 OE_QMAKE_INCDIR_QT='${STAGING_DIR_TARGET}/${OE_QMAKE_PATH_HEADERS}' \ 30 OE_QMAKE_INCDIR_QT='${STAGING_DIR_TARGET}/${OE_QMAKE_PATH_HEADERS}' \
31" 31"
32 32
33OE_QMAKESPEC = "${QMAKE_MKSPEC_PATH_NATIVE}/mkspecs/${OE_QMAKE_PLATFORM_NATIVE}"
34OE_XQMAKESPEC = "${QMAKE_MKSPEC_PATH}/mkspecs/${OE_QMAKE_PLATFORM}"
35OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake" 33OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
36OE_QMAKE_COMPILER = "${CC}" 34OE_QMAKE_COMPILER = "${CC}"
37OE_QMAKE_CC = "${CC}" 35OE_QMAKE_CC = "${CC}"
@@ -43,14 +41,18 @@ OE_QMAKE_LDFLAGS = "${LDFLAGS}"
43OE_QMAKE_AR = "${AR}" 41OE_QMAKE_AR = "${AR}"
44OE_QMAKE_STRIP = "echo" 42OE_QMAKE_STRIP = "echo"
45OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner" 43OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
46 44OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
47# this one needs to be exported, because qmake reads it from shell env 45OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}"
48export QT_CONF_PATH = "${WORKDIR}/qt.conf"
49 46
50inherit qmake5_paths remove-libtool 47inherit qmake5_paths remove-libtool
51 48
52do_generate_qt_config_file() { 49do_generate_qt_config_file() {
53 cat > ${QT_CONF_PATH} <<EOF 50 generate_qt_config_file_paths
51 generate_qt_config_file_effective_paths
52}
53
54generate_qt_config_file_paths() {
55 cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
54[Paths] 56[Paths]
55Prefix = ${OE_QMAKE_PATH_PREFIX} 57Prefix = ${OE_QMAKE_PATH_PREFIX}
56Headers = ${OE_QMAKE_PATH_HEADERS} 58Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -70,12 +72,21 @@ Tests = ${OE_QMAKE_PATH_TESTS}
70HostBinaries = ${OE_QMAKE_PATH_HOST_BINS} 72HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
71HostData = ${OE_QMAKE_PATH_HOST_DATA} 73HostData = ${OE_QMAKE_PATH_HOST_DATA}
72HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS} 74HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
73HostSpec = ${OE_QMAKESPEC} 75HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
74TartgetSpec = ${OE_XQMAKESPEC} 76TargetSpec = ${OE_QMAKE_PLATFORM}
75ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} 77ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
76Sysroot = ${STAGING_DIR_TARGET} 78Sysroot = ${STAGING_DIR_TARGET}
77EOF 79EOF
78} 80}
81
82generate_qt_config_file_effective_paths() {
83 cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
84[EffectivePaths]
85HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
86HostData = ${OE_QMAKE_PATH_HOST_DATA}
87HostPrefix = ${STAGING_DIR_NATIVE}${prefix_native}
88EOF
89}
79# 90#
80# Allows to override following values (as in version 5.0.1) 91# Allows to override following values (as in version 5.0.1)
81# Prefix The default prefix for all paths. 92# Prefix The default prefix for all paths.
@@ -154,8 +165,8 @@ qmake5_base_do_configure () {
154 # for config.tests to read this 165 # for config.tests to read this
155 export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}" 166 export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}"
156 167
157 CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST" 168 CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
158 ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD" 169 ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
159} 170}
160 171
161qmake5_base_native_do_install() { 172qmake5_base_native_do_install() {
@@ -163,32 +174,35 @@ qmake5_base_native_do_install() {
163 find "${D}" -ignore_readdir_race -name "*.la" -delete 174 find "${D}" -ignore_readdir_race -name "*.la" -delete
164} 175}
165 176
166qmake5_base_nativesdk_do_install() { 177qmake5_base_fix_install() {
167 # Fix install paths for all 178 STAGING_PATH=$1
168 find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g" 179 if [ -d ${D}${STAGING_PATH} ] ; then
169 180 echo "Some files are installed in wrong directory ${D}${STAGING_PATH}"
170 oe_runmake install INSTALL_ROOT=${D} 181 cp -ra ${D}${STAGING_PATH}/* ${D}
182 rm -rf ${D}${STAGING_PATH}
183 # remove empty dirs
184 TMP=`dirname ${D}${STAGING_PATH}`
185 while test ${TMP} != ${D}; do
186 rmdir ${TMP}
187 TMP=`dirname ${TMP}`;
188 done
189 fi
171} 190}
172 191
173qmake5_base_do_install() { 192qmake5_base_do_install() {
174 # Fix install paths for all 193 # Fix install paths for all
175 find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g" 194 find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
195 find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
196 find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE},(INSTALL_ROOT),g"
176 197
177 oe_runmake install INSTALL_ROOT=${D} 198 oe_runmake install INSTALL_ROOT=${D}
199 find "${D}" -ignore_readdir_race -name "*.la" -delete
178 200
179 # everything except HostData and HostBinaries is prefixed with sysroot value, 201 # everything except HostData and HostBinaries is prefixed with sysroot value,
180 # but we cannot remove sysroot override, because that's useful for pkg-config etc 202 # but we cannot remove sysroot override, because that's useful for pkg-config etc
181 # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work, 203 # concurrent builds may cause qmake to regenerate Makefiles and override the above
182 # fix them manually 204 # sed changes. If that happens, move files manually to correct location.
183 if [ -d ${D}${STAGING_DIR_TARGET} ] ; then 205 qmake5_base_fix_install ${STAGING_DIR_TARGET}
184 echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}" 206 qmake5_base_fix_install ${STAGING_DIR_HOST}
185 cp -ra ${D}${STAGING_DIR_TARGET}/* ${D} 207 qmake5_base_fix_install ${STAGING_DIR_NATIVE}
186 rm -rf ${D}${STAGING_DIR_TARGET}
187 # remove empty dirs
188 TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
189 while test ${TMP} != ${D}; do
190 rmdir ${TMP}
191 TMP=`dirname ${TMP}`;
192 done
193 fi
194} 208}
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index a9a7543e..bf9875b5 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -24,8 +24,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
24# common for qtbase-native, qtbase-nativesdk and qtbase 24# common for qtbase-native, qtbase-nativesdk and qtbase
25SRC_URI += "\ 25SRC_URI += "\
26 file://0001-Add-linux-oe-g-platform.patch \ 26 file://0001-Add-linux-oe-g-platform.patch \
27 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ 27 file://0002-configure-Separate-host-and-build-platform.patch \
28 file://0003-Add-external-hostbindir-option.patch \
29 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 28 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
30 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 29 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
31 file://0006-QOpenGLPaintDevice-sub-area-support.patch \ 30 file://0006-QOpenGLPaintDevice-sub-area-support.patch \
@@ -35,7 +34,6 @@ SRC_URI += "\
35# common for qtbase-native and nativesdk-qtbase 34# common for qtbase-native and nativesdk-qtbase
36SRC_URI += " \ 35SRC_URI += " \
37 file://0009-Always-build-uic.patch \ 36 file://0009-Always-build-uic.patch \
38 file://0010-Add-external-hostbindir-option-for-native-sdk.patch \
39" 37"
40 38
41# CMake's toolchain configuration of nativesdk-qtbase 39# CMake's toolchain configuration of nativesdk-qtbase
@@ -52,10 +50,11 @@ FILES_${PN}-tools-dev = " \
52 ${FILES_SOLIBSDEV} ${libdir}/*.la \ 50 ${FILES_SOLIBSDEV} ${libdir}/*.la \
53 ${libdir}/*.prl \ 51 ${libdir}/*.prl \
54 ${OE_QMAKE_PATH_ARCHDATA}/mkspecs \ 52 ${OE_QMAKE_PATH_ARCHDATA}/mkspecs \
53 ${OE_QMAKE_PATH_LIBS}/*.prl \
55" 54"
56 55
57FILES_${PN}-tools-staticdev = " \ 56FILES_${PN}-tools-staticdev = " \
58 ${libdir}/libQt5Bootstrap.a \ 57 ${OE_QMAKE_PATH_LIBS}/*.a \
59" 58"
60 59
61FILES_${PN}-tools-dbg = " \ 60FILES_${PN}-tools-dbg = " \
@@ -90,7 +89,7 @@ OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}"
90OE_QMAKE_PATH_HOST_LIBS = "${libdir}" 89OE_QMAKE_PATH_HOST_LIBS = "${libdir}"
91 90
92do_generate_qt_config_file() { 91do_generate_qt_config_file() {
93 cat > ${QT_CONF_PATH} <<EOF 92 cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
94[Paths] 93[Paths]
95Prefix = ${OE_QMAKE_PATH_PREFIX} 94Prefix = ${OE_QMAKE_PATH_PREFIX}
96Headers = ${OE_QMAKE_PATH_HEADERS} 95Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -110,18 +109,18 @@ Tests = ${OE_QMAKE_PATH_TESTS}
110HostBinaries = ${OE_QMAKE_PATH_HOST_BINS} 109HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
111HostData = ${OE_QMAKE_PATH_HOST_DATA} 110HostData = ${OE_QMAKE_PATH_HOST_DATA}
112HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS} 111HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
113HostSpec = ${OE_QMAKESPEC} 112HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
114TartgetSpec = ${OE_XQMAKESPEC} 113TargetSpec = ${OE_QMAKE_PLATFORM}
115ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} 114ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
116Sysroot = 115Sysroot =
117EOF 116EOF
118} 117}
119 118
120do_generate_qt_config_file_append() { 119do_generate_qt_config_file_append() {
121 cat >> ${QT_CONF_PATH} <<EOF 120 cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
122 121
123[EffectivePaths] 122[EffectivePaths]
124Prefix=.. 123Prefix=${B}
125EOF 124EOF
126} 125}
127 126
@@ -139,21 +138,10 @@ export OE_QMAKE_LDFLAGS
139export OE_QMAKE_AR 138export OE_QMAKE_AR
140export OE_QMAKE_STRIP 139export OE_QMAKE_STRIP
141 140
142# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
143OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
144OE_QMAKE_QMAKE = "bin/qmake"
145
146do_configure() { 141do_configure() {
147 # we need symlink in path relative to source, because
148 # EffectivePaths:Prefix is relative to qmake location
149 if [ ! -e ${B}/bin/qmake ]; then
150 mkdir -p ${B}/bin
151 ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
152 fi
153
154 ${S}/configure -v \ 142 ${S}/configure -v \
155 -opensource -confirm-license \ 143 -opensource -confirm-license \
156 -sysroot ${STAGING_DIR_NATIVE} \ 144 -sysroot ${STAGING_DIR_TARGET} \
157 -no-gcc-sysroot \ 145 -no-gcc-sysroot \
158 -system-zlib \ 146 -system-zlib \
159 -dbus-runtime \ 147 -dbus-runtime \
@@ -188,6 +176,7 @@ do_configure() {
188 -testsdir ${OE_QMAKE_PATH_TESTS} \ 176 -testsdir ${OE_QMAKE_PATH_TESTS} \
189 -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \ 177 -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
190 -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ 178 -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
179 -host-option CROSS_COMPILE=${HOST_PREFIX} \
191 -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ 180 -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
192 -no-glib \ 181 -no-glib \
193 -no-iconv \ 182 -no-iconv \
@@ -197,11 +186,11 @@ do_configure() {
197 -nomake libs \ 186 -nomake libs \
198 -no-compile-examples \ 187 -no-compile-examples \
199 -no-rpath \ 188 -no-rpath \
200 -platform ${OE_QMAKESPEC} \ 189 -platform ${OE_QMAKE_PLATFORM_NATIVE} \
201 -xplatform linux-oe-g++ \ 190 -xplatform ${OE_QMAKE_PLATFORM} \
202 ${QT_CONFIG_FLAGS} 191 ${QT_CONFIG_FLAGS}
203 192
204 bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_CONF_PACKAGECONFIG was ${EXTRA_CONF_PACKAGECONFIG}" 193 ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_QTCONF} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_CONF_PACKAGECONFIG was ${EXTRA_CONF_PACKAGECONFIG}"
205} 194}
206 195
207do_install() { 196do_install() {
@@ -210,12 +199,6 @@ do_install() {
210 199
211 oe_runmake install INSTALL_ROOT=${D} 200 oe_runmake install INSTALL_ROOT=${D}
212 201
213 install -m 755 ${B}/bin/qmake-target ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
214
215 # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
216 # e.g. qt3d, qtwayland
217 ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
218
219 # remove things unused in nativesdk, we need the headers and libs 202 # remove things unused in nativesdk, we need the headers and libs
220 rm -rf ${D}${datadir} \ 203 rm -rf ${D}${datadir} \
221 ${D}/${OE_QMAKE_PATH_PLUGINS} \ 204 ${D}/${OE_QMAKE_PATH_PLUGINS} \
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index 0565136e..7d79b04c 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -17,8 +17,7 @@ require qt5-git.inc
17# common for qtbase-native, qtbase-nativesdk and qtbase 17# common for qtbase-native, qtbase-nativesdk and qtbase
18SRC_URI += "\ 18SRC_URI += "\
19 file://0001-Add-linux-oe-g-platform.patch \ 19 file://0001-Add-linux-oe-g-platform.patch \
20 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ 20 file://0002-configure-Separate-host-and-build-platform.patch \
21 file://0003-Add-external-hostbindir-option.patch \
22 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 21 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
23 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 22 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
24 file://0006-QOpenGLPaintDevice-sub-area-support.patch \ 23 file://0006-QOpenGLPaintDevice-sub-area-support.patch \
@@ -29,19 +28,15 @@ SRC_URI += "\
29# common for qtbase-native and nativesdk-qtbase 28# common for qtbase-native and nativesdk-qtbase
30SRC_URI += " \ 29SRC_URI += " \
31 file://0009-Always-build-uic.patch \ 30 file://0009-Always-build-uic.patch \
32 file://0010-Add-external-hostbindir-option-for-native-sdk.patch \
33" 31"
34 32
35CLEANBROKEN = "1" 33CLEANBROKEN = "1"
36 34
37QT_CONF_PATH = "${B}/qt.conf"
38
39do_generate_qt_config_file() { 35do_generate_qt_config_file() {
40 : 36 :
41} 37}
42 38
43EXTRA_CONF_PACKAGECONFIG = " \ 39EXTRA_CONF_PACKAGECONFIG = " \
44 -prefix ${prefix} \
45 -sysroot ${STAGING_DIR_NATIVE} \ 40 -sysroot ${STAGING_DIR_NATIVE} \
46 -no-gcc-sysroot \ 41 -no-gcc-sysroot \
47 -system-zlib \ 42 -system-zlib \
@@ -63,10 +58,13 @@ EXTRA_CONF_PACKAGECONFIG = " \
63 -release \ 58 -release \
64 -prefix ${OE_QMAKE_PATH_PREFIX} \ 59 -prefix ${OE_QMAKE_PATH_PREFIX} \
65 -bindir ${OE_QMAKE_PATH_BINS} \ 60 -bindir ${OE_QMAKE_PATH_BINS} \
61 -hostbindir ${OE_QMAKE_PATH_BINS} \
66 -libdir ${OE_QMAKE_PATH_LIBS} \ 62 -libdir ${OE_QMAKE_PATH_LIBS} \
63 -hostlibdir ${OE_QMAKE_PATH_LIBS} \
67 -headerdir ${OE_QMAKE_PATH_HEADERS} \ 64 -headerdir ${OE_QMAKE_PATH_HEADERS} \
68 -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \ 65 -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
69 -datadir ${OE_QMAKE_PATH_DATA} \ 66 -datadir ${OE_QMAKE_PATH_DATA} \
67 -hostdatadir ${QMAKE_MKSPEC_PATH_NATIVE} \
70 -docdir ${OE_QMAKE_PATH_DOCS} \ 68 -docdir ${OE_QMAKE_PATH_DOCS} \
71 -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \ 69 -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
72 -no-glib \ 70 -no-glib \
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
index 1f9187b7..284e0226 100644
--- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -37,10 +37,6 @@ Subject: [PATCH 01/10] Add linux-oe-g++ platform
37 /bin/sh: line 0: test: -gt: unary operator expected 37 /bin/sh: line 0: test: -gt: unary operator expected
38 which are not fatal, but still misleading in do_configure output 38 which are not fatal, but still misleading in do_configure output
39 39
40* add -target suffix to qmake built in qtbase configure, this way we can
41 use qmake from qtbase-native, but then include qmake built for target
42 in qtbase-tools package (smilarly for nativesdk-qtbase).
43
44Upstream-Status: Inappropriate [embedded specific] 40Upstream-Status: Inappropriate [embedded specific]
45 too OE specific, probably cannot be upstreamed 41 too OE specific, probably cannot be upstreamed
46 42
@@ -161,7 +157,7 @@ index 69d0a08..a53638a 100755
161 EXEEXT= 157 EXEEXT=
162 ;; 158 ;;
163 esac 159 esac
164+ [ "$QT_CROSS_COMPILE" = "yes" ] && EXEEXT=-target 160+
165 if [ "$BUILD_ON_MAC" = "yes" ]; then 161 if [ "$BUILD_ON_MAC" = "yes" ]; then
166 echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile" 162 echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
167 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" 163 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
diff --git a/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch
new file mode 100644
index 00000000..9884976d
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch
@@ -0,0 +1,55 @@
1From 34676aae2d06271014ee4a67498e6e2f0fe97139 Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@theqtcompany.com>
3Date: Fri, 11 Mar 2016 16:00:23 +0200
4Subject: [PATCH] configure: Separate host and build platform
5
6Missing bits that were not upstreamed
7
8Change-Id: I6bfed072c9826094dcda9c7112b0c8b9d4055366
9---
10 configure | 2 +-
11 mkspecs/features/qt_functions.prf | 2 +-
12 mkspecs/features/qt_tool.prf | 1 +
13 3 files changed, 3 insertions(+), 2 deletions(-)
14
15diff --git a/configure b/configure
16index 03e89d5..2fa97d3 100755
17--- a/configure
18+++ b/configure
19@@ -3293,7 +3293,7 @@ if [ -d "$XPLATFORM" ]; then
20 else
21 XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
22 fi
23-if [ "$PLATFORM" != "$XPLATFORM" ]; then
24+if [ "$PLATFORM" != "$XPLATFORM" ] || [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
25 QT_CROSS_COMPILE=yes
26 QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
27 QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
28diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
29index 9c3414c..91d1888 100644
30--- a/mkspecs/features/qt_functions.prf
31+++ b/mkspecs/features/qt_functions.prf
32@@ -71,7 +71,7 @@ defineTest(qtHaveModule) {
33 defineTest(qtPrepareTool) {
34 cmd = $$eval(QT_TOOL.$${2}.binary)
35 isEmpty(cmd) {
36- cmd = $$[QT_HOST_BINS]/$$2
37+ cmd = $$[QT_HOST_BINS/get]/$$2
38 exists($${cmd}.pl) {
39 cmd = perl -w $$system_path($${cmd}.pl)
40 } else: contains(QMAKE_HOST.os, Windows) {
41diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
42index bdeb59c..ecc0ca2 100644
43--- a/mkspecs/features/qt_tool.prf
44+++ b/mkspecs/features/qt_tool.prf
45@@ -21,6 +21,7 @@ DEFINES *= QT_USE_QSTRINGBUILDER
46 isEmpty(MODULE):MODULE = $$TARGET
47
48 load(qt_build_paths)
49+ load(device_config)
50
51 TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
52
53--
541.9.1
55
diff --git a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
deleted file mode 100644
index 4211e0a9..00000000
--- a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 1dbcf143c0e320291514d30bcf352974595a0112 Mon Sep 17 00:00:00 2001
2From: Holger Freyther <zecke@selfish.org>
3Date: Wed, 26 Sep 2012 17:22:30 +0200
4Subject: [PATCH 02/10] qlibraryinfo: allow to set qt.conf from the outside
5 using the environment
6
7Allow to set a qt.conf from the outside using the environment. This allows
8to inject new prefixes and other paths into qmake. This is needed when using
9the same qmake binary to build qt/x11 and qt/embedded
10
11Upstream-Status: Inappropriate [embedded specific]
12 again very OE specific to read everything from environment (reusing the same
13 qmake from sstate and replacing all configured paths in it with qt.conf from
14 environment).
15
16Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
17---
18 src/corelib/global/qlibraryinfo.cpp | 5 ++++-
19 1 file changed, 4 insertions(+), 1 deletion(-)
20
21diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
22index c962f1b..893917e 100644
23--- a/src/corelib/global/qlibraryinfo.cpp
24+++ b/src/corelib/global/qlibraryinfo.cpp
25@@ -163,7 +163,10 @@ void QLibrarySettings::load()
26
27 QSettings *QLibraryInfoPrivate::findConfiguration()
28 {
29- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
30+ QByteArray config = getenv("QT_CONF_PATH");
31+ QString qtconfig = QFile::decodeName(config);
32+ if(!QFile::exists(qtconfig))
33+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
34 if (QFile::exists(qtconfig))
35 return new QSettings(qtconfig, QSettings::IniFormat);
36 #ifdef QT_BUILD_QMAKE
37--
382.7.1
39
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
deleted file mode 100644
index 2059050a..00000000
--- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
+++ /dev/null
@@ -1,231 +0,0 @@
1From 8497c1671d7dfb531ff4db43b3ce4128066e3496 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 03/10] Add -external-hostbindir option
5
6* when cross-compiling it's sometimes useful to use existing tools from machine
7 (or in OpenEmbedded built with separate native recipe) when building for target
8
9* this way we can skip bootstraping tools we already have
10
11* qt_functions: temporary remove isEmpty check
12* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
13* isEmpty works correctly only with qmake variables (e.g. $$FOO -
14 isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
15
16* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
17
18Upstream-Status: Pending
19 is a lot better for upstreaming (and it was already sort of approved by
20 Oswald) but in 5.2.0 I've noticed that he added something similar for
21 android builds
22
23Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
24Signed-off-by: Simon Busch <morphis@gravedo.de>
25Signed-off-by: Jonathan Liu <net147@gmail.com>
26
27Conflicts:
28 configure
29
30Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
31---
32 configure | 14 ++++++++++++++
33 mkspecs/features/qt_functions.prf | 6 +++++-
34 mkspecs/features/qt_tool.prf | 4 +++-
35 qtbase.pro | 16 ++++++++++++++++
36 src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
37 src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
38 src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
39 7 files changed, 44 insertions(+), 8 deletions(-)
40
41diff --git a/configure b/configure
42index a53638a..440d09d 100755
43--- a/configure
44+++ b/configure
45@@ -822,6 +822,7 @@ QT_HOST_BINS=
46 QT_HOST_LIBS=
47 QT_HOST_DATA=
48 QT_EXT_PREFIX=
49+QT_EXTERNAL_HOST_BINS=
50
51 #flags for SQL drivers
52 QT_CFLAGS_PSQL=
53@@ -941,6 +942,7 @@ while [ "$#" -gt 0 ]; do
54 -testsdir| \
55 -hostdatadir| \
56 -hostbindir| \
57+ -external-hostbindir| \
58 -hostlibdir| \
59 -extprefix| \
60 -sysroot| \
61@@ -1173,6 +1175,9 @@ while [ "$#" -gt 0 ]; do
62 extprefix)
63 QT_EXT_PREFIX="$VAL"
64 ;;
65+ external-hostbindir)
66+ QT_EXTERNAL_HOST_BINS="$VAL"
67+ ;;
68 pkg-config)
69 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
70 CFG_PKGCONFIG="$VAL"
71@@ -2435,6 +2440,10 @@ Installation options:
72 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
73 (default HOSTPREFIX)
74
75+ -external-hostbindir <dir> Use external host executables instead of building them
76+ (not used by defaut)
77+
78+
79 Configure options:
80
81 The defaults (*) are usually acceptable. A plus (+) denotes a default value
82@@ -3190,6 +3199,11 @@ fi
83 # command line and environment validation
84 #-------------------------------------------------------------------------------
85
86+# default is empty, don't call makeabs if it is empty
87+if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then
88+ QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"`
89+fi
90+
91 # update QT_CONFIG to show our current predefined configuration
92 CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
93 case "$CFG_QCONFIG" in
94diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
95index 2756f90..5d09175 100644
96--- a/mkspecs/features/qt_functions.prf
97+++ b/mkspecs/features/qt_functions.prf
98@@ -58,7 +58,11 @@ defineTest(qtHaveModule) {
99 defineTest(qtPrepareTool) {
100 cmd = $$eval(QT_TOOL.$${2}.binary)
101 isEmpty(cmd) {
102- cmd = $$[QT_HOST_BINS]/$$2
103+ QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
104+ isEmpty(QT_EXTERNAL_HOST_BINS): \
105+ cmd = $$[QT_HOST_BINS]/$$2
106+ else: \
107+ cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2
108 exists($${cmd}.pl) {
109 cmd = perl -w $$system_path($${cmd}.pl)
110 } else: contains(QMAKE_HOST.os, Windows) {
111diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
112index bdeb59c..b8c539f 100644
113--- a/mkspecs/features/qt_tool.prf
114+++ b/mkspecs/features/qt_tool.prf
115@@ -14,10 +14,12 @@ load(qt_app)
116 CONFIG += console
117 DEFINES *= QT_USE_QSTRINGBUILDER
118
119+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
120+
121 # If we are doing a prefix build, create a "module" pri which enables
122 # qtPrepareTool() to work with the non-installed build.
123 # Non-bootstrapped tools always need this because of the environment setup.
124-!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) {
125+!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)):isEmpty(QT_EXTERNAL_HOST_BINS) {
126 isEmpty(MODULE):MODULE = $$TARGET
127
128 load(qt_build_paths)
129diff --git a/qtbase.pro b/qtbase.pro
130index 663ff87..590741a 100644
131--- a/qtbase.pro
132+++ b/qtbase.pro
133@@ -37,6 +37,19 @@ CONFIG -= qt
134
135 ### installations ####
136
137+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
138+
139+#qmake
140+qmake.path = $$[QT_HOST_BINS]
141+qmake.files = $$OUT_PWD/bin/qmake
142+!isEmpty(QT_EXTERNAL_HOST_BINS) {
143+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/qmake
144+}
145+equals(QMAKE_HOST.os, Windows) {
146+ qmake.files = $${qmake.files}.exe
147+}
148+INSTALLS += qmake
149+
150 #licheck
151 licheck.path = $$[QT_HOST_BINS]
152 licheck.files = $$PWD/bin/$$QT_LICHECK
153@@ -50,6 +63,9 @@ INSTALLS += fixqt4headers
154 #syncqt
155 syncqt.path = $$[QT_HOST_BINS]
156 syncqt.files = $$PWD/bin/syncqt.pl
157+!isEmpty(QT_EXTERNAL_HOST_BINS) {
158+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl
159+}
160 INSTALLS += syncqt
161
162 # If we are doing a prefix build, create a "module" pri which enables
163diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
164index a5ed8b2..0e11a1e 100644
165--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
166+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
167@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake)
168 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
169 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
170 !!ELSE
171- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
172+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\")
173 !!ENDIF
174 _qt5_Core_check_file_exists(${imported_location})
175
176@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc)
177 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
178 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
179 !!ELSE
180- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
181+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\")
182 !!ENDIF
183 _qt5_Core_check_file_exists(${imported_location})
184
185@@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc)
186 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
187 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
188 !!ELSE
189- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
190+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\")
191 !!ENDIF
192 _qt5_Core_check_file_exists(${imported_location})
193
194diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
195index 1d94715..301af8f 100644
196--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
197+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
198@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
199 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
200 set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
201 !!ELSE
202- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
203+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
204 !!ENDIF
205 _qt5_DBus_check_file_exists(${imported_location})
206
207@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp)
208 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
209 set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
210 !!ELSE
211- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
212+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
213 !!ENDIF
214 _qt5_DBus_check_file_exists(${imported_location})
215
216diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
217index 99d87e2..5621dc0 100644
218--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
219+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
220@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic)
221 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
222 set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
223 !!ELSE
224- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
225+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\")
226 !!ENDIF
227 _qt5_Widgets_check_file_exists(${imported_location})
228
229--
2302.7.1
231
diff --git a/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch
deleted file mode 100644
index 181d145f..00000000
--- a/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1From 9598dcd8b432e0fe02f4321be09e53ce8d41f787 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 10/10] Add -external-hostbindir option for native(sdk)
5
6* when cross-compiling it's sometimes useful to use existing tools from machine
7 (or in OpenEmbedded built with separate native recipe) when building for target
8
9* this way we can skip bootstraping tools we already have
10
11* qt_functions: temporary remove isEmpty check
12* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
13* isEmpty works correctly only with qmake variables (e.g. $$FOO -
14 isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
15
16* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
17
18Upstream-Status: Pending
19 is a lot better for upstreaming (and it was already sort of approved by
20 Oswald) but in 5.2.0 I've noticed that he added something similar for
21 android builds
22
23Change-Id: I4f6e634bf0b2cb96065ee5c38b9cd8a224c3bd37
24Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
25Signed-off-by: Simon Busch <morphis@gravedo.de>
26Signed-off-by: Jonathan Liu <net147@gmail.com>
27Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
28
29Conflicts:
30 tools/configure/configureapp.cpp
31---
32 configure | 1 +
33 qmake/property.cpp | 1 +
34 src/corelib/global/qlibraryinfo.cpp | 3 ++-
35 src/corelib/global/qlibraryinfo.h | 1 +
36 tools/configure/configureapp.cpp | 11 +++++++++++
37 5 files changed, 16 insertions(+), 1 deletion(-)
38
39diff --git a/configure b/configure
40index a80f3f7..bc738a6 100755
41--- a/configure
42+++ b/configure
43@@ -3826,6 +3826,7 @@ fi
44 addConfStr "$QT_REL_HOST_BINS"
45 addConfStr "$QT_REL_HOST_LIBS"
46 addConfStr "$QT_REL_HOST_DATA"
47+addConfStr "$QT_EXTERNAL_HOST_BINS"
48 addConfStr "$shortxspec"
49 addConfStr "$shortspec"
50
51diff --git a/qmake/property.cpp b/qmake/property.cpp
52index 9ee08f4..e6ecf92 100644
53--- a/qmake/property.cpp
54+++ b/qmake/property.cpp
55@@ -63,6 +63,7 @@ static const struct {
56 { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
57 { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
58 { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true },
59+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
60 { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
61 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
62 };
63diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
64index 893917e..2da8334 100644
65--- a/src/corelib/global/qlibraryinfo.cpp
66+++ b/src/corelib/global/qlibraryinfo.cpp
67@@ -379,7 +379,7 @@ QLibraryInfo::isDebugBuild()
68 */
69
70 static const struct {
71- char key[19], value[13];
72+ char key[21], value[13];
73 } qtConfEntries[] = {
74 { "Prefix", "." },
75 { "Documentation", "doc" }, // should be ${Data}/doc
76@@ -404,6 +404,7 @@ static const struct {
77 { "HostBinaries", "bin" },
78 { "HostLibraries", "lib" },
79 { "HostData", "." },
80+ { "ExternalHostBinaries", "" },
81 { "TargetSpec", "" },
82 { "HostSpec", "" },
83 { "HostPrefix", "" },
84diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
85index 362d47d..a2326e2 100644
86--- a/src/corelib/global/qlibraryinfo.h
87+++ b/src/corelib/global/qlibraryinfo.h
88@@ -87,6 +87,7 @@ public:
89 HostBinariesPath,
90 HostLibrariesPath,
91 HostDataPath,
92+ ExternalHostBinariesPath,
93 TargetSpecPath,
94 HostSpecPath,
95 HostPrefixPath,
96diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
97index d43f700..a9c38a0 100644
98--- a/tools/configure/configureapp.cpp
99+++ b/tools/configure/configureapp.cpp
100@@ -1253,6 +1253,13 @@ void Configure::parseCmdLine()
101 dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i);
102 }
103
104+ else if (configCmdLine.at(i) == "-external-hostbindir") {
105+ ++i;
106+ if (i == argCount)
107+ break;
108+ dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i);
109+ }
110+
111 else if (configCmdLine.at(i) == "-make-tool") {
112 ++i;
113 if (i == argCount)
114@@ -4253,6 +4260,9 @@ void Configure::generateQConfigCpp()
115
116 if (dictionary["QT_REL_HOST_DATA"].isEmpty())
117 dictionary["QT_REL_HOST_DATA"] = haveHpx ? "." : dictionary["QT_REL_INSTALL_ARCHDATA"];
118+
119+ if (dictionary["QT_EXTERNAL_HOST_BINS"].isEmpty())
120+ dictionary["QT_EXTERNAL_HOST_BINS"] = haveHpx ? "bin" : dictionary["QT_REL_INSTALL_BINS"];
121
122 confStringOff = 0;
123 addConfStr(0, dictionary["QT_REL_INSTALL_DOCS"]);
124@@ -4272,6 +4282,7 @@ void Configure::generateQConfigCpp()
125 addConfStr(1, dictionary["QT_REL_HOST_BINS"]);
126 addConfStr(1, dictionary["QT_REL_HOST_LIBS"]);
127 addConfStr(1, dictionary["QT_REL_HOST_DATA"]);
128+ addConfStr(1, dictionary["QT_EXTERNAL_HOST_BINS"]);
129 addConfStr(1, targSpec);
130 addConfStr(1, hostSpec);
131
132--
1332.7.1
134
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 1de2aede..b254d8a5 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -13,8 +13,7 @@ LIC_FILES_CHKSUM = " \
13# common for qtbase-native, qtbase-nativesdk and qtbase 13# common for qtbase-native, qtbase-nativesdk and qtbase
14SRC_URI += "\ 14SRC_URI += "\
15 file://0001-Add-linux-oe-g-platform.patch \ 15 file://0001-Add-linux-oe-g-platform.patch \
16 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ 16 file://0002-configure-Separate-host-and-build-platform.patch \
17 file://0003-Add-external-hostbindir-option.patch \
18 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 17 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
19 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 18 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
20 file://0006-QOpenGLPaintDevice-sub-area-support.patch \ 19 file://0006-QOpenGLPaintDevice-sub-area-support.patch \
@@ -135,20 +134,19 @@ QT_CONFIG_FLAGS += " \
135 ${EXTRA_CONF_PACKAGECONFIG} \ 134 ${EXTRA_CONF_PACKAGECONFIG} \
136" 135"
137 136
138do_generate_qt_config_file_append() { 137OE_QMAKE_PATH_HOST_BINS = "${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}"
139 cat >> ${QT_CONF_PATH} <<EOF
140 138
139generate_qt_config_file_effective_paths() {
140 cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
141[EffectivePaths] 141[EffectivePaths]
142Prefix=.. 142Prefix=${B}
143EOF 143EOF
144} 144}
145 145
146OE_QMAKE_PATH_HOST_DATA = "${STAGING_LIBDIR}${QT_DIR_NAME}"
146# qtbase is exception, we need to use mkspecs from ${S} 147# qtbase is exception, we need to use mkspecs from ${S}
147QMAKE_MKSPEC_PATH = "${B}" 148QMAKE_MKSPEC_PATH_TARGET = "${B}"
148 149QMAKE_MKSPEC_PATH = "${S}"
149# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
150OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
151OE_QMAKE_QMAKE = "bin/qmake"
152 150
153# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell 151# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
154export OE_QMAKE_COMPILER 152export OE_QMAKE_COMPILER
@@ -162,17 +160,9 @@ export OE_QMAKE_AR
162export OE_QMAKE_STRIP 160export OE_QMAKE_STRIP
163 161
164do_configure() { 162do_configure() {
165 # we need symlink in path relative to source, because
166 # EffectivePaths:Prefix is relative to qmake location
167 if [ ! -e ${B}/bin/qmake ]; then
168 mkdir -p ${B}/bin
169 ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
170 fi
171
172 ${S}/configure -v \ 163 ${S}/configure -v \
173 -opensource -confirm-license \ 164 -opensource -confirm-license \
174 -sysroot ${STAGING_DIR_TARGET} \ 165 -sysroot ${STAGING_DIR_TARGET} \
175 -no-gcc-sysroot \
176 -prefix ${OE_QMAKE_PATH_PREFIX} \ 166 -prefix ${OE_QMAKE_PATH_PREFIX} \
177 -bindir ${OE_QMAKE_PATH_BINS} \ 167 -bindir ${OE_QMAKE_PATH_BINS} \
178 -libdir ${OE_QMAKE_PATH_LIBS} \ 168 -libdir ${OE_QMAKE_PATH_LIBS} \
@@ -191,7 +181,7 @@ do_configure() {
191 -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \ 181 -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
192 -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ 182 -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
193 -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ 183 -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
194 -platform ${OE_QMAKESPEC} \ 184 -platform ${OE_QMAKE_PLATFORM_NATIVE} \
195 -xplatform linux-oe-g++ \ 185 -xplatform linux-oe-g++ \
196 ${QT_CONFIG_FLAGS} 186 ${QT_CONFIG_FLAGS}
197 187
@@ -199,7 +189,6 @@ do_configure() {
199} 189}
200 190
201do_install_append() { 191do_install_append() {
202 install -m 0755 ${B}/bin/qmake-target ${D}/${bindir}${QT_DIR_NAME}/qmake
203 192
204 # Remove example.pro file as it is useless 193 # Remove example.pro file as it is useless
205 rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro 194 rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro
@@ -211,7 +200,7 @@ do_install_append() {
211 sed -i 's@^#!/bin/bash$@#!/bin/sh@g' ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/data/mac/objc_namespace.sh 200 sed -i 's@^#!/bin/bash$@#!/bin/sh@g' ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/data/mac/objc_namespace.sh
212 201
213 # Replace host paths with qmake built-in properties 202 # Replace host paths with qmake built-in properties
214 sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX]|g' \ 203 sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX/get]|g' \
215 -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \ 204 -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
216 ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri 205 ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
217} 206}
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
index e049e716..b02fa81d 100644
--- a/recipes-qt/qt5/qtdeclarative_git.bb
+++ b/recipes-qt/qt5/qtdeclarative_git.bb
@@ -31,6 +31,11 @@ do_configure_prepend() {
31 echo "QT_TOOL.syncqt.binary = \"${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt\"" > ${B}/.qmake.cache 31 echo "QT_TOOL.syncqt.binary = \"${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt\"" > ${B}/.qmake.cache
32} 32}
33 33
34do_install_append_class-nativesdk() {
35 # qml files not needed in nativesdk
36 rm -rf ${D}${OE_QMAKE_PATH_QML}
37}
38
34EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}" 39EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}"
35 40
36SRCREV = "ab2c5be35dd8f339ec39f52364625a53fa6d0ded" 41SRCREV = "ab2c5be35dd8f339ec39f52364625a53fa6d0ded"
diff --git a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
index bc902d30..08c86e98 100644
--- a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
+++ b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
@@ -116,9 +116,11 @@ index 387d54f..56b7d0c 100644
116-qtHaveModule(dbus): SUBDIRS += qdbus 116-qtHaveModule(dbus): SUBDIRS += qdbus
117+!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus 117+!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus
118 118
119 win32|winrt:SUBDIRS += windeployqt 119-win32|winrt:SUBDIRS += windeployqt
120 winrt:SUBDIRS += winrtrunner 120-winrt:SUBDIRS += winrtrunner
121-qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag 121-qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
122+!linguistonly:win32|winrt:SUBDIRS += windeployqt
123+!linguistonly:winrt:SUBDIRS += winrtrunner
122+!linguistonly:qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag 124+!linguistonly:qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
123 125
124 qtNomakeTools( \ 126 qtNomakeTools( \
diff --git a/recipes-qt/qt5/qtwayland-native_git.bb b/recipes-qt/qt5/qtwayland-native_git.bb
index f29836ec..20c00aa4 100644
--- a/recipes-qt/qt5/qtwayland-native_git.bb
+++ b/recipes-qt/qt5/qtwayland-native_git.bb
@@ -18,7 +18,7 @@ SRC_URI += " \
18" 18"
19 19
20do_configure() { 20do_configure() {
21 ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}/src/qtwaylandscanner 21 ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_QTCONF} -r ${S}/src/qtwaylandscanner
22} 22}
23 23
24do_install() { 24do_install() {
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index 01f7eb8c..4443638c 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -85,7 +85,7 @@ do_configure() {
85 85
86 # qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as 86 # qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as
87 # arguments here 87 # arguments here
88 ${OE_QMAKE_QMAKE} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \ 88 ${OE_QMAKE_QMAKE} ${OE_QMAKE_QTCONF} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \
89 QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \ 89 QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \
90 QMAKE_LINK="${OE_QMAKE_LINK}" \ 90 QMAKE_LINK="${OE_QMAKE_LINK}" \
91 QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \ 91 QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \