# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: G_Syme <demichan@mail.upb.de>

pkgname=libass
pkgver=0.17.3
pkgrel=1
pkgdesc='A portable library for SSA/ASS subtitles rendering'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url=https://github.com/libass/libass/
license=(BSD)
depends=(
  fontconfig
  fribidi
  glibc
  harfbuzz
  libfreetype.so
  libunibreak
)
makedepends=(
  git
)
makedepends_x86_64=(
  nasm
)
provides=(libass.so)
source=(git+https://github.com/libass/libass.git?signed#tag=${pkgver})
validpgpkeys=(
  5458C3100671F252B0F4C7708079D18C21AAAAFF # Oleg Oshmyan (Chortos-2) <chortos@inbox.lv>
  5EE63F2A71BF132CFE3567E1DFFE615F2824C720 # Oneric <oneric@oneric.de>
)
b2sums=('5eea183b01d1cb8993965abfdc329d0b856b1c3d4c01c9c5d63c6602b46c140e0a53f998458018eba21ba942ad5075450128d4c94e5d013ea131abd3589aedb4')

prepare() {
  cd libass
  ./autogen.sh
}

pkgver() {
  cd libass
  git describe --tags
}

build() {
  cd libass
  ./configure \
    --prefix=/usr \
    --enable-fontconfig \
    --enable-libunibreak
  make
}

package() {
  cd libass
  make DESTDIR="${pkgdir}" install
  install -Dm 644 COPYING -t "${pkgdir}"/usr/share/licenses/libass/
}

# vim: ts=2 sw=2 et:
