### this file is sourced not run
PKGVER=0.17.4
PKGBUILD=1
PKGARCH=x86_64

TARBALL=wlroots-$PKGVER.tar.bz2
MD5SUM=04dd3543bff6386bf0f0d737011110cf
SRC_URL=https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='libwayland libinput libxkbcommon pixman xcb-util-errors
seatd libdrm libliftoff libdisplay-info' # and mesa/opengl
SLACKDESC="libwlroots: libwlroots $PKGVER (Wayland compositor library)
libwlroots: 
libwlroots: wlroots is a package of pluggable, composable, unopinionated modules 
libwlroots: for building a Wayland compositor.
libwlroots: 
libwlroots: https://gitlab.freedesktop.org/wlroots/wlroots/
libwlroots: 
libwlroots: This version is built without vulkan support.
libwlroots: 
libwlroots: THIS IS AN EXPERIMENTAL PACKAGE.
libwlroots: 
"
# not needed when running under X, but needed when running on raw device
SLACKSUG='xwayland ' 

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/wlroots* &&
	
	# as it says
	patch -Np1 -i ../pkg/dont_kill_my_xserver.patch &&

	return 0
}

### default pkg_package
### build
pkg_build() {
	MESONFLAGS="$MESONFLAGS \
		--buildtype=release \
		-Dexamples=false    \
	" &&	
	pkg_build_meson &&
	pkg_build_slackdesc
}
