NAME="newt"
DESC="Library for color text mode, widget based user interfaces"
VERSION="0.52.23"
FILES=("https://releases.pagure.org/newt/newt-$VERSION.tar.gz")
HASHES=("70aefeff0f3e9444a69dbdae9a931442")
DEPENDS=("slang" "popt")

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  sed -e '/install -m 644 $(LIBNEWT)/ s/^/#/' \
    -e '/$(LIBNEWT):/,/rv/ s/^/#/'            \
    -e 's/$(LIBNEWT)/$(LIBNEWTSH)/g'          \
    -i Makefile.in                          

  ./configure --prefix=/usr         \
            --with-gpm-support      \
            --with-python=python3.11
  make && make DESTDIR="$ROOTDIR" install


  cd .. && rm -rf $NAME-$VERSION
}
