6.3. ncurses 6.6-20260418

ncurses installs terminal handling libraries and terminfo tooling, with a host-built `tic` used during target installation.

Input assumption: ncurses-6.6-20260418.tgz is already present in LBI_SOURCES from the chapter 4 source staging step.

Licenses:

Dependencies:

ncurses is a terminal handling library and terminfo toolkit. we need it to provide curses interfaces and terminal capability data for later userspace packages in this book.

Extract and Enter the Source Tree

cd "$LBI_SOURCES"
tar -xf ncurses-6.6-20260418.tgz
cd ncurses-6.6-20260418

Build Host tic

mkdir -pv build
pushd build
  ../configure --prefix="$LBI_ROOT/system/tools" AWK=gawk
  make -C include
  make -C progs tic
  install -vm755 progs/tic "$LBI_ROOT/system/tools/bin/tic"
popd

Configure, Build, and Install ncurses

Use lbi_configure for the target configure phase instead of a manual full-path ./configure invocation.

lbi_configure \
    --host="$LBI_TARGET" \
    --build="$(./config.guess)" \
    --with-manpage-format=normal \
    --with-shared \
    --without-normal \
    --with-cxx-shared \
    --without-debug \
    --without-ada \
    --disable-stripping \
    AWK=gawk

make $LWI_MAKE_FLAGS
make DESTDIR="$LBI_ROOT" TIC_PATH="$PWD/build/progs/tic" install

Post-install Compatibility Adjustments

ln -sv libncursesw.so "$LBI_ROOT/system/libraries/libncurses.so"
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
    -i "$LBI_ROOT/system/headers/curses.h"

Command Explanations