# Template file for 'identity'
pkgname=identity
version=26.03
revision=1
build_style=meson
build_helper="rust"
hostmakedepends="cargo rust pkg-config cmake gettext blueprint-compiler
 glib-devel gtk4-devel libadwaita-devel"
makedepends="gtk4-devel glib-devel gstreamer1-devel libadwaita-devel
 libdav1d-devel libwebp-devel libseccomp-devel rust-std glycin-devel
 glycin-gtk4-devel"
short_desc="Program for comparing multiple versions of an image or video"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://apps.gnome.org/Identity/"
distfiles="https://gitlab.gnome.org/YaLTeR/identity/-/archive/v${version}/identity-v${version}.tar.gz"
checksum=fe30aa7097c9cc1d3b4eb47c363970a2399ed6c0f5e7070e76b6735011cd59eb

if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
	XBPS_CROSS_RUSTFLAGS+=" -latomic"
fi

post_patch() {
	vsed -e 's/\(gtk_update_icon_cache\): true/\1: false/' \
		-e 's/\(update_desktop_database\): true/\1: false/' \
		-i meson.build
	if [ "$CROSS_BUILD" ]; then
		vsed -i src/meson.build \
			-e "s%rust_target /%'${RUST_TARGET}' / &%"
	fi
}
