source: chapter06/ncurses.xml@ 5536f74

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 5536f74 was 5536f74, checked in by Archaic <archaic@…>, 18 years ago

Applied Alexander Patrakov's patch which adds UTF-8 capability to the
development branch of the LFS Book.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7235 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 10.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-ncurses" role="wrap">
7<title>Ncurses-&ncurses-version;</title>
8<?dbhtml filename="ncurses.html"?>
9
10<indexterm zone="ch-system-ncurses"><primary sortas="a-Ncurses">Ncurses</primary></indexterm>
11
12<sect2 role="package"><title/>
13<para>The Ncurses package contains libraries for terminal-independent
14handling of character screens.</para>
15
16<segmentedlist>
17<segtitle>&buildtime;</segtitle>
18<segtitle>&diskspace;</segtitle>
19<seglistitem><seg>0.6 SBU</seg><seg>18.6 MB</seg></seglistitem>
20</segmentedlist>
21
22<segmentedlist>
23<segtitle>&dependencies;</segtitle>
24<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
25Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
26</segmentedlist>
27</sect2>
28
29<sect2 role="installation">
30<title>Installation of Ncurses</title>
31<!-- Uncomment if using a dated ncurses release instead of a numbered one.
32
33<para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
34and features added. The most important news are .......
35To get these fixes and features, apply the rollup patch:</para>
36
37<screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
38-->
39
40<para>Since the release of Ncurses-&ncurses-version;, a memory leak and some
41display bugs were found and fixed upstream. Apply those fixes:</para>
42
43<screen><userinput>patch -Np1 -i ../&ncurses-fixes-patch;</userinput></screen>
44
45<para>Prepare Ncurses for compilation:</para>
46
47<screen><userinput>./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
48
49<para>The meaning of the configure options:</para>
50
51<variablelist>
52<varlistentry>
53<term><parameter>--enable-widec</parameter></term>
54<listitem><para>This switch causes wide-character libraries
55(e.g. <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
56to be built instead of normal ones
57(e.g. <filename class="libraryfile">libncurses.so.&ncurses-version;</filename>).
58Those wide-character libraries are usable in both multibyte and traditional 8-bit
59locales, while normal libraries work properly only in 8-bit locales.
60Wide-character and normal libraries are source-compatible, but not
61binary-compatible.</para>
62</listitem>
63</varlistentry>
64<!--
65<varlistentry>
66<term><parameter>- -without-cxx-binding</parameter></term>
67<listitem><para>This optional switch causes the
68<filename class="libraryfile">libncurses++w.a</filename> library
69not to be built. Nothing in LFS and BLFS uses this library.</para>
70</listitem>
71</varlistentry>
72-->
73</variablelist>
74
75<para>Compile the package:</para>
76
77<screen><userinput>make</userinput></screen>
78
79<para>This package does not come with a test suite.</para>
80
81<para>Install the package:</para>
82
83<screen><userinput>make install</userinput></screen>
84
85<para>Give the Ncurses libraries execute permissions:</para>
86
87<screen><userinput>chmod -v 755 /usr/lib/*.&ncurses-version;</userinput></screen>
88
89<para>Fix a library that should not be executable:</para>
90
91<screen><userinput>chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
92
93<para>Move the libraries to the <filename class="directory">/lib</filename> directory,
94where they are expected to reside:</para>
95
96<screen><userinput>mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
97
98<para>Because the libraries have been moved, one symlink points to
99a non-existent file. Recreate it:</para>
100
101<screen><userinput>ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
102
103<para>Many applications still expect the linker to be able to find
104non-wide-character Ncurses libraries. Trick such applications into linking with
105wide-character libraries by means of symlinks and linker scripts:</para>
106
107<screen><userinput>for lib in curses ncurses form panel menu ; do \
108 rm -vf /usr/lib/lib${lib}.so ; \
109 echo "INPUT(-l${lib}w)" &gt;/usr/lib/lib${lib}.so ; \
110 ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
111done &amp;&amp;
112ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
113
114<para>Finally, make sure that really old applications that look for
115<filename class="libaryfile">-lcurses</filename> at build time are still
116buildable:</para>
117
118<screen><userinput>echo "INPUT(-lncursesw)" &gt;/usr/lib/libcursesw.so &amp;&amp;
119ln -sfv libncurses.so /usr/lib/libcurses.so &amp;&amp;
120ln -sfv libncursesw.a /usr/lib/libcursesw.a &amp;&amp;
121ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
122
123<note><para>The instructions above don't create non-wide-character Ncurses
124libraries since nothing in LFS and BLFS would link against them at runtime.
125If you must have such libraries because of some binary-only application,
126build them with the following commands:</para>
127<screen role="nodump"><userinput>make distclean &amp;&amp;
128./configure --prefix=/usr --with-shared --without-normal \
129 --without-debug --without-cxx-binding &amp;&amp;
130make sources libs &amp;&amp;
131cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
132</note>
133</sect2>
134
135
136<sect2 id="contents-ncurses" role="content"><title>Contents of Ncurses</title>
137
138<segmentedlist>
139<segtitle>Installed programs</segtitle>
140<segtitle>Installed libraries</segtitle>
141<seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
142reset (link to tset), tack, tic, toe, tput, and tset</seg>
143<seg>libcursesw.[a,so] (symlink and linker script to libncursesw.[a,so]),
144libformw.[a,so], libmenuw.[a,so],
145libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so] and their
146non-wide-character counterparts without "w" in the library names.</seg></seglistitem>
147</segmentedlist>
148
149<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
150<?dbfo list-presentation="list"?>
151<?dbhtml list-presentation="table"?>
152
153<varlistentry id="captoinfo">
154<term><command>captoinfo</command></term>
155<listitem>
156<para>Converts a termcap description into a terminfo description</para>
157<indexterm zone="ch-system-ncurses captoinfo"><primary sortas="b-captoinfo">captoinfo</primary></indexterm>
158</listitem>
159</varlistentry>
160
161<varlistentry id="clear">
162<term><command>clear</command></term>
163<listitem>
164<para>Clears the screen, if possible</para>
165<indexterm zone="ch-system-ncurses clear"><primary sortas="b-clear">clear</primary></indexterm>
166</listitem>
167</varlistentry>
168
169<varlistentry id="infocmp">
170<term><command>infocmp</command></term>
171<listitem>
172<para>Compares or prints out terminfo descriptions</para>
173<indexterm zone="ch-system-ncurses infocmp"><primary sortas="b-infocmp">infocmp</primary></indexterm>
174</listitem>
175</varlistentry>
176
177<varlistentry id="infotocap">
178<term><command>infotocap</command></term>
179<listitem>
180<para>Converts a terminfo description into a termcap description</para>
181<indexterm zone="ch-system-ncurses infotocap"><primary sortas="b-infotocap">infotocap</primary></indexterm>
182</listitem>
183</varlistentry>
184
185<varlistentry id="reset">
186<term><command>reset</command></term>
187<listitem>
188<para>Reinitializes a terminal to its default values</para>
189<indexterm zone="ch-system-ncurses reset"><primary sortas="b-reset">reset</primary></indexterm>
190</listitem>
191</varlistentry>
192
193<varlistentry id="tack">
194<term><command>tack</command></term>
195<listitem>
196<para>The terminfo action checker; it is mainly used to test the
197accuracy of an entry in the terminfo database</para>
198<indexterm zone="ch-system-ncurses tack"><primary sortas="b-tack">tack</primary></indexterm>
199</listitem>
200</varlistentry>
201
202<varlistentry id="tic">
203<term><command>tic</command></term>
204<listitem>
205<para>The terminfo entry-description compiler that translates a
206terminfo file from source format into the binary format needed for the
207ncurses library routines. A terminfo file contains information on the
208capabilities of a certain terminal</para>
209<indexterm zone="ch-system-ncurses tic"><primary sortas="b-tic">tic</primary></indexterm>
210</listitem>
211</varlistentry>
212
213<varlistentry id="toe">
214<term><command>toe</command></term>
215<listitem>
216<para>Lists all available terminal types, giving the primary name and
217description for each</para>
218<indexterm zone="ch-system-ncurses toe"><primary sortas="b-toe">toe</primary></indexterm>
219</listitem>
220</varlistentry>
221
222<varlistentry id="tput">
223<term><command>tput</command></term>
224<listitem>
225<para>Makes the values of terminal-dependent capabilities available to
226the shell; it can also be used to reset or initialize a terminal or
227report its long name</para>
228<indexterm zone="ch-system-ncurses tput"><primary sortas="b-tput">tput</primary></indexterm>
229</listitem>
230</varlistentry>
231
232<varlistentry id="tset">
233<term><command>tset</command></term>
234<listitem>
235<para>Can be used to initialize terminals</para>
236<indexterm zone="ch-system-ncurses tset"><primary sortas="b-tset">tset</primary></indexterm>
237</listitem>
238</varlistentry>
239
240<varlistentry id="libcurses">
241<term><filename class="libraryfile">libcurses</filename></term>
242<listitem>
243<para>A link to <filename>libncurses</filename></para>
244<indexterm zone="ch-system-ncurses libcurses"><primary sortas="c-libcurses">libcurses</primary></indexterm>
245</listitem>
246</varlistentry>
247
248<varlistentry id="libncurses">
249<term><filename class="libraryfile">libncurses</filename></term>
250<listitem>
251<para>Contains functions to display text in many complex ways on a
252terminal screen; a good example of the use of these functions is the
253menu displayed during the kernel's <command>make menuconfig</command></para>
254<indexterm zone="ch-system-ncurses libncurses"><primary sortas="c-libncurses">libncurses</primary></indexterm>
255</listitem>
256</varlistentry>
257
258<varlistentry id="libform">
259<term><filename class="libraryfile">libform</filename></term>
260<listitem>
261<para>Contains functions to implement forms</para>
262<indexterm zone="ch-system-ncurses libform"><primary sortas="c-libform">libform</primary></indexterm>
263</listitem>
264</varlistentry>
265
266<varlistentry id="libmenu">
267<term><filename class="libraryfile">libmenu</filename></term>
268<listitem>
269<para>Contains functions to implement menus</para>
270<indexterm zone="ch-system-ncurses libmenu"><primary sortas="c-libmenu">libmenu</primary></indexterm>
271</listitem>
272</varlistentry>
273
274<varlistentry id="libpanel">
275<term><filename class="libraryfile">libpanel</filename></term>
276<listitem>
277<para>Contains functions to implement panels</para>
278<indexterm zone="ch-system-ncurses libpanel"><primary sortas="c-libpanel">libpanel</primary></indexterm>
279</listitem>
280</varlistentry>
281</variablelist>
282
283</sect2>
284
285</sect1>
Note: See TracBrowser for help on using the repository browser.