wlroots: fix compilation

This commit is contained in:
Jeremy Soller 2025-10-30 17:35:02 -06:00
parent 30a1bfa3be
commit 9f304623a9
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
2 changed files with 50 additions and 3 deletions

View File

@ -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",
]

View File

@ -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 <wlr/util/log.h>
#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]);