# Template file for 'genius'
pkgname=genius
version=1.0.27
revision=1
build_style=gnu-configure
build_helper=qemu
configure_args="--disable-update-mimedb ac_cv_file__proc_self_maps=yes"
hostmakedepends="intltool pkg-config glib-devel bison flex
 gtk-update-icon-cache"
makedepends="gtksourceview4-devel mpfr-devel readline-devel ncurses-devel
 gtk+3-devel libglib-devel vte3-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Advanced calculator including a mathematical programming language"
maintainer="Samadi van Koten <samadi@vktec.co.uk>"
license="GPL-3.0-or-later"
homepage="https://www.jirka.org/genius.html"
changelog="https://www.jirka.org/genius.NEWS"
distfiles="${GNOME_SITE}/genius/${version%.*}/genius-${version}.tar.xz"
checksum=0243b7c36b5f9e930c62778acd52deb188deeca704a5e195337018435d9e7bb5

post_patch() {
	vsed -e '/PKG_CONFIG/s/ncurses/ncursesw/' -i configure
	vsed -e '/DATADIRNAME=/s/=.*/=share/' -i configure
	if [ "$CROSS_BUILD" ]; then
		vsed -e "/cd [\$].top_builddir./s:[\$].top_builddir./src/genius:/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static &:" \
			-i lib/Makefile.am lib/Makefile.in
	fi
}
