# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=wlroots0.16
pkgver=0.16.2
pkgrel=0
pkgdesc="Modular Wayland compositor library"
url="https://gitlab.freedesktop.org/wlroots/wlroots"
license="MIT"
arch="all"
makedepends="
	eudev-dev
	glslang-dev
	hwdata-dev
	libcap-dev
	libinput-dev
	libseat-dev
	libxcb-dev
	libxkbcommon-dev
	mesa-dev
	meson
	ninja
	pixman-dev
	vulkan-loader-dev
	wayland-dev
	wayland-protocols
	xcb-util-image-dev
	xcb-util-renderutil-dev
	xcb-util-wm-dev
	xkeyboard-config-dev
	xwayland-dev
	"
subpackages="$pkgname-dbg $pkgname-dev"
source="https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$pkgver/wlroots-$pkgver.tar.gz
	0001-vk-yeet-validation.patch
	0002-wlr-export-dmabuf-v1--handle-output-destroy.patch
	"
options="!check" # no test suite
builddir="$srcdir/wlroots-$pkgver"

replaces="wlroots"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dexamples=false \
		. build
	meson compile -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
3c1d4fecb3b751987e7051e69849fd62bd4eed95f2d2e548f06e42e4829d0fc24f20c1bfe056a53ede2d1fd05e0c566269a7b9f2bab0de0057a32b55e826a7c0  wlroots-0.16.2.tar.gz
6eb898e0dcb1d1ccabd4f8799a7797d43d363ab8a5c74462704bdc488d56a5f7059816195782c249fe2ebcffff04906fad1115aac6632bab6304db7d8f9a6dd3  0001-vk-yeet-validation.patch
26f7734757634c259b28f9dfb4b0c17c83eb3202e749187575251367481d12aa5d2b231a211a7f349314a618b71facb8d05248b3cf3cf8e1cd3e391777ad699e  0002-wlr-export-dmabuf-v1--handle-output-destroy.patch
"
