254.14. qt6-qt5compat-6.12.0
Qt 6 Core5Compat — QTextCodec, QRegExp and the Qt 5 graphical effects for code ported from Qt 5
| Version | 6.12.0, release 1 |
| Shelf | qt6 — The Qt 6 modules, and everything in `group = qt6` |
| Phase | 43_toolkits (Toolkits), 41 of 344 in build order |
| Licence | LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| Homepage | https://www.qt.io/ |
| Build time | 2.7 SBU |
| Installed size | 4.1 MiB in 144 files |
| Recipe | ports/core/qt6/qt6-qt5compat/kpkgbuild |
About
Qt 5 Compat is the Core5Compat library and the Qt 5 graphical effects for Qt 6: the classes Qt 6 removed from QtCore, QTextCodec, QRegExp, QStringRef, QLinkedList and the rest, and the Qt5Compat.GraphicalEffects QML module. A program ported from Qt 5 that still uses them links it.
Why it is in KDOS
The comment above the 27 ports from qt6-qtbase to qt6-qtmqtt in script/phases/43_toolkits/packages.d/qt6.txt:
Built with the Wayland and xcb platforms. QT_QPA_PLATFORM is
wayland;xcb, so a Qt application falls back to Xwayland only when the Wayland plugin cannot start, and QT_QPA_PLATFORMTHEME=kde makes it read its palette, fonts and icons from the kdeglobalskdos themewrites.
Sources
qt6-qt5compat-6.12.0.tar.xz(14.0 MiB)
sha25678cf1c283795312a7fa31c73eb7f7f556b48374adc484f10ad5a3c0bcb59264e
upstream: https://download.qt.io/official_releases/qt/6.12/6.12.0/submodules/qt5compat-everywhere-src-6.12.0.tar.xz
archive copy: sources-4/qt6--qt6-qt5compat-6.12.0.tar.xz
Dependencies
Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtdeclarative, qt6-qtshadertools, icu.
Required by (43): angelfish, audacity, audiotube, gnuplot, goldendict-ng, haruna, kalzium, kbackup, kdeplasma-addons, kdev-python, kdevelop, kfind, kgraphviewer, konversation, krita, ksirk, ktorrent, ktouch, kwin, libksysguard, libplasma, marble, massif-visualizer, merkuro, musescore, octave, openscad, phonon, plasma-desktop, plasma-phonebook, plasma-sdk, plasma-welcome, plasma-workspace, qca, qcad, qdirstat, qgis, qmapshack, qmlkonsole, qt-creator, quazip, qv4l2, xdg-desktop-portal-kde.
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 qt6-qt5compat'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/qt6/qt6-qt5compat.
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/qt6/qt6-qt5compat
echo '78cf1c283795312a7fa31c73eb7f7f556b48374adc484f10ad5a3c0bcb59264e qt6-qt5compat-6.12.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/qt6-qt5compat
SRC=$SRC_ROOT/qt6-qt5compat-6.12.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qt6-qt5compat-6.12.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 recipe’s helpers _module, group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p build && cd build
cmake .. -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DFEATURE_textcodec=ON \
-DFEATURE_codecs=ON \
-DFEATURE_big_codecs=ON \
-DFEATURE_iconv=OFF
ninja
DESTDIR=$PKG ninja install
The switches, and why each is set:
-DFEATURE_textcodec=ON— with-DFEATURE_codecs=ONand-DFEATURE_big_codecs=ON:QTextCodecand its codecs for non-Unicode text, each named. Because qt6-qtbase is built with ICU, the conversions go through icu: the module compiles its ICU codec, and leaves out its own CJK tables (Big5, EUC-JP, EUC-KR, GB18030, JIS, Shift-JIS), whichbig_codecsbuilds only without ICU.-DFEATURE_iconv=OFF— no conversion through iconv. Upstream’s condition for the feature is that ICU is not used, so with ICU the switch states what the configure would decide.
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/qt6-qt5compat, 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 qt6-qt5compat-6.12.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/qt6-qt5compat, and runs the triggers its paths call for.
Contents
Installed libraries: libQt6Core5Compat.so.
Installed directories: /usr/include/qt6/QtCore5Compat, /usr/lib/cmake/Qt6Core5Compat, /usr/lib/cmake/Qt6Core5CompatPrivate, /usr/lib/qt6/qml/Qt5Compat, /usr/share/licenses/qt6-qt5compat.
Short descriptions
Qt6Core5Compat.pc |
Qt Core5Compat module |
Notes
Like every Qt 6 module but qt6-qtbase, it passes no install paths of its own (see How Qt 6 is built).