# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=gulkan
pkgver=0.16.0
pkgrel=6
pkgdesc="GLib library for Vulkan abstraction"
url="https://gitlab.freedesktop.org/xrdesktop/gulkan"
arch="all"
license="MIT AND CC-BY-SA-4.0"
depends_dev="gobject-introspection-dev"
makedepends="$depends_dev
	gdk-pixbuf-dev
	glslang
	graphene-dev
	libdrm-dev
	libxkbcommon-dev
	meson
	vulkan-loader-dev
	"
source="https://gitlab.freedesktop.org/xrdesktop/gulkan/-/archive/$pkgver/gulkan-$pkgver.tar.gz
	gcc14.patch
	"
subpackages="$pkgname-libs $pkgname-dev"
options="!check" # Requires a working Vulkan driver

build() {
	abuild-meson \
		-Dapi_doc=false \
		. output
	meson compile -C output
}

check() {
	meson test --print-errorlogs -C output
}

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

sha512sums="
b05441ab8569845a6031ce4779ba3c68e06a184feb0886def3abbde521ef63df8e91c4e92102316a1a46427073dcac9ff95aca19b769b7dc2d0fc2e8a562385c  gulkan-0.16.0.tar.gz
5529728192dfd1f86037bcfc66f21e4ae4a2686183dfc11694837b4ac7cb4c874546cf296a49263b3f1329f1d607909bb78aa944cfaa7d48833517b875f0779c  gcc14.patch
"
