# Template file for 'libpanel'
pkgname=libpanel
version=1.8.1
revision=1
build_style=meson
build_helper="gir"
hostmakedepends="pkg-config gi-docgen gettext glib-devel vala gtk-update-icon-cache"
makedepends="gtk4-devel libadwaita-devel"
short_desc="Dock/panel library for GTK 4"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-3.0-or-later"
homepage="https://gitlab.gnome.org/GNOME/libpanel"
changelog="https://gitlab.gnome.org/GNOME/libpanel/-/raw/main/NEWS"
distfiles="${GNOME_SITE}/libpanel/${version%.*}/libpanel-${version}.tar.xz"
checksum=b87b8fa9b79768cc704243793f0158a040a1e46d37b9889188545a7f7dcaa6fb

pre_build() {
	# help gi-docgen find gi files on cross
	if [ -n "$CROSS_BUILD" ]; then
		export XDG_DATA_DIRS=/usr/$XBPS_CROSS_TRIPLET/usr/share/
	fi
}

libpanel-devel_package() {
	depends="gtk4-devel libadwaita-devel ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/share/doc
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		vmove usr/share/gir-1.0
		vmove usr/share/vala
	}
}
