summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2019-05-31 14:49:58 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2019-06-07 07:00:37 +0000
commita28765bf60028e7dc59130432edf16782b77a438 (patch)
treed798c8537a4cf2a626cbb487473635b3adb4539a
parent17fb7499c12764264212b1a28eb5782c741964d5 (diff)
downloadmeta-qt5-a28765bf60028e7dc59130432edf16782b77a438.tar.gz
Allow enabling gui for native and nativesdk
Some Qt build tools may depend on QtGui, which need platform plugins for running them. Use minimal platform plugin since no interaction with the tool is expected. Add PACKAGECONFIGs that can be used to enable gui and image format plugins for the native and nativesdk builds. Task-number: AUTOSUITE-1009 Change-Id: I39a9c5612da2c84be44e55665a970ed2a2fd512f Reviewed-by: Nikolay Zamotaev <nzamotaev@luxoft.com> Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rw-r--r--classes/qmake5_base.bbclass1
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb10
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb8
3 files changed, 10 insertions, 9 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 20ff33d4..fb5f9364 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -110,6 +110,7 @@ generate_qt_config_file_effective_paths() {
110 cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF 110 cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
111[EffectivePaths] 111[EffectivePaths]
112HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} 112HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
113HostLibraries = ${STAGING_LIBDIR_NATIVE}
113HostData = ${OE_QMAKE_PATH_HOST_DATA} 114HostData = ${OE_QMAKE_PATH_HOST_DATA}
114HostPrefix = ${STAGING_DIR_NATIVE} 115HostPrefix = ${STAGING_DIR_NATIVE}
115EOF 116EOF
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 939d8c02..0efe7605 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -65,6 +65,7 @@ FILES_${PN}-dev += " \
65 65
66FILES_${PN} += " \ 66FILES_${PN} += " \
67 ${SDKPATHNATIVE}/environment-setup.d \ 67 ${SDKPATHNATIVE}/environment-setup.d \
68 ${OE_QMAKE_PATH_PLUGINS} \
68" 69"
69 70
70# qttools binaries are placed in a subdir of bin in order to avoid 71# qttools binaries are placed in a subdir of bin in order to avoid
@@ -73,6 +74,10 @@ FILES_${PN} += " \
73# disable package auto-renaming for the tools-package. 74# disable package auto-renaming for the tools-package.
74DEBIAN_NOAUTONAME_${PN} = "1" 75DEBIAN_NOAUTONAME_${PN} = "1"
75 76
77PACKAGECONFIG ?= ""
78PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
79PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpg -no-ico -no-gif,"
80
76QT_CONFIG_FLAGS += " \ 81QT_CONFIG_FLAGS += " \
77 -shared \ 82 -shared \
78 -silent \ 83 -silent \
@@ -101,12 +106,8 @@ do_configure() {
101 -no-gcc-sysroot \ 106 -no-gcc-sysroot \
102 -system-zlib \ 107 -system-zlib \
103 -dbus-runtime \ 108 -dbus-runtime \
104 -no-libjpeg \
105 -no-libpng \
106 -no-gif \
107 -no-accessibility \ 109 -no-accessibility \
108 -no-cups \ 110 -no-cups \
109 -no-gui \
110 -no-sql-mysql \ 111 -no-sql-mysql \
111 -no-sql-sqlite \ 112 -no-sql-sqlite \
112 -no-opengl \ 113 -no-opengl \
@@ -148,7 +149,6 @@ do_install() {
148 149
149 # remove things unused in nativesdk, we need the headers and libs 150 # remove things unused in nativesdk, we need the headers and libs
150 rm -rf ${D}${datadir} \ 151 rm -rf ${D}${datadir} \
151 ${D}/${OE_QMAKE_PATH_PLUGINS} \
152 ${D}${libdir}/cmake \ 152 ${D}${libdir}/cmake \
153 ${D}${libdir}/pkgconfig 153 ${D}${libdir}/pkgconfig
154 154
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index cee1a1c4..07978e9b 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -56,18 +56,18 @@ CLEANBROKEN = "1"
56XPLATFORM_toolchain-clang = "linux-oe-clang" 56XPLATFORM_toolchain-clang = "linux-oe-clang"
57XPLATFORM ?= "linux-oe-g++" 57XPLATFORM ?= "linux-oe-g++"
58 58
59PACKAGECONFIG ?= ""
60PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
61PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpg -no-ico -no-gif,"
62
59QT_CONFIG_FLAGS = " \ 63QT_CONFIG_FLAGS = " \
60 -sysroot ${STAGING_DIR_NATIVE} \ 64 -sysroot ${STAGING_DIR_NATIVE} \
61 -L${STAGING_LIBDIR_NATIVE} \ 65 -L${STAGING_LIBDIR_NATIVE} \
62 -no-gcc-sysroot \ 66 -no-gcc-sysroot \
63 -system-zlib \ 67 -system-zlib \
64 -qt-pcre \ 68 -qt-pcre \
65 -no-libjpeg \
66 -no-libpng \
67 -no-gif \
68 -no-accessibility \ 69 -no-accessibility \
69 -no-cups \ 70 -no-cups \
70 -no-gui \
71 -no-sql-mysql \ 71 -no-sql-mysql \
72 -no-sql-sqlite \ 72 -no-sql-sqlite \
73 -no-sql-psql \ 73 -no-sql-psql \