From 9f304623a9d68160e9845a1c8e9b22eaa7083d43 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 30 Oct 2025 17:35:02 -0600 Subject: [PATCH] wlroots: fix compilation --- recipes/wip/wayland/wlroots/recipe.toml | 24 +++++++++++++++++--- recipes/wip/wayland/wlroots/redox.patch | 29 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 recipes/wip/wayland/wlroots/redox.patch diff --git a/recipes/wip/wayland/wlroots/recipe.toml b/recipes/wip/wayland/wlroots/recipe.toml index ba65fb026..3a58b98f0 100644 --- a/recipes/wip/wayland/wlroots/recipe.toml +++ b/recipes/wip/wayland/wlroots/recipe.toml @@ -2,13 +2,31 @@ # build instructions: https://gitlab.freedesktop.org/wlroots/wlroots#building [source] tar = "https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.17.0/downloads/wlroots-0.17.0.tar.gz" +blake3 = "f119e53d1f1dd5c8d4c348b0ebc2a780cf4174d158995356a087b26c3bc7d222" +patches = ["redox.patch"] + [build] template = "meson" dependencies = [ + "cairo", + "expat", + "freetype2", + "fontconfig", + "libdrm", + "libffi", + "libpng", + "libpthread-stubs", "libwayland", + "libx11", + "libxau", "libxcb", - "libinput", + "libxext", + "libxfixes", "libxkbcommon", + "libxxf86vm", + "mesa-x11", "pixman", - "seatd", -] + "wayland-protocols", + "x11proto", + "zlib", +] \ No newline at end of file diff --git a/recipes/wip/wayland/wlroots/redox.patch b/recipes/wip/wayland/wlroots/redox.patch new file mode 100644 index 000000000..92b6c8e23 --- /dev/null +++ b/recipes/wip/wayland/wlroots/redox.patch @@ -0,0 +1,29 @@ +diff -ruwN source-old/protocol/meson.build source/protocol/meson.build +--- source-old/protocol/meson.build 2023-11-21 09:06:13.000000000 -0700 ++++ source/protocol/meson.build 2025-10-30 17:22:43.903323248 -0600 +@@ -5,9 +5,8 @@ + ) + wl_protocol_dir = wayland_protos.get_variable('pkgdatadir') + +-wayland_scanner_dep = dependency('wayland-scanner', native: true) + wayland_scanner = find_program( +- wayland_scanner_dep.get_variable('wayland_scanner'), ++ 'wayland-scanner', + native: true, + ) + +diff -ruwN source-old/render/dmabuf.c source/render/dmabuf.c +--- source-old/render/dmabuf.c 2023-11-21 09:06:13.000000000 -0700 ++++ source/render/dmabuf.c 2025-10-30 17:33:46.223683923 -0600 +@@ -5,6 +5,11 @@ + #include + #include "render/dmabuf.h" + ++#if defined(__redox__) ++//TODO: F_DUPFD_CLOEXEC needed for atomic close on exec ++#define F_DUPFD_CLOEXEC F_DUPFD ++#endif ++ + void wlr_dmabuf_attributes_finish(struct wlr_dmabuf_attributes *attribs) { + for (int i = 0; i < attribs->n_planes; ++i) { + close(attribs->fd[i]);