# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gedit
pkgver=3.34.0
pkgrel=1
pkgdesc="GNOME Text Editor"
url="https://wiki.gnome.org/Apps/Gedit"
arch=(x86_64)
license=(GPL)
depends=(gtksourceview4 gsettings-desktop-schemas libpeas gspell python-gobject dconf)
makedepends=(yelp-tools vala gobject-introspection git gtk-doc meson)
optdepends=('gedit-plugins: Additional features')
conflicts=('gedit-code-assistance<=3.16.0+4+gd19b879-1')
groups=(gnome)
_commit=0d36c5da8b1d3108aaa0845e4939fddc36b9672a  # tags/3.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/gedit.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson $pkgname build -D documentation=true
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
