[deps]
relocate_toolchain

[main]
filesize=2826473
sha512=d7c5e54b6d4d8b9211f0006ca8786f7609d180cc1aaebf4f25e7e35e12959779cf66447359a602daed625621ca32b0d910d67aef3eb8b6fdc3c373819a88faa1

[mirrors]
http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

[build]
#the fallbacks file is needed to have no external dependencies.
#it is created using:
#ncurses/tinfo/MKfallback.sh /usr/share/terminfo/ /etc/termcap tic linux vt100 term xterm-256color > fallback.c
#on a machine that has those files.
cp $K/ncurses-fallback.c ncurses/fallback.c

# that </dev/ptmx is to fix an insanely stupid test for poll which
# needs to block on fd 1 (which they assume to be a tty).
CC="$CC -fPIC -I$R/include -D_GNU_SOURCE" ./configure -C \
   --with-shared --without-tests \
   --enable-sigwinch --with-fallbacks="linux vt100 xterm xterm256-color" \
   --prefix=/ --includedir=/include --mandir=/share/man \
   --disable-nls --without-dlsym --without-cxx-binding </dev/ptmx || exit 1
   
make -j$MAKE_THREADS libs || exit 1

mkdir -p "$butch_install_dir/lib"
cp lib/* "$butch_install_dir/lib"
