source: chapter08/ncurses.xml@ 0160d68

multilib
Last change on this file since 0160d68 was 0160d68, checked in by Thomas Trepl (Moody) <thomas@…>, 22 months ago

Automatic merge of trunk into multilib

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