pkgname=libass
pkgver=0.17.4
pkgdesc="Library for SSA/ASS subtitles rendering"
homepage="https://github.com/libass/libass"
licenses=("ISC")
depends=(
  ">=dev-libs/fribidi-0.19.5-r1"
  ">=media-libs/freetype-2.5.0.1:2"
  ">=virtual/libiconv-0-r1"
  ">=media-libs/harfbuzz-1.2.3:=[truetype]"
  "dev-lang/nasm"
)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://github.com/libass/libass/releases/download/${pkgver}/${sources[0]}")
sha512sums=("0dd9a869644a7898531c9cb40a05e41fe6a7a9105e95f723af3a9801f7b98d34970e296247894256c8bac1d01c9e2a8113dd4e3d485fdcca70343931e6e40dd0")

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

src_build() {
  local conf_args=(
    --prefix=/usr
    --disable-static
    --enable-fontconfig
    --disable-libunibreak
    --enable-test
    --disable-require-system-font-provider
    --with-pic
  )
  ./configure "${conf_args[@]}"
  make
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="$pkgdir" install
}

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