# Template file for 'enter-tex'
pkgname=enter-tex
version=3.49.0
revision=1
build_helper="gir"
build_style=meson
configure_args="-Ddconf_migration=false $(vopt_bool gtk_doc gtk_doc)"
hostmakedepends="glib-devel gettext itstool pkg-config vala
 gobject-introspection $(vopt_if gtk_doc gtk-doc) desktop-file-utils gtk-update-icon-cache"
makedepends="gsettings-desktop-schemas-devel gspell-devel libgedit-gtksourceview-devel
 gtk+3-devel libgee-devel libglib-devel libgedit-tepl-devel"
short_desc="LaTeX editor for the GNOME desktop"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://gitlab.gnome.org/World/gedit/enter-tex"
changelog="https://gitlab.gnome.org/World/gedit/enter-tex/-/raw/main/NEWS"
distfiles="https://gitlab.gnome.org/World/gedit/enter-tex/-/archive/${version}/enter-tex-${version}.tar.gz"
checksum=3d14fd0e6cd5fa761ab88b584efd2ea620090e37fe9e162332fafa08c4196928
replaces="gnome-latex>=0"

build_options="gtk_doc"
build_options_default=" "

if [ -z "$CROSS_BUILD" ]; then
	build_options_default+=" gtk_doc"
fi

post_install() {
	vdoc "${FILESDIR}/README.voidlinux"
}

pre_build() {
	# https://gitlab.gnome.org/World/gedit/enter-tex/-/blob/main/docs/more-information.md
	ninja -C build src/gtex/Gtex-1.gir
}

gnome-latex_package() {
	metapackage=yes
	short_desc+=" (transitional dummy package)"
	depends="${sourcepkg}>=${version}_${revision}"
}
