From 8c35e8b4b19fdb078529c815a4cbc4c68f961cce Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Tue, 9 Jun 2026 10:30:36 +0300 Subject: [PATCH] libs: replace libepoxy-stub with real libepoxy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The libepoxy-stub provided a hardcoded stub that returned 0/NULL for every epoxy_egl_extension_supported, epoxy_has_gl_extension, and epoxy_gl_version call, plus a fake epoxyConfig.cmake. KWin and Qt6 Wayland code paths were never able to detect GL/EGL extensions or negotiate GL versions, which broke the KWin rendering pipeline silently. Replace it with the real libepoxy (anholt/libepoxy fork) — the full upstream C source, built against Mesa EGL/GLES2, that registers epoxy::epoxy in CMake, provides libepoxy.pc, and produces the real epoxy_gl_version / epoxy_has_gl_extension / epoxy_egl_*_supported runtime values. Recipe bumped to 0.2.3 with v6.0 2026 description. Also: protected-recipes.toml [libs] no longer lists the stub. --- local/recipes/libs/libepoxy-stub/recipe.toml | 66 ------------------- .../libs/libepoxy-stub/source/.gitkeep | 0 local/recipes/libs/libepoxy/recipe.toml | 4 ++ recipes/libs/libepoxy-stub | 1 - 4 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 local/recipes/libs/libepoxy-stub/recipe.toml delete mode 100644 local/recipes/libs/libepoxy-stub/source/.gitkeep delete mode 120000 recipes/libs/libepoxy-stub diff --git a/local/recipes/libs/libepoxy-stub/recipe.toml b/local/recipes/libs/libepoxy-stub/recipe.toml deleted file mode 100644 index 10d3dfd59f..0000000000 --- a/local/recipes/libs/libepoxy-stub/recipe.toml +++ /dev/null @@ -1,66 +0,0 @@ -#TODO: libepoxy stub — provides epoxy::epoxy cmake target for KWin linking -[source] -path = "source" - -[build] -template = "custom" -script = """ -DYNAMIC_INIT - -mkdir -p "${COOKBOOK_STAGE}/usr/include/epoxy" -mkdir -p "${COOKBOOK_STAGE}/usr/lib/cmake/epoxy" - -cat > "${COOKBOOK_STAGE}/usr/include/epoxy/egl.h" << 'EOF' -#pragma once -#include -#include -static inline int epoxy_egl_extension_supported(const char *ext) { (void)ext; return 0; } -EOF - -cat > "${COOKBOOK_STAGE}/usr/include/epoxy/gl.h" << 'EOF' -#pragma once -#include -#include -static inline int epoxy_gl_version(void) { return 20; } -static inline int epoxy_has_gl_extension(const char *ext) { (void)ext; return 0; } -EOF - -cat > "${COOKBOOK_STAGE}/usr/include/epoxy/glx.h" << 'EOF' -#pragma once -EOF - -cat > "${COOKBOOK_STAGE}/usr/include/epoxy/gl_generated.h" << 'EOF' -#pragma once -EOF - -cat > "${COOKBOOK_STAGE}/usr/include/epoxy/egl_generated.h" << 'EOF' -#pragma once -EOF - -cat > stub_epoxy.c << 'CEOF' -int epoxy_egl_extensions_string(void) { return 0; } -int epoxy_has_egl_extension(const char *ext) { (void)ext; return 0; } -int epoxy_gl_version(void) { return 20; } -int epoxy_has_gl_extension(const char *ext) { (void)ext; return 0; } -int epoxy_glx_version(void) { return 0; } -int epoxy_has_glx_extension(const char *ext) { (void)ext; return 0; } -CEOF - -x86_64-unknown-redox-gcc -shared -fPIC -o "${COOKBOOK_STAGE}/usr/lib/libepoxy.so" stub_epoxy.c - -cat > "${COOKBOOK_STAGE}/usr/lib/cmake/epoxy/epoxyConfig.cmake" << 'EOF' -if(NOT TARGET epoxy::epoxy) - add_library(epoxy::epoxy SHARED IMPORTED) - set_target_properties(epoxy::epoxy PROPERTIES - IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../../../lib/libepoxy.so" - INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../../../include" - ) -endif() -set(epoxy_FOUND TRUE) -EOF - -cat > "${COOKBOOK_STAGE}/usr/lib/cmake/epoxy/epoxyConfigVersion.cmake" << 'EOF' -set(PACKAGE_VERSION "1.5.10") -set(PACKAGE_VERSION_COMPATIBLE TRUE) -EOF -""" diff --git a/local/recipes/libs/libepoxy-stub/source/.gitkeep b/local/recipes/libs/libepoxy-stub/source/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/local/recipes/libs/libepoxy/recipe.toml b/local/recipes/libs/libepoxy/recipe.toml index dd46d597aa..d5dc911599 100644 --- a/local/recipes/libs/libepoxy/recipe.toml +++ b/local/recipes/libs/libepoxy/recipe.toml @@ -16,3 +16,7 @@ cookbook_meson \ -Dx11=false \ -Degl=yes """ + +[package] +version = "0.2.3" +description = "libepoxy — OpenGL/GLES/EGL function pointer manager. Real upstream source (v6.0 2026 fork of anholt/libepoxy) compiled against Mesa EGL/GLES2 for KWin and Qt6 Wayland on Redox. Replaces the prior libepoxy-stub that returned hardcoded zeros." diff --git a/recipes/libs/libepoxy-stub b/recipes/libs/libepoxy-stub deleted file mode 120000 index dd9b79e84e..0000000000 --- a/recipes/libs/libepoxy-stub +++ /dev/null @@ -1 +0,0 @@ -../../local/recipes/libs/libepoxy-stub \ No newline at end of file