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