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

pkgname=libxvmc
pkgver=1.0.14
pkgrel=1
pkgdesc="X11 Video Motion Compensation extension library"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://gitlab.freedesktop.org/xorg/lib/libxvmc"
license=('LicenseRef-libxvmc')
depends=('libxext' 'libxv' 'libx11' 'xorgproto' 'glibc')
makedepends=('meson')
source=(https://xorg.freedesktop.org/releases/individual/lib/libXvMC-${pkgver}.tar.xz{,.sig})
sha512sums=('fc76c6d591780f3481f5032d1f956f2043f3dc7655a4b776dfda4bae55d4424a36d1a3c63dafe2a851908f33159297c0b038a41329d7a137ca7ea73d3db3eedf'
            'SKIP')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') #  Alan Coopersmith <alan.coopersmith@oracle.com>
#validpgpkeys+=('C41C985FDCF1E5364576638B687393EE37D128F8') # Matthieu Herrb <matthieu.herrb@laas.fr>
#validpgpkeys+=('995ED5C8A6138EB0961F18474C09DD83CAAA50B2') # "Adam Jackson <ajax@nwnk.net>"
#validpgpkeys=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner <mattst88@gmail.com>

build() {
 arch-meson libXvMC-${pkgver} build
 # Print config
 meson configure build
 meson compile -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libXvMC-$pkgver/COPYING
}
