# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: Tom Killian <tomk@runbox.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=libnewt
pkgver=0.52.24
pkgrel=2
_tclver=8.6
pkgdesc="Not Erik's Windowing Toolkit - text mode windowing with slang"
arch=('armv7h' 'aarch64')
url='https://pagure.io/newt'
license=(GPL)
depends=(popt slang)
makedepends=(python "tcl>=$_tclver")
optdepends=('python: libnewt support with the _snack module'
'tcl: whiptcl support')
options=(!makeflags)
source=("https://releases.pagure.org/newt/newt-$pkgver.tar.gz")
b2sums=('4ab5b343d1cc72855ee330d4a7f03a0dd5b090748410b64844277a7d9464f9166459ac6d943d07e844b22b7187ed851473840739dde8991e3b4b2dae97e6dcf4')
prepare() {
cd newt-$pkgver
echo '#define USE_INTERP_RESULT 1' >> config.h
sed -i "s:tcl8.4:tcl$_tclver:" Makefile.in
}
build() {
cd newt-$pkgver
./configure --prefix=/usr
make
}
package() {
make -C newt-$pkgver prefix="$pkgdir/usr" install
}