source: chapter08/ncurses.xml@ 7cf7354

multilib
Last change on this file since 7cf7354 was 9d18322, checked in by Thomas Trepl (Moody) <thomas@…>, 21 months ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 17.7 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:</para>
135
136<screen><userinput remap="install">make DESTDIR=$PWD/dest install
137install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
138rm -v dest/usr/lib/libncursesw.so.&ncurses-version;
139cp -av dest/* /</userinput></screen>
140
141 <para>Many applications still expect the linker to be able to find
142 non-wide-character Ncurses libraries. Trick such applications into linking with
143 wide-character libraries by means of symlinks and linker scripts:</para>
144
145<screen><userinput remap="install">for lib in ncurses form panel menu ; do
146 rm -vf /usr/lib/lib${lib}.so
147 echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
148 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
149done</userinput></screen>
150
151 <para>Finally, make sure that old applications that look for
152 <filename class="libraryfile">-lcurses</filename> at build time are still
153 buildable:</para>
154
155<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
156echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
157ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
158
159 <para>If desired, install the Ncurses documentation:</para>
160
161<screen><userinput remap="install">mkdir -pv /usr/share/doc/ncurses-&ncurses-version;
162cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
163
164 <note>
165
166 <para>The instructions above don't create non-wide-character Ncurses
167 libraries since no package installed by compiling from sources would link
168 against them at runtime. However, the only known binary-only
169 applications that link against non-wide-character Ncurses libraries
170 require version 5. If you must have such libraries because of some binary-only
171 application or to be compliant with LSB, build the package again with the
172 following commands:</para>
173
174<screen role="nodump"><userinput>make distclean
175./configure --prefix=/usr \
176 --with-shared \
177 --without-normal \
178 --with-cxx-shared \
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 --with-cxx-shared \
209 --enable-pc-files \
210 --enable-widec \
211 --with-pkg-config-libdir=/usr/lib32/pkgconfig</userinput></screen>
212
213 <para>Compile the package:</para>
214
215<screen><userinput remap="make">make</userinput></screen>
216
217 <para>Install the package:</para>
218
219<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
220mkdir -p DESTDIR/usr/lib32/pkgconfig
221for lib in ncurses form panel menu ; do
222 rm -vf DESTDIR/usr/lib32/lib${lib}.so
223 echo "INPUT(-l${lib}w)" > DESTDIR/usr/lib32/lib${lib}.so
224 ln -svf ${lib}w.pc DESTDIR/usr/lib32/pkgconfig/$lib.pc
225done
226rm -vf DESTDIR/usr/lib32/libcursesw.so
227echo "INPUT(-lncursesw)" > DESTDIR/usr/lib32/libcursesw.so
228ln -sfv libncurses.so DESTDIR/usr/lib32/libcurses.so
229cp -Rv DESTDIR/usr/lib32/* /usr/lib32
230rm -rf DESTDIR</userinput></screen>
231
232 </sect2><!-- m32 -->
233
234 <!-- - - - - - - - - - -->
235 <!-- Multilib - x32bit -->
236 <!-- - - - - - - - - - -->
237 <sect2 arch="ml_x32,ml_all">
238 <title>Building Ncurses - x32bit</title>
239
240 <para>Clean previous build:</para>
241
242<screen><userinput remap="pre">make distclean</userinput></screen>
243
244 <para>Prepare Ncurses for compilation:</para>
245
246<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \
247./configure --prefix=/usr \
248 --host=x86_64-pc-linux-gnux32 \
249 --libdir=/usr/libx32 \
250 --mandir=/usr/share/man \
251 --with-shared \
252 --without-debug \
253 --without-normal \
254 --enable-pc-files \
255 --enable-widec \
256 --with-pkg-config-libdir=/usr/libx32/pkgconfig</userinput></screen>
257
258 <para>Compile the package:</para>
259
260<screen><userinput remap="make">make</userinput></screen>
261
262 <para>Install the package:</para>
263
264<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
265mkdir -p DESTDIR/usr/libx32/pkgconfig
266for lib in ncurses form panel menu ; do
267 rm -vf DESTDIR/usr/libx32/lib${lib}.so
268 echo "INPUT(-l${lib}w)" > DESTDIR/usr/libx32/lib${lib}.so
269 ln -svf ${lib}w.pc DESTDIR/usr/libx32/pkgconfig/$lib.pc
270done
271rm -vf DESTDIR/usr/libx32/libcursesw.so
272echo "INPUT(-lncursesw)" > DESTDIR/usr/libx32/libcursesw.so
273ln -sfv libncurses.so DESTDIR/usr/libx32/libcurses.so
274cp -Rv DESTDIR/usr/libx32/* /usr/libx32
275rm -rf DESTDIR</userinput></screen>
276
277 </sect2><!-- mx32 -->
278
279 <sect2 id="contents-ncurses" role="content">
280 <title>Contents of Ncurses</title>
281
282 <segmentedlist>
283 <segtitle>Installed programs</segtitle>
284 <segtitle>Installed libraries</segtitle>
285 <segtitle>Installed directories</segtitle>
286
287 <seglistitem>
288 <seg>
289 captoinfo (link to tic),
290 clear,
291 infocmp,
292 infotocap (link to tic),
293 ncursesw6-config,
294 reset (link to tset),
295 tabs,
296 tic,
297 toe,
298 tput, and
299 tset
300 </seg>
301 <seg>
302 libcursesw.so (symlink and linker script to libncursesw.so),
303 libformw.so,
304 libmenuw.so,
305 libncursesw.so,
306 libncurses++w.so,
307 libpanelw.so, and their non-wide-character counterparts without "w"
308 in the library names.</seg>
309 <seg>
310 /usr/share/tabset,
311 /usr/share/terminfo, and
312 /usr/share/doc/ncurses-&ncurses-version;
313 </seg>
314 </seglistitem>
315 </segmentedlist>
316
317 <variablelist>
318 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
319 <?dbfo list-presentation="list"?>
320 <?dbhtml list-presentation="table"?>
321
322 <varlistentry id="captoinfo">
323 <term><command>captoinfo</command></term>
324 <listitem>
325 <para>Converts a termcap description into a terminfo description</para>
326 <indexterm zone="ch-system-ncurses captoinfo">
327 <primary sortas="b-captoinfo">captoinfo</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="clear">
333 <term><command>clear</command></term>
334 <listitem>
335 <para>Clears the screen, if possible</para>
336 <indexterm zone="ch-system-ncurses clear">
337 <primary sortas="b-clear">clear</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342 <varlistentry id="infocmp">
343 <term><command>infocmp</command></term>
344 <listitem>
345 <para>Compares or prints out terminfo descriptions</para>
346 <indexterm zone="ch-system-ncurses infocmp">
347 <primary sortas="b-infocmp">infocmp</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="infotocap">
353 <term><command>infotocap</command></term>
354 <listitem>
355 <para>Converts a terminfo description into a termcap description</para>
356 <indexterm zone="ch-system-ncurses infotocap">
357 <primary sortas="b-infotocap">infotocap</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="ncursesw6-config">
363 <term><command>ncursesw6-config</command></term>
364 <listitem>
365 <para>Provides configuration information for ncurses</para>
366 <indexterm zone="ch-system-ncurses ncursesw6-config">
367 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="reset">
373 <term><command>reset</command></term>
374 <listitem>
375 <para>Reinitializes a terminal to its default values</para>
376 <indexterm zone="ch-system-ncurses reset">
377 <primary sortas="b-reset">reset</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="tabs">
383 <term><command>tabs</command></term>
384 <listitem>
385 <para>Clears and sets tab stops on a terminal</para>
386 <indexterm zone="ch-system-ncurses tabs">
387 <primary sortas="b-tabs">tabs</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="tic">
393 <term><command>tic</command></term>
394 <listitem>
395 <para>The terminfo entry-description compiler that translates a
396 terminfo file from source format into the binary format needed for the
397 ncurses library routines [A terminfo file contains information on the
398 capabilities of a certain terminal.]</para>
399 <indexterm zone="ch-system-ncurses tic">
400 <primary sortas="b-tic">tic</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="toe">
406 <term><command>toe</command></term>
407 <listitem>
408 <para>Lists all available terminal types, giving the primary name and
409 description for each</para>
410 <indexterm zone="ch-system-ncurses toe">
411 <primary sortas="b-toe">toe</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="tput">
417 <term><command>tput</command></term>
418 <listitem>
419 <para>Makes the values of terminal-dependent capabilities available to
420 the shell; it can also be used to reset or initialize a terminal or
421 report its long name</para>
422 <indexterm zone="ch-system-ncurses tput">
423 <primary sortas="b-tput">tput</primary>
424 </indexterm>
425 </listitem>
426 </varlistentry>
427
428 <varlistentry id="tset">
429 <term><command>tset</command></term>
430 <listitem>
431 <para>Can be used to initialize terminals</para>
432 <indexterm zone="ch-system-ncurses tset">
433 <primary sortas="b-tset">tset</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="libcursesw">
439 <term><filename class="libraryfile">libcursesw</filename></term>
440 <listitem>
441 <para>A link to <filename>libncursesw</filename></para>
442 <indexterm zone="ch-system-ncurses libcursesw">
443 <primary sortas="c-libcursesw">libcursesw</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="libncursesw">
449 <term><filename class="libraryfile">libncursesw</filename></term>
450 <listitem>
451 <para>Contains functions to display text in many complex ways on a
452 terminal screen; a good example of the use of these functions is the
453 menu displayed during the kernel's <command>make
454 menuconfig</command></para>
455 <indexterm zone="ch-system-ncurses libncursesw">
456 <primary sortas="c-libncursesw">libncursesw</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="libncurses__w">
462 <term><filename class="libraryfile">libncurses++w</filename></term>
463 <listitem>
464 <para>Contains C++ binding for other libraries in this package</para>
465 <indexterm zone="ch-system-ncurses libncurses__w">
466 <primary sortas="c-libncurses++w">libncurses++w</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="libformw">
472 <term><filename class="libraryfile">libformw</filename></term>
473 <listitem>
474 <para>Contains functions to implement forms</para>
475 <indexterm zone="ch-system-ncurses libformw">
476 <primary sortas="c-libformw">libformw</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="libmenuw">
482 <term><filename class="libraryfile">libmenuw</filename></term>
483 <listitem>
484 <para>Contains functions to implement menus</para>
485 <indexterm zone="ch-system-ncurses libmenuw">
486 <primary sortas="c-libmenuw">libmenuw</primary>
487 </indexterm>
488 </listitem>
489 </varlistentry>
490
491 <varlistentry id="libpanelw">
492 <term><filename class="libraryfile">libpanelw</filename></term>
493 <listitem>
494 <para>Contains functions to implement panels</para>
495 <indexterm zone="ch-system-ncurses libpanelw">
496 <primary sortas="c-libpanelw">libpanelw</primary>
497 </indexterm>
498 </listitem>
499 </varlistentry>
500
501 </variablelist>
502
503 </sect2>
504
505</sect1>
Note: See TracBrowser for help on using the repository browser.