# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=libretro-blastem
pkgver=1813
pkgrel=1
pkgdesc='Sega Mega Drive core'
arch=(x86_64)
url=https://github.com/libretro/blastem
license=(GPL3)
groups=(libretro)
depends=(libretro-core-info)
makedepends=(git)
source=(
  libretro-blastem::git+https://github.com/libretro/blastem.git#commit=f5583a4f1d7272adde0d406b5affb6046e3f6d6e
  libretro-blastem-flags.patch
)
sha256sums=(
  SKIP
  5ddea4412ad3f14da2eb918edbaf1e0e95bacdeaefdc2fc70b7137db4a77f5e8
)

pkgver() {
  cd libretro-blastem

  git rev-list --count HEAD
}

prepare() {
  cd libretro-blastem

  patch -Np1 -i ../libretro-blastem-flags.patch
}

build() {
  make -C libretro-blastem -f Makefile.libretro
}

package() {
  install -Dm 644 libretro-blastem/blastem_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
