| [02095ae] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
 | 
|---|
| [c439b8a] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
 | 3 |   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
| [02095ae] | 4 |   <!ENTITY % general-entities SYSTEM "../../general.ent">
 | 
|---|
 | 5 |   %general-entities;
 | 
|---|
 | 6 | ]>
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | <sect1 id="ch-system-ncurses" role="wrap">
 | 
|---|
 | 9 |   <?dbhtml filename="ncurses.html"?>
 | 
|---|
 | 10 | 
 | 
|---|
 | 11 |   <title>Ncurses-&ncurses-version;</title>
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 |   <indexterm zone="ch-system-ncurses">
 | 
|---|
 | 14 |     <primary sortas="a-Ncurses">Ncurses</primary>
 | 
|---|
 | 15 |   </indexterm>
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 |   <sect2 role="package">
 | 
|---|
 | 18 |     <title/>
 | 
|---|
 | 19 | 
 | 
|---|
 | 20 |     <para>The Ncurses package contains libraries for terminal-independent
 | 
|---|
 | 21 |     handling of character screens.</para>
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 |   </sect2>
 | 
|---|
 | 24 | 
 | 
|---|
| [12e6567] | 25 |   &env-target;
 | 
|---|
 | 26 | 
 | 
|---|
| [02095ae] | 27 |   <sect2 role="installation">
 | 
|---|
 | 28 |     <title>Installation of Ncurses</title>
 | 
|---|
 | 29 | 
 | 
|---|
| [ef88672] | 30 |     <para os="p1">The following patch contains updates from the &ncurses-version; branch
 | 
|---|
 | 31 |     by the Ncurses developers:</para>
 | 
|---|
| [090d748] | 32 | 
 | 
|---|
| [ef88672] | 33 | <screen os="p2"><userinput>patch -Np1 -i ../&ncurses-branch_update-patch;</userinput></screen>
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 |     <para os="p3">This patch fixes an issue with some Bash versions:</para>
 | 
|---|
 | 36 | 
 | 
|---|
 | 37 | <screen os="p4"><userinput>patch -Np1 -i ../&ncurses-bashfix-patch;</userinput></screen>
 | 
|---|
| [090d748] | 38 | 
 | 
|---|
| [02095ae] | 39 |     <para os="a">Prepare Ncurses for compilation:</para>
 | 
|---|
 | 40 | 
 | 
|---|
| [cee2ca2] | 41 | <screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
 | 
|---|
| [ef88672] | 42 |     --prefix=/usr --libdir=/lib --with-shared \
 | 
|---|
 | 43 |     --enable-widec --without-debug --without-ada \
 | 
|---|
| [807984d] | 44 |     --with-manpage-format=normal \
 | 
|---|
| [db27842] | 45 |     --with-build-cc="gcc -D_GNU_SOURCE"</userinput></screen>
 | 
|---|
| [02095ae] | 46 | 
 | 
|---|
 | 47 |     <para os="c">Compile the package:</para>
 | 
|---|
 | 48 | 
 | 
|---|
 | 49 | <screen os="d"><userinput>make</userinput></screen>
 | 
|---|
 | 50 | 
 | 
|---|
 | 51 |     <para os="e">Install the package:</para>
 | 
|---|
 | 52 | 
 | 
|---|
| [586feb7] | 53 | <screen os="f"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
 | 
|---|
| [02095ae] | 54 | 
 | 
|---|
 | 55 |     <para os="g">Move the Ncurses static libraries to the proper location:</para>
 | 
|---|
 | 56 | 
 | 
|---|
| [ef88672] | 57 | <screen os="h"><userinput>mv -v ${CLFS}/lib/lib{panelw,menuw,formw,ncursesw,ncurses++w}.a \
 | 
|---|
| [a074923] | 58 |     ${CLFS}/usr/lib</userinput></screen>
 | 
|---|
| [02095ae] | 59 | 
 | 
|---|
 | 60 |     <para os="i">Create symlinks in <filename class="directory">/usr/lib:</filename></para>
 | 
|---|
 | 61 | 
 | 
