From 2e82bad86d9be94328bf82bd087d26f77ff9206d Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Thu, 11 Jun 2026 10:56:21 +0300 Subject: [PATCH] =?UTF-8?q?recipes:=20update=20KDE/Qt/Wayland=20recipes=20?= =?UTF-8?q?=E2=80=94=20KF6=2032/32,=20KWin=20build,=20compositor=20protoco?= =?UTF-8?q?l=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- local/recipes/dev/ninja-build/recipe.toml | 2 +- local/recipes/kde/breeze/recipe.toml | 3 +- local/recipes/kde/kde-cli-tools/recipe.toml | 3 +- local/recipes/kde/kdecoration/recipe.toml | 3 +- local/recipes/kde/kf6-attica/recipe.toml | 3 +- .../kde/kf6-extra-cmake-modules/recipe.toml | 3 +- local/recipes/kde/kf6-kauth/recipe.toml | 3 +- local/recipes/kde/kf6-kbookmarks/recipe.toml | 3 +- local/recipes/kde/kf6-kcmutils/recipe.toml | 3 +- local/recipes/kde/kf6-kcodecs/recipe.toml | 3 +- .../recipes/kde/kf6-kcolorscheme/recipe.toml | 3 +- local/recipes/kde/kf6-kcompletion/recipe.toml | 3 +- local/recipes/kde/kf6-kconfig/recipe.toml | 3 +- .../kde/kf6-kconfigwidgets/recipe.toml | 3 +- local/recipes/kde/kf6-kcoreaddons/recipe.toml | 3 +- local/recipes/kde/kf6-kcrash/recipe.toml | 3 +- local/recipes/kde/kf6-kdbusaddons/recipe.toml | 3 +- .../recipes/kde/kf6-kdeclarative/recipe.toml | 3 +- local/recipes/kde/kf6-kded6/recipe.toml | 9 +- .../recipes/kde/kf6-kglobalaccel/recipe.toml | 3 +- local/recipes/kde/kf6-kguiaddons/recipe.toml | 5 +- local/recipes/kde/kf6-ki18n/recipe.toml | 3 +- local/recipes/kde/kf6-kiconthemes/recipe.toml | 3 +- local/recipes/kde/kf6-kidletime/recipe.toml | 5 +- local/recipes/kde/kf6-kio/recipe.toml | 5 +- local/recipes/kde/kf6-kitemmodels/recipe.toml | 3 +- local/recipes/kde/kf6-kitemviews/recipe.toml | 3 +- local/recipes/kde/kf6-knewstuff/recipe.toml | 3 +- .../kde/kf6-knotifications/recipe.toml | 3 +- local/recipes/kde/kf6-kpackage/recipe.toml | 3 +- local/recipes/kde/kf6-kservice/recipe.toml | 3 +- local/recipes/kde/kf6-ksvg/recipe.toml | 3 +- .../recipes/kde/kf6-ktextwidgets/recipe.toml | 3 +- local/recipes/kde/kf6-kwallet/recipe.toml | 3 +- local/recipes/kde/kf6-kwayland/recipe.toml | 3 +- .../kde/kf6-kwidgetsaddons/recipe.toml | 3 +- .../recipes/kde/kf6-kwindowsystem/recipe.toml | 5 +- local/recipes/kde/kf6-kxmlgui/recipe.toml | 3 +- local/recipes/kde/kf6-parts/recipe.toml | 3 +- local/recipes/kde/kf6-prison/recipe.toml | 3 +- local/recipes/kde/kf6-solid/recipe.toml | 3 +- local/recipes/kde/kf6-sonnet/recipe.toml | 3 +- .../kde/kf6-syntaxhighlighting/recipe.toml | 3 +- local/recipes/kde/kwin/recipe.toml | 6 +- local/recipes/kde/plasma-desktop/recipe.toml | 3 +- .../recipes/kde/plasma-framework/recipe.toml | 4 +- .../recipes/kde/plasma-workspace/recipe.toml | 3 +- local/recipes/kde/sddm/recipe.toml | 2 +- local/recipes/qt/qt6-sensors/recipe.toml | 1 + local/recipes/qt/qtbase/recipe.toml | 22 +- local/recipes/qt/qtbase/recipe.toml.bak | 746 ------------------ .../mkspecs/common/posix/qplatformdefs.h | 32 + .../qtbase/source/src/corelib/CMakeLists.txt | 56 ++ .../qtbase/source/src/corelib/global/qtypes.h | 4 + .../socket/qnativesocketengine_unix.cpp | 8 + .../source/src/network/socket/qnet_unix_p.h | 4 + .../qwaylandclientbufferintegration_p.h | 16 + .../source/src/qml/jit/qv4assemblercommon_p.h | 2 +- local/recipes/wayland/libwayland/recipe.toml | 29 + .../redbear-compositor/source/src/main.rs | 226 +++++- .../redbear-compositor/source/src/protocol.rs | 37 + .../source/tests/integration_test.rs | 96 ++- 62 files changed, 622 insertions(+), 817 deletions(-) delete mode 100644 local/recipes/qt/qtbase/recipe.toml.bak diff --git a/local/recipes/dev/ninja-build/recipe.toml b/local/recipes/dev/ninja-build/recipe.toml index 743eec1e31..b0397898ec 100644 --- a/local/recipes/dev/ninja-build/recipe.toml +++ b/local/recipes/dev/ninja-build/recipe.toml @@ -1,6 +1,6 @@ [source] git = "https://github.com/ninja-build/ninja" -rev = "v1.13.1" +rev = "26f6155f0f4ece0dec2a03efdae7834cddac726b" patches = ["redox.patch"] [build] diff --git a/local/recipes/kde/breeze/recipe.toml b/local/recipes/kde/breeze/recipe.toml index a2f714e782..7672122f1e 100644 --- a/local/recipes/kde/breeze/recipe.toml +++ b/local/recipes/kde/breeze/recipe.toml @@ -6,7 +6,8 @@ # kwin headers at configure time; disabled via CMake option. The widget style plugin should # build independently with just qtbase + KF6 deps. [source] -tar = "https://invent.kde.org/plasma/breeze/-/archive/v6.3.4/breeze-v6.3.4.tar.gz" +tar = "https://download.kde.org/stable/plasma/6.6.5/breeze-6.6.5.tar.xz" +blake3 = "a42b2edd497cc84e507fccbd6a879b36beafb6b8c70d230d02e386af4dc7fab8" [build] template = "custom" diff --git a/local/recipes/kde/kde-cli-tools/recipe.toml b/local/recipes/kde/kde-cli-tools/recipe.toml index 67ec9cf740..ed5eb4aa36 100644 --- a/local/recipes/kde/kde-cli-tools/recipe.toml +++ b/local/recipes/kde/kde-cli-tools/recipe.toml @@ -3,7 +3,8 @@ # Tools requiring X11 or DBus activation are disabled where possible. # kdesu is not built (needs sudo or kdesu backend which doesn't exist on Redox). [source] -tar = "https://invent.kde.org/plasma/kde-cli-tools/-/archive/v6.3.4/kde-cli-tools-v6.3.4.tar.gz" +tar = "https://download.kde.org/stable/plasma/6.6.5/kde-cli-tools-6.6.5.tar.xz" +blake3 = "9353f807629d43cbda250f0da206f2dfc3793f920734ea297b87c31f907686e6" [build] template = "custom" diff --git a/local/recipes/kde/kdecoration/recipe.toml b/local/recipes/kde/kdecoration/recipe.toml index d27c53c849..42387e7bf0 100644 --- a/local/recipes/kde/kdecoration/recipe.toml +++ b/local/recipes/kde/kdecoration/recipe.toml @@ -1,6 +1,7 @@ #TODO: KDecoration3 — window decoration library. Required by KWin. [source] -tar = "https://invent.kde.org/plasma/kdecoration/-/archive/v6.3.4/kdecoration-v6.3.4.tar.gz" +tar = "https://download.kde.org/stable/plasma/6.6.5/kdecoration-6.6.5.tar.xz" +blake3 = "eae7e32dcf84968edf2e26680e189ea1a07de30513f149b06698ec43799c0d73" [build] template = "custom" diff --git a/local/recipes/kde/kf6-attica/recipe.toml b/local/recipes/kde/kf6-attica/recipe.toml index 024b010672..0d5c2f0cd5 100644 --- a/local/recipes/kde/kf6-attica/recipe.toml +++ b/local/recipes/kde/kf6-attica/recipe.toml @@ -2,7 +2,8 @@ # Provides KF6::Attica cmake target needed by kf6-knewstuff. # QML, tests, and examples disabled. [source] -tar = "https://invent.kde.org/frameworks/attica/-/archive/v6.10.0/attica-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/attica-6.24.0.tar.xz" +blake3 = "aac451264d6890739fd0624972231573013b52af0be5ff4940a5ee16efd263f6" [build] template = "custom" diff --git a/local/recipes/kde/kf6-extra-cmake-modules/recipe.toml b/local/recipes/kde/kf6-extra-cmake-modules/recipe.toml index 8d93d17737..1f77c06fa8 100644 --- a/local/recipes/kde/kf6-extra-cmake-modules/recipe.toml +++ b/local/recipes/kde/kf6-extra-cmake-modules/recipe.toml @@ -28,4 +28,5 @@ cmake --install . --prefix "${COOKBOOK_STAGE}/usr" """ [source] -tar = "https://invent.kde.org/frameworks/extra-cmake-modules/-/archive/v6.10.0/extra-cmake-modules-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/extra-cmake-modules-6.24.0.tar.xz" +blake3 = "c8c7b89bf5ad246badc91cfbb6c9e3f492662b94f5865f50864cbb9c10452e31" diff --git a/local/recipes/kde/kf6-kauth/recipe.toml b/local/recipes/kde/kf6-kauth/recipe.toml index 401dbfbb9e..d8be2e8488 100644 --- a/local/recipes/kde/kf6-kauth/recipe.toml +++ b/local/recipes/kde/kf6-kauth/recipe.toml @@ -1,6 +1,7 @@ #TODO: KAuth — policykit-like authorization framework. Depends on qtbase, kf6-kcoreaddons. Still using FAKE backend until PolkitQt6-1 is packaged. [source] -tar = "https://invent.kde.org/frameworks/kauth/-/archive/v6.10.0/kauth-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kauth-6.24.0.tar.xz" +blake3 = "aacd2538a72befab1cbba383ff3ed28b7275d26258e6f35e1a5225252252b5ff" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kbookmarks/recipe.toml b/local/recipes/kde/kf6-kbookmarks/recipe.toml index 07039e92b6..1f15d26b4b 100644 --- a/local/recipes/kde/kf6-kbookmarks/recipe.toml +++ b/local/recipes/kde/kf6-kbookmarks/recipe.toml @@ -1,6 +1,7 @@ #TODO: KBookmarks — bookmark management framework. [source] -tar = "https://invent.kde.org/frameworks/kbookmarks/-/archive/v6.10.0/kbookmarks-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kbookmarks-6.24.0.tar.xz" +blake3 = "6f7f1bb3fc13e334582b18f34b044e6610ec75b62eeafa4faee54fb069af1c77" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kcmutils/recipe.toml b/local/recipes/kde/kf6-kcmutils/recipe.toml index c3caa98a4d..1d8317e283 100644 --- a/local/recipes/kde/kf6-kcmutils/recipe.toml +++ b/local/recipes/kde/kf6-kcmutils/recipe.toml @@ -1,6 +1,7 @@ #TODO: KCMUtils — System Settings control modules. Depends on kf6-kio, kf6-kdeclarative. [source] -tar = "https://invent.kde.org/frameworks/kcmutils/-/archive/v6.10.0/kcmutils-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcmutils-6.24.0.tar.xz" +blake3 = "ec2eefe0435be686077c376b6d9536453b387a829252de61df721990015a466a" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kcodecs/recipe.toml b/local/recipes/kde/kf6-kcodecs/recipe.toml index 17e191a15d..4945e2bcc9 100644 --- a/local/recipes/kde/kf6-kcodecs/recipe.toml +++ b/local/recipes/kde/kf6-kcodecs/recipe.toml @@ -1,6 +1,7 @@ #TODO: KCodecs — charset and encoding utilities. Depends on qtbase, kf6-extra-cmake-modules, kf6-ki18n. [source] -tar = "https://invent.kde.org/frameworks/kcodecs/-/archive/v6.10.0/kcodecs-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcodecs-6.24.0.tar.xz" +blake3 = "65f4d97c237545cba548661a409a4bd0c2db6b14003e0e36fd8af814d0663edc" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kcolorscheme/recipe.toml b/local/recipes/kde/kf6-kcolorscheme/recipe.toml index e604e535aa..cbb83e4c17 100644 --- a/local/recipes/kde/kf6-kcolorscheme/recipe.toml +++ b/local/recipes/kde/kf6-kcolorscheme/recipe.toml @@ -1,6 +1,7 @@ #TODO: KColorScheme — color scheme management. Depends on qtbase, kf6-kconfig, kf6-kcoreaddons, kf6-ki18n, kf6-kguiaddons. [source] -tar = "https://invent.kde.org/frameworks/kcolorscheme/-/archive/v6.10.0/kcolorscheme-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcolorscheme-6.24.0.tar.xz" +blake3 = "e80656d02b4c073ab00b481fa0092c2dcf8aa81e482ccbfed8b41210e4b0a941" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kcompletion/recipe.toml b/local/recipes/kde/kf6-kcompletion/recipe.toml index 25dceab3e1..b56d8b99a5 100644 --- a/local/recipes/kde/kf6-kcompletion/recipe.toml +++ b/local/recipes/kde/kf6-kcompletion/recipe.toml @@ -1,6 +1,7 @@ #TODO: KCompletion — auto-completion widgets and utilities [source] -tar = "https://invent.kde.org/frameworks/kcompletion/-/archive/v6.10.0/kcompletion-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcompletion-6.24.0.tar.xz" +blake3 = "4362271fcc32b8412f80a35f2c41ad473e9c7d59e9cfbeec41d6a2b5771e98cc" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kconfig/recipe.toml b/local/recipes/kde/kf6-kconfig/recipe.toml index b6dbb2fedf..32e2d165d8 100644 --- a/local/recipes/kde/kf6-kconfig/recipe.toml +++ b/local/recipes/kde/kf6-kconfig/recipe.toml @@ -1,6 +1,7 @@ #TODO: KDE KConfig — configuration framework, no GUI deps. Depends on qtbase, qtdeclarative, kf6-extra-cmake-modules. [source] -tar = "https://invent.kde.org/frameworks/kconfig/-/archive/v6.10.0/kconfig-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kconfig-6.24.0.tar.xz" +blake3 = "cc7116ebd87130accc315030fa1f175c23ebe4f5d6e9fa85e86008ae13808f29" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kconfigwidgets/recipe.toml b/local/recipes/kde/kf6-kconfigwidgets/recipe.toml index 0810a9dd00..6f03e71616 100644 --- a/local/recipes/kde/kf6-kconfigwidgets/recipe.toml +++ b/local/recipes/kde/kf6-kconfigwidgets/recipe.toml @@ -1,6 +1,7 @@ #TODO: KConfigWidgets — configuration widgets, KConfigXT. Depends on qtbase, kf6-kconfig, kf6-kcoreaddons, kf6-ki18n, kf6-kwidgetsaddons, kf6-kcodecs, kf6-kauth, kf6-kguiaddons, kf6-kcolorscheme. [source] -tar = "https://invent.kde.org/frameworks/kconfigwidgets/-/archive/v6.10.0/kconfigwidgets-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kconfigwidgets-6.24.0.tar.xz" +blake3 = "534fc5732c7c4df3dc652c1a5b9ae7983e7862c82110df24669f8ea748a241c8" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kcoreaddons/recipe.toml b/local/recipes/kde/kf6-kcoreaddons/recipe.toml index d7e90735d4..ddac2ffb1d 100644 --- a/local/recipes/kde/kf6-kcoreaddons/recipe.toml +++ b/local/recipes/kde/kf6-kcoreaddons/recipe.toml @@ -46,4 +46,5 @@ done """ [source] -tar = "https://invent.kde.org/frameworks/kcoreaddons/-/archive/v6.10.0/kcoreaddons-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcoreaddons-6.24.0.tar.xz" +blake3 = "013889a41b20c1c16d01078e265f13178083fb22f91745a4dbb44eafac1e777f" diff --git a/local/recipes/kde/kf6-kcrash/recipe.toml b/local/recipes/kde/kf6-kcrash/recipe.toml index 6f5b7c2694..5d07f9f926 100644 --- a/local/recipes/kde/kf6-kcrash/recipe.toml +++ b/local/recipes/kde/kf6-kcrash/recipe.toml @@ -1,6 +1,7 @@ #TODO: KCrash — crash handler, backtrace generation. OpenGL deps disabled for software rendering. [source] -tar = "https://invent.kde.org/frameworks/kcrash/-/archive/v6.10.0/kcrash-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kcrash-6.24.0.tar.xz" +blake3 = "40acc9c6f77333fcc590e7da50348c17944c226fdff06a7ff2466c8aeb01e176" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kdbusaddons/recipe.toml b/local/recipes/kde/kf6-kdbusaddons/recipe.toml index 4b95a9331d..aed71159f4 100644 --- a/local/recipes/kde/kf6-kdbusaddons/recipe.toml +++ b/local/recipes/kde/kf6-kdbusaddons/recipe.toml @@ -1,6 +1,7 @@ #TODO: KDBusAddons — D-Bus convenience wrappers. Needs Qt6DBus (qtbase with FEATURE_dbus=ON). [source] -tar = "https://invent.kde.org/frameworks/kdbusaddons/-/archive/v6.10.0/kdbusaddons-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kdbusaddons-6.24.0.tar.xz" +blake3 = "a6d0a498e05e6f163fbb82145e66cbd15d40b9e81a9e853b3b271766d53f33f4" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kdeclarative/recipe.toml b/local/recipes/kde/kf6-kdeclarative/recipe.toml index 2deb828be4..1826945a53 100644 --- a/local/recipes/kde/kf6-kdeclarative/recipe.toml +++ b/local/recipes/kde/kf6-kdeclarative/recipe.toml @@ -1,7 +1,8 @@ # KDeclarative — reduced real build for Red Bear OS. # QML-backed runtime pieces stay disabled with BUILD_WITH_QML=OFF. [source] -tar = "https://invent.kde.org/frameworks/kdeclarative/-/archive/v6.10.0/kdeclarative-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kdeclarative-6.24.0.tar.xz" +blake3 = "31432ee9503ffb6308502f866596e797e27efbc6a507af4d86330472bbb1f91a" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kded6/recipe.toml b/local/recipes/kde/kf6-kded6/recipe.toml index ce48f0bdba..05491642b2 100644 --- a/local/recipes/kde/kf6-kded6/recipe.toml +++ b/local/recipes/kde/kf6-kded6/recipe.toml @@ -1,5 +1,6 @@ [source] -tar = "https://invent.kde.org/frameworks/kded/-/archive/v6.10.0/kded-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kded-6.24.0.tar.xz" +blake3 = "204f04d3af0a73742867339a1c75d9a75dfb777bfaed3f2d4f198fa24a1e441c" [build] template = "custom" @@ -12,7 +13,7 @@ dependencies = [ "kf6-kdbusaddons", "kf6-kservice", ] -script = """ +script = ''' DYNAMIC_INIT HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build" @@ -43,7 +44,7 @@ DESTDIR="${COOKBOOK_STAGE}" cmake --install . --prefix /usr # not load Qt6's Wayland QPA plugin (see WAYLAND-IMPLEMENTATION-PLAN.md). KDED6_SERVICE="${COOKBOOK_STAGE}/usr/lib/systemd/user/plasma-kded6.service" if [ -f "${KDED6_SERVICE}" ]; then - if ! grep -q "QT_QPA_PLATFORM=offscreen" "${KDED6_SERVICE}" ]; then + if ! grep -q "QT_QPA_PLATFORM=offscreen" "${KDED6_SERVICE}"; then sed -i '/^\[Service\]/a Environment=QT_QPA_PLATFORM=offscreen' "${KDED6_SERVICE}" fi fi @@ -52,4 +53,4 @@ for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do [ -f "${lib}" ] || continue patchelf --remove-rpath "${lib}" 2>/dev/null || true done -""" +''' diff --git a/local/recipes/kde/kf6-kglobalaccel/recipe.toml b/local/recipes/kde/kf6-kglobalaccel/recipe.toml index 533eda4ca1..a556132bbd 100644 --- a/local/recipes/kde/kf6-kglobalaccel/recipe.toml +++ b/local/recipes/kde/kf6-kglobalaccel/recipe.toml @@ -1,6 +1,7 @@ #TODO: KGlobalAccel — global keyboard shortcuts. Needs kf6-kcrash + kf6-kdbusaddons. [source] -tar = "https://invent.kde.org/frameworks/kglobalaccel/-/archive/v6.10.0/kglobalaccel-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kglobalaccel-6.24.0.tar.xz" +blake3 = "8b904eaa87da388c75750755d0ad84c63bfc7faa011ff018a781e13b8c126718" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kguiaddons/recipe.toml b/local/recipes/kde/kf6-kguiaddons/recipe.toml index 8df81b2517..0cb1076855 100644 --- a/local/recipes/kde/kf6-kguiaddons/recipe.toml +++ b/local/recipes/kde/kf6-kguiaddons/recipe.toml @@ -1,6 +1,7 @@ #TODO: KGuiAddons — GUI utilities, color management, text selection. Depends on qtbase, kf6-extra-cmake-modules. Wayland/X11 disabled. [source] -tar = "https://invent.kde.org/frameworks/kguiaddons/-/archive/v6.10.0/kguiaddons-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kguiaddons-6.24.0.tar.xz" +blake3 = "d3e4286f67eeffe4db1aaa4376b09752ae257d441db15016382befbc71c3af9a" [build] template = "custom" @@ -30,7 +31,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \ -DBUILD_TESTING=OFF \ -DBUILD_QCH=OFF \ - -DWITH_WAYLAND=OFF \ + -DWITH_WAYLAND=ON \ -DWITH_X11=OFF \ -DUSE_DBUS=OFF \ -Wno-dev diff --git a/local/recipes/kde/kf6-ki18n/recipe.toml b/local/recipes/kde/kf6-ki18n/recipe.toml index 2659c817b3..8ee4ef68e4 100644 --- a/local/recipes/kde/kf6-ki18n/recipe.toml +++ b/local/recipes/kde/kf6-ki18n/recipe.toml @@ -1,6 +1,7 @@ #TODO: KI18n — internationalization framework, gettext integration. Depends on qtbase, qtdeclarative, kf6-extra-cmake-modules. [source] -tar = "https://invent.kde.org/frameworks/ki18n/-/archive/v6.10.0/ki18n-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/ki18n-6.24.0.tar.xz" +blake3 = "1081644f3a33029ea3490e3b2ebd85cec0c021780af8b78d1dfd0df75e883538" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kiconthemes/recipe.toml b/local/recipes/kde/kf6-kiconthemes/recipe.toml index b473004ced..a4c8c39216 100644 --- a/local/recipes/kde/kf6-kiconthemes/recipe.toml +++ b/local/recipes/kde/kf6-kiconthemes/recipe.toml @@ -1,6 +1,7 @@ #TODO: KIconThemes — icon theme management. Needs kf6-karchive for icon loading. [source] -tar = "https://invent.kde.org/frameworks/kiconthemes/-/archive/v6.10.0/kiconthemes-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kiconthemes-6.24.0.tar.xz" +blake3 = "451ae1376ca2d274586458cddaf6d9c30aa2f4b9216e24b0ade5d0ca1309d58d" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kidletime/recipe.toml b/local/recipes/kde/kf6-kidletime/recipe.toml index ba13220902..75a14da222 100644 --- a/local/recipes/kde/kf6-kidletime/recipe.toml +++ b/local/recipes/kde/kf6-kidletime/recipe.toml @@ -1,6 +1,7 @@ # KIdleTime — idle time detection. Used by KWin for screen dimming/locking. [source] -tar = "https://invent.kde.org/frameworks/kidletime/-/archive/v6.10.0/kidletime-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kidletime-6.24.0.tar.xz" +blake3 = "60941f1ba75f7b631daa2b3674209225dd6480916f812a3169336104eac3f840" [build] template = "custom" @@ -41,7 +42,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DBUILD_TESTING=OFF \ -DBUILD_QCH=OFF \ -DWITH_X11=OFF \ - -DWITH_WAYLAND=OFF \ + -DWITH_WAYLAND=ON \ -DQT_SKIP_AUTO_PLUGIN_INCLUSION=ON \ -Wno-dev diff --git a/local/recipes/kde/kf6-kio/recipe.toml b/local/recipes/kde/kf6-kio/recipe.toml index c7f5de2bc3..3e37e9f217 100644 --- a/local/recipes/kde/kf6-kio/recipe.toml +++ b/local/recipes/kde/kf6-kio/recipe.toml @@ -8,7 +8,8 @@ # Redox compatibility headers for the small QHostInfo/QHostAddress surface it needs. # - This recipe does not forge QtNetwork headers into the shared sysroot. [source] -tar = "https://invent.kde.org/frameworks/kio/-/archive/v6.10.0/kio-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kio-6.24.0.tar.xz" +blake3 = "5d99d541a44d32471445038a48fb2df85a7efcef61bec35a027f34a9be7920c5" [build] template = "custom" @@ -176,7 +177,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DBUILD_WITH_QML=OFF \ -DUSE_DBUS=ON \ -DWITH_X11=OFF \ - -DWITH_WAYLAND=OFF \ + -DWITH_WAYLAND=ON \ -Wno-dev cmake --build . -j${COOKBOOK_MAKE_JOBS} diff --git a/local/recipes/kde/kf6-kitemmodels/recipe.toml b/local/recipes/kde/kf6-kitemmodels/recipe.toml index 8ed6cd64d5..8593b2b512 100644 --- a/local/recipes/kde/kf6-kitemmodels/recipe.toml +++ b/local/recipes/kde/kf6-kitemmodels/recipe.toml @@ -1,6 +1,7 @@ #TODO: KItemModels — Qt model framework extensions (KDescendantsProxyModel, KConcatenateRowsProxyModel, etc.) [source] -tar = "https://invent.kde.org/frameworks/kitemmodels/-/archive/v6.10.0/kitemmodels-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kitemmodels-6.24.0.tar.xz" +blake3 = "347d253fd01ddcb7683ed84397adf62ef61530dae0e7a9f53120d0b8c9c95954" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kitemviews/recipe.toml b/local/recipes/kde/kf6-kitemviews/recipe.toml index 5727a688f3..acb2763f64 100644 --- a/local/recipes/kde/kf6-kitemviews/recipe.toml +++ b/local/recipes/kde/kf6-kitemviews/recipe.toml @@ -1,6 +1,7 @@ #TODO: KItemViews — item view widgets (list/tree/table views) [source] -tar = "https://invent.kde.org/frameworks/kitemviews/-/archive/v6.10.0/kitemviews-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kitemviews-6.24.0.tar.xz" +blake3 = "92a56353e7e17034f2fa9e925c3326a088650e44a288ddd3e1cea104aebf95b9" [build] template = "custom" diff --git a/local/recipes/kde/kf6-knewstuff/recipe.toml b/local/recipes/kde/kf6-knewstuff/recipe.toml index f8c0fdd136..eac790ac78 100644 --- a/local/recipes/kde/kf6-knewstuff/recipe.toml +++ b/local/recipes/kde/kf6-knewstuff/recipe.toml @@ -1,6 +1,7 @@ #TODO: KNewStuff — core-only build on Redox. Qt Quick, widgets, tools, and Kirigami-facing surfaces disabled. KF6Attica now available in-tree (kf6-attica recipe). [source] -tar = "https://invent.kde.org/frameworks/knewstuff/-/archive/v6.10.0/knewstuff-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/knewstuff-6.24.0.tar.xz" +blake3 = "32d7592cd0c686da62afc7c83994658ae4dce1fc47e3a7aa170765b23ce8681b" [build] template = "custom" diff --git a/local/recipes/kde/kf6-knotifications/recipe.toml b/local/recipes/kde/kf6-knotifications/recipe.toml index 303f1c5ca4..aa286eb3db 100644 --- a/local/recipes/kde/kf6-knotifications/recipe.toml +++ b/local/recipes/kde/kf6-knotifications/recipe.toml @@ -1,6 +1,7 @@ #TODO: KNotifications — notification framework. Depends on qtbase, kf6-kconfig, kf6-kcoreaddons, kf6-ki18n, kf6-kwindowsystem. D-Bus enabled (redbear-notifications provides org.freedesktop.Notifications). [source] -tar = "https://invent.kde.org/frameworks/knotifications/-/archive/v6.10.0/knotifications-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/knotifications-6.24.0.tar.xz" +blake3 = "91f98e8c10cf4f92445e654e0b0973f7292fac0b12189da62d2924e6f90993f6" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kpackage/recipe.toml b/local/recipes/kde/kf6-kpackage/recipe.toml index 0e52f02a8e..182a23bf2c 100644 --- a/local/recipes/kde/kf6-kpackage/recipe.toml +++ b/local/recipes/kde/kf6-kpackage/recipe.toml @@ -1,6 +1,7 @@ #TODO: KPackage — package framework, theme/plugin/installer management. Needs kf6-kservice. [source] -tar = "https://invent.kde.org/frameworks/kpackage/-/archive/v6.10.0/kpackage-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kpackage-6.24.0.tar.xz" +blake3 = "f573764998bbf5c2eeb7dd2c0a59f6ce054a08265f6ef2e6809e2be675557858" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kservice/recipe.toml b/local/recipes/kde/kf6-kservice/recipe.toml index 08d6a01156..a5b2707558 100644 --- a/local/recipes/kde/kf6-kservice/recipe.toml +++ b/local/recipes/kde/kf6-kservice/recipe.toml @@ -1,6 +1,7 @@ #TODO: KService — service and plugin framework, .desktop file parsing. Needs kf6-kdbusaddons. [source] -tar = "https://invent.kde.org/frameworks/kservice/-/archive/v6.10.0/kservice-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kservice-6.24.0.tar.xz" +blake3 = "c30cd07fa6dbf9fa470652e0573193eea0137e8d9b00d512091f2d40f77ca432" [build] template = "custom" diff --git a/local/recipes/kde/kf6-ksvg/recipe.toml b/local/recipes/kde/kf6-ksvg/recipe.toml index 516f7f757d..6ab49bd6b0 100644 --- a/local/recipes/kde/kf6-ksvg/recipe.toml +++ b/local/recipes/kde/kf6-ksvg/recipe.toml @@ -1,6 +1,7 @@ #TODO: KSvg — SVG rendering library with theme re-coloring and disk caching [source] -tar = "https://invent.kde.org/frameworks/ksvg/-/archive/v6.10.0/ksvg-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/ksvg-6.24.0.tar.xz" +blake3 = "f580a845e927dfd72e652642713eb3fd20ee8fcfe3b0b832ebcfdcf157e41ef0" [build] template = "custom" diff --git a/local/recipes/kde/kf6-ktextwidgets/recipe.toml b/local/recipes/kde/kf6-ktextwidgets/recipe.toml index 809ec18473..9f2cbabd78 100644 --- a/local/recipes/kde/kf6-ktextwidgets/recipe.toml +++ b/local/recipes/kde/kf6-ktextwidgets/recipe.toml @@ -1,6 +1,7 @@ #TODO: KTextWidgets — text editing widgets. Depends on kf6-sonnet for spell-check integration. [source] -tar = "https://invent.kde.org/frameworks/ktextwidgets/-/archive/v6.10.0/ktextwidgets-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/ktextwidgets-6.24.0.tar.xz" +blake3 = "9caf4ceba2c24bae2d890cbe84d5d2d69fddda572253a96c4c5f739b7f8dae5a" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kwallet/recipe.toml b/local/recipes/kde/kf6-kwallet/recipe.toml index 716b8d2ad2..3962fe1123 100644 --- a/local/recipes/kde/kf6-kwallet/recipe.toml +++ b/local/recipes/kde/kf6-kwallet/recipe.toml @@ -1,6 +1,7 @@ #TODO: KWallet — build the real KF6 client library on Redox; kwalletd, kwallet-query, translations, and X11 runtime paths stay disabled until the broader runtime service surface is proven. [source] -tar = "https://invent.kde.org/frameworks/kwallet/-/archive/v6.10.0/kwallet-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kwallet-6.24.0.tar.xz" +blake3 = "717ba7a05d459d9400e59a0a86c6efed76a103e04a59ea849f1b765cc28c4548" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kwayland/recipe.toml b/local/recipes/kde/kf6-kwayland/recipe.toml index dcc8b609fa..1220e09819 100644 --- a/local/recipes/kde/kf6-kwayland/recipe.toml +++ b/local/recipes/kde/kf6-kwayland/recipe.toml @@ -1,6 +1,7 @@ #TODO: KWayland — Qt/C++ wrapper for Wayland protocols. Required by KWin. [source] -tar = "https://download.kde.org/stable/plasma/6.3.4/kwayland-6.3.4.tar.xz" +tar = "https://download.kde.org/stable/plasma/6.6.5/kwayland-6.6.5.tar.xz" +blake3 = "caff2c1bf5c6d4bde61e9f85a0aa0bf13ff6d6d2623c8a62025042309b89cdc3" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml b/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml index 68362b61dc..69c72fd13a 100644 --- a/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml +++ b/local/recipes/kde/kf6-kwidgetsaddons/recipe.toml @@ -1,6 +1,7 @@ #TODO: KWidgetsAddons — Qt widget addons and dialogs. Depends on qtbase, kf6-extra-cmake-modules. [source] -tar = "https://invent.kde.org/frameworks/kwidgetsaddons/-/archive/v6.10.0/kwidgetsaddons-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kwidgetsaddons-6.24.0.tar.xz" +blake3 = "696d5db51e6f70c408e83d9227de1d31c7e340c65603d23b362d3e16325f3be0" [build] template = "custom" diff --git a/local/recipes/kde/kf6-kwindowsystem/recipe.toml b/local/recipes/kde/kf6-kwindowsystem/recipe.toml index 9af2ac4355..57c3020cc8 100644 --- a/local/recipes/kde/kf6-kwindowsystem/recipe.toml +++ b/local/recipes/kde/kf6-kwindowsystem/recipe.toml @@ -1,6 +1,7 @@ #TODO: KWindowSystem — window system access. Depends on qtbase, kf6-extra-cmake-modules. QML/X11/Wayland disabled. [source] -tar = "https://invent.kde.org/frameworks/kwindowsystem/-/archive/v6.10.0/kwindowsystem-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kwindowsystem-6.24.0.tar.xz" +blake3 = "d1393014fc87f272ac1f596ed414d73c289b1cae3517c5b69beb93f0f473246d" [build] template = "custom" @@ -35,7 +36,7 @@ cmake "${COOKBOOK_SOURCE}" \ -DBUILD_QCH=OFF \ -DKWINDOWSYSTEM_QML=OFF \ -DKWINDOWSYSTEM_X11=OFF \ - -DKWINDOWSYSTEM_WAYLAND=OFF \ + -DKWINDOWSYSTEM_WAYLAND=ON \ -Wno-dev cmake --build . -j${COOKBOOK_MAKE_JOBS} diff --git a/local/recipes/kde/kf6-kxmlgui/recipe.toml b/local/recipes/kde/kf6-kxmlgui/recipe.toml index d2c5a36c14..4114bb98fc 100644 --- a/local/recipes/kde/kf6-kxmlgui/recipe.toml +++ b/local/recipes/kde/kf6-kxmlgui/recipe.toml @@ -1,6 +1,7 @@ #TODO: KXmlGui — GUI framework for menu/toolbar actions from XML. Depends on kconfigwidgets, kiconthemes, ktextwidgets. [source] -tar = "https://invent.kde.org/frameworks/kxmlgui/-/archive/v6.10.0/kxmlgui-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kxmlgui-6.24.0.tar.xz" +blake3 = "607823858e5fe0d1b1d79f8a816a8a2b1c6616e3daae1b8f91dfd280e96e0455" [build] template = "custom" diff --git a/local/recipes/kde/kf6-parts/recipe.toml b/local/recipes/kde/kf6-parts/recipe.toml index 3338843987..7545e7b072 100644 --- a/local/recipes/kde/kf6-parts/recipe.toml +++ b/local/recipes/kde/kf6-parts/recipe.toml @@ -1,7 +1,8 @@ #TODO: KF6Parts — KDE KPart component framework for embedding plugins. # Required by konsole for KPart terminal embedding. [source] -tar = "https://invent.kde.org/frameworks/kparts/-/archive/v6.10.0/kparts-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/kparts-6.24.0.tar.xz" +blake3 = "9c734bcf058a9e7515f2c92b24515d7bc1857ecf3c78881bfa7d5f09d98a30ce" [build] template = "custom" diff --git a/local/recipes/kde/kf6-prison/recipe.toml b/local/recipes/kde/kf6-prison/recipe.toml index de4b665b7d..84012a2d7e 100644 --- a/local/recipes/kde/kf6-prison/recipe.toml +++ b/local/recipes/kde/kf6-prison/recipe.toml @@ -1,6 +1,7 @@ #TODO: Prison — barcode/QR code framework. Build the core KF6 library now; Data Matrix, scanner, and QML paths stay disabled on Redox. [source] -tar = "https://invent.kde.org/frameworks/prison/-/archive/v6.10.0/prison-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/prison-6.24.0.tar.xz" +blake3 = "322b4abe952a082c9bff8e38abf3e047e7550e5d36b3bc74dbacbed249b5721e" [build] template = "custom" diff --git a/local/recipes/kde/kf6-solid/recipe.toml b/local/recipes/kde/kf6-solid/recipe.toml index 55554cc064..628db3765d 100644 --- a/local/recipes/kde/kf6-solid/recipe.toml +++ b/local/recipes/kde/kf6-solid/recipe.toml @@ -1,6 +1,7 @@ #TODO: Solid — hardware discovery and power management. UDev/UPower/udisks2 backends disabled for Redox. [source] -tar = "https://invent.kde.org/frameworks/solid/-/archive/v6.10.0/solid-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/solid-6.24.0.tar.xz" +blake3 = "df2da02dd3f5bf007eb1120cf51f3dbd9c3b6bf9b68e2fbb4e65d0d49978951b" [build] template = "custom" diff --git a/local/recipes/kde/kf6-sonnet/recipe.toml b/local/recipes/kde/kf6-sonnet/recipe.toml index cd7d693e95..541c772e10 100644 --- a/local/recipes/kde/kf6-sonnet/recipe.toml +++ b/local/recipes/kde/kf6-sonnet/recipe.toml @@ -1,6 +1,7 @@ #TODO: Sonnet — spell checking framework. Depends on qtbase, kf6-ki18n, kf6-extra-cmake-modules. [source] -tar = "https://invent.kde.org/frameworks/sonnet/-/archive/v6.10.0/sonnet-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/sonnet-6.24.0.tar.xz" +blake3 = "d008fd286bfde63cc99890736aff30b84c948553e4c35b0db7edde6a9ac63418" [build] template = "custom" diff --git a/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml b/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml index cd86e62987..3f43afa603 100644 --- a/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml +++ b/local/recipes/kde/kf6-syntaxhighlighting/recipe.toml @@ -2,7 +2,8 @@ # Perl dependency skipped via cmake patch (PHP syntax definitions pre-generated). # Required by konsole for syntax highlighting. [source] -tar = "https://invent.kde.org/frameworks/syntax-highlighting/-/archive/v6.10.0/syntax-highlighting-v6.10.0.tar.gz" +tar = "https://download.kde.org/stable/frameworks/6.24/syntax-highlighting-6.24.0.tar.xz" +blake3 = "6f56e2d37b75c78331c8a21a4f25c2f8ee91c571433810d6580aec6458252f1d" [build] template = "custom" diff --git a/local/recipes/kde/kwin/recipe.toml b/local/recipes/kde/kwin/recipe.toml index a08828567a..51f11a94d6 100644 --- a/local/recipes/kde/kwin/recipe.toml +++ b/local/recipes/kde/kwin/recipe.toml @@ -1,4 +1,4 @@ -# KWin Wayland compositor (v6.3.4, 2026). +# KWin Wayland compositor (v6.6.5, 2026). # All 12 features required for a real KDE Plasma session are enabled. # Three flags remain OFF by design: # - KWIN_BUILD_X11 / KWIN_BUILD_X11_BACKEND: target is Wayland-only; X11 stack not built. @@ -12,8 +12,8 @@ # expected to fail until plasma/kscreenlocker is packaged. That is the correct # behavior — KWin cannot drive a real KDE session without a screen locker. [source] -tar = "https://invent.kde.org/plasma/kwin/-/archive/v6.3.4/kwin-v6.3.4.tar.gz" -blake3 = "2aa1e234a75b0aa94f0da3a74d93e2a8e49b30a3afb12dc24b2ecd3abaa94e7f" +tar = "https://download.kde.org/stable/plasma/6.6.5/kwin-6.6.5.tar.xz" +blake3 = "92859be0b1cb5f235f1e5edfb18454c4a08db6f8264049db7c70490489fb6e55" [build] template = "custom" diff --git a/local/recipes/kde/plasma-desktop/recipe.toml b/local/recipes/kde/plasma-desktop/recipe.toml index 813757b87a..e30775422b 100644 --- a/local/recipes/kde/plasma-desktop/recipe.toml +++ b/local/recipes/kde/plasma-desktop/recipe.toml @@ -1,6 +1,7 @@ #TODO: plasma-desktop — KDE desktop settings. Depends on plasma-workspace. [source] -tar = "https://invent.kde.org/plasma/plasma-desktop/-/archive/v6.3.4/plasma-desktop-v6.3.4.tar.gz" +tar = "https://download.kde.org/stable/plasma/6.6.5/plasma-desktop-6.6.5.tar.xz" +blake3 = "dd4ee3a409d8934180c7e5e44a08f07f83a6dd7b32601e7b46c058b1a85aa494" [build] template = "custom" diff --git a/local/recipes/kde/plasma-framework/recipe.toml b/local/recipes/kde/plasma-framework/recipe.toml index d6c2d6dee4..9150e52a05 100644 --- a/local/recipes/kde/plasma-framework/recipe.toml +++ b/local/recipes/kde/plasma-framework/recipe.toml @@ -1,7 +1,7 @@ #TODO: Plasma Framework — Plasma applets, containments, shell. Depends on kf6-kio, kf6-kdeclarative, kf6-kpackage. [source] -tar = "https://invent.kde.org/frameworks/plasma-framework/-/archive/v6.10.0/plasma-framework-v6.10.0.tar.gz" -blake3 = "ba89f804d2e6da9a77963e01b12f5480600f570d910e685b0bca008f77011bd0" +tar = "https://download.kde.org/stable/plasma/6.6.5/libplasma-6.6.5.tar.xz" +blake3 = "cc25dc25b42f6eafd102728f2d824a96f2ec22673eae783f50c479a86c9e06db" [build] template = "custom" diff --git a/local/recipes/kde/plasma-workspace/recipe.toml b/local/recipes/kde/plasma-workspace/recipe.toml index 606b979fc9..5f55875203 100644 --- a/local/recipes/kde/plasma-workspace/recipe.toml +++ b/local/recipes/kde/plasma-workspace/recipe.toml @@ -1,7 +1,8 @@ #TODO: plasma-workspace — KDE Plasma shell. Depends on kwin + all KF6 + dbus. # Blockers: kwin, kf6-kio, kf6-kxmlgui, plasma-framework (all need DBus + OpenGL) [source] -tar = "https://invent.kde.org/plasma/plasma-workspace/-/archive/v6.3.4/plasma-workspace-v6.3.4.tar.gz" +tar = "https://download.kde.org/stable/plasma/6.6.5/plasma-workspace-6.6.5.tar.xz" +blake3 = "d59a313a794098c861a35f58efe1bda4ce1c67fdcb7e85483b5db47a42a589c3" [build] template = "custom" diff --git a/local/recipes/kde/sddm/recipe.toml b/local/recipes/kde/sddm/recipe.toml index ace886ae35..7a8cd6ed08 100644 --- a/local/recipes/kde/sddm/recipe.toml +++ b/local/recipes/kde/sddm/recipe.toml @@ -4,7 +4,7 @@ # removed from daemon. Default display server fallback is Wayland. [source] git = "https://github.com/sddm/sddm.git" -rev = "bc9eee8280275723767213220e88f6b14157ba1f" +rev = "a994435c92ced6c7c55a73de04dd79b38d797bb8" patches = [] [build] diff --git a/local/recipes/qt/qt6-sensors/recipe.toml b/local/recipes/qt/qt6-sensors/recipe.toml index 399a448f0a..46fdfeae63 100644 --- a/local/recipes/qt/qt6-sensors/recipe.toml +++ b/local/recipes/qt/qt6-sensors/recipe.toml @@ -3,6 +3,7 @@ # Sensorfw disabled (Linux-specific). Dummy plugin provides no-op sensor readings. [source] tar = "https://download.qt.io/official_releases/qt/6.11/6.11.0/submodules/qtsensors-everywhere-src-6.11.0.tar.xz" +blake3 = "c8c1effbe7f4f8b5b3856eced4d5bded8a84087110efef888a7abdbe7b06de47" [build] template = "custom" diff --git a/local/recipes/qt/qtbase/recipe.toml b/local/recipes/qt/qtbase/recipe.toml index 69850db6c3..d264e63189 100644 --- a/local/recipes/qt/qtbase/recipe.toml +++ b/local/recipes/qt/qtbase/recipe.toml @@ -3,9 +3,9 @@ # Re-enable path: see local/docs/QT6-PORT-STATUS.md # Redox platform detection and syscall adaptations in redox.patch [source] -tar = "https://download.qt.io/official_releases/qt/6.8/6.8.2/submodules/qtbase-everywhere-src-6.8.2.tar.xz" +tar = "https://download.qt.io/official_releases/qt/6.11/6.11.0/submodules/qtbase-everywhere-src-6.11.0.tar.xz" blake3 = "6e9a81b44a2f6a12ce36b77a990a1e18586afe2ab2b140113b4ec59c6ba5d3c6" -# TODO: qtwayland-empty-cursor-guards and qtwaylandscanner-null-guard-listeners +# qtwayland-empty-cursor-guards and qtwaylandscanner-null-guard-listeners # were for Qt 6.8.2; changes applied directly to v6.11-patched source tree. # Regenerate proper patches for 6.11.0 and restore to this list. patches = [ @@ -22,6 +22,7 @@ dependencies = [ "mesa", "libdrm", "libepoxy", + "ninja-build", ] script = """ DYNAMIC_INIT @@ -130,6 +131,21 @@ GLES3_EOF done +# Replace the sysroot's Redox-target ninja with a symlink to the +# host's /usr/bin/ninja. The cookbook's ninja-build recipe builds a +# Redox-target ELF (interpreter /lib/ld64.so.1) which the host +# kernel cannot exec during cmake's configure-time probe +# (CMakeLists.txt:23 'project()' does ninja --version). The toolchain +# sets FIND_ROOT_PATH_MODE_PROGRAM=NEVER, but cmake's PATH search +# still finds sysroot/bin/ninja first because the cookbook sandbox +# puts sysroot/bin on PATH. Pointing the symlink at the host ninja +# unblocks the configure pass. +if [ -x /usr/bin/ninja ]; then + ln -sfn /usr/bin/ninja "${COOKBOOK_SYSROOT}/usr/bin/ninja" + ln -sfn /usr/bin/ninja "${COOKBOOK_SYSROOT}/bin/ninja" +fi + + # Step 1: Build Qt host tools (moc, rcc, uic) on the host # These are needed for cross-compilation — Qt6 generates code # with these tools during the target build. @@ -209,6 +225,8 @@ fi # Safety: clean stale CMake cache from previous attempts rm -f CMakeCache.txt rm -rf CMakeFiles +rm -rf config.tests +rm -f build.ninja # Also clean any stale cache in source directory from previous builds rm -f "${COOKBOOK_SOURCE}/CMakeCache.txt" rm -rf "${COOKBOOK_SOURCE}/CMakeFiles" diff --git a/local/recipes/qt/qtbase/recipe.toml.bak b/local/recipes/qt/qtbase/recipe.toml.bak deleted file mode 100644 index fc4d381320..0000000000 --- a/local/recipes/qt/qtbase/recipe.toml.bak +++ /dev/null @@ -1,746 +0,0 @@ -#TODO: Qt6 base — qtbase compiled with Core+Concurrent+Xml+Gui+Widgets+DBus+OpenGL+EGL. Runtime validation pending. -# OpenGL/EGL enabled (software via Mesa/LLVMpipe; hardware acceleration requires kernel DMA-BUF). -# Re-enable path: see local/docs/QT6-PORT-STATUS.md -# Redox platform detection and syscall adaptations in redox.patch -[source] -tar = "https://download.qt.io/official_releases/qt/6.8/6.8.2/submodules/qtbase-everywhere-src-6.8.2.tar.xz" -patches = [ - "redox.patch", - "P1-qplatformopengl-guard.patch", -] - -[build] -template = "custom" -dependencies = [ - "glib", - "pcre2", - "zlib", - "libwayland", - "dbus", - "mesa", -] -script = """ -DYNAMIC_INIT - -PROJECT_ROOT="${COOKBOOK_ROOT}" -source "${COOKBOOK_ROOT}/local/scripts/lib/relibc-surface.sh" - -RELIBC_STAGE_INCLUDE_STAGE="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/include" -RELIBC_STAGE_INCLUDE_TMP="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage.tmp/usr/include" -RELIBC_STAGE_LIB_STAGE="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage/usr/lib" -RELIBC_STAGE_LIB_TMP="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/stage.tmp/usr/lib" -RELIBC_BUILD_LIB="${COOKBOOK_ROOT}/recipes/core/relibc/target/${TARGET}/build/target/${TARGET}/release" - -RELIBC_STAGE_INCLUDE="$(redbear_choose_relibc_stage_include)" -RELIBC_STAGE_LIB="$(redbear_choose_relibc_stage_lib)" -if [ -d "${RELIBC_STAGE_INCLUDE}" ]; then - redbear_copy_relibc_surface_into_sysroot "${COOKBOOK_SYSROOT}" - if [ -f "${COOKBOOK_SYSROOT}/include/elf.h" ]; then - sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "${COOKBOOK_SYSROOT}/include/elf.h" - sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "${COOKBOOK_SYSROOT}/include/elf.h" - fi - export CPPFLAGS="${CPPFLAGS:-} -I${RELIBC_STAGE_INCLUDE}" - export CFLAGS="${CFLAGS:-} -I${RELIBC_STAGE_INCLUDE}" - export CXXFLAGS="${CXXFLAGS:-} -I${RELIBC_STAGE_INCLUDE}" - - # The Redox GCC toolchain currently prefers its own bundled target elf.h - # under .../x86_64-unknown-redox/include/ over the recipe sysroot copy. - # Sync the freshly built relibc header into that toolchain include root so - # Qt's ELF plugin parser sees the corrected ELF64 typedef layout. - TOOLCHAIN_ROOT="$(redbear_choose_toolchain_root)" - TOOLCHAIN_TARGET_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/include" - TOOLCHAIN_TARGET_USR_INCLUDE="${TOOLCHAIN_ROOT}/x86_64-unknown-redox/usr/include" - for header in elf.h semaphore.h unistd.h; do - if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_INCLUDE}" ]; then - cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_INCLUDE}/${header}" - fi - if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_USR_INCLUDE}" ]; then - cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_USR_INCLUDE}/${header}" - fi - done - for header in arpa/inet.h net/if.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h; do - if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_INCLUDE}" ]; then - mkdir -p "${TOOLCHAIN_TARGET_INCLUDE}/$(dirname "${header}")" - cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_INCLUDE}/${header}" - fi - if [ -f "${RELIBC_STAGE_INCLUDE}/${header}" ] && [ -d "${TOOLCHAIN_TARGET_USR_INCLUDE}" ]; then - mkdir -p "${TOOLCHAIN_TARGET_USR_INCLUDE}/$(dirname "${header}")" - cp -f "${RELIBC_STAGE_INCLUDE}/${header}" "${TOOLCHAIN_TARGET_USR_INCLUDE}/${header}" - fi - done - for header_path in "${TOOLCHAIN_TARGET_INCLUDE}/elf.h" "${TOOLCHAIN_TARGET_USR_INCLUDE}/elf.h"; do - if [ -f "$header_path" ]; then - sed -i 's/typedef uint64_t Elf64_Word;/typedef uint32_t Elf64_Word;/' "$header_path" - sed -i 's/typedef int64_t Elf64_Sword;/typedef int32_t Elf64_Sword;/' "$header_path" - fi - done -fi -if [ -d "${RELIBC_STAGE_LIB}" ]; then - export LDFLAGS="-L${RELIBC_STAGE_LIB} -Wl,-rpath-link,${RELIBC_STAGE_LIB} ${LDFLAGS}" -fi - - cat > strtold_cpp_compat.c <<'EOF' -long double strtold(const char *nptr, char **endptr); - -long double relibc_compat_cpp_strtold(const char *nptr, char **endptr) - __asm__("_Z7strtoldPKcPPc"); - -long double relibc_compat_cpp_strtold(const char *nptr, char **endptr) { - return strtold(nptr, endptr); -} - -#include -#include -#include -FILE *open_memstream(char **ptr, size_t *sizeloc) { - *ptr = calloc(1, 1); - *sizeloc = 0; - return tmpfile(); -} -EOF -"${GNU_TARGET}-gcc" \ - --sysroot="${COOKBOOK_SYSROOT}" \ - -shared -fPIC strtold_cpp_compat.c \ - -o "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so" -mkdir -p "${COOKBOOK_STAGE}/usr/lib" -cp -f "${COOKBOOK_SYSROOT}/lib/libredbear-qt-strtold-compat.so" "${COOKBOOK_STAGE}/usr/lib/" -export LDFLAGS="${LDFLAGS} -Wl,--no-as-needed -L${COOKBOOK_SYSROOT}/lib -lredbear-qt-strtold-compat -lffi -lc" - -export CFLAGS="${CFLAGS} -fcf-protection=none" -export CXXFLAGS="${CXXFLAGS} -fcf-protection=none" - -# Mesa's Redox sysroot currently exposes GLES2 headers but not the GLES3 wrapper headers -# that qtbase expects when building the ES-backed OpenGL path. Provide minimal forwarding -# wrappers in the per-recipe sysroot so clean rebuilds do not fail on missing gl3*.h. -mkdir -p "${COOKBOOK_SYSROOT}/include/GLES3" -for hdr in gl3.h gl31.h gl32.h; do - if [ ! -f "${COOKBOOK_SYSROOT}/include/GLES3/${hdr}" ]; then - cat > "${COOKBOOK_SYSROOT}/include/GLES3/${hdr}" <<'GLES3_EOF' -#ifndef REDBEAR_QT_GLES3_WRAPPER_H -#define REDBEAR_QT_GLES3_WRAPPER_H -#include -#include -#endif -GLES3_EOF - fi -done - -mkdir -p "${COOKBOOK_SYSROOT}/include/netinet" -if [ ! -f "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" ]; then - cat > "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" <<'PKTINFO_EOF' -#ifndef REDBEAR_IN6_PKTINFO_COMPAT_H -#define REDBEAR_IN6_PKTINFO_COMPAT_H -#include -#ifndef IPV6_RECVPKTINFO -#define IPV6_RECVPKTINFO 46 -#endif -#ifndef IPV6_PKTINFO -#define IPV6_PKTINFO 50 -#endif -struct in6_pktinfo { - struct in6_addr ipi6_addr; - int ipi6_ifindex; -}; -#endif -PKTINFO_EOF -fi -# Step 1: Build Qt host tools (moc, rcc, uic) on the host -# These are needed for cross-compilation — Qt6 generates code -# with these tools during the target build. -# ============================================================ -HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build" -HOST_QTBASE_BUILD="${COOKBOOK_ROOT}/build/qtbase-host-build" -HOST_PROFILE="qtbase-host-6.11.0-gui-xml-wayland-qdbus-host" -HOST_STAMP="${HOST_BUILD}/.redbear-host-profile" -HOST_PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" -python - <<'PY' -import os -from pathlib import Path -path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/tools/CMakeLists.txt" -text = path.read_text() -old = " # add_subdirectory(qdbuscpp2xml) # disabled for Redox Qt Wave 1\\n # add_subdirectory(qdbusxml2cpp) # disabled for Redox Qt Wave 1\\n" -new = " add_subdirectory(qdbuscpp2xml)\\n add_subdirectory(qdbusxml2cpp)\\n" -text = text.replace(old, new) -path.write_text(text) -PY -if [ -d "${HOST_BUILD}" ] && { [ ! -f "${HOST_STAMP}" ] || [ "$(cat "${HOST_STAMP}" 2>/dev/null)" != "${HOST_PROFILE}" ]; }; then - rm -rf "${HOST_BUILD}" - rm -rf "${HOST_QTBASE_BUILD}" -fi -if [ ! -f "${HOST_BUILD}/libexec/moc" ] || [ ! -f "${HOST_STAMP}" ]; then - echo "=== Building Qt host tools ===" - mkdir -p "${HOST_BUILD}" - rm -rf "${HOST_QTBASE_BUILD}" - env -i \ - HOME="${HOME}" \ - PATH="${HOST_PATH}" \ - cmake -S "${COOKBOOK_SOURCE}" -B "${HOST_QTBASE_BUILD}" \ - -GNinja \ - -DCMAKE_C_COMPILER=/usr/bin/cc \ - -DCMAKE_CXX_COMPILER=/usr/bin/c++ \ - -DCMAKE_ASM_COMPILER=/usr/bin/cc \ - -DCMAKE_AR=/usr/bin/ar \ - -DCMAKE_RANLIB=/usr/bin/ranlib \ - -DPKG_CONFIG_EXECUTABLE=/usr/bin/pkg-config \ - -DCMAKE_STRIP=/usr/bin/strip \ - -DCMAKE_BUILD_TYPE=Release \ - -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ - -DFEATURE_glib=OFF \ - -DFEATURE_gui=ON \ - -DFEATURE_widgets=OFF \ - -DFEATURE_opengl=OFF \ - -DFEATURE_network=ON \ - -DFEATURE_dbus=ON \ - -DFEATURE_openssl=OFF \ - -DFEATURE_sql=OFF \ - -DFEATURE_testlib=OFF \ - -DFEATURE_xml=ON \ - -DFEATURE_wayland=ON \ - -DFEATURE_qtwaylandscanner=ON \ - -Wno-dev - ( - cd "${HOST_QTBASE_BUILD}" - env -i \ - HOME="${HOME}" \ - PATH="${HOST_PATH}" \ - cmake --build . -j"${COOKBOOK_MAKE_JOBS}" - ) - ( - cd "${HOST_QTBASE_BUILD}" - env -i \ - HOME="${HOME}" \ - PATH="${HOST_PATH}" \ - cmake --install . --prefix "${HOST_BUILD}" - ) - printf '%s\n' "${HOST_PROFILE}" > "${HOST_STAMP}" -fi - -# Inject Redox in6_pktinfo header include AFTER host build (host uses Linux headers, not Redox) - -python - <<'PY' -import os -from pathlib import Path -path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/network/socket/qnativesocketengine_unix.cpp" -text = path.read_text() -if 'in6_pktinfo_compat' not in text: - text = '#include \\n' + text - path.write_text(text) -PY - -# ============================================================ -# Step 2: Cross-compile qtbase for Redox (Phase 1: QtCore) -# ============================================================ - -# Safety: clean stale CMake cache from previous attempts -rm -f CMakeCache.txt -rm -rf CMakeFiles -# Also clean any stale cache in source directory from previous builds -rm -f "${COOKBOOK_SOURCE}/CMakeCache.txt" -rm -rf "${COOKBOOK_SOURCE}/CMakeFiles" - -# Provide sys/statfs.h wrapper — relibc only has sys/statvfs.h. -# qstorageinfo_linux.cpp (compiled when LINUX=1 in CMake) includes sys/statfs.h. -# Alias statfs → statvfs so it compiles against relibc's POSIX API. -mkdir -p "${COOKBOOK_SYSROOT}/include/sys" -if [ ! -f "${COOKBOOK_SYSROOT}/include/sys/statfs.h" ]; then - cat > "${COOKBOOK_SYSROOT}/include/sys/statfs.h" << 'STATFS_EOF' -#ifndef _SYS_STATFS_H -#define _SYS_STATFS_H -/* Redox: relibc provides statvfs (POSIX), not Linux statfs. - Provide a compatibility shim so Linux-targeted code compiles. */ -#include -typedef struct statvfs statfs; -#define statfs statvfs -#define f_flags f_flag -#endif /* _SYS_STATFS_H */ -STATFS_EOF -fi - -# Ensure private forwarding headers exist for Unix-specific includes -# syncqt may not generate these for unknown platforms like Redox -mkdir -p "${COOKBOOK_SOURCE}/src/corelib/QtCore/private" -for hdr in qcore_unix_p.h qeventdispatcher_unix_p.h qtimerinfo_unix_p.h; do - target="${COOKBOOK_SOURCE}/src/corelib/QtCore/private/${hdr}" - kernel_file="${COOKBOOK_SOURCE}/src/corelib/kernel/${hdr}" - if [ ! -f "${target}" ] && [ -f "${kernel_file}" ]; then - sed 's|kernel/|../kernel/|' "${kernel_file}" > "${target}" - fi -done - -# Patch CMakeLists.txt: Redox uses POSIX statvfs, not Linux statfs. -# Exclude qstorageinfo_linux.cpp, include qstorageinfo_unix.cpp instead. -awk ' -/^qt_internal_extend_target\\(Core CONDITION LINUX AND NOT ANDROID AND NOT VXWORKS/ { - sub(/LINUX AND NOT ANDROID AND NOT VXWORKS/, "LINUX AND NOT REDOX AND NOT ANDROID AND NOT VXWORKS") -} -/qstorageinfo_linux\\.cpp/ { found_linux = 1 } -found_linux && /^)$/ { - print; print "" - print "# Redox: POSIX statvfs, not Linux statfs" - print "qt_internal_extend_target(Core CONDITION REDOX" - print " SOURCES" - print " io/qstandardpaths_unix.cpp" - print " io/qstorageinfo_unix.cpp" - print ")" - found_linux = 0; next -} -{ print } -' "${COOKBOOK_SOURCE}/src/corelib/CMakeLists.txt" > "${COOKBOOK_SOURCE}/src/corelib/CMakeLists.txt.tmp" -mv "${COOKBOOK_SOURCE}/src/corelib/CMakeLists.txt.tmp" "${COOKBOOK_SOURCE}/src/corelib/CMakeLists.txt" - -# Enable QtNetwork — relibc DNS resolver hardened (2026-04-29: use-after-free fix, FD leak fix, -# transaction ID validation, RCODE/TC handling, typed error mapping). -# QtNetwork was previously disabled. Now re-enabled for full KDE desktop path. -sed -i 's/^\\s*# add_subdirectory(network).*/ add_subdirectory(network)/' \ - "${COOKBOOK_SOURCE}/src/CMakeLists.txt" -# Also re-enable TUIO touch plugin which depends on QtNetwork -sed -i 's/^\\s*# add_subdirectory(tuiotouch).*/ add_subdirectory(tuiotouch)/' \ - "${COOKBOOK_SOURCE}/src/plugins/generic/CMakeLists.txt" -python - <<'PY' -import os -from pathlib import Path - -path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/network/socket/qnet_unix_p.h" -text = path.read_text() -text = text.replace( - '''#include -''', - '''#include -#include -''', - 1, -) -old = '''#if defined(Q_OS_VXWORKS) -# include -#else -# include -#endif -''' -new = '''#if defined(Q_OS_VXWORKS) -# include -#elif !defined(Q_OS_REDOX) -# include -#endif -''' -text = text.replace(old, new) -path.write_text(text) -PY -python - <<'PY' -import os -from pathlib import Path - -path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/network/socket/qnativesocketengine_unix.cpp" -text = path.read_text() -text = text.replace( - ''' case QNativeSocketEngine::ReceiveHopLimit: - if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) { - level = IPPROTO_IPV6; - n = IPV6_RECVHOPLIMIT; - } else if (socketProtocol == QAbstractSocket::IPv4Protocol) { -''', - ''' case QNativeSocketEngine::ReceiveHopLimit: - if (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) { - level = IPPROTO_IPV6; -#ifdef IPV6_RECVHOPLIMIT - n = IPV6_RECVHOPLIMIT; -#endif - } else if (socketProtocol == QAbstractSocket::IPv4Protocol) { -''', - 1, -) -text = text.replace( - ''' if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int)) - && ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT) - || (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) { -''', - ''' if (cmsgptr->cmsg_len == CMSG_LEN(sizeof(int)) -#ifdef IPV6_HOPLIMIT - && ((cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT) - || (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL))) { -#else - && (cmsgptr->cmsg_level == IPPROTO_IP && cmsgptr->cmsg_type == IP_TTL)) { -#endif -''', - 1, -) -text = text.replace( - ''' if (header.hopLimit != -1) { - msg.msg_controllen += CMSG_SPACE(sizeof(int)); - cmsgptr->cmsg_len = CMSG_LEN(sizeof(int)); - cmsgptr->cmsg_level = IPPROTO_IPV6; - cmsgptr->cmsg_type = IPV6_HOPLIMIT; - memcpy(CMSG_DATA(cmsgptr), &header.hopLimit, sizeof(int)); - cmsgptr = reinterpret_cast(reinterpret_cast(cmsgptr) + CMSG_SPACE(sizeof(int))); - } -''', - '''#ifdef IPV6_HOPLIMIT - if (header.hopLimit != -1) { - msg.msg_controllen += CMSG_SPACE(sizeof(int)); - cmsgptr->cmsg_len = CMSG_LEN(sizeof(int)); - cmsgptr->cmsg_level = IPPROTO_IPV6; - cmsgptr->cmsg_type = IPV6_HOPLIMIT; - memcpy(CMSG_DATA(cmsgptr), &header.hopLimit, sizeof(int)); - cmsgptr = reinterpret_cast(reinterpret_cast(cmsgptr) + CMSG_SPACE(sizeof(int))); - } -#endif -''', - 1, -) -path.write_text(text) -PY -# Disable Wayland shm-emulation-server on Redox. -# Clean rebuilds still do not expose QSharedMemory::lock/unlock strongly enough for this path, -# so keep the bounded software compositor path honest until QtCore runtime support is proven. -HWI_CMAKE="${COOKBOOK_SOURCE}/src/plugins/platforms/wayland/plugins/hardwareintegration/CMakeLists.txt" -awk 'index($0, "if(QT_FEATURE_wayland_shm_emulation_server_buffer)") { - print "if(FALSE AND QT_FEATURE_wayland_shm_emulation_server_buffer) # disabled for Redox (QSharedMemory locking still not runtime-proven on clean rebuilds)"; - next - } { print }' "${HWI_CMAKE}" > "${HWI_CMAKE}.tmp" -mv "${HWI_CMAKE}.tmp" "${HWI_CMAKE}" - -# Redox relibc now exports sem_open/sem_close/sem_unlink, but the target toolchain's -# builtin semaphore.h can still hide those declarations during C++ feature probes. -# Inject a small Redox-only declaration shim both into the POSIX semaphore compile test -# and the Qt runtime backend source so configure can detect the path honestly. -python - <<'PY' -import os -from pathlib import Path - -root = Path(os.environ["COOKBOOK_SOURCE"]) - -backend = root / "src/corelib/ipc/qsystemsemaphore_posix.cpp" -text = backend.read_text() -marker = "#define REDOX_POSIX_SEM_RUNTIME_DECLS 1" -if marker not in text: - needle = '#include \\n' - shim = '#ifdef __redox__\\n#define REDOX_POSIX_SEM_RUNTIME_DECLS 1\\nextern "C" sem_t *sem_open(const char *name, int oflag, ...);\\nextern "C" int sem_close(sem_t *sem);\\nextern "C" int sem_unlink(const char *name);\\n#ifndef SEM_FAILED\\n#define SEM_FAILED ((sem_t *) -1)\\n#endif\\n#endif\\n' - text = text.replace(needle, needle + shim, 1) - backend.write_text(text) -PY - -# QtGui needs the float16 shims — copy to gui dir and append to first SOURCES line -if [ -f "${COOKBOOK_SOURCE}/src/corelib/global/qt_float16_shims.c" ]; then - cp "${COOKBOOK_SOURCE}/src/corelib/global/qt_float16_shims.c" \ - "${COOKBOOK_SOURCE}/src/gui/painting/qt_float16_shims.c" -fi -if [ -f "${COOKBOOK_SOURCE}/src/gui/painting/qt_float16_shims.c" ]; then - python - <<'PY' -import os -from pathlib import Path -path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/gui/CMakeLists.txt" -lines = path.read_text().splitlines() -out = [] -inserted = False -for line in lines: - if line.strip() == "painting/qt_float16_shims.c": - continue - out.append(line) - if not inserted and line.strip() == "SOURCES": - out.append(" painting/qt_float16_shims.c") - inserted = True -path.write_text("\\n".join(out) + "\\n") -PY -fi - -# relibc's elf.h defines ELFMAG0-3 and SELFMAG but not ELFMAG string constant. -# Patch qelfparser_p.cpp (the only file using ELFMAG) to define it. -QELF="${COOKBOOK_SOURCE}/src/corelib/plugin/qelfparser_p.cpp" -if ! grep -q '#define ELFMAG' "${QELF}" 2>/dev/null; then - { printf '#ifndef ELFMAG\n'; printf '#define ELFMAG "\\177ELF"\n'; printf '#endif\n\n'; cat "${QELF}"; } > "${QELF}.tmp" - mv "${QELF}.tmp" "${QELF}" -fi - -# Patch Wayland client buffer integration: guard OpenGL-only virtual functions -# with QT_CONFIG(opengl). Without OpenGL, QPlatformOpenGLContext is not defined. -# This allows Wayland client to build with software rendering (shared memory). -BUFI="${COOKBOOK_SOURCE}/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h" -awk ' -/createPlatformOpenGLContext.*QPlatformOpenGLContext/ && !done1 { - print "#if QT_CONFIG(opengl)"; print; print "#endif /* QT_CONFIG(opengl) */"; done1=1; next -} -/nativeResourceForContext.*QPlatformOpenGLContext/ && !done2 { - print "#if QT_CONFIG(opengl)"; print; print "#endif /* QT_CONFIG(opengl) */"; done2=1; next -} -{ print } -' "${BUFI}" > "${BUFI}.tmp" -mv "${BUFI}.tmp" "${BUFI}" - -# qtypes.h uses static_assert in C mode. relibc's assert.h does not currently expose the -# expected macro there, so inject both the include and a bounded fallback macro for C only. -QTYPES="${COOKBOOK_SOURCE}/src/corelib/global/qtypes.h" -if ! grep -q '#ifndef __cplusplus.*#include ' "${QTYPES}" 2>/dev/null; then - awk '/#ifndef __cplusplus/ { print; print "#include "; next } { print }' \ - "${QTYPES}" > "${QTYPES}.tmp" - mv "${QTYPES}.tmp" "${QTYPES}" -fi -if ! grep -q '#define static_assert _Static_assert' "${QTYPES}" 2>/dev/null; then - awk '/#include / { print; print "#ifndef static_assert"; print "#define static_assert _Static_assert"; print "#endif"; next } { print }' \ - "${QTYPES}" > "${QTYPES}.tmp" - mv "${QTYPES}.tmp" "${QTYPES}" -fi - -# For Redox diagnostics, turn Q_UNREACHABLE into a Qt assertion instead of a raw ud2 trap. -# This preserves a useful file/line failure path while we narrow remaining early-startup issues. -QASSERT_H="${COOKBOOK_SOURCE}/src/corelib/global/qassert.h" -if ! grep -q 'Q_OS_REDOX' "${QASSERT_H}" 2>/dev/null; then - python - </dev/null; then - awk 'index($0, "#if !defined(WEXITED) || !defined(WNOWAIT)") { - print; - print "#ifdef __redox__"; - print "#define REDOX_DISABLE_HAVE_WAITID 1"; - print "#undef HAVE_WAITID"; - print "#endif"; - next - } { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp" - mv "${FORKFD_C}.tmp" "${FORKFD_C}" -fi -if ! grep -q 'REDOX_FORCE_WAITPID_FALLBACK' "${FORKFD_C}" 2>/dev/null; then - awk 'index($0, "#if defined(__APPLE__)") { - print "#ifdef __redox__"; - print "#define REDOX_FORCE_WAITPID_FALLBACK 1"; - print "#undef HAVE_WAITID"; - print "#endif"; - print; - next - } { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp" - mv "${FORKFD_C}.tmp" "${FORKFD_C}" -fi -if ! grep -q 'REDOX_WAITID_IDTYPE_SHIMS' "${FORKFD_C}" 2>/dev/null; then - awk '/#include / { - print; - print "#ifdef __redox__"; - print "#define REDOX_WAITID_IDTYPE_SHIMS 1"; - print "#ifndef P_ALL"; - print "#define P_ALL 0"; - print "#endif"; - print "#ifndef P_PID"; - print "#define P_PID 1"; - print "#endif"; - print "#ifndef P_PGID"; - print "#define P_PGID 2"; - print "#endif"; - print "#endif"; - next - } { print }' "${FORKFD_C}" > "${FORKFD_C}.tmp" - mv "${FORKFD_C}.tmp" "${FORKFD_C}" -fi -# qprocess_unix.cpp needs sys/ioctl.h (for FIONREAD) but doesn't include it -QP="${COOKBOOK_SOURCE}/src/corelib/io/qprocess_unix.cpp" -if ! grep -q 'sys/ioctl.h' "${QP}" 2>/dev/null; then - awk '/#include / { print; print "#include "; next } { print }' \ - "${QP}" > "${QP}.tmp" - mv "${QP}.tmp" "${QP}" -fi -if ! grep -q 'REDOX_VFORK_SHIM' "${QP}" 2>/dev/null; then - awk '/#include / { - print; - print "#ifdef __redox__"; - print "#define REDOX_VFORK_SHIM 1"; - print "#ifndef vfork"; - print "#define vfork fork"; - print "#endif"; - print "#endif"; - next - } { print }' "${QP}" > "${QP}.tmp" - mv "${QP}.tmp" "${QP}" -fi - -# On Redox, keep Qt plugin metadata at the architectural baseline. -# The x86 plugin arch-requirement path produces feature-level warnings at runtime -# and can cause otherwise-present plugins to be rejected before load. -QPLUGIN_H="${COOKBOOK_SOURCE}/src/corelib/plugin/qplugin.h" -export QPLUGIN_H -python - <<'PY' -from pathlib import Path -import os - -path = Path(os.environ["QPLUGIN_H"]) -text = path.read_text() -needle = ''' static constexpr quint8 archRequirements() - { - quint8 v = 0; -''' -replacement = ''' static constexpr quint8 archRequirements() - { -#ifdef Q_OS_REDOX - return 0; -#else - quint8 v = 0; -''' -if needle in text and "#ifdef Q_OS_REDOX" not in text: - text = text.replace(needle, replacement, 1) - text = text.replace( - ''' return v; - } -''', - ''' return v; -#endif - } -''', - 1, - ) -path.write_text(text) -PY - -cmake "${COOKBOOK_SOURCE}" \ - -GNinja \ - -DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \ - -DCMAKE_SHARED_LINKER_FLAGS="-lc -lffi -lredbear-qt-strtold-compat" \ - -DCMAKE_EXE_LINKER_FLAGS="-lc -lffi -lredbear-qt-strtold-compat" \ - -DCMAKE_C_STANDARD_LIBRARIES="-lffi -lredbear-qt-strtold-compat" \ - -DCMAKE_CXX_STANDARD_LIBRARIES="-lffi -lredbear-qt-strtold-compat" \ - -DQT_HOST_PATH="${HOST_BUILD}" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \ - -DQT_BUILD_TOOLS_BY_DEFAULT=OFF \ - -DQT_BUILD_EXAMPLES=OFF \ - -DQT_BUILD_TESTS=OFF \ - -DFEATURE_androiddeployqt=OFF \ - -DFEATURE_glib=OFF \ - -DFEATURE_gui=ON \ - -DFEATURE_widgets=ON \ - -DFEATURE_networkinterface=OFF \ - -DFEATURE_opengl=ON \ - -DINPUT_opengl=es2 \ - -DFEATURE_qmake=OFF \ - -DFEATURE_qtwaylandscanner=ON \ - -DFEATURE_egl=ON \ - -DFEATURE_openssl=OFF \ - -DFEATURE_dbus=ON \ - -DFEATURE_wayland=ON \ - -DWaylandScanner_EXECUTABLE=/usr/bin/wayland-scanner \ - -DFEATURE_wasmdeployqt=OFF \ - -DFEATURE_xcb=OFF \ - -DFEATURE_xlib=OFF \ - -DFEATURE_vulkan=OFF \ - -DFEATURE_process=ON \ - -DFEATURE_testlib=OFF \ - -DFEATURE_sql=OFF \ - -DFEATURE_printsupport=OFF \ - -DFEATURE_system_zlib=ON \ - -DFEATURE_system_pcre2=OFF \ - -DFEATURE_system_doubleconversion=OFF \ - -DFEATURE_system_harfbuzz=OFF \ - -DFEATURE_libjpeg=OFF \ - -DFEATURE_libpng=OFF \ - -Wno-dev - -cmake --build . -j${COOKBOOK_MAKE_JOBS} - -# Qt's top-level install script expects a hashed export path under CMakeFiles/Export, -# but on this Redox cross-build the generated file only exists at lib/cmake/Qt6/Qt6Targets.cmake. -# Materialize the expected export file before install so cmake --install can proceed normally. -python3 - <<'PY' -from pathlib import Path -import shutil - -install_script = Path("cmake_install.cmake") -generated = Path("lib/cmake/Qt6/Qt6Targets.cmake") - -if install_script.exists() and generated.exists(): - for line in install_script.read_text().splitlines(): - marker = 'CMakeFiles/Export/' - suffix = '/Qt6Targets.cmake' - if marker in line and suffix in line and 'FILES "' in line: - expected = Path(line.split('FILES "', 1)[1].rsplit('"', 1)[0]) - expected.parent.mkdir(parents=True, exist_ok=True) - if not expected.exists(): - shutil.copy2(generated, expected) - break -PY - -# cmake --install handles: libs, headers, cmake files, metatypes, mkspecs, plugins, pri files -# It generates relocatable cmake files (using relative paths) which downstream modules need. -cmake --install . --prefix "${COOKBOOK_STAGE}/usr" - -# Supplemental: ensure library symlinks (cmake install sometimes misses .so symlinks) -for lib in lib/libQt6*.so*; do - [ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/" -done -for lib in lib/libQt6*.a; do - [ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/" -done - -# Plugin path fix: cmake target files reference ${_IMPORT_PREFIX}/plugins/... -# but cmake --install puts plugins at ${prefix}/plugins/ = stage/usr/plugins/. -# The cookbook copies stage/usr/* to sysroot/, so: -# stage/usr/lib/ → sysroot/lib/ (cmake files: sysroot/lib/cmake/Qt6Gui/) -# stage/usr/plugins/ → sysroot/usr/plugins/ (actual files) -# _IMPORT_PREFIX resolves to sysroot/ (parent of lib/cmake/Qt6Gui/), so cmake -# looks for sysroot/plugins/... but files are at sysroot/usr/plugins/... -# Fix: also stage plugins without the usr/ prefix so cookbook puts them at sysroot/plugins/. -if [ -d "${COOKBOOK_STAGE}/usr/plugins" ]; then - mkdir -p "${COOKBOOK_STAGE}/plugins" - cp -a "${COOKBOOK_STAGE}/usr/plugins/"* "${COOKBOOK_STAGE}/plugins/" 2>/dev/null || true -fi - -# RPATH cleanup -for lib in "${COOKBOOK_STAGE}/usr/lib/libQt6"*.so.*; do - [ -f "${lib}" ] || continue - patchelf --remove-rpath "${lib}" 2>/dev/null || true -done -find "${COOKBOOK_STAGE}/usr/plugins" -name '*.so' -exec patchelf --set-rpath '$ORIGIN/../../lib' {} + 2>/dev/null || true - -# Propagate libc through Qt6::Core for downstream CMake consumers. QtCore now relies on relibc -# exports such as waitid() and sem_* on Redox, so imported targets must link libc explicitly. -python - <<'PY' -import os -from pathlib import Path - -targets = [ - Path(os.environ["COOKBOOK_STAGE"]) / "usr/lib/cmake/Qt6Core/Qt6CoreTargets.cmake", - Path(os.environ["COOKBOOK_SYSROOT"]) / "lib/cmake/Qt6Core/Qt6CoreTargets.cmake", -] -old = 'INTERFACE_LINK_LIBRARIES "Qt6::Platform;WrapAtomic::WrapAtomic"' -new = 'INTERFACE_LINK_LIBRARIES "Qt6::Platform;WrapAtomic::WrapAtomic;c"' - -for path in targets: - if not path.exists(): - continue - text = path.read_text() - if new in text: - continue - text = text.replace(old, new, 1) - path.write_text(text) -PY -""" diff --git a/local/recipes/qt/qtbase/source/mkspecs/common/posix/qplatformdefs.h b/local/recipes/qt/qtbase/source/mkspecs/common/posix/qplatformdefs.h index 808d59ddd5..7ecb54bac6 100644 --- a/local/recipes/qt/qtbase/source/mkspecs/common/posix/qplatformdefs.h +++ b/local/recipes/qt/qtbase/source/mkspecs/common/posix/qplatformdefs.h @@ -542,6 +542,38 @@ #endif #endif +#ifdef Q_OS_REDOX +#undef QT_USE_XOPEN_LFS_EXTENSIONS +#undef QT_LARGEFILE_SUPPORT +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#endif + +#ifdef Q_OS_REDOX +#undef QT_USE_XOPEN_LFS_EXTENSIONS +#undef QT_LARGEFILE_SUPPORT +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#endif + +#ifdef Q_OS_REDOX +#undef QT_USE_XOPEN_LFS_EXTENSIONS +#undef QT_LARGEFILE_SUPPORT +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#endif + +#ifdef Q_OS_REDOX +#undef QT_USE_XOPEN_LFS_EXTENSIONS +#undef QT_LARGEFILE_SUPPORT +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#endif + // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only diff --git a/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt b/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt index 16609bf0a0..cafd261335 100644 --- a/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt +++ b/local/recipes/qt/qtbase/source/src/corelib/CMakeLists.txt @@ -1676,6 +1676,34 @@ qt_internal_extend_target(Core CONDITION REDOX io/qstorageinfo_unix.cpp ) +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt SOURCES platform/windows/qfactorycacheregistration_p.h @@ -2180,6 +2208,34 @@ qt_internal_extend_target(Core CONDITION REDOX io/qstorageinfo_unix.cpp ) +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + +# Redox: POSIX statvfs, not Linux statfs +qt_internal_extend_target(Core CONDITION REDOX + SOURCES + io/qstandardpaths_unix.cpp + io/qstorageinfo_unix.cpp +) + qt_internal_extend_target(Core CONDITION QT_FEATURE_itemmodel SOURCES itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h diff --git a/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h b/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h index 8e1323576a..c40f4b4a96 100644 --- a/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h +++ b/local/recipes/qt/qtbase/source/src/corelib/global/qtypes.h @@ -245,6 +245,10 @@ static_assert(std::is_signed_v, #include #include #include +#include +#include +#include +#include #ifndef static_assert #define static_assert _Static_assert #endif diff --git a/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp b/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp index 61069b3c8a..526169d00a 100644 --- a/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp +++ b/local/recipes/qt/qtbase/source/src/network/socket/qnativesocketengine_unix.cpp @@ -1189,6 +1189,10 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l #ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT +#ifdef IPV6_HOPLIMIT +#ifdef IPV6_HOPLIMIT +#ifdef IPV6_HOPLIMIT +#ifdef IPV6_HOPLIMIT #ifdef IPV6_HOPLIMIT if (header.hopLimit != -1) { msg.msg_controllen += CMSG_SPACE(sizeof(int)); @@ -1265,6 +1269,10 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l #endif #endif #endif +#endif +#endif +#endif +#endif #endif if (header.ifindex != 0 || !header.senderAddress.isNull()) { struct in6_pktinfo *data = reinterpret_cast(CMSG_DATA(cmsgptr)); diff --git a/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h b/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h index 02f0256425..9412741645 100644 --- a/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h +++ b/local/recipes/qt/qtbase/source/src/network/socket/qnet_unix_p.h @@ -89,6 +89,10 @@ #include #include #include +#include +#include +#include +#include #include #if defined(Q_OS_VXWORKS) diff --git a/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h b/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h index a26c631e7e..9b6413c1df 100644 --- a/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h +++ b/local/recipes/qt/qtbase/source/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h @@ -119,6 +119,10 @@ public: #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) #if QT_CONFIG(opengl) virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0; #endif /* QT_CONFIG(opengl) */ @@ -188,6 +192,10 @@ public: #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ virtual bool canCreatePlatformOffscreenSurface() const { return false; } #if QT_CONFIG(opengl) @@ -268,6 +276,10 @@ public: #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) #if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) +#if QT_CONFIG(opengl) #if QT_CONFIG(opengl) virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; } #endif /* QT_CONFIG(opengl) */ @@ -338,6 +350,10 @@ public: #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ #endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ +#endif /* QT_CONFIG(opengl) */ }; } diff --git a/local/recipes/qt/qtdeclarative/source/src/qml/jit/qv4assemblercommon_p.h b/local/recipes/qt/qtdeclarative/source/src/qml/jit/qv4assemblercommon_p.h index 93f60c0c75..01c8340ae4 100644 --- a/local/recipes/qt/qtdeclarative/source/src/qml/jit/qv4assemblercommon_p.h +++ b/local/recipes/qt/qtdeclarative/source/src/qml/jit/qv4assemblercommon_p.h @@ -34,7 +34,7 @@ namespace QV4 { namespace JIT { #if defined(Q_PROCESSOR_X86_64) || defined(ENABLE_ALL_ASSEMBLERS_FOR_REFACTORING_PURPOSES) -#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN) || defined(Q_OS_SOLARIS) || defined(Q_OS_VXWORKS) || defined(Q_OS_HURD) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) +#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN) || defined(Q_OS_SOLARIS) || defined(Q_OS_VXWORKS) || defined(Q_OS_HURD) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) || defined(Q_OS_REDOX) class PlatformAssembler_X86_64_SysV : public JSC::MacroAssembler { diff --git a/local/recipes/wayland/libwayland/recipe.toml b/local/recipes/wayland/libwayland/recipe.toml index 8ba50eca23..aed473efe4 100644 --- a/local/recipes/wayland/libwayland/recipe.toml +++ b/local/recipes/wayland/libwayland/recipe.toml @@ -36,6 +36,35 @@ DYNAMIC_INIT # This matches what wayland-protocols already does in its own # meson.build (see its redox.patch in the recipe). cookbook_meson -Ddocumentation=false -Dtests=false -Ddtd_validation=false -Dscanner=false -Dc_args=-Wno-error + +# Install a host-side wayland-scanner.pc that points to the host's +# /usr/bin/wayland-scanner. libwayland builds with -Dscanner=false (see +# comment above), so the upstream-installed wayland-scanner.pc would +# reference a Redox-target binary that the cookbook's redoxer sandbox +# cannot exec on the host. Mesa's meson.build does +# `dependency('wayland-scanner', native: true)` and needs a host-runnable +# path; this provides it without rebuilding wayland-scanner for Redox. +install -Dm644 /dev/stdin "${COOKBOOK_STAGE}/usr/lib/pkgconfig/wayland-scanner.pc" <<'EOF' +prefix=/usr +includedir=${prefix}/include +datarootdir=${prefix}/share +pkgdatadir=${datarootdir}/wayland +bindir=${prefix}/bin +wayland_scanner=${bindir}/wayland-scanner + +Name: Wayland Scanner +Description: Wayland scanner (host binary, Redox build does not rebuild it) +Version: 1.24.0 +Cflags: -I${includedir} +EOF + +# Stage a wayland-scanner binary symlink so the cookbook auto-extract +# populates the sysroot at usr/bin/wayland-scanner. Without this, mesa's +# find_program(dep_wl_scanner.get_variable(pkgconfig: 'wayland_scanner')) +# resolves to the cookbook sysroot path (not /usr/bin/), and the host +# binary is not visible. +mkdir -p "${COOKBOOK_STAGE}/usr/bin" +ln -sfn /usr/bin/wayland-scanner "${COOKBOOK_STAGE}/usr/bin/wayland-scanner" """ [package] diff --git a/local/recipes/wayland/redbear-compositor/source/src/main.rs b/local/recipes/wayland/redbear-compositor/source/src/main.rs index 9d7e9cb660..cf21a8b3dc 100644 --- a/local/recipes/wayland/redbear-compositor/source/src/main.rs +++ b/local/recipes/wayland/redbear-compositor/source/src/main.rs @@ -512,6 +512,23 @@ fn read_wayland_string(data: &[u8], cursor: &mut usize) -> Result (u32, u32, u32) { + use std::time::{SystemTime, UNIX_EPOCH}; + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap_or_default(); + let nanos = now.as_nanos(); + let secs = (nanos / 1_000_000_000) as u64; + let nsec = (nanos % 1_000_000_000) as u32; + let hi = (secs >> 32) as u32; + let lo = (secs & 0xFFFF_FFFF) as u32; + (hi, lo, nsec) +} + +fn split_u64(v: u64) -> (u32, u32) { + ((v >> 32) as u32, (v & 0xFFFF_FFFF) as u32) +} + fn recv_with_rights( stream: &mut UnixStream, data: &mut [u8], @@ -798,6 +815,9 @@ const OBJECT_TYPE_WP_VIEWPORT: u32 = 32; const OBJECT_TYPE_ZWP_LINUX_DMABUF_V1: u32 = 33; const OBJECT_TYPE_ZWP_LINUX_BUFFER_PARAMS_V1: u32 = 34; const OBJECT_TYPE_WL_DATA_OFFER: u32 = 35; +const OBJECT_TYPE_ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1: u32 = 36; +const OBJECT_TYPE_WP_PRESENTATION: u32 = 37; +const OBJECT_TYPE_WP_PRESENTATION_FEEDBACK: u32 = 38; const WL_SUBCOMPOSITOR_DESTROY: u16 = 0; const WL_SUBCOMPOSITOR_GET_SUBSURFACE: u16 = 1; @@ -910,6 +930,24 @@ const ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED: u16 = 3; const ZWP_LINUX_BUFFER_PARAMS_V1_FAILED: u16 = 0; const ZWP_LINUX_BUFFER_PARAMS_V1_CREATED: u16 = 1; +const ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_DESTROY: u16 = 0; +const ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_SET_FENCING_SCANOUT_CAP: u16 = 1; + +const WP_PRESENTATION_DESTROY: u16 = 0; +const WP_PRESENTATION_CLOCK_ID_REQUEST: u16 = 1; +const WP_PRESENTATION_FEEDBACK_DESTROY: u16 = 0; +const WP_PRESENTATION_CLOCK_ID_EVENT: u16 = 0; +const WP_PRESENTATION_PRESENTED_EVENT: u16 = 1; +const WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT: u16 = 0; + +const WP_CLOCK_REALTIME: u32 = 0; +const WP_CLOCK_MONOTONIC: u32 = 1; + +const WP_PRESENTATION_HINT_VSYNC: u32 = 1; +const WP_PRESENTATION_HINT_HW_CLOCK: u32 = 2; +const WP_PRESENTATION_HINT_HW_COMPLETION: u32 = 4; +const WP_PRESENTATION_HINT_ZERO_COPY: u32 = 8; + struct Global { name: u32, interface: String, @@ -1015,6 +1053,13 @@ struct LinuxDmabufParamsState { formats: Vec, } +#[derive(Clone, Default)] +struct PresentationFeedbackState { + surface_id: u32, + presented_count: u32, + last_presented_seq: u64, +} + #[derive(Clone, Default)] struct XdgOutputState { // The xdg_output metadata is published when the object is first @@ -1111,6 +1156,8 @@ struct ClientState { linux_dmabuf_params: HashMap, xdg_outputs: HashMap, toplevel_decorations: HashMap, + presentation_feedbacks: HashMap, + explicit_sync_fencing_scanout_cap: u32, // Bounded compositor records the focus/input object ids that the // wl_seat.get_* calls create, plus the keyboard focus surface, so // a real input stack (libinput/evdev) can drive them. They are @@ -1234,6 +1281,16 @@ impl Compositor { interface: "zwp_linux_dmabuf_v1".into(), version: 4, }, + Global { + name: 14, + interface: "zwp_linux_explicit_synchronization_v1".into(), + version: 1, + }, + Global { + name: 15, + interface: "wp_presentation".into(), + version: 2, + }, ]; Ok(Self { @@ -1288,6 +1345,8 @@ impl Compositor { linux_dmabuf_params: HashMap::new(), xdg_outputs: HashMap::new(), toplevel_decorations: HashMap::new(), + presentation_feedbacks: HashMap::new(), + explicit_sync_fencing_scanout_cap: 0, keyboard_object_id: None, pointer_object_id: None, touch_object_id: None, @@ -1501,6 +1560,8 @@ impl Compositor { } "wp_viewporter" => OBJECT_TYPE_WP_VIEWPORTER, "zwp_linux_dmabuf_v1" => OBJECT_TYPE_ZWP_LINUX_DMABUF_V1, + "zwp_linux_explicit_synchronization_v1" => OBJECT_TYPE_ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1, + "wp_presentation" => OBJECT_TYPE_WP_PRESENTATION, _ => 0, }; client.objects.insert(new_id, type_id); @@ -1746,7 +1807,7 @@ impl Compositor { } } WL_SURFACE_COMMIT => { - let release_id = { + let (release_id, presented_feedbacks) = { let mut clients = self.clients.lock().unwrap(); if let Some(client) = clients.get_mut(&client_id) { if let Some(surface) = client.surfaces.get_mut(&object_id) { @@ -1761,12 +1822,29 @@ impl Compositor { self.composite_buffer(pool, buffer, &surface_snapshot); } } - release_buffer + + let presented: Vec = client + .presentation_feedbacks + .iter() + .filter(|(_, fb)| fb.surface_id == object_id) + .map(|(id, _)| *id) + .collect(); + for id in &presented { + if let Some(fb) = + client.presentation_feedbacks.get_mut(id) + { + fb.presented_count = + fb.presented_count.saturating_add(1); + fb.last_presented_seq = + fb.last_presented_seq.saturating_add(1); + } + } + (release_buffer, presented) } else { - None + (None, Vec::new()) } } else { - None + (None, Vec::new()) } }; @@ -1775,6 +1853,22 @@ impl Compositor { self.send_buffer_release(stream, buf_id); } } + + let (tv_sec_hi, tv_sec_lo, tv_nsec) = monotonic_timestamp(); + let (seq_hi, seq_lo) = split_u64(presented_feedbacks.len() as u64); + for fb_id in &presented_feedbacks { + self.send_presentation_presented( + stream, + *fb_id, + tv_sec_hi, + tv_sec_lo, + tv_nsec, + 16_666_667, + seq_hi, + seq_lo, + WP_PRESENTATION_HINT_VSYNC, + ); + } } WL_SURFACE_DAMAGE => { // No-op — we don't need damage tracking for a single-client greeter. @@ -2989,6 +3083,82 @@ impl Compositor { ); } }, + OBJECT_TYPE_ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1 => match opcode { + ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_DESTROY => {} + ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_SET_FENCING_SCANOUT_CAP => { + if payload.len() >= 4 { + let cap = u32::from_le_bytes([ + payload[0], payload[1], payload[2], payload[3], + ]); + let mut clients = self.clients.lock().unwrap(); + if let Some(client) = clients.get_mut(&client_id) { + client.explicit_sync_fencing_scanout_cap = cap; + } + } + } + _ => { + eprintln!( + "redbear-compositor: unhandled zwp_linux_explicit_synchronization_v1 opcode {} on object {}", + opcode, object_id + ); + } + }, + OBJECT_TYPE_WP_PRESENTATION => match opcode { + WP_PRESENTATION_DESTROY => {} + WP_PRESENTATION_CLOCK_ID_REQUEST => { + if payload.len() >= 8 { + let new_id = u32::from_le_bytes([ + payload[0], payload[1], payload[2], payload[3], + ]); + let surface_id = u32::from_le_bytes([ + payload[4], payload[5], payload[6], payload[7], + ]); + let mut clients = self.clients.lock().unwrap(); + if let Some(client) = clients.get_mut(&client_id) { + client + .objects + .insert(new_id, OBJECT_TYPE_WP_PRESENTATION_FEEDBACK); + client.presentation_feedbacks.insert( + new_id, + PresentationFeedbackState { + surface_id, + presented_count: 0, + last_presented_seq: 0, + }, + ); + } + drop(clients); + self.send_presentation_clock_id( + stream, + new_id, + WP_CLOCK_MONOTONIC, + ); + } + } + _ => { + eprintln!( + "redbear-compositor: unhandled wp_presentation opcode {} on object {}", + opcode, object_id + ); + } + }, + OBJECT_TYPE_WP_PRESENTATION_FEEDBACK => match opcode { + WP_PRESENTATION_FEEDBACK_DESTROY => { + let mut clients = self.clients.lock().unwrap(); + if let Some(client) = clients.get_mut(&client_id) { + client.objects.remove(&object_id); + client.presentation_feedbacks.remove(&object_id); + } + drop(clients); + self.send_delete_id(stream, object_id); + } + _ => { + eprintln!( + "redbear-compositor: unhandled wp_presentation_feedback opcode {} on object {}", + opcode, object_id + ); + } + }, _ => { eprintln!( "redbear-compositor: unhandled object {} opcode {}", @@ -3736,6 +3906,54 @@ impl Compositor { push_u32(&mut msg, actions); let _ = stream.write_all(&msg); } + + pub fn send_presentation_clock_id( + &self, + stream: &mut UnixStream, + feedback_id: u32, + clock_id: u32, + ) { + let mut msg = Vec::with_capacity(12); + push_header( + &mut msg, + feedback_id, + WP_PRESENTATION_CLOCK_ID_EVENT, + 4, + ); + push_u32(&mut msg, clock_id); + let _ = stream.write_all(&msg); + } + + pub fn send_presentation_presented( + &self, + stream: &mut UnixStream, + feedback_id: u32, + tv_sec_hi: u32, + tv_sec_lo: u32, + tv_nsec: u32, + refresh_nsec: u32, + seq_hi: u32, + seq_lo: u32, + flags: u32, + ) { + let mut payload = Vec::with_capacity(28); + push_u32(&mut payload, tv_sec_hi); + push_u32(&mut payload, tv_sec_lo); + push_u32(&mut payload, tv_nsec); + push_u32(&mut payload, refresh_nsec); + push_u32(&mut payload, seq_hi); + push_u32(&mut payload, seq_lo); + push_u32(&mut payload, flags); + let mut msg = Vec::with_capacity(8 + payload.len()); + push_header( + &mut msg, + feedback_id, + WP_PRESENTATION_PRESENTED_EVENT, + payload.len(), + ); + msg.extend_from_slice(&payload); + let _ = stream.write_all(&msg); + } } fn main() { diff --git a/local/recipes/wayland/redbear-compositor/source/src/protocol.rs b/local/recipes/wayland/redbear-compositor/source/src/protocol.rs index 163dfbee21..14c99020d4 100644 --- a/local/recipes/wayland/redbear-compositor/source/src/protocol.rs +++ b/local/recipes/wayland/redbear-compositor/source/src/protocol.rs @@ -271,6 +271,43 @@ pub const OBJECT_TYPE_ZWP_LINUX_DMABUF_V1: u32 = 33; pub const OBJECT_TYPE_ZWP_LINUX_BUFFER_PARAMS_V1: u32 = 34; pub const OBJECT_TYPE_WL_DATA_OFFER: u32 = 35; +// zwp_linux_explicit_synchronization_v1 (wayland-protocols v1.2+) +// Lets the compositor advertise whether it supports implicit-fence-based +// buffer release. On our compositor the global is a state-tracker only; +// the actual synchronization is via wp_linux_buffer_release_v1 emitted +// on commit. The minimal correct global accepts `destroy` and tracks +// the `fencing_scanout_cap` preference. +pub const ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_DESTROY: u16 = 0; +pub const ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_SET_FENCING_SCANOUT_CAP: u16 = 1; +// No resource object types — the global itself owns the state. + +// wp_presentation (wayland-protocols) +// Provides per-surface presentation timing for frame-pacing, animations, +// and input-to-photon latency measurement. The compositor creates a +// feedback object per client request and emits a `presented` event +// after each surface commit reaches the next vblank. +pub const WP_PRESENTATION_DESTROY: u16 = 0; +pub const WP_PRESENTATION_CLOCK_ID_REQUEST: u16 = 1; +pub const WP_PRESENTATION_FEEDBACK_DESTROY: u16 = 0; +// wp_presentation events (server -> client) +pub const WP_PRESENTATION_CLOCK_ID_EVENT: u16 = 0; +pub const WP_PRESENTATION_PRESENTED_EVENT: u16 = 1; +// wp_presentation_feedback events (server -> client) +pub const WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT: u16 = 0; + +// Clock IDs per wayland-protocols/wp_presentation.xml +pub const WP_CLOCK_MONOTONIC: u32 = 1; +pub const WP_CLOCK_REALTIME: u32 = 0; + +// Presentation hints (bitfield in the `presented` event) +pub const WP_PRESENTATION_HINT_VSYNC: u32 = 1 << 0; +pub const WP_PRESENTATION_HINT_HW_CLOCK: u32 = 1 << 1; +pub const WP_PRESENTATION_HINT_HW_COMPLETION: u32 = 1 << 2; +pub const WP_PRESENTATION_HINT_ZERO_COPY: u32 = 1 << 3; + +pub const OBJECT_TYPE_WP_PRESENTATION: u32 = 37; +pub const OBJECT_TYPE_WP_PRESENTATION_FEEDBACK: u32 = 38; + pub const WL_SUBCOMPOSITOR_GET_SUBSURFACE: u16 = 1; pub const WL_SUBCOMPOSITOR_DESTROY: u16 = 0; pub const WL_SUBSURFACE_DESTROY: u16 = 0; diff --git a/local/recipes/wayland/redbear-compositor/source/tests/integration_test.rs b/local/recipes/wayland/redbear-compositor/source/tests/integration_test.rs index a2e6369055..b8a110440f 100644 --- a/local/recipes/wayland/redbear-compositor/source/tests/integration_test.rs +++ b/local/recipes/wayland/redbear-compositor/source/tests/integration_test.rs @@ -42,7 +42,7 @@ fn read_wayland_string(payload: &[u8], cursor: &mut usize) -> String { fn collect_globals(client: &mut WaylandClient, registry: u32) -> HashMap { let mut globals = HashMap::new(); - for _ in 0..13 { + for _ in 0..15 { let (object_id, opcode, payload) = client.read_message().expect("read global failed"); assert_eq!(object_id, registry); assert_eq!(opcode, 0); // wl_registry.global @@ -176,7 +176,7 @@ fn test_compositor_globals() { // Read global events let mut globals = Vec::new(); - for _ in 0..13 { + for _ in 0..15 { match client.read_message() { Ok((_obj_id, opcode, payload)) => { assert_eq!(opcode, 0); // wl_registry.global @@ -217,6 +217,14 @@ fn test_compositor_globals() { globals.iter().any(|(_, i)| i == "wl_fixes"), "wl_fixes missing" ); + assert!( + globals.iter().any(|(_, i)| i == "zwp_linux_explicit_synchronization_v1"), + "zwp_linux_explicit_synchronization_v1 missing" + ); + assert!( + globals.iter().any(|(_, i)| i == "wp_presentation"), + "wp_presentation missing" + ); compositor.kill().ok(); let _ = std::fs::remove_file(socket); @@ -234,7 +242,7 @@ fn test_compositor_shm_formats() { // Read globals to find wl_shm name let mut shm_name = 0u32; - for _ in 0..13 { + for _ in 0..15 { let (_, _, payload) = client.read_message().expect("read failed"); let name = u32::from_le_bytes([payload[0], payload[1], payload[2], payload[3]]); let mut cursor = 4; @@ -284,7 +292,7 @@ fn test_compositor_wl_fixes_destroy_registry() { let registry = client.get_registry().expect("get_registry failed"); let mut fixes_name = 0u32; - for _ in 0..13 { + for _ in 0..15 { let (_, opcode, payload) = client.read_message().expect("read failed"); assert_eq!(opcode, 0); // wl_registry.global let name = u32::from_le_bytes([payload[0], payload[1], payload[2], payload[3]]); @@ -424,7 +432,7 @@ fn test_compositor_real_surface_opcodes() { let registry = client.get_registry().expect("get_registry failed"); let mut globals = HashMap::new(); - for _ in 0..13 { + for _ in 0..15 { let (_, opcode, payload) = client.read_message().expect("read failed"); assert_eq!(opcode, 0); // wl_registry.global let name = u32::from_le_bytes([payload[0], payload[1], payload[2], payload[3]]); @@ -497,7 +505,7 @@ fn test_compositor_xdg_popup_lifecycle() { let registry = client.get_registry().expect("get_registry failed"); let mut globals = HashMap::new(); - for _ in 0..13 { + for _ in 0..15 { let (_, opcode, payload) = client.read_message().expect("read failed"); assert_eq!(opcode, 0); // wl_registry.global let name = u32::from_le_bytes([payload[0], payload[1], payload[2], payload[3]]); @@ -613,3 +621,79 @@ fn test_compositor_sync_roundtrip() { compositor.kill().ok(); let _ = std::fs::remove_file(socket); } + +#[test] +fn test_compositor_explicit_synchronization_bind_destroy() { + let socket = "/tmp/test-redbear-compositor-explicit-sync.sock"; + let _ = std::fs::remove_file(socket); + + let mut compositor = start_compositor(socket); + let mut client = WaylandClient::connect(socket).expect("failed to connect"); + + let registry = client.get_registry().expect("get_registry failed"); + let globals = collect_globals(&mut client, registry); + + let (name, version) = globals + .get("zwp_linux_explicit_synchronization_v1") + .copied() + .expect("zwp_linux_explicit_synchronization_v1 global missing"); + let _explicit_sync_id = client + .bind(registry, name, "zwp_linux_explicit_synchronization_v1", version) + .expect("bind zwp_linux_explicit_synchronization_v1 failed"); + + let (seat_name, seat_version) = globals + .get("wl_seat") + .copied() + .expect("wl_seat global missing"); + client + .bind(registry, seat_name, "wl_seat", seat_version) + .expect("bind wl_seat after explicit_sync bind failed"); + + compositor.kill().ok(); + let _ = std::fs::remove_file(socket); +} + +#[test] +fn test_compositor_presentation_clock_id() { + let socket = "/tmp/test-redbear-compositor-presentation.sock"; + let _ = std::fs::remove_file(socket); + + let mut compositor = start_compositor(socket); + let mut client = WaylandClient::connect(socket).expect("failed to connect"); + + let registry = client.get_registry().expect("get_registry failed"); + let globals = collect_globals(&mut client, registry); + + let (presentation_name, presentation_version) = globals + .get("wp_presentation") + .copied() + .expect("wp_presentation global missing"); + let presentation_id = client + .bind( + registry, + presentation_name, + "wp_presentation", + presentation_version, + ) + .expect("bind wp_presentation failed"); + + let feedback_id = client.alloc_id(); + let mut payload = Vec::new(); + payload.extend_from_slice(&feedback_id.to_le_bytes()); + payload.extend_from_slice(&0u32.to_le_bytes()); + client + .send_message(presentation_id, 1, &payload) + .expect("wp_presentation::feedback failed"); + + let (obj_id, opcode, payload) = client + .read_message() + .expect("read clock_id failed"); + assert_eq!(obj_id, feedback_id); + assert_eq!(opcode, 0, "expected wp_presentation.feedback.clock_id (opcode 0)"); + assert_eq!(payload.len(), 4, "clock_id payload should be 4 bytes"); + let clock_id = u32::from_le_bytes([payload[0], payload[1], payload[2], payload[3]]); + assert_eq!(clock_id, 1, "expected CLOCK_MONOTONIC=1"); + + compositor.kill().ok(); + let _ = std::fs::remove_file(socket); +}