# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: mio <miyopan@e.email>
pkgname=gedit-plugins
pkgver=48.0
pkgrel=0
pkgdesc="Collection of plugins for the gedit text editor"
url="https://gitlab.gnome.org/GNOME/gedit/blob/master/plugins/list-of-gedit-plugins.md"
arch="all !s390x"
license="GPL-2.0-only"
depends="
	gucharmap
	libpeas-python3
	python3
	py3-dbus
	py3-gobject3
	vte3
	"
makedepends="
	gedit-dev
	glib-dev
	gtk+3.0-dev
	gucharmap-dev
	itstool
	libgedit-gtksourceview-dev
	libgit2-glib-dev
	libpeas-dev
	py3-dbus-dev
	vte3-dev
	vala
	meson
	"
checkdepends="appstream-glib"
subpackages="$pkgname-lang $pkgname-doc $pkgname-pyc"
source="https://gitlab.gnome.org/GNOME/gedit-plugins/-/archive/$pkgver/gedit-plugins-$pkgver.tar.gz"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	python3 -m compileall -fq "$pkgdir"/usr/lib/gedit
}

pyc() {
	default_pyc
	find usr/lib/gedit/plugins -type d -name __pycache__ | \
	while IFS="$(printf '\n')" read -r path; do
		amove "$path"
	done
}

sha512sums="
b893a06eff7014684bbcd6801fe9ee9d78da2124fc8533f935d92e15bc03cb55f6fb01f31b8e0c095ae54067f4c37307c6a6f6d5f8ad56c5f75408a71e7e882a  gedit-plugins-48.0.tar.gz
"
