# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer:
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libvdpau
pkgver=1.5
pkgrel=3
pkgdesc='Nvidia VDPAU library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url=https://www.freedesktop.org/wiki/Software/VDPAU/
license=(custom)
depends=(
  libxext
)
makedepends=(
  git
  meson
  xorgproto
)
optdepends=(
  'libvdpau-va-gl: driver using VAAPI'
  'mesa-vdpau: driver for Mesa'
)
optdepends_x86_64=(
  'nvidia-utils: driver for NVIDIA'
)
provides=(
  libvdpau.so
)
_tag=b40ac3c8f6cac061ddd5ed70c8305238f97a1b25
source=(git+https://gitlab.freedesktop.org/vdpau/libvdpau.git#tag=${_tag})
b2sums=('SKIP')

pkgver() {
  cd libvdpau
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

build() {
  arch-meson libvdpau build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dm 644 libvdpau/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

# vim:set sw=2 sts=-1 et:
