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

pkgname=gspell
pkgver=1.8.4
pkgrel=1
pkgdesc="a flexible API to implement the spell checking in a GTK+ application"
url="https://wiki.gnome.org/Projects/gspell"
arch=(x86_64)
license=(GPL2)
depends=(gtk3 enchant libxml2 iso-codes)
makedepends=(gobject-introspection vala gtk-doc autoconf-archive git)
_commit=afd6d46d900dff621be840079c34488d9b3e8259
source=("git+https://gitlab.gnome.org/GNOME/gspell.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure  --prefix=/usr --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package(){
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
