# Maintainer: Thomas Krug <t.krug@elektronenpumpe.de>
# Contributor: Joe Davison <joedavison.davison@gmail.com>

pkgname=scummvm-git
_pkgname=scummvm
pkgver=r178134.aab01176bcb
pkgrel=1
pkgdesc="A 'virtual machine' for several classic graphical point-and-click adventure games. - git version"
arch=('i686' 'x86_64')
url="http://www.scummvm.org"
license=('GPL')
depends=('libpng' 'libtheora' 'sdl2' 'sdl2_net' 'fluidsynth' 'flac' 'faad2' 'libvorbis' 'libmad' 'freetype2'
         'libgl' 'glu' 'libjpeg-turbo' 'libmpeg2' 'curl' 'a52dec' 'giflib' 'glew' 'libspeechd' 'gtk3' 'sndio'
         'glib2' 'libstdc++' 'zlib' 'hicolor-icon-theme' 'sonivox' 'libvpx' 'libmpcdec' 'libmikmod')
makedepends=('git' 'mesa')
conflicts=('scummvm')
provides=('scummvm')
source=("$_pkgname"::'git+https://github.com/scummvm/scummvm.git')
md5sums=('SKIP')
 
pkgver() {
  cd "$srcdir/$_pkgname"

  echo r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
 
build() {
  cd "$srcdir/$_pkgname"

  sed -i 's/debug(line.c_str());/debug("%s", line.c_str());/g' engines/nancy/action/puzzle/sortpuzzle.cpp

  ./configure  --enable-release \
              --disable-debug \
              --prefix=/usr \
              --enable-all-engines \
              --enable-text-console

  make
}
 
package() {
  cd "$srcdir/$_pkgname"
 
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
