# Based on Arch's PKGBUILD

_realname=bwidget
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=1.9.16
pkgrel=1
pkgdesc='A companion to Tcllib, for Tk related packages (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://core.tcl.tk/bwidget/home'
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-tk")
source=("https://downloads.sourceforge.net/project/tcllib/BWidget/${pkgver}/bwidget-${pkgver}.tar.gz")
sha256sums=('bfe0036374b84293d23620a7f6dda86571813d0c7adfed983c1f337e5ce81ae0')

package() {
  _dest="${pkgdir}"/${MINGW_PREFIX}/lib
  mkdir -p ${_dest}
  cd "${srcdir}"
  cp -r bwidget-${pkgver} "${_dest}"
  _bwdir=${_dest}/bwidget-${pkgver}
  cd ${_bwdir}
  rm -rf .fslckout Changelog tests demo
}
