257.60. qqc2-desktop-style-6.31.0
KDE Frameworks: QtQuick Controls style that follows the desktop palette and icons
| Version | 6.31.0, release 1 |
| Shelf | kf6 — KDE Frameworks 6: every port whose homepage is under invent.kde.org/frameworks, whatever it does |
| Phase | 43_toolkits (Toolkits), 180 of 344 in build order |
| Licence | (LGPL-3.0-only OR GPL-2.0-or-later) AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND (LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KFQF-Accepted-GPL OR LicenseRef-Qt-Commercial) AND (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) |
| Homepage | https://invent.kde.org/frameworks/qqc2-desktop-style |
| Build time | 0.2 SBU |
| Installed size | 7.2 MiB in 88 files |
| Recipe | ports/core/kf6/qqc2-desktop-style/kpkgbuild |
About
qqc2-desktop-style is the org.kde.desktop style of Qt Quick Controls 2: buttons, fields, menus, scroll bars and the rest drawn by the Qt Widgets style in use, Breeze for one, so a Qt Quick program looks like a Qt Widgets one beside it. It also installs Kirigami’s org.kde.desktop platform plugin, through which kirigami takes its colours from the KDE colour scheme and its icons from the icon theme. Plasma’s System Settings pages and the Kirigami applications in the tree, elisa, haruna and kdeconnect among them, draw through it.
Why it is in KDOS
The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:
The libraries KDE applications are built on, without Plasma.
Sources
qqc2-desktop-style-6.31.0.tar.xz(91.0 KiB)
sha256e01350ca31cf1250b9de0801ecba31a0406cab24c81a3e70dfc90c24acf8d717
upstream: https://download.kde.org/stable/frameworks/6.31/qqc2-desktop-style-6.31.0.tar.xz
archive copy: sources-3/kf6--qqc2-desktop-style-6.31.0.tar.xz
Dependencies
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kcolorscheme, kconfig, kiconthemes, kirigami, sonnet, libX11.
Required by (31): alligator, angelfish, arianna, audiotube, calindori, elisa, filelight, francis, haruna, itinerary, kalk, kalm, kapptemplate, kasts, kclock, kdeconnect, kdenlive, kdos-installer-gui, keepsecret, keysmith, kirigami-gallery, kmail-account-wizard, krecorder, ktrip, merkuro, minuet, neochat, plasma-desktop, plasma-integration, telly-skout, tokodon.
Patches
build.sh applies these; kpkg applies nothing by itself.
focusrect-hasfocus.patch makes the keyboard focus of a Qt Quick check box or radio button visible. Both draw their focus frame with the style’s private FocusRect item, shown while the control has the active focus, but upstream’s item never sets the style item’s hasFocus, and Breeze draws a focus frame, the line under the label, only for an option whose state has the focus. Unpatched, Tab moves the focus onto the control and no pixel changes, so a keyboard user of a System Settings page or the graphical installer cannot tell which option Space toggles. The patch binds hasFocus to the control’s activeFocus, the same condition that shows the item. It is to be offered upstream as a merge request against frameworks/qqc2-desktop-style.
focusrect-hasfocus.patch— Give FocusRect the focus state so the style draws the check box and radio button focus frame
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install qqc2-desktop-style'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/kf6/qqc2-desktop-style.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/kf6/qqc2-desktop-style
echo 'e01350ca31cf1250b9de0801ecba31a0406cab24c81a3e70dfc90c24acf8d717 qqc2-desktop-style-6.31.0.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/qqc2-desktop-style
SRC=$SRC_ROOT/qqc2-desktop-style-6.31.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qqc2-desktop-style-6.31.0.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/focusrect-hasfocus.patch"
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-D KF_SKIP_PO_PROCESSING=ON— Build none of the Qt translation catalogues underpoqm/, whichecm_install_po_files_as_qm()would compile into.qmfiles. The strings in the source are English, and the package-wide English-only rule (see Size and language policy) would remove every catalogue in another language.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/qqc2-desktop-style, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf qqc2-desktop-style-6.31.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/qqc2-desktop-style, and runs the triggers its paths call for.
Contents
Installed directories: /usr/lib/cmake/KF6QQC2DesktopStyle, /usr/lib/qt6/qml/org/kde/desktop, /usr/lib/qt6/qml/org/kde/qqc2desktopstyle, /usr/share/licenses/qqc2-desktop-style.
Notes
The configure looks for KIconThemes, KColorScheme and libX11 as optional: without kiconthemes Kirigami’s icons ignore the icon theme’s colouring, and without kcolorscheme its palette ignores the colour scheme. All three are in depends, so all three are built in. It also looks up the QML module org.kde.sonnet, the spell checking of text fields, which sonnet installs.