PORTNAME=	wlroots
PORTVERSION=	0.19.3
CATEGORIES=	x11
MASTER_SITES=	https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${PORTVERSION}/
DISTFILES=	wlroots-${PORTVERSION}.tar.gz

SOURCE_DIR=	${WRKSRC}/wlroots-${PORTVERSION}
BUILD_STYLE=	meson
RUN_DEPENDS=	libudev-garden:devel/libudev-garden \
		seatd:sysutils/seatd \
		wayland:graphics/wayland \
		wayland-protocols:graphics/wayland-protocols \
		libdrm:graphics/libdrm \
		hwdata:misc/hwdata \
		libdisplay-info:graphics/libdisplay-info \
		libinput:x11/libinput \
		libxkbcommon:x11/libxkbcommon \
		pixman:graphics/pixman
CONFIGURE_ARGS=	-Dbackends=drm,libinput -Drenderers=[] -Dallocators=[] \
		-Dsession=enabled -Dxwayland=disabled -Dexamples=false \
		-Dcolor-management=disabled -Dlibliftoff=disabled

do-install:
	env DESTDIR="${STAGEDIR}" ${NINJA} -C "${BUILD_DIR}" install
	mkdir -p "${STAGEDIR}${PREFIX}/share/licenses/wlroots"
	install -m 0644 "${SOURCE_DIR}/LICENSE" \
	    "${STAGEDIR}${PREFIX}/share/licenses/wlroots/LICENSE"

.include "${.PARSEDIR}/../../Mk/mouse.port.mk"
