# Maintainer: juergen <juergen@archlinux.org>
# Contributor: Manolis Tzanidakis, Petter Gundersen

pkgname=scummvm
pkgver=2.0.0
pkgrel=2
pkgdesc="A 'virtual machine' for several classic graphical point-and-click adventure games."
arch=('x86_64')
license=('GPL')
url="http://www.scummvm.org/"
depends=('libpng' 'libtheora' 'sdl2' 'fluidsynth' 'flac' 'faad2' 'libvorbis' 'libmad' 'freetype2'
         'libgl' 'glu' 'libjpeg-turbo' 'libmpeg2')
makedepends=('mesa')
source=("https://scummvm.org/frs/scummvm/${pkgver}/scummvm-${pkgver}.tar.xz")
sha512sums=('5f4c11145c5dfcc7ae95d5c0e5ac9e938912cc5060b9d5fdfcb699a745755b31412e44199e487ad388ca5e091afc3366f874610adb44d440f336e26d6cd4812c')

build() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  ./configure \
    --enable-all-engines \
    --enable-c++11 \
    --enable-release \
    --prefix=/usr
  make
}

package() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  install -Dm644 dists/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
}
