source: chapter08/ncurses.xml@ 7abb6a9

multilib
Last change on this file since 7abb6a9 was cd67d00, checked in by Thomas Trepl (Moody) <thomas@…>, 2 years ago

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