# Template file for 'ghostty'
pkgname=ghostty
version=1.0.1
revision=1
build_style=zig-build
configure_args="
 -Doptimize=ReleaseFast
 -Dpie
 -Dversion-string=${version}
 -fsys=freetype
 -fsys=fontconfig
 -fsys=harfbuzz"
hostmakedepends="pkg-config glib-devel pandoc"
makedepends="fontconfig-devel freetype-devel harfbuzz-devel gtk4-devel libadwaita-devel"
depends="ghostty-terminfo-${version}_${revision}"
short_desc="Fast and feature-rich terminal emulator that uses GPU acceleration"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
homepage="https://ghostty.org/"
distfiles="https://github.com/ghostty-org/ghostty/archive/refs/tags/v${version}.tar.gz"
checksum=4e4d9725ef2e50715492df26265e275417acca0db374f6d21740b848c77d6189

post_install() {
	vlicense LICENSE
	tic -sx -o ${DESTDIR}/usr/share/terminfo ${DESTDIR}/usr/share/terminfo/ghostty.terminfo
	rm -f ${DESTDIR}/usr/share/man/.placeholder
}

ghostty-terminfo_package() {
	short_desc+=" - terminfo data"
	pkg_install() {
		vmove usr/share/terminfo
	}
}
