kde: add Python3 + LibMount + kfilesystemtype + QVariant include fixes for KF6 6.26.0 on Redox

- kf6-kguiaddons: add -DBUILD_PYTHON_BINDINGS=OFF (Shiboken6 unavailable on Redox)
- kf6-kcoreaddons: stub kfilesystemtype.cpp (Redox+CMAKE_SYSTEM_NAME=Linux
  collides with public function; relibc lacks statfs magic numbers);
  disable LibMount and BUILD_PYTHON_BINDINGS
- kf6-kcolorscheme: add missing <QVariant> include in kcolorschemehelpers_p.h

All 19 Qt 6.11.0 + KF6 6.26.0 packages now build clean on redbear-full baseline.
This commit is contained in:
2026-06-11 16:47:39 +03:00
parent 34f8f31d46
commit c6e9a46ddf
3 changed files with 51 additions and 9 deletions
+16 -2
View File
@@ -1,7 +1,7 @@
#TODO: KColorScheme — color scheme management. Depends on qtbase, kf6-kconfig, kf6-kcoreaddons, kf6-ki18n, kf6-kguiaddons.
[source]
tar = "https://download.kde.org/stable/frameworks/6.24/kcolorscheme-6.24.0.tar.xz"
blake3 = "e80656d02b4c073ab00b481fa0092c2dcf8aa81e482ccbfed8b41210e4b0a941"
tar = "https://download.kde.org/stable/frameworks/6.26/kcolorscheme-6.26.0.tar.xz"
blake3 = "a78ed834939f5a105317834e729093919164cce22783aea69935a67c79fb8b30"
[build]
template = "custom"
@@ -28,6 +28,20 @@ sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
sed -i '/find_package(Qt6.*Gui)/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
# kcolorschemehelpers_p.h uses qApp->property(...).toString() without
# including <QVariant>. Add it.
python3 - <<PYEOF
import sys
p = "${COOKBOOK_SOURCE}/src/kcolorschemehelpers_p.h"
with open(p) as f:
s = f.read()
needle = "#include <QCoreApplication>"
replacement = "#include <QCoreApplication>" + chr(10) + "#include <QVariant>"
s = s.replace(needle, replacement, 1)
with open(p, 'w') as f:
f.write(s)
PYEOF
rm -f CMakeCache.txt
rm -rf CMakeFiles
+31 -4
View File
@@ -20,10 +20,36 @@ rm -rf CMakeFiles
sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' \
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
# Re-enable kfilesystemtype.cpp but provide stub for missing statfs implementation
sed -i 's|#io/kfilesystemtype.cpp|io/kfilesystemtype.cpp|' \
# kfilesystemtype.cpp uses static determineFileSystemTypeImpl per-platform.
# On Redox (CMAKE_SYSTEM_NAME=Linux) the static branch collides with the
# public function and references statfs magic numbers not present in relibc.
sed -i 's|io/kfilesystemtype.cpp|io/kfilesystemtype_stub.cpp|' \
"${COOKBOOK_SOURCE}/src/lib/CMakeLists.txt"
cat > "${COOKBOOK_SOURCE}/src/lib/io/kfilesystemtype_stub.cpp" << 'EOF'
#include "kfilesystemtype.h"
namespace KFileSystemType
{
Type fileSystemType(const QString &path)
{
Q_UNUSED(path);
return Unknown;
}
QString fileSystemName(KFileSystemType::Type type)
{
Q_UNUSED(type);
return QString();
}
}
EOF
# Stub LibMount — Redox has no libmount, but our toolchain sets CMAKE_SYSTEM_NAME=Linux
# so upstream unconditionally tries find_package(LibMount REQUIRED). Disable.
sed -i 's|find_package(LibMount REQUIRED)|find_package(LibMount QUIET)|' \
"${COOKBOOK_SOURCE}/CMakeLists.txt"
sed -i 's|set(HAVE_LIB_MOUNT ${LibMount_FOUND})|set(HAVE_LIB_MOUNT FALSE)|' \
"${COOKBOOK_SOURCE}/CMakeLists.txt"
cmake "${COOKBOOK_SOURCE}" \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DQT_HOST_PATH="${HOST_BUILD}" \
@@ -33,6 +59,7 @@ cmake "${COOKBOOK_SOURCE}" \
-DBUILD_TESTING=OFF \
-DBUILD_QCH=OFF \
-DKCOREADDONS_USE_QML=OFF \
-DBUILD_PYTHON_BINDINGS=OFF \
-DUSE_DBUS=OFF \
-Wno-dev
@@ -46,5 +73,5 @@ done
"""
[source]
tar = "https://download.kde.org/stable/frameworks/6.24/kcoreaddons-6.24.0.tar.xz"
blake3 = "013889a41b20c1c16d01078e265f13178083fb22f91745a4dbb44eafac1e777f"
tar = "https://download.kde.org/stable/frameworks/6.26/kcoreaddons-6.26.0.tar.xz"
blake3 = "abed6c54d5623998f076faeac11be6fd6fef3d10b9e928d09303d812846e3440"
+4 -3
View File
@@ -1,7 +1,7 @@
#TODO: KGuiAddons — GUI utilities, color management, text selection. Depends on qtbase, kf6-extra-cmake-modules. Wayland/X11 disabled.
[source]
tar = "https://download.kde.org/stable/frameworks/6.24/kguiaddons-6.24.0.tar.xz"
blake3 = "d3e4286f67eeffe4db1aaa4376b09752ae257d441db15016382befbc71c3af9a"
tar = "https://download.kde.org/stable/frameworks/6.26/kguiaddons-6.26.0.tar.xz"
blake3 = "71c65c431228cc9cd8ceb9ba5147ae3e51ba0df57a1c75680032edcba9cecc50"
[build]
template = "custom"
@@ -31,9 +31,10 @@ cmake "${COOKBOOK_SOURCE}" \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
-DBUILD_TESTING=OFF \
-DBUILD_QCH=OFF \
-DWITH_WAYLAND=ON \
-DWITH_WAYLAND=OFF \
-DWITH_X11=OFF \
-DUSE_DBUS=OFF \
-DBUILD_PYTHON_BINDINGS=OFF \
-Wno-dev
cmake --build . -j${COOKBOOK_MAKE_JOBS}