source: chapter06/ncurses.xml@ 3dab9f9

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 3dab9f9 was 3dab9f9, checked in by Matthew Burgess <matthew@…>, 17 years ago

Upgrade to NCurses-5.6. Fixes #1940.

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

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