source: chapter08/ncurses.xml@ 51c01bff

ml-11.0 multilib
Last change on this file since 51c01bff was df462a9, checked in by Thomas Trepl (Moody) <thomas@…>, 3 years ago

Merge pre-LFS-11-0 changes

  • Property mode set to 100644
File size: 15.8 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-fin-sbu;</seg>
35 <seg>&ncurses-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Ncurses</title>
43
44 <para>Prepare Ncurses for compilation:</para>
45
46<screen><userinput remap="configure">./configure --prefix=/usr \
47 --mandir=/usr/share/man \
48 --with-shared \
49 --without-debug \
50 --without-normal \
51 --enable-pc-files \
52 --enable-widec</userinput></screen>
53
54 <variablelist>
55 <title>The meaning of the new configure options:</title>
56
57 <varlistentry>
58 <term><parameter>--enable-widec</parameter></term>
59 <listitem>
60 <para>This switch causes wide-character libraries (e.g., <filename
61 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
62 to be built instead of normal ones (e.g., <filename
63 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
64 These wide-character libraries are usable in both multibyte and
65 traditional 8-bit locales, while normal libraries work properly
66 only in 8-bit locales. Wide-character and normal libraries are
67 source-compatible, but not binary-compatible.</para>
68 </listitem>
69 </varlistentry>
70
71 <varlistentry>
72 <term><parameter>--enable-pc-files</parameter></term>
73 <listitem>
74 <para>This switch generates and installs .pc files for pkg-config.
75 </para>
76 </listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><parameter>--without-normal</parameter></term>
81 <listitem>
82 <para>This switch disables building and installing most static libraries.
83 </para>
84 </listitem>
85 </varlistentry>
86
87 </variablelist>
88
89 <para>Compile the package:</para>
90
91<screen><userinput remap="make">make</userinput></screen>
92
93 <para>This package has a test suite, but it can only be run after the
94 package has been installed. The tests reside in the
95 <filename class="directory">test/</filename> directory. See the
96 <filename>README</filename> file in that directory for further details.
97 </para>
98
99 <para>Install the package:</para>
100
101<screen><userinput remap="install">make install</userinput></screen>
102
103 <para>Many applications still expect the linker to be able to find
104 non-wide-character Ncurses libraries. Trick such applications into linking with
105 wide-character libraries by means of symlinks and linker scripts:</para>
106
107<screen><userinput remap="install">for lib in 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}w.pc /usr/lib/pkgconfig/${lib}.pc
111done</userinput></screen>
112
113 <para>Finally, make sure that old applications that look for
114 <filename class="libraryfile">-lcurses</filename> at build time are still
115 buildable:</para>
116
117<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
118echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
119ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
120
121 <para>Remove a static library that is not handled by configure:</para>
122
123<screen><userinput remap="install">rm -fv /usr/lib/libncurses++w.a</userinput></screen>
124
125 <para>If desired, install the Ncurses documentation:</para>
126
127<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;
128cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
129
130 <note>
131
132 <para>The instructions above don't create non-wide-character Ncurses
133 libraries since no package installed by compiling from sources would link
134 against them at runtime. However, the only known binary-only
135 applications that link against non-wide-character Ncurses libraries
136 require version 5. If you must have such libraries because of some binary-only
137 application or to be compliant with LSB, build the package again with the
138 following commands:</para>
139
140<screen role="nodump"><userinput>make distclean
141./configure --prefix=/usr \
142 --with-shared \
143 --without-normal \
144 --without-debug \
145 --without-cxx-binding \
146 --with-abi-version=5
147make sources libs
148cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
149 </note>
150
151 </sect2>
152
153 <!-- - - - - - - - - - -->
154 <!-- Multilib - 32bit -->
155 <!-- - - - - - - - - - -->
156 <sect2 arch="ml_32,ml_all">
157 <title>Building Ncurses - 32bit</title>
158
159 <para>Clean previous build:</para>
160
161<screen><userinput remap="pre">make distclean</userinput></screen>
162
163 <para>Prepare Ncurses for compilation:</para>
164
165<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \
166./configure --prefix=/usr \
167 --host=i686-pc-linux-gnu \
168 --libdir=&usr-lib-m32; \
169 --mandir=/usr/share/man \
170 --with-shared \
171 --without-debug \
172 --without-normal \
173 --enable-pc-files \
174 --enable-widec \
175 --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen>
176
177 <para>Compile the package:</para>
178
179<screen><userinput remap="make">make</userinput></screen>
180
181 <para>Install the package:</para>
182
183<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
184mkdir -p DESTDIR&usr-lib-m32;/pkgconfig
185for lib in ncurses form panel menu ; do
186 rm -vf DESTDIR&usr-lib-m32;/lib${lib}.so
187 echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-m32;/lib${lib}.so
188 ln -svf ${lib}w.pc DESTDIR&usr-lib-m32;/pkgconfig/$lib.pc
189done
190rm -vf DESTDIR&usr-lib-m32;/libcursesw.so
191echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-m32;/libcursesw.so
192ln -sfv libncurses.so DESTDIR&usr-lib-m32;/libcurses.so
193cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
194rm -rf DESTDIR</userinput></screen>
195
196 </sect2><!-- m32 -->
197
198 <!-- - - - - - - - - - -->
199 <!-- Multilib - x32bit -->
200 <!-- - - - - - - - - - -->
201 <sect2 arch="ml_x32,ml_all">
202 <title>Building Ncurses - x32bit</title>
203
204 <para>Clean previous build:</para>
205
206<screen><userinput remap="pre">make distclean</userinput></screen>
207
208 <para>Prepare Ncurses for compilation:</para>
209
210<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \
211./configure --prefix=/usr \
212 --host=x86_64-pc-linux-gnux32 \
213 --libdir=&usr-lib-mx32; \
214 --mandir=/usr/share/man \
215 --with-shared \
216 --without-debug \
217 --without-normal \
218 --enable-pc-files \
219 --enable-widec \
220 --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen>
221
222 <para>Compile the package:</para>
223
224<screen><userinput remap="make">make</userinput></screen>
225
226 <para>Install the package:</para>
227
228<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
229mkdir -p DESTDIR&usr-lib-mx32;/pkgconfig
230for lib in ncurses form panel menu ; do
231 rm -vf DESTDIR&usr-lib-mx32;/lib${lib}.so
232 echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-mx32;/lib${lib}.so
233 ln -svf ${lib}w.pc DESTDIR&usr-lib-mx32;/pkgconfig/$lib.pc
234done
235rm -vf DESTDIR&usr-lib-mx32;/libcursesw.so
236echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-mx32;/libcursesw.so
237ln -sfv libncurses.so DESTDIR&usr-lib-mx32;/libcurses.so
238cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
239rm -rf DESTDIR</userinput></screen>
240
241 </sect2><!-- mx32 -->
242
243 <sect2 id="contents-ncurses" role="content">
244 <title>Contents of Ncurses</title>
245
246 <segmentedlist>
247 <segtitle>Installed programs</segtitle>
248 <segtitle>Installed libraries</segtitle>
249 <segtitle>Installed directories</segtitle>
250
251 <seglistitem>
252 <seg>
253 captoinfo (link to tic),
254 clear,
255 infocmp,
256 infotocap (link to tic),
257 ncursesw6-config,
258 reset (link to tset),
259 tabs,
260 tic,
261 toe,
262 tput, and
263 tset
264 </seg>
265 <seg>
266 libcursesw.so (symlink and linker script to libncursesw.so),
267 libformw.so,
268 libmenuw.so,
269 libncursesw.so,
270 libpanelw.so, and their non-wide-character counterparts without "w"
271 in the library names.</seg>
272 <seg>
273 /usr/share/tabset,
274 /usr/share/terminfo, and
275 /usr/share/doc/ncurses-&ncurses-version;
276 </seg>
277 </seglistitem>
278 </segmentedlist>
279
280 <variablelist>
281 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
282 <?dbfo list-presentation="list"?>
283 <?dbhtml list-presentation="table"?>
284
285 <varlistentry id="captoinfo">
286 <term><command>captoinfo</command></term>
287 <listitem>
288 <para>Converts a termcap description into a terminfo description</para>
289 <indexterm zone="ch-system-ncurses captoinfo">
290 <primary sortas="b-captoinfo">captoinfo</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="clear">
296 <term><command>clear</command></term>
297 <listitem>
298 <para>Clears the screen, if possible</para>
299 <indexterm zone="ch-system-ncurses clear">
300 <primary sortas="b-clear">clear</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 <varlistentry id="infocmp">
306 <term><command>infocmp</command></term>
307 <listitem>
308 <para>Compares or prints out terminfo descriptions</para>
309 <indexterm zone="ch-system-ncurses infocmp">
310 <primary sortas="b-infocmp">infocmp</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="infotocap">
316 <term><command>infotocap</command></term>
317 <listitem>
318 <para>Converts a terminfo description into a termcap description</para>
319 <indexterm zone="ch-system-ncurses infotocap">
320 <primary sortas="b-infotocap">infotocap</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="ncursesw6-config">
326 <term><command>ncursesw6-config</command></term>
327 <listitem>
328 <para>Provides configuration information for ncurses</para>
329 <indexterm zone="ch-system-ncurses ncursesw6-config">
330 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="reset">
336 <term><command>reset</command></term>
337 <listitem>
338 <para>Reinitializes a terminal to its default values</para>
339 <indexterm zone="ch-system-ncurses reset">
340 <primary sortas="b-reset">reset</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="tabs">
346 <term><command>tabs</command></term>
347 <listitem>
348 <para>Clears and sets tab stops on a terminal</para>
349 <indexterm zone="ch-system-ncurses tabs">
350 <primary sortas="b-tabs">tabs</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="tic">
356 <term><command>tic</command></term>
357 <listitem>
358 <para>The terminfo entry-description compiler that translates a
359 terminfo file from source format into the binary format needed for the
360 ncurses library routines [A terminfo file contains information on the
361 capabilities of a certain terminal.]</para>
362 <indexterm zone="ch-system-ncurses tic">
363 <primary sortas="b-tic">tic</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="toe">
369 <term><command>toe</command></term>
370 <listitem>
371 <para>Lists all available terminal types, giving the primary name and
372 description for each</para>
373 <indexterm zone="ch-system-ncurses toe">
374 <primary sortas="b-toe">toe</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="tput">
380 <term><command>tput</command></term>
381 <listitem>
382 <para>Makes the values of terminal-dependent capabilities available to
383 the shell; it can also be used to reset or initialize a terminal or
384 report its long name</para>
385 <indexterm zone="ch-system-ncurses tput">
386 <primary sortas="b-tput">tput</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="tset">
392 <term><command>tset</command></term>
393 <listitem>
394 <para>Can be used to initialize terminals</para>
395 <indexterm zone="ch-system-ncurses tset">
396 <primary sortas="b-tset">tset</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="libcursesw">
402 <term><filename class="libraryfile">libcursesw</filename></term>
403 <listitem>
404 <para>A link to <filename>libncursesw</filename></para>
405 <indexterm zone="ch-system-ncurses libcursesw">
406 <primary sortas="c-libcursesw">libcursesw</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="libncursesw">
412 <term><filename class="libraryfile">libncursesw</filename></term>
413 <listitem>
414 <para>Contains functions to display text in many complex ways on a
415 terminal screen; a good example of the use of these functions is the
416 menu displayed during the kernel's <command>make
417 menuconfig</command></para>
418 <indexterm zone="ch-system-ncurses libncursesw">
419 <primary sortas="c-libncursesw">libncursesw</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
424 <varlistentry id="libformw">
425 <term><filename class="libraryfile">libformw</filename></term>
426 <listitem>
427 <para>Contains functions to implement forms</para>
428 <indexterm zone="ch-system-ncurses libformw">
429 <primary sortas="c-libformw">libformw</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="libmenuw">
435 <term><filename class="libraryfile">libmenuw</filename></term>
436 <listitem>
437 <para>Contains functions to implement menus</para>
438 <indexterm zone="ch-system-ncurses libmenuw">
439 <primary sortas="c-libmenuw">libmenuw</primary>
440 </indexterm>
441 </listitem>
442 </varlistentry>
443
444 <varlistentry id="libpanelw">
445 <term><filename class="libraryfile">libpanelw</filename></term>
446 <listitem>
447 <para>Contains functions to implement panels</para>
448 <indexterm zone="ch-system-ncurses libpanelw">
449 <primary sortas="c-libpanelw">libpanelw</primary>
450 </indexterm>
451 </listitem>
452 </varlistentry>
453
454 </variablelist>
455
456 </sect2>
457
458</sect1>
Note: See TracBrowser for help on using the repository browser.