# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Thomas Schneider <maxmusterm@gmail.com>

pkgname=libretro-parallel-n64
pkgver=5265
pkgrel=1
pkgdesc='Nintendo 64 core'
arch=(x86_64)
url=https://github.com/libretro/parallel-n64
license=(GPL2)
groups=(libretro)
depends=(
  libgl
  libretro-core-info
)
makedepends=(
  clang
  git
  mesa
)
_commit=1da824e13e725a7144f3245324f43d59623974f8
source=(libretro-parallel-n64::git+https://github.com/libretro/parallel-n64.git#commit=${_commit})
sha256sums=('ca144d367674a1f72405223b8ec23a86a5dc675535e185d3e2fe849fb2b577f2')
options=(!lto)

pkgver() {
  cd libretro-parallel-n64
  git rev-list --count HEAD
}

build() {
  make -C libretro-parallel-n64 \
    CC=clang \
    WITH_DYNAREC=x86_64 \
    HAVE_PARALLEL=1 \
    HAVE_PARALLEL_RSP=1 \
    HAVE_THR_AL=1
}

package() {
  install -Dm 644 libretro-parallel-n64/parallel_n64_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
