pkgname=pango
pkgver=1.57.0
_ver=${pkgver%.*}
pkgdesc="A library for layout and rendering of text"
homepage="https://www.pango.org/"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
  cairo
  fontconfig
  freetype
  fribidi
  glib
  glibc
  harfbuzz
)
makedepends=(
  gobject-introspection
  meson
  python-docutils
)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://download.gnome.org/sources/pango/${_ver}/${sources[0]}")
md5sums=("c027445c1325603a2a11df2fd868e6b8")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1

  rm examples/pangowin32tobmp.c
  rm tests/layouts/valid-20.layout
  sed -i -e '/test-font-data/d' tests/meson.build
}

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D documentation=false
    -D introspection=enabled
    -D man-pages=true
    -D build-testsuite=false
    -D build-examples=false
    -D fontconfig=enabled
    -D sysprof=disabled
    -D libthai=disabled
    -D cairo=enabled
    -D xft=disabled
    -D freetype=enabled
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

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

# vim:ft=sh syn=sh et sw=2:
