10.41. Ncurses-5.9 N32 Libraries

The Ncurses package contains libraries for terminal-independent handling of character screens.

10.41.1. Installation of Ncurses

The following patch contains updates from the 5.9 branch by the Ncurses developers:

patch -Np1 -i ../ncurses-5.9-branch_update-4.patch

Prepare Ncurses for compilation:

CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \
   ./configure --prefix=/usr --libdir=/lib32 \
   --with-shared --without-debug --enable-widec \
   --with-manpage-format=normal --enable-pc-files \
   --with-default-terminfo-dir=/usr/share/terminfo

Compile the package:

make

This package has a test suite, but it can only be run after the package is installed. The tests are in the test/ directory. See the README file in that directory for details.

Install the package:

make install

Prepare ncursesw5-config to be wrapped by the multiarch wrapper:

mv -v /usr/bin/ncursesw5-config{,-n32}

Move the Ncurses static libraries to the proper location:

mv -v /lib32/lib{panelw,menuw,formw,ncursesw,ncurses++w}.a /usr/lib32

Create symlinks in /usr/lib32:

ln -svf ../../lib32/$(readlink /lib32/libncursesw.so) /usr/lib32/libncursesw.so
ln -svf ../../lib32/$(readlink /lib32/libmenuw.so) /usr/lib32/libmenuw.so
ln -svf ../../lib32/$(readlink /lib32/libpanelw.so) /usr/lib32/libpanelw.so
ln -svf ../../lib32/$(readlink /lib32/libformw.so) /usr/lib32/libformw.so
rm -v /lib32/lib{ncursesw,menuw,panelw,formw}.so

Many packages that use Ncurses will compile just fine against the widechar libraries, but won't know to look for them. Create linker scripts and symbolic links to allow older and non-widec compatible programs to build properly:

for lib in curses ncurses form panel menu ; do
        echo "INPUT(-l${lib}w)" > /usr/lib32/lib${lib}.so
        ln -sfv lib${lib}w.a /usr/lib32/lib${lib}.a
done
ln -sfv libcurses.so /usr/lib32/libcursesw.so
ln -sfv libncurses.so /usr/lib32/libcurses.so
ln -sfv libncursesw.a /usr/lib32/libcursesw.a
ln -sfv libncurses.a /usr/lib32/libcurses.a
ln -sfv libncurses++w.a /usr/lib32/libncurses++.a
ln -sfv ncurses5w-config-32 /usr/bin/ncurses5-config-32

Details on this package are located in Section 10.42.2, “Contents of Ncurses.”