Investigate adding Qt5
Context
Qt5 is a fairly widely used toolkit that currently is only provide by the KDE runtime which is large and has shorter support cycles.
Description
As a test I have built Qt5 on top of 18.08:
id: org.freedesktop.Platform.Qt5
runtime: org.freedesktop.Platform
runtime-version: '18.08'
sdk: org.freedesktop.Sdk
cleanup:
- /bin
- /include
- /mkspecs
- /doc
build-options:
cflags: -02 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2
cxxflags: -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2
ldflags: -fstack-protector-strong -Wl,-z,relro,-z,now
modules:
- name: qt5-qtbase
config-opts:
- -confirm-license
- -opensource
- -shared
- -platform
- linux-g++
- -optimized-qmake
- -nomake
- examples
- -nomake
- tests
- -system-harfbuzz
- -system-sqlite
- -accessibility
- -dbus-linked
- -fontconfig
- -glib
- -icu
- -openssl-linked
- -no-pch
- -no-rpath
- -no-directfb
- -no-linuxfb
- -no-kms
- -no-cups
- -system-proxies
- -gtk
sources:
- type: archive
url: https://download.qt.io/archive/qt/5.9/5.9.6/submodules/qtbase-opensource-src-5.9.6.tar.xz
sha256: eed620cb268b199bd83b3fc6a471c51d51e1dc2dbb5374fc97a0cc75facbe36f
# NOTE: KDE has a handful of patches on top of this
- name: qt5-wayland
buildsystem: qmake
sources:
- type: archive
url: https://download.qt.io/archive/qt/5.9/5.9.6/submodules/qtwayland-opensource-src-5.9.6.tar.xz
sha256: 6dd066b1ab518b16dc2bebc4b3629528a30161cfce48ce5d8482c67a570667d8
# Other modules in KDE runtime:
# qtsvg qtx11extras qtquickcontrols2 qtxmlpatterns, might be worth adding
# qtconnectivity qtvirtualkeyboard qttools, unknown
# libdbusmenuqt, probably valuable but not part of qt
# qtdeclarative, is deprecated
# qtwebchannel qtwebsockets qtwebengine, beyond scope of this
# qtimageformats, beyond scope, bundles somes libs
# qtscript bundles javascriptcore, probably best to skip
# qtmultimedia qtsensors qtlocation qtserialport qtcharts qt3d qtgraphicaleffects, probably beyond scope
The resulting platform size is 44.7MB.
There are some more questions about a few more modules we may want to bundle that I noted above.
To get the answer to this probably is best done by looking at the packages on Flathub.
A big problem with just punting the optional modules to applications is every minor qt update requires a rebuild of all modules. So 5.9.7 would break applications bundling modules.
Edited by TingPing