source: chapter06/ncurses.xml@ 2e1fb0ca

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.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 2e1fb0ca was 2e1fb0ca, checked in by Randy McMurchy <randy@…>, 16 years ago

Added some documentation installation commands to the Chapter 6 Ncurses instructions

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

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