Subversion Repositories svn LFS-FR

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-ncurses" role="wrap">
  <?dbhtml filename="ncurses.html"?>

  <title>Ncurses-&ncurses-version;</title>

  <indexterm zone="ch-system-ncurses">
    <primary sortas="a-Ncurses">Ncurses</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Ncurses package contains libraries for terminal-independent
    handling of character screens.</para>

  </sect2>

  &env-target;

  <sect2 role="installation">
    <title>Installation of Ncurses</title>

    <para os="p1">The following patch contains updates from the &ncurses-version; branch
    by the Ncurses developers:</para>

<screen os="p2"><userinput>patch -Np1 -i ../&ncurses-branch_update-patch;</userinput></screen>

    <para os="p3">This patch fixes an issue with some Bash versions:</para>

<screen os="p4"><userinput>patch -Np1 -i ../&ncurses-bashfix-patch;</userinput></screen>

    <para os="a">Prepare Ncurses for compilation:</para>

<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --prefix=/usr --libdir=/lib --with-shared \
    --enable-widec --without-debug --without-ada \
    --with-manpage-format=normal \
    --with-build-cc="gcc -D_GNU_SOURCE"</userinput></screen>

    <para os="c">Compile the package:</para>

<screen os="d"><userinput>make</userinput></screen>

    <para os="e">Install the package:</para>

<screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>

    <para os="g">Move the Ncurses static libraries to the proper location:</para>

<screen os="h"><userinput>mv -v ${CLFS}/lib/lib{panelw,menuw,formw,ncursesw,ncurses++w}.a \
    ${CLFS}/usr/lib</userinput></screen>

    <para os="i">Create symlinks in <filename class="directory">/usr/lib:</filename></para>

<screen os="j"><userinput>rm -v ${CLFS}/lib/lib{ncursesw,menuw,panelw,formw}.so
ln -sfv ../../lib/libncursesw.so.&ncurses-version2; ${CLFS}/usr/lib/libncursesw.so
ln -sfv ../../lib/libmenuw.so.&ncurses-version2; ${CLFS}/usr/lib/libmenuw.so
ln -sfv ../../lib/libpanelw.so.&ncurses-version2; ${CLFS}/usr/lib/libpanelw.so
ln -sfv ../../lib/libformw.so.&ncurses-version2; ${CLFS}/usr/lib/libformw.so</userinput></screen>

   <para os="k">Now we will make our Ncurses compatible for older and non-widec compatible programs
    can build properly:</para>

<screen os="l"><userinput>for lib in curses ncurses form panel menu ; do
        echo "INPUT(-l${lib}w)" > ${CLFS}/usr/lib/lib${lib}.so
        ln -sfv lib${lib}w.a ${CLFS}/usr/lib/lib${lib}.a
done
ln -sfv libncursesw.so ${CLFS}/usr/lib/libcursesw.so
ln -sfv libncursesw.a ${CLFS}/usr/lib/libcursesw.a
ln -sfv libncurses++w.a ${CLFS}/usr/lib/libncurses++.a
ln -sfv ncursesw5-config ${CLFS}/usr/bin/ncurses5-config</userinput></screen>

    <para os="m">Now we will create a symlink for /usr/share/terminfo in
    <filename class="directory">/usr/lib</filename> for compatibility:</para>

<screen os="n"><userinput>ln -sfv ../share/terminfo ${CLFS}/usr/lib/terminfo</userinput></screen>

  </sect2>

  <sect2 id="contents-ncurses" role="content">
    <title>Contents of Ncurses</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed libraries</segtitle>

      <seglistitem>
        <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
        ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
        <seg>libcursesw.so (link to libncursesw.so), libformw.[a,so],
        libmenuw.[a,so], libncurses++w.a, libncursesw.[a,so], and
        libpanelw.[a,so]</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="captoinfo">
        <term><command>captoinfo</command></term>
        <listitem>
          <para>Converts a termcap description into a terminfo description</para>
          <indexterm zone="ch-system-ncurses captoinfo">
            <primary sortas="b-captoinfo">captoinfo</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="clear">
        <term><command>clear</command></term>
        <listitem>
          <para>Clears the screen, if possible</para>
          <indexterm zone="ch-system-ncurses clear">
            <primary sortas="b-clear">clear</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="infocmp">
        <term><command>infocmp</command></term>
        <listitem>
          <para>Compares or prints out terminfo descriptions</para>
          <indexterm zone="ch-system-ncurses infocmp">
            <primary sortas="b-infocmp">infocmp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="infotocap">
        <term><command>infotocap</command></term>
        <listitem>
          <para>Converts a terminfo description into a termcap description</para>
          <indexterm zone="ch-system-ncurses infotocap">
            <primary sortas="b-infotocap">infotocap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ncursesw5-config">
        <term><command>ncursesw5-config</command></term>
        <listitem>
          <para>Provides configuration information for ncurses</para>
          <indexterm zone="ch-system-ncurses ncursesw5-config">
            <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="reset">
        <term><command>reset</command></term>
        <listitem>
          <para>Reinitializes a terminal to its default values</para>
          <indexterm zone="ch-system-ncurses reset">
            <primary sortas="b-reset">reset</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tabs">
        <term><command>tabs</command></term>
        <listitem>
          <para>Sets and clears tab stops on a terminal</para>
          <indexterm zone="ch-system-ncurses tabs">
            <primary sortas="b-tabs">tabs</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tic">
        <term><command>tic</command></term>
        <listitem>
          <para>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</para>
          <indexterm zone="ch-system-ncurses tic">
            <primary sortas="b-tic">tic</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="toe">
        <term><command>toe</command></term>
        <listitem>
          <para>Lists all available terminal types, giving the primary name and
          description for each</para>
          <indexterm zone="ch-system-ncurses toe">
            <primary sortas="b-toe">toe</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tput">
        <term><command>tput</command></term>
        <listitem>
          <para>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</para>
          <indexterm zone="ch-system-ncurses tput">
            <primary sortas="b-tput">tput</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tset">
        <term><command>tset</command></term>
        <listitem>
          <para>Can be used to initialize terminals</para>
          <indexterm zone="ch-system-ncurses tset">
            <primary sortas="b-tset">tset</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libcursesw">
        <term><filename class="libraryfile">libcursesw</filename></term>
        <listitem>
          <para>A link to <filename>libncursesw</filename></para>
          <indexterm zone="ch-system-ncurses libcursesw">
            <primary sortas="c-libcursesw">libcursesw</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libncursesw">
        <term><filename class="libraryfile">libncursesw</filename></term>
        <listitem>
          <para>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
          <command>make menuconfig</command></para>
          <indexterm zone="ch-system-ncurses libncursesw">
            <primary sortas="c-libncursesw">libncursesw</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libformw">
        <term><filename class="libraryfile">libformw</filename></term>
        <listitem>
          <para>Contains functions to implement forms</para>
          <indexterm zone="ch-system-ncurses libformw">
            <primary sortas="c-libform">libformw</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libmenuw">
        <term><filename class="libraryfile">libmenuw</filename></term>
        <listitem>
          <para>Contains functions to implement menus</para>
          <indexterm zone="ch-system-ncurses libmenuw">
            <primary sortas="c-libmenuw">libmenuw</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libpanelw">
        <term><filename class="libraryfile">libpanelw</filename></term>
        <listitem>
          <para>Contains functions to implement panels</para>
          <indexterm zone="ch-system-ncurses libpanelw">
            <primary sortas="c-libpanelw">libpanelw</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>