# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=pango
pkgver=1.42.4
pkgrel=1
epoch=1
pkgdesc="A library for layout and rendering of text"
url="https://www.pango.org/"
arch=(x86_64)
license=(LGPL)
depends=(libthai cairo libxft harfbuzz fribidi)
makedepends=(gobject-introspection help2man gtk-doc git meson)
checkdepends=(ttf-dejavu cantarell-fonts)
_commit=a6a89818246b0b14c0fe3d00d6120929fc0a11d9  # tags/1.42.4^0
source=("git+https://gitlab.gnome.org/GNOME/pango.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  rm -r "$pkgdir"/usr/{lib,share}/installed-tests
}
