
Linux From Scratch - Version 7.0
113
6.20. Ncurses-5.9
The Ncurses package contains libraries for terminal-independent handling of character screens.
Approximate build time: 0.8 SBU
Required disk space: 35 MB
6.20.1. Installation of Ncurses
Prepare Ncurses for compilation:
./configure --prefix=/usr --with-shared --without-debug --enable-widec
The meaning of the configure option:
--enable-widec
This switch causes wide-character libraries (e.g., libncursesw.so.5.9) to be built instead of normal ones
(e.g., libncurses.so.5.9). These wide-character libraries are usable in both multibyte and traditional 8-
bit locales, while normal libraries work properly only in 8-bit locales. Wide-character and normal libraries are
source-compatible, but not binary-compatible.
Compile the package:
make
This package has a test suite, but it can only be run after the package has been installed. The tests reside in the test/
directory. See the README file in that directory for further details.
Install the package:
make install
Move the shared libraries to the /lib directory, where they are expected to reside:
mv -v /usr/lib/libncursesw.so.5* /lib
Because the libraries have been moved, one symlink points to a non-existent file. Recreate it:
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
Many applications still expect the linker to be able to find non-wide-character Ncurses libraries. Trick such
applications into linking with wide-character libraries by means of symlinks and linker scripts:
for lib in ncurses form panel menu ; do \
rm -vf /usr/lib/lib${lib}.so ; \
echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
done
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
Finally, make sure that old applications that look for -lcurses at build time are still buildable:
rm -vf /usr/lib/libcursesw.so
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
ln -sfv libncursesw.a /usr/lib/libcursesw.a
ln -sfv libncurses.a /usr/lib/libcurses.a
Comentarios a estos manuales