mesa: persist Redox EGL/DRI gate as a tracked patch

The meson gate that enables EGL on Redox — adding "redox" to
system_has_kms_drm (meson.build:159, so with_dri→with_egl/gbm) and to the
_GNU_SOURCE platform list (:1208) — existed only as an in-place edit in the
untracked extracted source/ tree. Any clean re-extract lost it and reverted to
"Feature egl cannot be enabled". Capture it as local/patches/mesa/08-*.patch and
wire it into recipe.toml so EGL/GBM/llvmpipe build reproducibly. Source tree
reverted to pristine so the patch is the sole, tracked change.
This commit is contained in:
2026-07-24 13:18:20 +09:00
parent f6b09ff713
commit 74d5e01bb4
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,20 @@
--- a/meson.build
+++ b/meson.build
@@ -156,7 +156,7 @@
with_any_opengl = with_opengl or with_gles1 or with_gles2
-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system())
+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm', 'redox'].contains(host_machine.system())
gallium_drivers = get_option('gallium-drivers')
if gallium_drivers.contains('auto')
@@ -1205,7 +1205,7 @@
endif
# TODO: this is very incomplete
-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm'].contains(host_machine.system())
+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm', 'redox'].contains(host_machine.system())
pre_args += '-D_GNU_SOURCE'
elif host_machine.system() == 'sunos'
pre_args += '-D__EXTENSIONS__'
+4
View File
@@ -15,6 +15,10 @@ patches = [
"mesa/02-gbm-dumb-prime-export.patch",
"mesa/04-sys-ioccom-stub-header.patch",
"mesa/05-vk-sync-wchar-include.patch",
# Persist the Redox EGL/DRI gate: add 'redox' to meson's system_has_kms_drm
# (enables with_dri → with_egl/gbm) and to the _GNU_SOURCE platform list.
# Was an untracked in-place edit lost on every clean re-extract.
"mesa/08-meson-redox-kms-drm.patch",
]
[build]
template = "custom"