diff --git a/local/patches/mesa/08-meson-redox-kms-drm.patch b/local/patches/mesa/08-meson-redox-kms-drm.patch new file mode 100644 index 0000000000..dad944b2f1 --- /dev/null +++ b/local/patches/mesa/08-meson-redox-kms-drm.patch @@ -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__' diff --git a/local/recipes/libs/mesa/recipe.toml b/local/recipes/libs/mesa/recipe.toml index 5113010e9e..c6ad50f37b 100644 --- a/local/recipes/libs/mesa/recipe.toml +++ b/local/recipes/libs/mesa/recipe.toml @@ -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"