pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import wayland/wlroots



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Sat Apr 18 12:20:19 2026 +0200
Changeset:	65249a8950a0530fc17215653b4a63d3f6ac8bc5

Modified Files:
	Makefile
Added Files:
	wlroots/DESCR
	wlroots/Makefile
	wlroots/PLIST
	wlroots/buildlink3.mk
	wlroots/distinfo
	wlroots/options.mk
	wlroots/patches/patch-backend_libinput_meson.build
	wlroots/patches/patch-render_allocator_allocator.c
	wlroots/patches/patch-render_drm__syncobj.c
	wlroots/patches/patch-render_vulkan_vulkan.c
	wlroots/patches/patch-util_shm.c
	wlroots/patches/patch-xcursor_xcursor.c

Log Message:
Import wayland/wlroots

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=65249a8950a0530fc17215653b4a63d3f6ac8bc5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |   1 +
 wlroots/DESCR                                      |   9 ++
 wlroots/Makefile                                   |  52 +++++++++
 wlroots/PLIST                                      | 122 +++++++++++++++++++++
 wlroots/buildlink3.mk                              |  36 ++++++
 wlroots/distinfo                                   |  11 ++
 wlroots/options.mk                                 |  13 +++
 wlroots/patches/patch-backend_libinput_meson.build |  16 +++
 wlroots/patches/patch-render_allocator_allocator.c |  59 ++++++++++
 wlroots/patches/patch-render_drm__syncobj.c        |  15 +++
 wlroots/patches/patch-render_vulkan_vulkan.c       |  12 ++
 wlroots/patches/patch-util_shm.c                   |  16 +++
 wlroots/patches/patch-xcursor_xcursor.c            |  20 ++++
 13 files changed, 382 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 0a2d607e2f..c47da10f15 100644
--- a/Makefile
+++ b/Makefile
@@ -6056,6 +6056,7 @@ SUBDIR+=	wl-git
 SUBDIR+=	wl-snapshot
 SUBDIR+=	wla-dx
 SUBDIR+=	wla-dx-git
+SUBDIR+=	wlroots
 SUBDIR+=	wmbattery
 SUBDIR+=	wmc2d
 SUBDIR+=	wmii-devel
