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
|
---|
138 | install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
|
---|
139 | rm -v dest/usr/lib/libncursesw.so.&ncurses-version;
|
---|
140 | cp -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)" > /usr/lib/lib${lib}.so
|
---|
149 | ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
|
---|
150 | done</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
|
---|
157 | echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
|
---|
158 | ln -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;
|
---|
163 | cp -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
|
---|
182 | make sources libs
|
---|
183 | cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
---|
184 | </note>
|
---|
185 |
|
---|
186 | </sect2>
|
---|
187 |
|
---|
188 | <sect2 id="contents-ncurses" role="content">
|
---|
189 | <title>Contents of Ncurses</title>
|
---|
190 |
|
---|
191 | <segmentedlist>
|
---|
192 | <segtitle>Installed programs</segtitle>
|
---|
193 | <segtitle>Installed libraries</segtitle>
|
---|
194 | <segtitle>Installed directories</segtitle>
|
---|
195 |
|
---|
196 | <seglistitem>
|
---|
197 | <seg>
|
---|
198 | captoinfo (link to tic),
|
---|
199 | clear,
|
---|
200 | infocmp,
|
---|
201 | infotocap (link to tic),
|
---|
202 | ncursesw6-config,
|
---|
203 | reset (link to tset),
|
---|
204 | tabs,
|
---|
205 | tic,
|
---|
206 | toe,
|
---|
207 | tput, and
|
---|
208 | tset
|
---|
209 | </seg>
|
---|
210 | <seg>
|
---|
211 | libcursesw.so (symlink and linker script to libncursesw.so),
|
---|
212 | libformw.so,
|
---|
213 | libmenuw.so,
|
---|
214 | libncursesw.so,
|
---|
215 | libpanelw.so, and their non-wide-character counterparts without "w"
|
---|
216 | in the library names.</seg>
|
---|
217 | <seg>
|
---|
218 | /usr/share/tabset,
|
---|
219 | /usr/share/terminfo, and
|
---|
220 | /usr/share/doc/ncurses-&ncurses-version;
|
---|
221 | </seg>
|
---|
222 | </seglistitem>
|
---|
223 | </segmentedlist>
|
---|
224 |
|
---|
225 | <variablelist>
|
---|
226 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
227 | <?dbfo list-presentation="list"?>
|
---|
228 | <?dbhtml list-presentation="table"?>
|
---|
229 |
|
---|
230 | <varlistentry id="captoinfo">
|
---|
231 | <term><command>captoinfo</command></term>
|
---|
232 | <listitem>
|
---|
233 | <para>Converts a termcap description into a terminfo description</para>
|
---|
234 | <indexterm zone="ch-system-ncurses captoinfo">
|
---|
235 | <primary sortas="b-captoinfo">captoinfo</primary>
|
---|
236 | </indexterm>
|
---|
237 | </listitem>
|
---|
238 | </varlistentry>
|
---|
239 |
|
---|
240 | <varlistentry id="clear">
|
---|
241 | <term><command>clear</command></term>
|
---|
242 | <listitem>
|
---|
243 | <para>Clears the screen, if possible</para>
|
---|
244 | <indexterm zone="ch-system-ncurses clear">
|
---|
245 | <primary sortas="b-clear">clear</primary>
|
---|
246 | </indexterm>
|
---|
247 | </listitem>
|
---|
248 | </varlistentry>
|
---|
249 |
|
---|
250 | <varlistentry id="infocmp">
|
---|
251 | <term><command>infocmp</command></term>
|
---|
252 | <listitem>
|
---|
253 | <para>Compares or prints out terminfo descriptions</para>
|
---|
254 | <indexterm zone="ch-system-ncurses infocmp">
|
---|
255 | <primary sortas="b-infocmp">infocmp</primary>
|
---|
256 | </indexterm>
|
---|
257 | </listitem>
|
---|
258 | </varlistentry>
|
---|
259 |
|
---|
260 | <varlistentry id="infotocap">
|
---|
261 | <term><command>infotocap</command></term>
|
---|
262 | <listitem>
|
---|
263 | <para>Converts a terminfo description into a termcap description</para>
|
---|
264 | <indexterm zone="ch-system-ncurses infotocap">
|
---|
265 | <primary sortas="b-infotocap">infotocap</primary>
|
---|
266 | </indexterm>
|
---|
267 | </listitem>
|
---|
268 | </varlistentry>
|
---|
269 |
|
---|
270 | <varlistentry id="ncursesw6-config">
|
---|
271 | <term><command>ncursesw6-config</command></term>
|
---|
272 | <listitem>
|
---|
273 | <para>Provides configuration information for ncurses</para>
|
---|
274 | <indexterm zone="ch-system-ncurses ncursesw6-config">
|
---|
275 | <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
|
---|
276 | </indexterm>
|
---|
277 | </listitem>
|
---|
278 | </varlistentry>
|
---|
279 |
|
---|
280 | <varlistentry id="reset">
|
---|
281 | <term><command>reset</command></term>
|
---|
282 | <listitem>
|
---|
283 | <para>Reinitializes a terminal to its default values</para>
|
---|
284 | <indexterm zone="ch-system-ncurses reset">
|
---|
285 | <primary sortas="b-reset">reset</primary>
|
---|
286 | </indexterm>
|
---|
287 | </listitem>
|
---|
288 | </varlistentry>
|
---|
289 |
|
---|
290 | <varlistentry id="tabs">
|
---|
291 | <term><command>tabs</command></term>
|
---|
292 | <listitem>
|
---|
293 | <para>Clears and sets tab stops on a terminal</para>
|
---|
294 | <indexterm zone="ch-system-ncurses tabs">
|
---|
295 | <primary sortas="b-tabs">tabs</primary>
|
---|
296 | </indexterm>
|
---|
297 | </listitem>
|
---|
298 | </varlistentry>
|
---|
299 |
|
---|
300 | <varlistentry id="tic">
|
---|
301 | <term><command>tic</command></term>
|
---|
302 | <listitem>
|
---|
303 | <para>The terminfo entry-description compiler that translates a
|
---|
304 | terminfo file from source format into the binary format needed for the
|
---|
305 | ncurses library routines [A terminfo file contains information on the
|
---|
306 | capabilities of a certain terminal.]</para>
|
---|
307 | <indexterm zone="ch-system-ncurses tic">
|
---|
308 | <primary sortas="b-tic">tic</primary>
|
---|
309 | </indexterm>
|
---|
310 | </listitem>
|
---|
311 | </varlistentry>
|
---|
312 |
|
---|
313 | <varlistentry id="toe">
|
---|
314 | <term><command>toe</command></term>
|
---|
315 | <listitem>
|
---|
316 | <para>Lists all available terminal types, giving the primary name and
|
---|
317 | description for each</para>
|
---|
318 | <indexterm zone="ch-system-ncurses toe">
|
---|
319 | <primary sortas="b-toe">toe</primary>
|
---|
320 | </indexterm>
|
---|
321 | </listitem>
|
---|
322 | </varlistentry>
|
---|
323 |
|
---|
324 | <varlistentry id="tput">
|
---|
325 | <term><command>tput</command></term>
|
---|
326 | <listitem>
|
---|
327 | <para>Makes the values of terminal-dependent capabilities available to
|
---|
328 | the shell; it can also be used to reset or initialize a terminal or
|
---|
329 | report its long name</para>
|
---|
330 | <indexterm zone="ch-system-ncurses tput">
|
---|
331 | <primary sortas="b-tput">tput</primary>
|
---|
332 | </indexterm>
|
---|
333 | </listitem>
|
---|
334 | </varlistentry>
|
---|
335 |
|
---|
336 | <varlistentry id="tset">
|
---|
337 | <term><command>tset</command></term>
|
---|
338 | <listitem>
|
---|
339 | <para>Can be used to initialize terminals</para>
|
---|
340 | <indexterm zone="ch-system-ncurses tset">
|
---|
341 | <primary sortas="b-tset">tset</primary>
|
---|
342 | </indexterm>
|
---|
343 | </listitem>
|
---|
344 | </varlistentry>
|
---|
345 |
|
---|
346 | <varlistentry id="libcursesw">
|
---|
347 | <term><filename class="libraryfile">libcursesw</filename></term>
|
---|
348 | <listitem>
|
---|
349 | <para>A link to <filename>libncursesw</filename></para>
|
---|
350 | <indexterm zone="ch-system-ncurses libcursesw">
|
---|
351 | <primary sortas="c-libcursesw">libcursesw</primary>
|
---|
352 | </indexterm>
|
---|
353 | </listitem>
|
---|
354 | </varlistentry>
|
---|
355 |
|
---|
356 | <varlistentry id="libncursesw">
|
---|
357 | <term><filename class="libraryfile">libncursesw</filename></term>
|
---|
358 | <listitem>
|
---|
359 | <para>Contains functions to display text in many complex ways on a
|
---|
360 | terminal screen; a good example of the use of these functions is the
|
---|
361 | menu displayed during the kernel's <command>make
|
---|
362 | menuconfig</command></para>
|
---|
363 | <indexterm zone="ch-system-ncurses libncursesw">
|
---|
364 | <primary sortas="c-libncursesw">libncursesw</primary>
|
---|
365 | </indexterm>
|
---|
366 | </listitem>
|
---|
367 | </varlistentry>
|
---|
368 |
|
---|
369 | <varlistentry id="libformw">
|
---|
370 | <term><filename class="libraryfile">libformw</filename></term>
|
---|
371 | <listitem>
|
---|
372 | <para>Contains functions to implement forms</para>
|
---|
373 | <indexterm zone="ch-system-ncurses libformw">
|
---|
374 | <primary sortas="c-libformw">libformw</primary>
|
---|
375 | </indexterm>
|
---|
376 | </listitem>
|
---|
377 | </varlistentry>
|
---|
378 |
|
---|
379 | <varlistentry id="libmenuw">
|
---|
380 | <term><filename class="libraryfile">libmenuw</filename></term>
|
---|
381 | <listitem>
|
---|
382 | <para>Contains functions to implement menus</para>
|
---|
383 | <indexterm zone="ch-system-ncurses libmenuw">
|
---|
384 | <primary sortas="c-libmenuw">libmenuw</primary>
|
---|
385 | </indexterm>
|
---|
386 | </listitem>
|
---|
387 | </varlistentry>
|
---|
388 |
|
---|
389 | <varlistentry id="libpanelw">
|
---|
390 | <term><filename class="libraryfile">libpanelw</filename></term>
|
---|
391 | <listitem>
|
---|
392 | <para>Contains functions to implement panels</para>
|
---|
393 | <indexterm zone="ch-system-ncurses libpanelw">
|
---|
394 | <primary sortas="c-libpanelw">libpanelw</primary>
|
---|
395 | </indexterm>
|
---|
396 | </listitem>
|
---|
397 | </varlistentry>
|
---|
398 |
|
---|
399 | </variablelist>
|
---|
400 |
|
---|
401 | </sect2>
|
---|
402 |
|
---|
403 | </sect1>
|
---|