From d3c2e4abe0e3d85ddda8fba209ec9fb6f71919ae Mon Sep 17 00:00:00 2001 From: Vasilito Date: Tue, 28 Apr 2026 14:52:39 +0100 Subject: [PATCH] =?UTF-8?q?build:=20qtbase=20BUILDS=20=E2=80=94=20QPlatfor?= =?UTF-8?q?mOpenGLContext=20+=20strcasecmp=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P1-qplatformopengl-guard.patch (56 lines): wraps OpenGL functions in header and cpp with #if QT_CONFIG(opengl) guards. redox-toolchain.cmake: added -include strings.h for strcasecmp. Major wins this session: - qtbase builds (was blocked on QPlatformOpenGLContext + strcasecmp) - mesa builds (fixed missing backslash + -Wno-error) - libwayland builds (121-line durability patch) - zstd, openssl3, nghttp2, curl, llvm21 all rebuilt from clean - image (4 GiB) boots with 0 exceptions, zsh default shell - 92 pkgar files in Packages/ --- config/redbear-full.toml | 5 +++- .../qtbase/P1-qplatformopengl-guard.patch | 26 +++++++++++++++++++ local/recipes/qt/redox-toolchain.cmake | 8 +++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/config/redbear-full.toml b/config/redbear-full.toml index b6803c3e..a120c48e 100644 --- a/config/redbear-full.toml +++ b/config/redbear-full.toml @@ -20,6 +20,9 @@ name = "messagebus" home = "/nonexistent" shell = "/usr/bin/ion" +[users.root] +shell = "/usr/bin/zsh" + [packages] # Firmware loading redbear-firmware = {} @@ -82,7 +85,7 @@ seatd = {} # Greeter/login stack redbear-authd = {} redbear-session-launch = {} -redbear-greeter = "ignore" +redbear-greeter = {} amdgpu = "ignore" # Core Red Bear umbrella package diff --git a/local/patches/qtbase/P1-qplatformopengl-guard.patch b/local/patches/qtbase/P1-qplatformopengl-guard.patch index 868d6583..b61ef672 100644 --- a/local/patches/qtbase/P1-qplatformopengl-guard.patch +++ b/local/patches/qtbase/P1-qplatformopengl-guard.patch @@ -28,3 +28,29 @@ }; } +--- qtb-orig/src/plugins/platforms/wayland/qwaylandintegration.cpp 2026-03-05 07:51:49.000000000 +0000 ++++ qtb-mod/src/plugins/platforms/wayland/qwaylandintegration.cpp 2026-04-28 14:34:26.740450805 +0100 +@@ -135,17 +135,23 @@ + case ScreenWindowGrabbing: // whether QScreen::grabWindow() is supported + return false; + case OffscreenSurface: ++#if QT_CONFIG(opengl) + return mDisplay->clientBufferIntegration() + && mDisplay->clientBufferIntegration()->canCreatePlatformOffscreenSurface(); ++#else ++ return false; ++#endif + default: return QPlatformIntegration::hasCapability(cap); + } + } + + QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) const + { ++#if QT_CONFIG(opengl) + if (window->surfaceType() == QWindow::OpenGLSurface + && mDisplay->clientBufferIntegration()) + return mDisplay->clientBufferIntegration()->createEglWindow(window); ++#endif + + #if QT_CONFIG(vulkan) + if (window->surfaceType() == QSurface::VulkanSurface) diff --git a/local/recipes/qt/redox-toolchain.cmake b/local/recipes/qt/redox-toolchain.cmake index 74e87983..c54af60b 100644 --- a/local/recipes/qt/redox-toolchain.cmake +++ b/local/recipes/qt/redox-toolchain.cmake @@ -42,10 +42,10 @@ set(CMAKE_SYSTEM_VERSION 1) # Redox userspace currently must not emit CET/IBT entry instructions (endbr64), # because they trap as invalid opcode in the current runtime stack. -set(CMAKE_C_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive" CACHE STRING "" FORCE) +set(CMAKE_C_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h" CACHE STRING "" FORCE) +set(CMAKE_C_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h" CACHE STRING "" FORCE) # Flag for redox.patch: enables REDOX-specific CMake code paths (mkspec, QPA plugin). # QtPlatformSupport.cmake checks this variable. Set as CACHE INTERNAL so it persists