diff --git a/wlroots/DESCR b/wlroots/DESCR
new file mode 100644
index 0000000000..8b656cce48
--- /dev/null
+++ b/wlroots/DESCR
@@ -0,0 +1,9 @@
+Wlroots implements a huge variety of Wayland compositor
+features and implements them right, so you can focus on
+the features that make your compositor unique. By using
+wlroots, you get high performance, excellent hardware
+compatibility, broad support for many wayland interfaces,
+and comfortable development tools - or any subset of
+these features you like, because all of them work
+independently of one another and freely compose with
+anything you want to implement yourself.
diff --git a/wlroots/Makefile b/wlroots/Makefile
new file mode 100644
index 0000000000..0290fc71f0
--- /dev/null
+++ b/wlroots/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+DISTNAME=		wlroots-0.19.2
+CATEGORIES=		wayland
+MASTER_SITE_GITLAB=	https://gitlab.freedesktop.org/
+MASTER_SITES=		${MASTER_SITE_GITLAB:=wlroots/}
+GITLAB_TAG=		${PKGVERSION_NOREV}
+
+MAINTAINER=		kikadf.01%gmail.com@localhost
+HOMEPAGE=		https://gitlab.freedesktop.org/wlroots/wlroots
+COMMENT=		Wayland compositor library
+LICENSE=		mit
+
+USE_TOOLS+=		pkg-config
+
+MESON_ARGS+=		-Dallocators=gbm
+
+SUBST_CLASSES+=		path
+SUBST_STAGE.path=	pre-configure
+SUBST_MESSAGE.path=	Fixing pathes
+SUBST_FILES.path+=	xcursor/xcursor.c
+SUBST_VARS.path+=	PREFIX X11BASE
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 110000
+PKG_FAIL_REASON+=	"DRM_IOCTL_GET_UNIQUE is not allowed on render nodes"
+.endif
+
+.include "options.mk"
+
+.include "../../devel/meson/build.mk"
+.include "../../devel/libopeninput/buildlink3.mk"
+.include "../../devel/libudev-bsd/buildlink3.mk"
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+PREFER.MesaLib=	pkgsrc	# glesv2
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/glslang/buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
+.include "../../graphics/libliftoff/buildlink3.mk"
+.include "../../graphics/vulkan-loader/buildlink3.mk"
+.include "../../sysutils/hwdata/buildlink3.mk"
+.include "../../sysutils/seatd/buildlink3.mk"
+.include "../../x11/libdisplay-info/buildlink3.mk"
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../x11/xcb-util-errors/buildlink3.mk"
+.include "../../x11/xcb-util-renderutil/buildlink3.mk"
+.include "../../x11/xcb-util-wm/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/wlroots/PLIST b/wlroots/PLIST
new file mode 100644
index 0000000000..1baebdc5cd
--- /dev/null
+++ b/wlroots/PLIST
@@ -0,0 +1,122 @@
+@comment $NetBSD: PLIST,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+include/wlroots-0.19/wlr/backend.h
+include/wlroots-0.19/wlr/backend/drm.h
+include/wlroots-0.19/wlr/backend/headless.h
+include/wlroots-0.19/wlr/backend/interface.h
+include/wlroots-0.19/wlr/backend/libinput.h
+include/wlroots-0.19/wlr/backend/multi.h
+include/wlroots-0.19/wlr/backend/session.h
+include/wlroots-0.19/wlr/backend/wayland.h
+include/wlroots-0.19/wlr/backend/x11.h
+include/wlroots-0.19/wlr/config.h
+include/wlroots-0.19/wlr/interfaces/wlr_buffer.h
+include/wlroots-0.19/wlr/interfaces/wlr_ext_image_capture_source_v1.h
+include/wlroots-0.19/wlr/interfaces/wlr_keyboard.h
+include/wlroots-0.19/wlr/interfaces/wlr_output.h
+include/wlroots-0.19/wlr/interfaces/wlr_pointer.h
+include/wlroots-0.19/wlr/interfaces/wlr_switch.h
+include/wlroots-0.19/wlr/interfaces/wlr_tablet_pad.h
+include/wlroots-0.19/wlr/interfaces/wlr_tablet_tool.h
+include/wlroots-0.19/wlr/interfaces/wlr_touch.h
+include/wlroots-0.19/wlr/render/allocator.h
+include/wlroots-0.19/wlr/render/color.h
+include/wlroots-0.19/wlr/render/dmabuf.h
+include/wlroots-0.19/wlr/render/drm_format_set.h
+include/wlroots-0.19/wlr/render/drm_syncobj.h
+include/wlroots-0.19/wlr/render/egl.h
+include/wlroots-0.19/wlr/render/gles2.h
+include/wlroots-0.19/wlr/render/interface.h
+include/wlroots-0.19/wlr/render/pass.h
+include/wlroots-0.19/wlr/render/pixman.h
+include/wlroots-0.19/wlr/render/swapchain.h
+include/wlroots-0.19/wlr/render/vulkan.h
+include/wlroots-0.19/wlr/render/wlr_renderer.h
+include/wlroots-0.19/wlr/render/wlr_texture.h
+include/wlroots-0.19/wlr/types/wlr_alpha_modifier_v1.h
+include/wlroots-0.19/wlr/types/wlr_buffer.h
+include/wlroots-0.19/wlr/types/wlr_color_management_v1.h
+include/wlroots-0.19/wlr/types/wlr_compositor.h
+include/wlroots-0.19/wlr/types/wlr_content_type_v1.h
+include/wlroots-0.19/wlr/types/wlr_cursor.h
+include/wlroots-0.19/wlr/types/wlr_cursor_shape_v1.h
+include/wlroots-0.19/wlr/types/wlr_damage_ring.h
+include/wlroots-0.19/wlr/types/wlr_data_control_v1.h
+include/wlroots-0.19/wlr/types/wlr_data_device.h
+include/wlroots-0.19/wlr/types/wlr_drm.h
+include/wlroots-0.19/wlr/types/wlr_drm_lease_v1.h
+include/wlroots-0.19/wlr/types/wlr_export_dmabuf_v1.h
+include/wlroots-0.19/wlr/types/wlr_ext_data_control_v1.h
+include/wlroots-0.19/wlr/types/wlr_ext_foreign_toplevel_list_v1.h
+include/wlroots-0.19/wlr/types/wlr_ext_image_capture_source_v1.h
+include/wlroots-0.19/wlr/types/wlr_ext_image_copy_capture_v1.h
+include/wlroots-0.19/wlr/types/wlr_foreign_toplevel_management_v1.h
+include/wlroots-0.19/wlr/types/wlr_fractional_scale_v1.h
+include/wlroots-0.19/wlr/types/wlr_gamma_control_v1.h
+include/wlroots-0.19/wlr/types/wlr_idle_inhibit_v1.h
+include/wlroots-0.19/wlr/types/wlr_idle_notify_v1.h
+include/wlroots-0.19/wlr/types/wlr_input_device.h
+include/wlroots-0.19/wlr/types/wlr_input_method_v2.h
+include/wlroots-0.19/wlr/types/wlr_keyboard.h
+include/wlroots-0.19/wlr/types/wlr_keyboard_group.h
+include/wlroots-0.19/wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h
+include/wlroots-0.19/wlr/types/wlr_layer_shell_v1.h
+include/wlroots-0.19/wlr/types/wlr_linux_dmabuf_v1.h
+include/wlroots-0.19/wlr/types/wlr_linux_drm_syncobj_v1.h
+include/wlroots-0.19/wlr/types/wlr_output.h
+include/wlroots-0.19/wlr/types/wlr_output_layer.h
+include/wlroots-0.19/wlr/types/wlr_output_layout.h
+include/wlroots-0.19/wlr/types/wlr_output_management_v1.h
+include/wlroots-0.19/wlr/types/wlr_output_power_management_v1.h
+include/wlroots-0.19/wlr/types/wlr_output_swapchain_manager.h
+include/wlroots-0.19/wlr/types/wlr_pointer.h
+include/wlroots-0.19/wlr/types/wlr_pointer_constraints_v1.h
+include/wlroots-0.19/wlr/types/wlr_pointer_gestures_v1.h
+include/wlroots-0.19/wlr/types/wlr_presentation_time.h
+include/wlroots-0.19/wlr/types/wlr_primary_selection.h
+include/wlroots-0.19/wlr/types/wlr_primary_selection_v1.h
+include/wlroots-0.19/wlr/types/wlr_relative_pointer_v1.h
+include/wlroots-0.19/wlr/types/wlr_scene.h
+include/wlroots-0.19/wlr/types/wlr_screencopy_v1.h
+include/wlroots-0.19/wlr/types/wlr_seat.h
+include/wlroots-0.19/wlr/types/wlr_security_context_v1.h
+include/wlroots-0.19/wlr/types/wlr_server_decoration.h
+include/wlroots-0.19/wlr/types/wlr_session_lock_v1.h
+include/wlroots-0.19/wlr/types/wlr_shm.h
+include/wlroots-0.19/wlr/types/wlr_single_pixel_buffer_v1.h
+include/wlroots-0.19/wlr/types/wlr_subcompositor.h
+include/wlroots-0.19/wlr/types/wlr_switch.h
+include/wlroots-0.19/wlr/types/wlr_tablet_pad.h
+include/wlroots-0.19/wlr/types/wlr_tablet_tool.h
+include/wlroots-0.19/wlr/types/wlr_tablet_v2.h
+include/wlroots-0.19/wlr/types/wlr_tearing_control_v1.h
+include/wlroots-0.19/wlr/types/wlr_text_input_v3.h
+include/wlroots-0.19/wlr/types/wlr_touch.h
+include/wlroots-0.19/wlr/types/wlr_transient_seat_v1.h
+include/wlroots-0.19/wlr/types/wlr_viewporter.h
+include/wlroots-0.19/wlr/types/wlr_virtual_keyboard_v1.h
+include/wlroots-0.19/wlr/types/wlr_virtual_pointer_v1.h
+include/wlroots-0.19/wlr/types/wlr_xcursor_manager.h
+include/wlroots-0.19/wlr/types/wlr_xdg_activation_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_decoration_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_dialog_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_foreign_registry.h
+include/wlroots-0.19/wlr/types/wlr_xdg_foreign_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_foreign_v2.h
+include/wlroots-0.19/wlr/types/wlr_xdg_output_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_shell.h
+include/wlroots-0.19/wlr/types/wlr_xdg_system_bell_v1.h
+include/wlroots-0.19/wlr/types/wlr_xdg_toplevel_icon_v1.h
+include/wlroots-0.19/wlr/util/addon.h
+include/wlroots-0.19/wlr/util/box.h
+include/wlroots-0.19/wlr/util/edges.h
+include/wlroots-0.19/wlr/util/log.h
+include/wlroots-0.19/wlr/util/region.h
+include/wlroots-0.19/wlr/util/transform.h
+include/wlroots-0.19/wlr/version.h
+include/wlroots-0.19/wlr/xcursor.h
+${PLIST.xwayland}include/wlroots-0.19/wlr/xwayland.h
+include/wlroots-0.19/wlr/xwayland/server.h
+include/wlroots-0.19/wlr/xwayland/shell.h
+include/wlroots-0.19/wlr/xwayland/xwayland.h
+lib/libwlroots-0.19.so
+lib/pkgconfig/wlroots-0.19.pc
diff --git a/wlroots/buildlink3.mk b/wlroots/buildlink3.mk
new file mode 100644
index 0000000000..e78cb205e5
--- /dev/null
+++ b/wlroots/buildlink3.mk
@@ -0,0 +1,36 @@
+# $NetBSD: buildlink3.mk,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+BUILDLINK_TREE+=	wlroots
+
+.if !defined(WLROOTS_BUILDLINK3_MK)
+WLROOTS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.wlroots+=	wlroots>=0.19.2
+BUILDLINK_PKGSRCDIR.wlroots?=	../../wayland/wlroots
+
+.include "../../devel/libopeninput/buildlink3.mk"
+.include "../../devel/libudev-bsd/buildlink3.mk"
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+PREFER.MesaLib=	pkgsrc	# glesv2
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
+.include "../../graphics/libliftoff/buildlink3.mk"
+.include "../../graphics/vulkan-loader/buildlink3.mk"
+.include "../../sysutils/seatd/buildlink3.mk"
+.include "../../x11/libdisplay-info/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../x11/xcb-util-errors/buildlink3.mk"
+.include "../../x11/xcb-util-renderutil/buildlink3.mk"
+.include "../../x11/xcb-util-wm/buildlink3.mk"
+
+pkgbase := wlroots
+.include "../../mk/pkg-build-options.mk"
+.if ${PKG_BUILD_OPTIONS.wlroots:Mxwayland}
+.include "../../wayland/xwayland/buildlink3.mk"
+.endif
+
+.endif	# WLROOTS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-wlroots
diff --git a/wlroots/distinfo b/wlroots/distinfo
new file mode 100644
index 0000000000..493c6827b1
--- /dev/null
+++ b/wlroots/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+BLAKE2s (wlroots-0.19.2.tar.gz) = aff6485d67841535c2bac5fda24cb8b0f6449ec841a344caa9df3641cd2548e0
+SHA512 (wlroots-0.19.2.tar.gz) = a48e71bc7ebcd2ca3bcbc1b20034b50ed230ecdd270fa4a6362e19e24b3fb60ea2e0a9631fa1b7ebadf4fc0f433a7cd9525f57e6130f7fede0a239ba1d1aba29
+Size (wlroots-0.19.2.tar.gz) = 670517 bytes
+SHA1 (patch-backend_libinput_meson.build) = 7f109761790191930828f280ca74db6bc95941e1
+SHA1 (patch-render_allocator_allocator.c) = ca1f468d6e253fea5ae4d739172d4e94a07a4be6
+SHA1 (patch-render_drm__syncobj.c) = 70708836fe3fd7e4f55e128edbe9d3ad50f66916
+SHA1 (patch-render_vulkan_vulkan.c) = adf215c6cc885909a51c534b0102c89a84f8ab27
+SHA1 (patch-util_shm.c) = 4bc2f6eefbe94539d03e1ce2f1e001ae97ab4c60
+SHA1 (patch-xcursor_xcursor.c) = 43a0135fd953e79326b7bb0e0bfbdae6370f25df
diff --git a/wlroots/options.mk b/wlroots/options.mk
new file mode 100644
index 0000000000..dcc8374cbd
--- /dev/null
+++ b/wlroots/options.mk
@@ -0,0 +1,13 @@
+# $NetBSD: options.mk,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.wlroots
+PKG_SUPPORTED_OPTIONS+=	xwayland
+PKG_SUGGESTED_OPTIONS+=	xwayland
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=	xwayland
+.if !empty(PKG_OPTIONS:Mxwayland)
+.include "../../wayland/xwayland/buildlink3.mk"
+PLIST.xwayland=	yes
+.endif
diff --git a/wlroots/patches/patch-backend_libinput_meson.build b/wlroots/patches/patch-backend_libinput_meson.build
new file mode 100644
index 0000000000..75b7a99e38
--- /dev/null
+++ b/wlroots/patches/patch-backend_libinput_meson.build
@@ -0,0 +1,16 @@
+$NetBSD: patch-backend_libinput_meson.build,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* libopeninput lacks libinput_device_get_id_bustype() 
+
+--- backend/libinput/meson.build.orig	2025-09-12 15:10:06.534197806 +0000
++++ backend/libinput/meson.build
+@@ -28,4 +28,8 @@ wlr_files += files(
+ features += { 'libinput-backend': true }
+ wlr_deps += libinput
+ 
+-internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0'))
++if host_machine.system() == 'netbsd'
++	internal_config.set10('HAVE_LIBINPUT_BUSTYPE', false)
++else
++	internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0'))
++endif
diff --git a/wlroots/patches/patch-render_allocator_allocator.c b/wlroots/patches/patch-render_allocator_allocator.c
new file mode 100644
index 0000000000..3d6c374bb2
--- /dev/null
+++ b/wlroots/patches/patch-render_allocator_allocator.c
@@ -0,0 +1,59 @@
+$NetBSD: patch-render_allocator_allocator.c,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* On NetBSD the stub drm_mode_create_lease_ioctl() always returns with -ENODEV,
+  but after drmModeCreateLease() only allowed -EINVAL and -EOPNOTSUPP
+* Call reopen_drm_node() with the correct fd
+  backend(card[0-3]) vs. renderer(renderD[128-131])
+
+--- render/allocator/allocator.c.orig	2025-10-21 22:21:53.000000000 +0000
++++ render/allocator/allocator.c
+@@ -37,6 +37,7 @@ void wlr_allocator_init(struct wlr_alloc
+  */
+ static int reopen_drm_node(int drm_fd, bool allow_render_node) {
+ 	if (drmIsMaster(drm_fd)) {
++#if !defined(__NetBSD__)
+ 		// Only recent kernels support empty leases
+ 		uint32_t lessee_id;
+ 		int lease_fd = drmModeCreateLease(drm_fd, NULL, 0, O_CLOEXEC, &lessee_id);
+@@ -46,6 +47,7 @@ static int reopen_drm_node(int drm_fd, b
+ 			wlr_log_errno(WLR_ERROR, "drmModeCreateLease failed");
+ 			return -1;
+ 		}
++#endif
+ 		wlr_log(WLR_DEBUG, "drmModeCreateLease failed, "
+ 			"falling back to plain open");
+ 	}
+@@ -99,18 +101,12 @@ struct wlr_allocator *wlr_allocator_auto
+ 		struct wlr_renderer *renderer) {
+ 	uint32_t backend_caps = backend->buffer_caps;
+ 	uint32_t renderer_caps = renderer->render_buffer_caps;
+-
+-	// Note, drm_fd may be negative if unavailable
+-	int drm_fd = wlr_backend_get_drm_fd(backend);
+-	if (drm_fd < 0) {
+-		drm_fd = wlr_renderer_get_drm_fd(renderer);
+-	}
+-
++	int drm_fd = -1;
+ 	struct wlr_allocator *alloc = NULL;
+ 
+ 	uint32_t gbm_caps = WLR_BUFFER_CAP_DMABUF;
+-	if ((backend_caps & gbm_caps) && (renderer_caps & gbm_caps)
+-			&& drm_fd >= 0) {
++	if ((backend_caps & gbm_caps) && (renderer_caps & gbm_caps) &&
++	    ((drm_fd = wlr_renderer_get_drm_fd(renderer)) >= 0)) {
+ #if WLR_HAS_GBM_ALLOCATOR
+ 		wlr_log(WLR_DEBUG, "Trying to create gbm allocator");
+ 		int gbm_fd = reopen_drm_node(drm_fd, true);
+@@ -137,8 +133,9 @@ struct wlr_allocator *wlr_allocator_auto
+ 	}
+ 
+ 	uint32_t drm_caps = WLR_BUFFER_CAP_DMABUF | WLR_BUFFER_CAP_DATA_PTR;
+-	if ((backend_caps & drm_caps) && (renderer_caps & drm_caps)
+-			&& drm_fd >= 0 && drmIsMaster(drm_fd)) {
++	if ((backend_caps & drm_caps) && (renderer_caps & drm_caps) &&
++	    ((drm_fd = wlr_backend_get_drm_fd(backend)) >= 0) &&
++	    drmIsMaster(drm_fd)) {
+ 		wlr_log(WLR_DEBUG, "Trying to create drm dumb allocator");
+ 		int dumb_fd = reopen_drm_node(drm_fd, false);
+ 		if (dumb_fd < 0) {
diff --git a/wlroots/patches/patch-render_drm__syncobj.c b/wlroots/patches/patch-render_drm__syncobj.c
new file mode 100644
index 0000000000..28a8db8fee
--- /dev/null
+++ b/wlroots/patches/patch-render_drm__syncobj.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-render_drm__syncobj.c,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* Use ETIMEDOUT instead of ETIME
+
+--- render/drm_syncobj.c.orig	2025-09-13 13:32:29.063861299 +0000
++++ render/drm_syncobj.c
+@@ -161,7 +161,7 @@ out:
+ bool wlr_drm_syncobj_timeline_check(struct wlr_drm_syncobj_timeline *timeline,
+ 		uint64_t point, uint32_t flags, bool *result) {
+ 	int etime;
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__)|| defined(__NetBSD__)
+ 	etime = ETIMEDOUT;
+ #else
+ 	etime = ETIME;
diff --git a/wlroots/patches/patch-render_vulkan_vulkan.c b/wlroots/patches/patch-render_vulkan_vulkan.c
new file mode 100644
index 0000000000..8003b120dc
--- /dev/null
+++ b/wlroots/patches/patch-render_vulkan_vulkan.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-render_vulkan_vulkan.c,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* For makedev function
+
+--- render/vulkan/vulkan.c.orig	2025-09-12 14:05:14.281653073 +0000
++++ render/vulkan/vulkan.c
+@@ -1,4 +1,4 @@
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #undef _POSIX_C_SOURCE
+ #endif
+ #include <assert.h>
diff --git a/wlroots/patches/patch-util_shm.c b/wlroots/patches/patch-util_shm.c
new file mode 100644
index 0000000000..60b6e21ddc
--- /dev/null
+++ b/wlroots/patches/patch-util_shm.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-util_shm.c,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* For fchmod(2)
+
+--- util/shm.c.orig	2025-09-12 14:11:20.694413854 +0000
++++ util/shm.c
+@@ -2,6 +2,9 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <sys/mman.h>
++#if defined(__NetBSD__)
++#define _NETBSD_SOURCE
++#endif
+ #include <sys/stat.h>
+ #include <time.h>
+ #include <unistd.h>
diff --git a/wlroots/patches/patch-xcursor_xcursor.c b/wlroots/patches/patch-xcursor_xcursor.c
new file mode 100644
index 0000000000..8b904d51f6
--- /dev/null
+++ b/wlroots/patches/patch-xcursor_xcursor.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-xcursor_xcursor.c,v 1.1 2026/04/13 17:20:09 kikadf Exp $
+
+* Fix cursor pathes
+
+--- xcursor/xcursor.c.orig	2025-09-13 13:33:55.701973322 +0000
++++ xcursor/xcursor.c
+@@ -486,11 +486,11 @@ xcursor_xc_file_load_images(FILE *file, 
+  */
+ 
+ #ifndef ICONDIR
+-#define ICONDIR "/usr/X11R6/lib/X11/icons"
++#define ICONDIR "@X11BASE@/include/X11/pixmaps"
+ #endif
+ 
+ #ifndef XCURSORPATH
+-#define XCURSORPATH "~/.icons:/usr/share/icons:/usr/share/pixmaps:~/.cursors:/usr/share/cursors/xorg-x11:"ICONDIR
++#define XCURSORPATH "~/.icons:@PREFIX@/share/icons:~/.cursors:"ICONDIR
+ #endif
+ 
+ #define XDG_DATA_HOME_FALLBACK "~/.local/share"


Home | Main Index | Thread Index | Old Index