6.23.
Ncurses-5.9
The Ncurses package contains libraries for terminal-independent
handling of character screens.
Approximate build time:
0.5 SBU
Required disk space:
54 MB
6.23.1. Installation of Ncurses
6.23.2. 32-bit Installation
Prepare Ncurses for 32-bit compilation:
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--enable-pc-files \
--enable-widec \
--libdir=/usr/lib32 \
CC="gcc -m32" CXX="g++ -m32"
The meaning of the new configure options:
-
--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.
-
--enable-pc-files
-
This switch generates and installs .pc files for pkg-config.
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 /lib32
directory, where they are expected to
reside:
mv -v /usr/lib32/libncursesw.so.5* /lib32
Because the libraries have been moved, one symlink points to a
non-existent file. Recreate it:
ln -sfv ../../lib32/$(readlink /usr/lib32/libncursesw.so) /usr/lib32/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/lib32/lib${lib}.so
echo "INPUT(-l${lib}w)" > /usr/lib32/lib${lib}.so
ln -sfv lib${lib}w.a /usr/lib32/lib${lib}.a
ln -sfv ${lib}w.pc /usr/lib32/pkgconfig/${lib}.pc
done
ln -sfv libncurses++w.a /usr/lib32/libncurses++.a
Finally, make sure that old applications that look for -lcurses
at build time are still buildable:
rm -vf /usr/lib32/libcursesw.so
echo "INPUT(-lncursesw)" > /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
Note
The instructions above don't create non-wide-character Ncurses
libraries since no package installed by compiling from sources
would link against them at runtime. If you must have such
libraries because of some binary-only application or to be
compliant with LSB, build the package again with the following
commands:
make distclean
./configure --prefix=/usr \
--with-shared \
--without-normal \
--without-debug \
--without-cxx-binding \
--libdir=/usr/lib32 \
CC="gcc -m32" CXX="g++ -m32"
make sources libs
cp -av lib/lib*.so.5* /usr/lib32
Clean up the build directory before moving on to the next platform:
make clean
6.23.3. x32 ABI Installation
Prepare Ncurses for x32 ABI compilation:
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--enable-pc-files \
--enable-widec \
--libdir=/usr/libx32 \
CC="gcc -mx32" CXX="g++ -mx32"
The meaning of the new configure options:
-
--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.
-
--enable-pc-files
-
This switch generates and installs .pc files for pkg-config.
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 /libx32
directory, where they are expected to
reside:
mv -v /usr/libx32/libncursesw.so.5* /libx32
Because the libraries have been moved, one symlink points to a
non-existent file. Recreate it:
ln -sfv ../../libx32/$(readlink /usr/libx32/libncursesw.so) /usr/libx32/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/libx32/lib${lib}.so
echo "INPUT(-l${lib}w)" > /usr/libx32/lib${lib}.so
ln -sfv lib${lib}w.a /usr/libx32/lib${lib}.a
ln -sfv ${lib}w.pc /usr/libx32/pkgconfig/${lib}.pc
done
ln -sfv libncurses++w.a /usr/libx32/libncurses++.a
Finally, make sure that old applications that look for -lcurses
at build time are still buildable:
rm -vf /usr/libx32/libcursesw.so
echo "INPUT(-lncursesw)" > /usr/libx32/libcursesw.so
ln -sfv libncurses.so /usr/libx32/libcurses.so
ln -sfv libncursesw.a /usr/libx32/libcursesw.a
ln -sfv libncurses.a /usr/libx32/libcurses.a
Note
The instructions above don't create non-wide-character Ncurses
libraries since no package installed by compiling from sources
would link against them at runtime. If you must have such
libraries because of some binary-only application or to be
compliant with LSB, build the package again with the following
commands:
make distclean
./configure --prefix=/usr \
--with-shared \
--without-normal \
--without-debug \
--without-cxx-binding \
--libdir=/usr/libx32 \
CC="gcc -mx32" CXX="g++ -mx32"
make sources libs
cp -av lib/lib*.so.5* /usr/libx32
Clean up the build directory before moving on to the next platform:
make clean
6.23.4. 64-bit Installation
Prepare Ncurses for 64-bit compilation:
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--enable-pc-files \
--enable-widec
The meaning of the new configure options:
-
--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.
-
--enable-pc-files
-
This switch generates and installs .pc files for pkg-config.
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/$(readlink /usr/lib/libncursesw.so) /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
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
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
If desired, install the Ncurses documentation:
mkdir -v /usr/share/doc/ncurses-5.9
cp -v -R doc/* /usr/share/doc/ncurses-5.9
Note
The instructions above don't create non-wide-character Ncurses
libraries since no package installed by compiling from sources
would link against them at runtime. If you must have such
libraries because of some binary-only application or to be
compliant with LSB, build the package again with the following
commands:
make distclean
./configure --prefix=/usr \
--with-shared \
--without-normal \
--without-debug \
--without-cxx-binding
make sources libs
cp -av lib/lib*.so.5* /usr/lib
6.23.5.
Contents of Ncurses
Installed programs:
captoinfo (link to tic), clear, infocmp,
infotocap (link to tic), ncursesw5-config, reset (link to
tset), tabs, tic, toe, tput, and tset
Installed libraries:
libcursesw.{a,so} (symlink and linker
script to libncursesw.{a,so}), libformw.{a,so},
libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
libpanelw.{a,so}, and their non-wide-character counterparts
without "w" in the library names.
Installed directories:
/usr/share/tabset, /usr/share/terminfo,
and /usr/share/doc/ncurses-5.9
Short Descriptions
captoinfo
|
Converts a termcap description into a terminfo
description
|
clear
|
Clears the screen, if possible
|
infocmp
|
Compares or prints out terminfo descriptions
|
infotocap
|
Converts a terminfo description into a termcap
description
|
ncursesw5-config
|
Provides configuration information for ncurses
|
reset
|
Reinitializes a terminal to its default values
|
tabs
|
Clears and sets tab stops on a terminal
|
tic
|
The terminfo entry-description compiler that translates a
terminfo file from source format into the binary format
needed for the ncurses library routines [A terminfo file
contains information on the capabilities of a certain
terminal.]
|
toe
|
Lists all available terminal types, giving the primary
name and description for each
|
tput
|
Makes the values of terminal-dependent capabilities
available to the shell; it can also be used to reset or
initialize a terminal or report its long name
|
tset
|
Can be used to initialize terminals
|
libcursesw
|
A link to libncursesw
|
libncursesw
|
Contains functions to display text in many complex ways
on a terminal screen; a good example of the use of these
functions is the menu displayed during the kernel's
make
menuconfig
|
libformw
|
Contains functions to implement forms
|
libmenuw
|
Contains functions to implement menus
|
libpanelw
|
Contains functions to implement panels
|