|---|
| [ef88672] | 62 | <screen os="j"><userinput>rm -v ${CLFS}/lib/lib{ncursesw,menuw,panelw,formw}.so
 | 
|---|
 | 63 | ln -sfv ../../lib/libncursesw.so.&ncurses-version2; ${CLFS}/usr/lib/libncursesw.so
 | 
|---|
 | 64 | ln -sfv ../../lib/libmenuw.so.&ncurses-version2; ${CLFS}/usr/lib/libmenuw.so
 | 
|---|
 | 65 | ln -sfv ../../lib/libpanelw.so.&ncurses-version2; ${CLFS}/usr/lib/libpanelw.so
 | 
|---|
 | 66 | ln -sfv ../../lib/libformw.so.&ncurses-version2; ${CLFS}/usr/lib/libformw.so</userinput></screen>
 | 
|---|
 | 67 | 
 | 
|---|
 | 68 |    <para os="k">Now we will make our Ncurses compatible for older and non-widec compatible programs
 | 
|---|
 | 69 |     can build properly:</para>
 | 
|---|
 | 70 | 
 | 
|---|
 | 71 | <screen os="l"><userinput>for lib in curses ncurses form panel menu ; do
 | 
|---|
 | 72 |         echo "INPUT(-l${lib}w)" > ${CLFS}/usr/lib/lib${lib}.so
 | 
|---|
 | 73 |         ln -sfv lib${lib}w.a ${CLFS}/usr/lib/lib${lib}.a
 | 
|---|
 | 74 | done
 | 
|---|
 | 75 | ln -sfv libncursesw.so ${CLFS}/usr/lib/libcursesw.so
 | 
|---|
 | 76 | ln -sfv libncursesw.a ${CLFS}/usr/lib/libcursesw.a
 | 
|---|
 | 77 | ln -sfv libncurses++w.a ${CLFS}/usr/lib/libncurses++.a
 | 
|---|
 | 78 | ln -sfv ncursesw5-config ${CLFS}/usr/bin/ncurses5-config</userinput></screen>
 | 
|---|
| [02095ae] | 79 | 
 | 
|---|
| [ef88672] | 80 |     <para os="m">Now we will create a symlink for /usr/share/terminfo in
 | 
|---|
 | 81 |     <filename class="directory">/usr/lib</filename> for compatibility:</para>
 | 
|---|
| [02095ae] | 82 | 
 | 
|---|
| [c8063d1] | 83 | <screen os="n"><userinput>ln -sfv ../share/terminfo ${CLFS}/usr/lib/terminfo</userinput></screen>
 | 
|---|
| [02095ae] | 84 | 
 | 
|---|
 | 85 |   </sect2>
 | 
|---|
 | 86 | 
 | 
|---|
 | 87 |   <sect2 id="contents-ncurses" role="content">
 | 
|---|
 | 88 |     <title>Contents of Ncurses</title>
 | 
|---|
 | 89 | 
 | 
|---|
 | 90 |     <segmentedlist>
 | 
|---|
 | 91 |       <segtitle>Installed programs</segtitle>
 | 
|---|
 | 92 |       <segtitle>Installed libraries</segtitle>
 | 
|---|
 | 93 | 
 | 
|---|
 | 94 |       <seglistitem>
 | 
|---|
| [ef88672] | 95 |         <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
 | 
|---|
 | 96 |         ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
 | 
|---|
 | 97 |         <seg>libcursesw.so (link to libncursesw.so), libformw.[a,so],
 | 
|---|
 | 98 |         libmenuw.[a,so], libncurses++w.a, libncursesw.[a,so], and
 | 
|---|
 | 99 |         libpanelw.[a,so]</seg>
 | 
|---|
| [02095ae] | 100 |       </seglistitem>
 | 
|---|
 | 101 |     </segmentedlist>
 | 
|---|
 | 102 | 
 | 
|---|
 | 103 |     <variablelist>
 | 
|---|
 | 104 |       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
 | 
|---|
 | 105 |       <?dbfo list-presentation="list"?>
 | 
|---|
 | 106 |       <?dbhtml list-presentation="table"?>
 | 
