summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2019-05-31 14:49:58 +0300
committerMartin Jansa <Martin.Jansa@gmail.com>2019-07-15 13:58:40 +0000
commit8da88b098fae46e13cd7cbaf8d65dd0e99b4e0e5 (patch)
tree2cb9a483f75334cfd17b45305334edbca7d2254e
parent6463beab78606bf2c0a023b9c453a60b45d7bc0e (diff)
downloadmeta-qt5-8da88b098fae46e13cd7cbaf8d65dd0e99b4e0e5.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. Signed-off-by: Samuli Piippo <samuli.piippo@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 4650d597..3f1bba23 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 3c4f31cc..020ada23 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -66,6 +66,7 @@ FILES_${PN}-dev += " \
66 66
67FILES_${PN} += " \ 67FILES_${PN} += " \
68 ${SDKPATHNATIVE}/environment-setup.d \ 68 ${SDKPATHNATIVE}/environment-setup.d \
69 ${OE_QMAKE_PATH_PLUGINS} \
69" 70"
70 71
71# qttools binaries are placed in a subdir of bin in order to avoid 72# qttools binaries are placed in a subdir of bin in order to avoid
@@ -74,6 +75,10 @@ FILES_${PN} += " \
74# disable package auto-renaming for the tools-package. 75# disable package auto-renaming for the tools-package.
75DEBIAN_NOAUTONAME_${PN} = "1" 76DEBIAN_NOAUTONAME_${PN} = "1"
76 77
78PACKAGECONFIG ?= ""
79PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
80PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpeg -no-ico -no-gif,"
81
77QT_CONFIG_FLAGS += " \ 82QT_CONFIG_FLAGS += " \
78 -shared \ 83 -shared \
79 -silent \ 84 -silent \
@@ -102,12 +107,8 @@ do_configure() {
102 -no-gcc-sysroot \ 107 -no-gcc-sysroot \
103 -system-zlib \ 108 -system-zlib \
104 -dbus-runtime \ 109 -dbus-runtime \
105 -no-libjpeg \
106 -no-libpng \
107 -no-gif \
108 -no-accessibility \ 110 -no-accessibility \
109 -no-cups \ 111 -no-cups \
110 -no-gui \
111 -no-sql-mysql \ 112 -no-sql-mysql \
112 -no-sql-sqlite \ 113 -no-sql-sqlite \
113 -no-opengl \ 114 -no-opengl \
@@ -149,7 +150,6 @@ do_install() {
149 150
150 # remove things unused in nativesdk, we need the headers and libs 151 # remove things unused in nativesdk, we need the headers and libs
151 rm -rf ${D}${datadir} \ 152 rm -rf ${D}${datadir} \
152 ${D}/${OE_QMAKE_PATH_PLUGINS} \
153 ${D}${libdir}/cmake \ 153 ${D}${libdir}/cmake \
154 ${D}${libdir}/pkgconfig 154 ${D}${libdir}/pkgconfig
155 155
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index 715fe6b5..516315e5 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -57,18 +57,18 @@ CLEANBROKEN = "1"
57XPLATFORM_toolchain-clang = "linux-oe-clang" 57XPLATFORM_toolchain-clang = "linux-oe-clang"
58XPLATFORM ?= "linux-oe-g++" 58XPLATFORM ?= "linux-oe-g++"
59 59
60PACKAGECONFIG ?= ""
61PACKAGECONFIG[gui] = "-gui -qpa minimal,-no-gui,"
62PACKAGECONFIG[imageformats] = "-qt-libpng -qt-libjpeg -gif -ico, -no-libpng -no-libjpeg -no-ico -no-gif,"
63
60QT_CONFIG_FLAGS = " \ 64QT_CONFIG_FLAGS = " \
61 -sysroot ${STAGING_DIR_NATIVE} \ 65 -sysroot ${STAGING_DIR_NATIVE} \
62 -L${STAGING_LIBDIR_NATIVE} \ 66 -L${STAGING_LIBDIR_NATIVE} \
63 -no-gcc-sysroot \ 67 -no-gcc-sysroot \
64 -system-zlib \ 68 -system-zlib \
65 -qt-pcre \ 69 -qt-pcre \
66 -no-libjpeg \
67 -no-libpng \
68 -no-gif \
69 -no-accessibility \ 70 -no-accessibility \
70 -no-cups \ 71 -no-cups \
71 -no-gui \
72 -no-sql-mysql \ 72 -no-sql-mysql \
73 -no-sql-sqlite \ 73 -no-sql-sqlite \
74 -no-sql-psql \ 74 -no-sql-psql \