Details on this package are located in the section called “Contents of Ncurses.”
The Ncurses package contains libraries for terminal-independent handling of character screens.
First, run the following commands to build the tic
program on the build host. We install it in
$LFS/tools, so that it is found
in the PATH when needed:
mkdir build pushd build ../configure --prefix=$LFS/tools AWK=gawk make -C include make -C progs tic install progs/tic $LFS/tools/bin popd
Prepare Ncurses for compilation:
./configure --prefix=/usr \
--host=$LFS_TGT \
--build=$(./config.guess) \
--mandir=/usr/share/man \
--with-manpage-format=normal \
--with-shared \
--without-normal \
--with-cxx-shared \
--without-debug \
--without-ada \
--disable-stripping \
AWK=gawkThe meaning of the new configure options:
--with-manpage-format=normalThis prevents Ncurses from installing compressed manual pages, which may happen if the host distribution itself has compressed manual pages.
--with-sharedThis makes Ncurses build and install shared C libraries.
--without-normalThis prevents Ncurses from building and installing static C libraries.
--without-debugThis prevents Ncurses from building and installing debug libraries.
--with-cxx-sharedThis makes Ncurses build and install shared C++ bindings. It also prevents it building and installing static C++ bindings.
--without-adaThis ensures that Ncurses does not build support for the Ada compiler, which may be present on the host but will not be available once we enter the chroot environment.
--disable-strippingThis switch prevents the building system from using the strip program from the host. Using host tools on cross-compiled programs can cause failure.
AWK=gawkThis switch prevents the building system from using the mawk program from the host. Some versions of mawk can cause this package to fail to build.
Compile the package:
make
Install the package:
make DESTDIR=$LFS install
ln -sv libncursesw.so $LFS/usr/lib/libncurses.so
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
-i $LFS/usr/include/curses.hThe meaning of the install options:
The libncurses.so library is needed by
a few packages we will build soon. We create this symlink to use
libncursesw.so as a replacement.
The header file curses.h contains
the definition of various Ncurses data structures. With different
preprocessor macro definitions two different sets of the data
structure definition may be used: the 8-bit definition is
compatible with libncurses.so and the
wide-character definition is compatible with
libncursesw.so. Since we are using
libncursesw.so as a replacement of
libncurses.so, edit the header file so it
will always use the wide-character data structure definition
compatible with libncursesw.so.
Details on this package are located in the section called “Contents of Ncurses.”