# Template file for 'gnome-boxes'
pkgname=gnome-boxes
version=3.38.0
revision=1
build_helper="gir"
build_style=meson
hostmakedepends="gettext itstool pkg-config vala glib-devel"
makedepends="clutter-gtk-devel freerdp-devel gtk-vnc-devel libarchive-devel
 libglib-devel libgudev-devel libosinfo-devel libsecret-devel libsoup-devel
 libusb-devel libvirt-glib-devel libxml2-devel spice-gtk-devel spice-protocol
 tracker-devel vala-devel webkit2gtk-devel vte3-devel gtksourceview4-devel
 libhandy-devel"
depends="desktop-file-utils hicolor-icon-theme libosinfo libvirt-glib qemu tracker"
short_desc="GNOME 3 application to access remote or virtual systems"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.0-or-later"
homepage="https://wiki.gnome.org/Apps/Boxes"
changelog="https://raw.githubusercontent.com/GNOME/gnome-boxes/gnome-3-36/NEWS"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=696b599fc21af941975679205f2b129cffa03632c444810dd94b1409d041a38b

# Liberation
# Some code has been taken from:
# https://git.parabola.nu/abslibre.git/tree/libre/gnome-boxes/PKGBUILD
post_patch() {
	# remove recommended downloads of nonfree OS
	sed -i /os_id/d ./data/recommended-downloads.xml
	# I'd rather not use Windows as example in user docs
	find ./help/ -type f \( -name '*.po' -o -name '*.page' \) -exec \
		sed -Ei 's/(Microsoft )?Windows(™)?/Parabola/' {} +
}