|---|
 | 107 | 
 | 
|---|
| [ef88672] | 108 |       <varlistentry id="captoinfo">
 | 
|---|
 | 109 |         <term><command>captoinfo</command></term>
 | 
|---|
 | 110 |         <listitem>
 | 
|---|
 | 111 |           <para>Converts a termcap description into a terminfo description</para>
 | 
|---|
 | 112 |           <indexterm zone="ch-system-ncurses captoinfo">
 | 
|---|
 | 113 |             <primary sortas="b-captoinfo">captoinfo</primary>
 | 
|---|
 | 114 |           </indexterm>
 | 
|---|
 | 115 |         </listitem>
 | 
|---|
 | 116 |       </varlistentry>
 | 
|---|
 | 117 | 
 | 
|---|
 | 118 |       <varlistentry id="clear">
 | 
|---|
 | 119 |         <term><command>clear</command></term>
 | 
|---|
 | 120 |         <listitem>
 | 
|---|
 | 121 |           <para>Clears the screen, if possible</para>
 | 
|---|
 | 122 |           <indexterm zone="ch-system-ncurses clear">
 | 
|---|
 | 123 |             <primary sortas="b-clear">clear</primary>
 | 
|---|
 | 124 |           </indexterm>
 | 
|---|
 | 125 |         </listitem>
 | 
|---|
 | 126 |       </varlistentry>
 | 
|---|
 | 127 | 
 | 
|---|
 | 128 |       <varlistentry id="infocmp">
 | 
|---|
 | 129 |         <term><command>infocmp</command></term>
 | 
|---|
 | 130 |         <listitem>
 | 
|---|
 | 131 |           <para>Compares or prints out terminfo descriptions</para>
 | 
|---|
 | 132 |           <indexterm zone="ch-system-ncurses infocmp">
 | 
|---|
 | 133 |             <primary sortas="b-infocmp">infocmp</primary>
 | 
|---|
 | 134 |           </indexterm>
 | 
|---|
 | 135 |         </listitem>
 | 
|---|
 | 136 |       </varlistentry>
 | 
|---|
 | 137 | 
 | 
|---|
 | 138 |       <varlistentry id="infotocap">
 | 
|---|
 | 139 |         <term><command>infotocap</command></term>
 | 
|---|
 | 140 |         <listitem>
 | 
|---|
 | 141 |           <para>Converts a terminfo description into a termcap description</para>
 | 
|---|
 | 142 |           <indexterm zone="ch-system-ncurses infotocap">
 | 
|---|
 | 143 |             <primary sortas="b-infotocap">infotocap</primary>
 | 
|---|
 | 144 |           </indexterm>
 | 
|---|
 | 145 |         </listitem>
 | 
|---|
 | 146 |       </varlistentry>
 | 
|---|
 | 147 | 
 | 
|---|
 | 148 |       <varlistentry id="ncursesw5-config">
 | 
|---|
 | 149 |         <term><command>ncursesw5-config</command></term>
 | 
|---|
| [9c69069] | 150 |         <listitem>
 | 
|---|
 | 151 |           <para>Provides configuration information for ncurses</para>
 | 
|---|
| [ef88672] | 152 |           <indexterm zone="ch-system-ncurses ncursesw5-config">
 | 
|---|
 | 153 |             <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
 | 
|---|
 | 154 |           </indexterm>
 | 
|---|
 | 155 |         </listitem>
 | 
|---|
 | 156 |       </varlistentry>
 | 
|---|
 | 157 | 
 | 
|---|
 | 158 |       <varlistentry id="reset">
 | 
|---|
 | 159 |         <term><command>reset</command></term>
 | 
|---|
 | 160 |         <listitem>
 | 
|---|
 | 161 |           <para>Reinitializes a terminal to its default values</para>
 | 
|---|
 | 162 |           <indexterm zone="ch-system-ncurses reset">
 | 
|---|
 | 163 |             <primary sortas="b-reset">reset</primary>
 | 
|---|
 | 164 |           </indexterm>
 | 
|---|
 | 165 |         </listitem>
 | 
|---|
 | 166 |       </varlistentry>
 | 
