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

pkgname=libretro-beetle-supergrafx
pkgver=1019
pkgrel=1
pkgdesc='NEC SuperGrafx core'
arch=(x86_64)
url=https://github.com/libretro/beetle-supergrafx-libretro
license=(GPL2)
groups=(libretro)
depends=(
  gcc-libs
  glibc
  libretro-core-info
  zlib
)
makedepends=(git)
_commit=6c76ef9e83f7f3bed3aa747b01fd2d6c54687c65
source=(libretro-beetle-supergrafx::git+https://github.com/libretro/beetle-supergrafx-libretro.git#commit=${_commit})
sha256sums=('056d30fb244d084d3c69647e32ade62bf378b05fcdd82db05016e013db934a76')

pkgver() {
  cd libretro-beetle-supergrafx

  git rev-list --count HEAD
}

build() {
  make \
    SYSTEM_LIBCHDR=0 \
    SYSTEM_ZLIB=1 \
    -C libretro-beetle-supergrafx
}

package() {
  install -Dm 644 libretro-beetle-supergrafx/mednafen_supergrafx_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
