# Maintainer: metab0t <metab0t@outlook.com>

_realname=chicken
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.12.0
pkgrel=1
pkgdesc='Feature rich R5RS Scheme compiler and interpreter (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
url='http://call-cc.org/'
license=('BSD')
source=("https://code.call-cc.org/releases/$pkgver/${_realname}-$pkgver.tar.gz")
sha256sums=('605ace459bc66e8c5f82abb03d9b1c9ca36f1c2295931d244d03629a947a6989')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make -j1 PLATFORM=mingw-msys PREFIX="${MINGW_PREFIX}"
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make -j1 PLATFORM=mingw-msys DESTDIR="${pkgdir}" PREFIX="${MINGW_PREFIX}" install
  install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}