# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Evert Vorster <evorster@gmail.com>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>

pkgname=movit
pkgver=1.7.1
pkgrel=2
pkgdesc="The modern video toolkit"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://movit.sesse.net/"
license=('GPL')
depends=('fftw' 'libepoxy')
makedepends=('eigen' 'gtest' 'sdl2')
source=(https://movit.sesse.net/$pkgname-$pkgver.tar.gz)
sha256sums=('b33073b705f0ccb6ac4942cf51151515407b40bb4e9a2dd0228c1c2cb1fbc11a')

build() {
  cd $pkgname-$pkgver

  case "${CARCH}" in
    powerpc64)
      export CFLAGS='-O2 -pipe'
      export CXXFLAGS='-O2 -pipe'
    ;;
  esac

  ./configure --prefix=/usr
  make GTEST_DIR=/usr/src/googletest -j1
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install
}