|---|
 | 167 | 
 | 
|---|
 | 168 |       <varlistentry id="tabs">
 | 
|---|
 | 169 |         <term><command>tabs</command></term>
 | 
|---|
 | 170 |         <listitem>
 | 
|---|
 | 171 |           <para>Sets and clears tab stops on a terminal</para>
 | 
|---|
 | 172 |           <indexterm zone="ch-system-ncurses tabs">
 | 
|---|
 | 173 |             <primary sortas="b-tabs">tabs</primary>
 | 
|---|
 | 174 |           </indexterm>
 | 
|---|
 | 175 |         </listitem>
 | 
|---|
 | 176 |       </varlistentry>
 | 
|---|
 | 177 | 
 | 
|---|
 | 178 |       <varlistentry id="tic">
 | 
|---|
 | 179 |         <term><command>tic</command></term>
 | 
|---|
 | 180 |         <listitem>
 | 
|---|
 | 181 |           <para>The terminfo entry-description compiler that translates a
 | 
|---|
 | 182 |           terminfo file from source format into the binary format needed for the
 | 
|---|
 | 183 |           ncurses library routines. A terminfo file contains information on the
 | 
|---|
 | 184 |           capabilities of a certain terminal</para>
 | 
|---|
 | 185 |           <indexterm zone="ch-system-ncurses tic">
 | 
|---|
 | 186 |             <primary sortas="b-tic">tic</primary>
 | 
|---|
 | 187 |           </indexterm>
 | 
|---|
 | 188 |         </listitem>
 | 
|---|
 | 189 |       </varlistentry>
 | 
|---|
 | 190 | 
 | 
|---|
 | 191 |       <varlistentry id="toe">
 | 
|---|
 | 192 |         <term><command>toe</command></term>
 | 
|---|
 | 193 |         <listitem>
 | 
|---|
 | 194 |           <para>Lists all available terminal types, giving the primary name and
 | 
|---|
 | 195 |           description for each</para>
 | 
|---|
 | 196 |           <indexterm zone="ch-system-ncurses toe">
 | 
|---|
 | 197 |             <primary sortas="b-toe">toe</primary>
 | 
|---|
 | 198 |           </indexterm>
 | 
|---|
 | 199 |         </listitem>
 | 
|---|
 | 200 |       </varlistentry>
 | 
|---|
 | 201 | 
 | 
|---|
 | 202 |       <varlistentry id="tput">
 | 
|---|
 | 203 |         <term><command>tput</command></term>
 | 
|---|
 | 204 |         <listitem>
 | 
|---|
 | 205 |           <para>Makes the values of terminal-dependent capabilities available to
 | 
|---|
 | 206 |           the shell; it can also be used to reset or initialize a terminal or
 | 
|---|
 | 207 |           report its long name</para>
 | 
|---|
 | 208 |           <indexterm zone="ch-system-ncurses tput">
 | 
|---|
 | 209 |             <primary sortas="b-tput">tput</primary>
 | 
|---|
 | 210 |           </indexterm>
 | 
|---|
 | 211 |         </listitem>
 | 
|---|
 | 212 |       </varlistentry>
 | 
|---|
 | 213 | 
 | 
|---|
 | 214 |       <varlistentry id="tset">
 | 
|---|
 | 215 |         <term><command>tset</command></term>
 | 
|---|
 | 216 |         <listitem>
 | 
|---|
 | 217 |           <para>Can be used to initialize terminals</para>
 | 
|---|
 | 218 |           <indexterm zone="ch-system-ncurses tset">
 | 
|---|
 | 219 |             <primary sortas="b-tset">tset</primary>
 | 
|---|
| [9c69069] | 220 |           </indexterm>
 | 
|---|
 | 221 |         </listitem>
 | 
|---|
 | 222 |       </varlistentry>
 | 
|---|
 | 223 | 
 | 
|---|
| [ef88672] | 224 |       <varlistentry id="libcursesw">
 | 
|---|
 | 225 |         <term><filename class="libraryfile">libcursesw</filename></term>
 | 
|---|
| [02095ae] | 226 |         <listitem>
 | 
