# Template file for 'xdg-desktop-portal'
pkgname=xdg-desktop-portal
version=1.22.1
revision=1
build_style=meson
configure_args="-Dgeoclue=enabled -Dsystemd=disabled"
hostmakedepends="pkg-config gettext glib-devel bubblewrap flatpak python3-docutils
 gst-plugins-good1 gstreamer1 python3-dbusmock python3-gobject python3-pytest-xdist"
makedepends="flatpak-devel fuse3-devel pipewire-devel geoclue2-devel
 polkit-devel gst-plugins-base1-devel libumockdev-devel"
checkdepends="dbus python3-dbusmock umockdev"
short_desc="Portal frontend service for Flatpak"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/flatpak/xdg-desktop-portal"
changelog="https://raw.githubusercontent.com/flatpak/xdg-desktop-portal/refs/heads/main/NEWS.md"
distfiles="https://github.com/flatpak/xdg-desktop-portal/releases/download/${version}/xdg-desktop-portal-${version}.tar.xz"
checksum=d4879ddb3d65ff1a8f19187497e6f13dc5d267bcac404a5d501218be355753d3
# https://github.com/flatpak/xdg-desktop-portal/issues/1589
make_check_pre="env XDP_VALIDATE_ICON_INSECURE=1 XDP_VALIDATE_SOUND_INSECURE=1"

if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
	export TEST_IN_CI="true"
fi

post_install() {
	vinstall "${FILESDIR}"/portals.conf 644 usr/share/xdg-desktop-portal
}
