# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: team/gnome <knuxify@gmail.com>
pkgname=xdg-desktop-portal-gnome
pkgver=46.2
pkgrel=0
pkgdesc="backend implementation for xdg-desktop-portal for the GNOME desktop environment"
url="https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome"
arch="all"
license="LGPL-2.1-or-later"
depends="xdg-desktop-portal xdg-desktop-portal-gtk"
makedepends="
	gnome-desktop-dev
	gsettings-desktop-schemas-dev
	gtk4.0-dev
	libadwaita-dev
	meson
	xdg-desktop-portal-dev
	"
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/xdg-desktop-portal-gnome/${pkgver%.*}/xdg-desktop-portal-gnome-$pkgver.tar.xz"
options="!check"  # no tests

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemduserunitdir=/DELETEME \
	.  output
	meson compile -C output
}

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

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

sha512sums="
8257a30fd2303e32c6eebd2fd97e876f2776aeb7442de96040d7fdb5961b674272d03c24ebd89bfb55a88bd668ae75bde3f3405a26cda48b93c23033d0d7bde5  xdg-desktop-portal-gnome-46.2.tar.xz
"
