source: chapter06/ncurses.xml@ f77b95f

7.8-systemd 7.9-systemd 7.9-systemd-rc1 7.9-systemd-rc2 systemd
Last change on this file since f77b95f was f77b95f, checked in by Douglas R. Reno <renodr@…>, 6 years ago

Update to binutils-2.25.1
Update to check-0.10.0
Update to procps-ng-3.3.11
Update to man-pages-4.02
Update to glibc-2.22
Update to linux-4.1.5
Update to tzdata2015f
XML Cleanups
Add a workaround for ncurses in Chapter 5 to not use mawk if found
Document some test suite failures

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd@10940 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 <para>Don't install a static library that is not handled by configure:</para>
45
46<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
47
48 <para>Prepare Ncurses for compilation:</para>
49
50<screen><userinput remap="configure">./configure --prefix=/usr \
51 --mandir=/usr/share/man \
52 --with-shared \
53 --without-debug \
54 --without-normal \
55 --enable-pc-files \
56 --enable-widec</userinput></screen>
57
58 <variablelist>
59 <title>The meaning of the new configure options:</title>
60
61 <varlistentry>
62 <term><parameter>--enable-widec</parameter></term>
63 <listitem>
64 <para>This switch causes wide-character libraries (e.g., <filename
65 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
66 to be built instead of normal ones (e.g., <filename
67 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
68 These wide-character libraries are usable in both multibyte and
69 traditional 8-bit locales, while normal libraries work properly
70 only in 8-bit locales. Wide-character and normal libraries are
71 source-compatible, but not binary-compatible.</para>
72 </listitem>
73 </varlistentry>
74
75 <varlistentry>
76 <term><parameter>--enable-pc-files</parameter></term>
77 <listitem>
78 <para>This switch generates and installs .pc files for pkg-config.
79 </para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--without-normal</parameter></term>
85 <listitem>
86 <para>This switch disables building and installing most static libraries.
87 </para>
88 </listitem>
89 </varlistentry>
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>Move the shared libraries to the
108 <filename class="directory">/lib</filename> directory, where they are
109 expected to reside:</para>
110
111<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen>
112
113 <para>Because the libraries have been moved, one symlink points to
114 a non-existent file. Recreate it:</para>
115
116<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
117
118 <para>Many applications still expect the linker to be able to find
119 non-wide-character Ncurses libraries. Trick such applications into linking with
120 wide-character libraries by means of symlinks and linker scripts:</para>
121
122<screen><userinput remap="install">for lib in ncurses form panel menu ; do
123 rm -vf /usr/lib/lib${lib}.so
124 echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
125 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
126done</userinput></screen>
127
128 <para>Finally, make sure that old applications that look for
129 <filename class="libraryfile">-lcurses</filename> at build time are still
130 buildable:</para>
131
132<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
133echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
134ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
135
136 <para>If desired, install the Ncurses documentation:</para>
137
138<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;
139cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
140
141 <note>
142 <para>The instructions above don't create non-wide-character Ncurses
143 libraries since no package installed by compiling from sources would
144 link against them at runtime. If you must have such libraries because
145 of some binary-only application or to be compliant with LSB, build
146 the package again with the following commands:</para>
147
148<screen role="nodump"><userinput>make distclean
149./configure --prefix=/usr \
150 --with-shared \
151 --without-normal \
152 --without-debug \
153 --without-cxx-binding
154make sources libs
155cp -av lib/lib*.so.6* /usr/lib</userinput></screen>
156 </note>
157
158 </sect2>
159
160 <sect2 id="contents-ncurses" role="content">
161 <title>Contents of Ncurses</title>
162
163 <segmentedlist>
164 <segtitle>Installed programs</segtitle>
165 <segtitle>Installed libraries</segtitle>
166 <segtitle>Installed directories</segtitle>
167
168 <seglistitem>
169 <seg>
170 captoinfo (link to tic),
171 clear,
172 infocmp,
173 infotocap (link to tic),
174 ncursesw5-config,
175 reset (link to tset),
176 tabs,
177 tic,
178 toe,
179 tput, and
180 tset
181 </seg>
182 <seg>
183 libcursesw.so (symlink and linker script to libncursesw.so),
184 libformw.so,
185 libmenuw.so,
186 libncursesw.so,
187 libpanelw.so, and their non-wide-character counterparts without "w"
188 in the library names.</seg>
189 <seg>
190 /usr/share/tabset,
191 /usr/share/terminfo, and
192 /usr/share/doc/ncurses-&ncurses-version;
193 </seg>
194 </seglistitem>
195 </segmentedlist>
196
197 <variablelist>
198 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
199 <?dbfo list-presentation="list"?>
200 <?dbhtml list-presentation="table"?>
201
202 <varlistentry id="captoinfo">
203 <term><command>captoinfo</command></term>
204 <listitem>
205 <para>Converts a termcap description into a terminfo description</para>
206 <indexterm zone="ch-system-ncurses captoinfo">
207 <primary sortas="b-captoinfo">captoinfo</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
212 <varlistentry id="clear">
213 <term><command>clear</command></term>
214 <listitem>
215 <para>Clears the screen, if possible</para>
216 <indexterm zone="ch-system-ncurses clear">
217 <primary sortas="b-clear">clear</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
222 <varlistentry id="infocmp">
223 <term><command>infocmp</command></term>
224 <listitem>
225 <para>Compares or prints out terminfo descriptions</para>
226 <indexterm zone="ch-system-ncurses infocmp">
227 <primary sortas="b-infocmp">infocmp</primary>
228 </indexterm>
229 </listitem>
230 </varlistentry>
231
232 <varlistentry id="infotocap">
233 <term><command>infotocap</command></term>
234 <listitem>
235 <para>Converts a terminfo description into a termcap description</para>
236 <indexterm zone="ch-system-ncurses infotocap">
237 <primary sortas="b-infotocap">infotocap</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry id="ncursesw5-config">
243 <term><command>ncursesw5-config</command></term>
244 <listitem>
245 <para>Provides configuration information for ncurses</para>
246 <indexterm zone="ch-system-ncurses ncursesw5-config">
247 <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="reset">
253 <term><command>reset</command></term>
254 <listitem>
255 <para>Reinitializes a terminal to its default values</para>
256 <indexterm zone="ch-system-ncurses reset">
257 <primary sortas="b-reset">reset</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 <varlistentry id="tabs">
263 <term><command>tabs</command></term>
264 <listitem>
265 <para>Clears and sets tab stops on a terminal</para>
266 <indexterm zone="ch-system-ncurses tabs">
267 <primary sortas="b-tabs">tabs</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="tic">
273 <term><command>tic</command></term>
274 <listitem>
275 <para>The terminfo entry-description compiler that translates a
276 terminfo file from source format into the binary format needed for the
277 ncurses library routines [A terminfo file contains information on the
278 capabilities of a certain terminal.]</para>
279 <indexterm zone="ch-system-ncurses tic">
280 <primary sortas="b-tic">tic</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="toe">
286 <term><command>toe</command></term>
287 <listitem>
288 <para>Lists all available terminal types, giving the primary name and
289 description for each</para>
290 <indexterm zone="ch-system-ncurses toe">
291 <primary sortas="b-toe">toe</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="tput">
297 <term><command>tput</command></term>
298 <listitem>
299 <para>Makes the values of terminal-dependent capabilities available to
300 the shell; it can also be used to reset or initialize a terminal or
301 report its long name</para>
302 <indexterm zone="ch-system-ncurses tput">
303 <primary sortas="b-tput">tput</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="tset">
309 <term><command>tset</command></term>
310 <listitem>
311 <para>Can be used to initialize terminals</para>
312 <indexterm zone="ch-system-ncurses tset">
313 <primary sortas="b-tset">tset</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="libcursesw">
319 <term><filename class="libraryfile">libcursesw</filename></term>
320 <listitem>
321 <para>A link to <filename>libncursesw</filename></para>
322 <indexterm zone="ch-system-ncurses libcursesw">
323 <primary sortas="c-libcursesw">libcursesw</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="libncursesw">
329 <term><filename class="libraryfile">libncursesw</filename></term>
330 <listitem>
331 <para>Contains functions to display text in many complex ways on a
332 terminal screen; a good example of the use of these functions is the
333 menu displayed during the kernel's <command>make
334 menuconfig</command></para>
335 <indexterm zone="ch-system-ncurses libncursesw">
336 <primary sortas="c-libncursesw">libncursesw</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="libformw">
342 <term><filename class="libraryfile">libformw</filename></term>
343 <listitem>
344 <para>Contains functions to implement forms</para>
345 <indexterm zone="ch-system-ncurses libformw">
346 <primary sortas="c-libformw">libformw</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="libmenuw">
352 <term><filename class="libraryfile">libmenuw</filename></term>
353 <listitem>
354 <para>Contains functions to implement menus</para>
355 <indexterm zone="ch-system-ncurses libmenuw">
356 <primary sortas="c-libmenuw">libmenuw</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="libpanelw">
362 <term><filename class="libraryfile">libpanelw</filename></term>
363 <listitem>
364 <para>Contains functions to implement panels</para>
365 <indexterm zone="ch-system-ncurses libpanelw">
366 <primary sortas="c-libpanelw">libpanelw</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 </variablelist>
372
373 </sect2>
374
375</sect1>
Note: See TracBrowser for help on using the repository browser.