|---|
| [ef88672] | 227 |           <para>A link to <filename>libncursesw</filename></para>
 | 
|---|
 | 228 |           <indexterm zone="ch-system-ncurses libcursesw">
 | 
|---|
 | 229 |             <primary sortas="c-libcursesw">libcursesw</primary>
 | 
|---|
| [02095ae] | 230 |           </indexterm>
 | 
|---|
 | 231 |         </listitem>
 | 
|---|
 | 232 |       </varlistentry>
 | 
|---|
 | 233 | 
 | 
|---|
| [ef88672] | 234 |       <varlistentry id="libncursesw">
 | 
|---|
 | 235 |         <term><filename class="libraryfile">libncursesw</filename></term>
 | 
|---|
| [02095ae] | 236 |         <listitem>
 | 
|---|
 | 237 |           <para>Contains functions to display text in many complex ways on a
 | 
|---|
 | 238 |           terminal screen; a good example of the use of these functions is the
 | 
|---|
 | 239 |           menu displayed during the kernel's
 | 
|---|
 | 240 |           <command>make menuconfig</command></para>
 | 
|---|
| [ef88672] | 241 |           <indexterm zone="ch-system-ncurses libncursesw">
 | 
|---|
 | 242 |             <primary sortas="c-libncursesw">libncursesw</primary>
 | 
|---|
| [02095ae] | 243 |           </indexterm>
 | 
|---|
 | 244 |         </listitem>
 | 
|---|
 | 245 |       </varlistentry>
 | 
|---|
 | 246 | 
 | 
|---|
| [ef88672] | 247 |       <varlistentry id="libformw">
 | 
|---|
 | 248 |         <term><filename class="libraryfile">libformw</filename></term>
 | 
|---|
| [02095ae] | 249 |         <listitem>
 | 
|---|
 | 250 |           <para>Contains functions to implement forms</para>
 | 
|---|
| [ef88672] | 251 |           <indexterm zone="ch-system-ncurses libformw">
 | 
|---|
 | 252 |             <primary sortas="c-libform">libformw</primary>
 | 
|---|
| [02095ae] | 253 |           </indexterm>
 | 
|---|
 | 254 |         </listitem>
 | 
|---|
 | 255 |       </varlistentry>
 | 
|---|
 | 256 | 
 | 
|---|
| [ef88672] | 257 |       <varlistentry id="libmenuw">
 | 
|---|
 | 258 |         <term><filename class="libraryfile">libmenuw</filename></term>
 | 
|---|
| [02095ae] | 259 |         <listitem>
 | 
|---|
 | 260 |           <para>Contains functions to implement menus</para>
 | 
|---|
| [ef88672] | 261 |           <indexterm zone="ch-system-ncurses libmenuw">
 | 
|---|
 | 262 |             <primary sortas="c-libmenuw">libmenuw</primary>
 | 
|---|
| [02095ae] | 263 |           </indexterm>
 | 
|---|
 | 264 |         </listitem>
 | 
|---|
 | 265 |       </varlistentry>
 | 
|---|
 | 266 | 
 | 
|---|
| [ef88672] | 267 |       <varlistentry id="libpanelw">
 | 
|---|
 | 268 |         <term><filename class="libraryfile">libpanelw</filename></term>
 | 
|---|
| [02095ae] | 269 |         <listitem>
 | 
|---|
 | 270 |           <para>Contains functions to implement panels</para>
 | 
|---|
| [ef88672] | 271 |           <indexterm zone="ch-system-ncurses libpanelw">
 | 
|---|
 | 272 |             <primary sortas="c-libpanelw">libpanelw</primary>
 | 
|---|
| [02095ae] | 273 |           </indexterm>
 | 
|---|
 | 274 |         </listitem>
 | 
|---|
 | 275 |       </varlistentry>
 | 
|---|
 | 276 | 
 | 
|---|
 | 277 |     </variablelist>
 | 
|---|
 | 278 | 
 | 
|---|
 | 279 |   </sect2>
 | 
|---|
 | 280 | 
 | 
|---|
 | 281 | </sect1>
 | 
|---|