From 16ac294f2673ebdb3cfaff9036c1c75470d9856a Mon Sep 17 00:00:00 2001 From: vasilito Date: Sat, 25 Jul 2026 00:20:04 +0900 Subject: [PATCH] kf6-solid: guard optical-disc shared cache (Redox has no QSystemSemaphore) udisksopticaldisc.cpp SharedContentTypesCache uses QSystemSemaphore + QSharedMemory locking for a cross-process content-type cache; Redox Qt is built without systemsemaphore-backed shared memory (same limitation the qtwayland recipe notes), so it failed to compile ("m_semaphore not declared", "QSharedMemory has no member named lock"). Guard the cache on QT_CONFIG(sharedmemory) && QT_CONFIG(systemsemaphore); on Redox provide a no-cache stub that detects directly (the cached path already fell back to advancedDiscDetect()). Durable patch. --- local/recipes/kde/kf6-solid/recipe.toml | 6 ++++ ...dox-no-systemsemaphore-optical-cache.patch | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 local/recipes/kde/kf6-solid/redox-no-systemsemaphore-optical-cache.patch diff --git a/local/recipes/kde/kf6-solid/recipe.toml b/local/recipes/kde/kf6-solid/recipe.toml index 6e05e511d9..74c5926658 100644 --- a/local/recipes/kde/kf6-solid/recipe.toml +++ b/local/recipes/kde/kf6-solid/recipe.toml @@ -6,6 +6,12 @@ version = "6.28" [source] tar = "https://download.kde.org/stable/frameworks/6.28/solid-6.28.0.tar.xz" blake3 = "fc1c0f092ff6786a2284e57b57500e11ac47dcd5471e842e0898ce76c96ab8cb" +patches = [ + # Redox Qt lacks QSystemSemaphore + QSharedMemory locking, so the optical + # disc content-type shared cache (udisksopticaldisc.cpp) fails to compile. + # Guard it and fall back to direct detection. + "redox-no-systemsemaphore-optical-cache.patch", +] [build] template = "custom" diff --git a/local/recipes/kde/kf6-solid/redox-no-systemsemaphore-optical-cache.patch b/local/recipes/kde/kf6-solid/redox-no-systemsemaphore-optical-cache.patch new file mode 100644 index 0000000000..5b6425882b --- /dev/null +++ b/local/recipes/kde/kf6-solid/redox-no-systemsemaphore-optical-cache.patch @@ -0,0 +1,29 @@ +--- a/src/solid/devices/backends/udisks2/udisksopticaldisc.cpp ++++ b/src/solid/devices/backends/udisks2/udisksopticaldisc.cpp +@@ -186,6 +186,7 @@ + QPair m_info[100]; + }; + ++#if QT_CONFIG(sharedmemory) && QT_CONFIG(systemsemaphore) + class SharedContentTypesCache + { + private: +@@ -295,6 +296,18 @@ + m_shmem.detach(); + } + }; ++#else ++// Redox and other platforms without QSystemSemaphore + QSharedMemory locking: ++// there is no cross-process content-type cache; detect directly each call. ++class SharedContentTypesCache ++{ ++public: ++ Solid::OpticalDisc::ContentTypes getContent(const OpticalDisc::Identity &, const QByteArray &file) ++ { ++ return advancedDiscDetect(file); ++ } ++}; ++#endif // QT_CONFIG(sharedmemory) && QT_CONFIG(systemsemaphore) + + Q_GLOBAL_STATIC(QThreadStorage, sharedContentTypesCache) +