# $Id$
# Maintainer: Richard Leys <leys.richard@gmail.com>
# Based on Arch's PKGBUILD

_realname=tcl-nsf
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.3.0
pkgrel=2
pkgdesc="Next Scripting Language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
  'aur: nsf'
)
url="https://next-scripting.org"
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-tcl")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
             "${MINGW_PACKAGE_PREFIX}-cc")
source=("https://downloads.sourceforge.net/project/next-scripting/${pkgver}/nsf${pkgver}.tar.gz")
sha256sums=('3940c4c00e18900abac8d57c195498f563c3cdb65157257af57060185cfd7ba9')

build() {
  
  cd $srcdir/nsf${pkgver}
  [[ "${MINGW_CHOST}" = 'x86_64-w64-mingw32' ]] && enable64bit='--enable-64bit'

  ./configure --prefix=${MINGW_PREFIX} $enable64bit
  make

}
package() {

  cd $srcdir/nsf${pkgver}
  make DESTDIR="${pkgdir}" install

}
