2024-01-18 19:53:23 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-02-06 20:45:42 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<sect1 id="ch-tools-ncurses" role="wrap">
|
2006-02-06 20:45:42 +00:00
|
|
|
<?dbhtml filename="ncurses.html"?>
|
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>ncurses</productname>
|
|
|
|
<productnumber>&ncurses-version;</productnumber>
|
|
|
|
<address>&ncurses-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<title>Ncurses-&ncurses-version;</title>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<indexterm zone="ch-tools-ncurses">
|
2006-02-06 20:45:42 +00:00
|
|
|
<primary sortas="a-Ncurses">Ncurses</primary>
|
2020-06-29 08:55:01 +01:00
|
|
|
<secondary>tools</secondary>
|
2006-02-06 20:45:42 +00:00
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
href="../chapter08/ncurses.xml"
|
|
|
|
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<seglistitem>
|
2020-06-29 08:55:01 +01:00
|
|
|
<seg>&ncurses-tmp-sbu;</seg>
|
|
|
|
<seg>&ncurses-tmp-du;</seg>
|
2006-02-06 20:45:42 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Ncurses</title>
|
2006-05-13 01:07:12 +01:00
|
|
|
|
2024-08-18 13:13:59 +01:00
|
|
|
<para>First, run the following commands to build the <quote>tic</quote>
|
2020-06-29 08:55:01 +01:00
|
|
|
program on the build host:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="pre">mkdir build
|
|
|
|
pushd build
|
2024-08-18 13:13:59 +01:00
|
|
|
../configure AWK=gawk
|
2020-06-29 08:55:01 +01:00
|
|
|
make -C include
|
|
|
|
make -C progs tic
|
|
|
|
popd</userinput></screen>
|
2006-01-06 01:59:08 +00:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<para>Prepare Ncurses for compilation:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="configure">./configure --prefix=/usr \
|
|
|
|
--host=$LFS_TGT \
|
|
|
|
--build=$(./config.guess) \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--with-manpage-format=normal \
|
|
|
|
--with-shared \
|
2022-06-29 13:08:29 +01:00
|
|
|
--without-normal \
|
|
|
|
--with-cxx-shared \
|
2020-06-29 08:55:01 +01:00
|
|
|
--without-debug \
|
|
|
|
--without-ada \
|
2024-08-18 13:13:59 +01:00
|
|
|
--disable-stripping \
|
|
|
|
AWK=gawk</userinput></screen>
|
2006-01-06 01:59:08 +00:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<variablelist>
|
2014-08-24 06:34:38 +01:00
|
|
|
<title>The meaning of the new configure options:</title>
|
2006-02-06 20:45:42 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-manpage-format=normal</parameter></term>
|
|
|
|
<listitem>
|
2023-11-23 01:18:51 +00:00
|
|
|
<para>This prevents Ncurses from installing compressed manual
|
2020-06-29 08:55:01 +01:00
|
|
|
pages, which may happen if the host distribution itself
|
|
|
|
has compressed manual pages.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2022-06-29 13:08:29 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-shared</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This makes Ncurses build and install shared C libraries.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--without-normal</parameter></term>
|
|
|
|
<listitem>
|
2023-11-23 01:18:51 +00:00
|
|
|
<para>This prevents Ncurses from building and installing static C
|
2022-06-29 13:08:29 +01:00
|
|
|
libraries.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--without-debug</parameter></term>
|
|
|
|
<listitem>
|
2023-11-23 01:18:51 +00:00
|
|
|
<para>This prevents Ncurses from building and installing debug
|
2022-06-29 13:08:29 +01:00
|
|
|
libraries.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-cxx-shared</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This makes Ncurses build and install shared C++ bindings. It
|
|
|
|
also prevents it building and installing static C++ bindings.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--without-ada</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This ensures that Ncurses does not build support for the Ada
|
2022-11-04 00:24:54 +00:00
|
|
|
compiler, which may be present on the host but will not be available
|
2020-06-29 08:55:01 +01:00
|
|
|
once we enter the <command>chroot</command> environment.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2021-12-17 17:32:45 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--disable-stripping</parameter></term>
|
|
|
|
<listitem>
|
2022-11-04 00:24:54 +00:00
|
|
|
<para>This switch prevents the building system from
|
|
|
|
using the <command>strip</command> program from the host.
|
|
|
|
Using host tools on cross-compiled programs can cause failure.</para>
|
2021-12-17 17:32:45 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2024-08-18 13:13:59 +01:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<varlistentry>
|
2024-08-18 13:13:59 +01:00
|
|
|
<term><parameter>AWK=gawk</parameter></term>
|
2006-02-06 20:45:42 +00:00
|
|
|
<listitem>
|
2024-08-18 13:13:59 +01:00
|
|
|
<para>This switch prevents the building system from using the
|
|
|
|
<command>mawk</command> program from the host.
|
|
|
|
Some<!-- FIXME vauge --> versions of <command>mawk</command> can
|
2024-09-04 15:59:12 +01:00
|
|
|
cause this package to fail to build. <!-- It seems happened in 2015,
|
2024-08-18 13:13:59 +01:00
|
|
|
is there any updated into? --></para>
|
2006-02-06 20:45:42 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
<para>Install the package:</para>
|
2020-07-08 20:36:00 +01:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
|
2024-01-19 04:57:51 +00:00
|
|
|
ln -sv libncursesw.so $LFS/usr/lib/libncurses.so
|
2024-01-19 04:47:33 +00:00
|
|
|
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
|
|
|
|
-i $LFS/usr/include/curses.h</userinput></screen>
|
2022-06-29 13:08:29 +01:00
|
|
|
<!--
|
2022-05-26 12:30:40 +01:00
|
|
|
<para>Remove an unneeded static library not handled by
|
|
|
|
<command>configure</command>:</para>
|
|
|
|
|
2022-05-27 14:50:53 +01:00
|
|
|
<screen><userinput remap="install">rm -v $LFS/usr/lib/libncurses++w.a</userinput></screen>
|
2022-06-29 13:08:29 +01:00
|
|
|
-->
|
2020-07-08 20:36:00 +01:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the install options:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>TIC_PATH=$(pwd)/build/progs/tic</parameter></term>
|
|
|
|
<listitem>
|
2022-11-04 00:24:54 +00:00
|
|
|
<para>We need to pass the path of the newly built
|
|
|
|
<command>tic</command> program that runs on the building machine, so
|
2020-07-08 20:36:00 +01:00
|
|
|
the terminal database can be created without errors.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2024-01-19 04:57:51 +00:00
|
|
|
<term><command>ln -sv libncursesw.so $LFS/usr/lib/libncurses.so</command></term>
|
2020-07-08 20:36:00 +01:00
|
|
|
<listitem>
|
|
|
|
<para>The <filename>libncurses.so</filename> library is needed by
|
2024-01-19 04:57:51 +00:00
|
|
|
a few packages we will build soon. We create this symlink to use
|
|
|
|
<filename>libncursesw.so</filename> as a replacement.</para>
|
2020-07-06 21:47:01 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2024-01-19 04:47:33 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><command>sed -e 's/^#if.*XOPEN.*$/#if 1/' ...</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>The header file <filename>curses.h</filename> 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 <filename>libncurses.so</filename> and the
|
|
|
|
wide-character definition is compatible with
|
|
|
|
<filename>libncursesw.so</filename>. Since we are using
|
|
|
|
<filename>libncursesw.so</filename> as a replacement of
|
|
|
|
<filename>libncurses.so</filename>, edit the header file so it
|
|
|
|
will always use the wide-character data structure definition
|
|
|
|
compatible with <filename>libncursesw.so</filename>.</para>
|
2020-07-08 20:36:00 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-06 20:45:42 +00:00
|
|
|
</sect2>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<!-- - - - - - - - - - -->
|
|
|
|
<!-- Multilib - 32bit -->
|
|
|
|
<!-- - - - - - - - - - -->
|
|
|
|
<sect2 arch="ml_32,ml_all">
|
|
|
|
<title>Building Ncurses - 32bit</title>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Clean previous build:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="pre">make distclean</userinput></screen>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<para>Prepare Ncurses for compilation:</para>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \
|
|
|
|
CXX="$LFS_TGT-g++ -m32" \
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--host=$LFS_TGT32 \
|
2021-02-03 08:02:01 +00:00
|
|
|
--build=$(./config.guess) \
|
2021-05-14 11:47:43 +01:00
|
|
|
--libdir=/usr/lib32 \
|
2020-06-29 08:55:01 +01:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--with-shared \
|
2022-06-29 21:29:02 +01:00
|
|
|
--without-normal \
|
|
|
|
--with-cxx-shared \
|
2020-06-29 08:55:01 +01:00
|
|
|
--without-debug \
|
2020-08-30 15:04:15 +01:00
|
|
|
--without-ada \
|
2024-05-13 07:59:17 +01:00
|
|
|
--disable-stripping</userinput></screen>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Install the package:</para>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
2024-05-13 18:05:59 +01:00
|
|
|
ln -sv libncursesw.so DESTDIR/usr/lib32/libncurses.so
|
2021-05-14 11:47:43 +01:00
|
|
|
cp -Rv DESTDIR/usr/lib32/* $LFS/usr/lib32
|
2019-04-01 18:00:45 +01:00
|
|
|
rm -rf DESTDIR</userinput></screen>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
</sect2><!-- m32 -->
|
2019-04-01 18:00:45 +01:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<!-- - - - - - - - - - -->
|
|
|
|
<!-- Multilib - x32bit -->
|
|
|
|
<!-- - - - - - - - - - -->
|
|
|
|
<sect2 arch="ml_x32,ml_all">
|
|
|
|
<title>Building Ncurses - x32bit</title>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Clean previous build:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="pre">make distclean</userinput></screen>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<para>Prepare Ncurses for compilation:</para>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \
|
|
|
|
CXX="$LFS_TGT-g++ -mx32" \
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--host=$LFS_TGTX32 \
|
2021-02-03 08:02:01 +00:00
|
|
|
--build=$(./config.guess) \
|
2021-05-14 11:47:43 +01:00
|
|
|
--libdir=/usr/libx32 \
|
2020-06-29 08:55:01 +01:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--with-shared \
|
2022-06-29 21:29:02 +01:00
|
|
|
--without-normal \
|
|
|
|
--with-cxx-shared \
|
2020-06-29 08:55:01 +01:00
|
|
|
--without-debug \
|
2020-08-30 15:04:15 +01:00
|
|
|
--without-ada \
|
2024-05-13 07:59:17 +01:00
|
|
|
--disable-stripping</userinput></screen>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2019-04-01 18:00:45 +01:00
|
|
|
|
|
|
|
<para>Install the package:</para>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
2024-05-13 18:05:59 +01:00
|
|
|
ln -sv libncursesw.so DESTDIR/usr/libx32/libncurses.so
|
2021-05-14 11:47:43 +01:00
|
|
|
cp -Rv DESTDIR/usr/libx32/* $LFS/usr/libx32
|
2019-04-01 18:00:45 +01:00
|
|
|
rm -rf DESTDIR</userinput></screen>
|
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
</sect2><!-- mx32 -->
|
2006-02-06 20:45:42 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<sect2 role="content">
|
|
|
|
<title/>
|
2006-02-06 20:45:42 +00:00
|
|
|
|
2020-06-29 08:55:01 +01:00
|
|
|
<para>Details on this package are located in
|
|
|
|
<xref linkend="contents-ncurses" role="."/></para>
|
2006-02-06 20:45:42 +00:00
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|