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-tools-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-tools-ncurses">
|
---|
20 | <primary sortas="a-Ncurses">Ncurses</primary>
|
---|
21 | <secondary>tools</secondary>
|
---|
22 | </indexterm>
|
---|
23 |
|
---|
24 | <sect2 role="package">
|
---|
25 | <title/>
|
---|
26 |
|
---|
27 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
28 | href="../chapter08/ncurses.xml"
|
---|
29 | xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
---|
30 |
|
---|
31 | <segmentedlist>
|
---|
32 | <segtitle>&buildtime;</segtitle>
|
---|
33 | <segtitle>&diskspace;</segtitle>
|
---|
34 |
|
---|
35 | <seglistitem>
|
---|
36 | <seg>&ncurses-tmp-sbu;</seg>
|
---|
37 | <seg>&ncurses-tmp-du;</seg>
|
---|
38 | </seglistitem>
|
---|
39 | </segmentedlist>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 |
|
---|
43 | <sect2 role="installation">
|
---|
44 | <title>Installation of Ncurses</title>
|
---|
45 |
|
---|
46 | <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
|
---|
47 |
|
---|
48 | <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
|
---|
49 |
|
---|
50 | <para>Then, run the following commands to build the <quote>tic</quote>
|
---|
51 | program on the build host:</para>
|
---|
52 |
|
---|
53 | <screen><userinput remap="pre">mkdir build
|
---|
54 | pushd build
|
---|
55 | ../configure
|
---|
56 | make -C include
|
---|
57 | make -C progs tic
|
---|
58 | popd</userinput></screen>
|
---|
59 |
|
---|
60 | <para>Prepare Ncurses for compilation:</para>
|
---|
61 |
|
---|
62 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
63 | --host=$LFS_TGT \
|
---|
64 | --build=$(./config.guess) \
|
---|
65 | --mandir=/usr/share/man \
|
---|
66 | --with-manpage-format=normal \
|
---|
67 | --with-shared \
|
---|
68 | --without-debug \
|
---|
69 | --without-ada \
|
---|
70 | --without-normal \
|
---|
71 | --enable-widec</userinput></screen>
|
---|
72 |
|
---|
73 | <variablelist>
|
---|
74 | <title>The meaning of the new configure options:</title>
|
---|
75 |
|
---|
76 | <varlistentry>
|
---|
77 | <term><parameter>--with-manpage-format=normal</parameter></term>
|
---|
78 | <listitem>
|
---|
79 | <para>This prevents Ncurses installing compressed manual
|
---|
80 | pages, which may happen if the host distribution itself
|
---|
81 | has compressed manual pages.</para>
|
---|
82 | </listitem>
|
---|
83 | </varlistentry>
|
---|
84 |
|
---|
85 | <varlistentry>
|
---|
86 | <term><parameter>--without-ada</parameter></term>
|
---|
87 | <listitem>
|
---|
88 | <para>This ensures that Ncurses does not build support for the Ada
|
---|
89 | compiler which may be present on the host but will not be available
|
---|
90 | once we enter the <command>chroot</command> environment.</para>
|
---|
91 | </listitem>
|
---|
92 | </varlistentry>
|
---|
93 |
|
---|
94 | <varlistentry>
|
---|
95 | <term><parameter>--enable-widec</parameter></term>
|
---|
96 | <listitem>
|
---|
97 | <para>This switch causes wide-character libraries (e.g., <filename
|
---|
98 | class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
---|
99 | to be built instead of normal ones (e.g., <filename
|
---|
100 | class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
---|
101 | These wide-character libraries are usable in both multibyte and
|
---|
102 | traditional 8-bit locales, while normal libraries work properly
|
---|
103 | only in 8-bit locales. Wide-character and normal libraries are
|
---|
104 | source-compatible, but not binary-compatible.</para>
|
---|
105 | </listitem>
|
---|
106 | </varlistentry>
|
---|
107 |
|
---|
108 | <varlistentry>
|
---|
109 | <term><parameter>--without-normal</parameter></term>
|
---|
110 | <listitem>
|
---|
111 | <para>This switch disables building and installing most static libraries.
|
---|
112 | </para>
|
---|
113 | </listitem>
|
---|
114 | </varlistentry>
|
---|
115 |
|
---|
116 | </variablelist>
|
---|
117 |
|
---|
118 | <para>Compile the package:</para>
|
---|
119 |
|
---|
120 | <screen><userinput remap="make">make</userinput></screen>
|
---|
121 |
|
---|
122 | <para>Install the package:</para>
|
---|
123 |
|
---|
124 | <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
|
---|
125 | echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</userinput></screen>
|
---|
126 |
|
---|
127 | <variablelist>
|
---|
128 | <title>The meaning of the install options:</title>
|
---|
129 |
|
---|
130 | <varlistentry>
|
---|
131 | <term><parameter>TIC_PATH=$(pwd)/build/progs/tic</parameter></term>
|
---|
132 | <listitem>
|
---|
133 | <para>We need to pass the path of the just built
|
---|
134 | <command>tic</command> able to run on the building machine, so that
|
---|
135 | the terminal database can be created without errors.</para>
|
---|
136 | </listitem>
|
---|
137 | </varlistentry>
|
---|
138 |
|
---|
139 | <varlistentry>
|
---|
140 | <term><command>echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</command></term>
|
---|
141 | <listitem>
|
---|
142 | <para>The <filename>libncurses.so</filename> library is needed by
|
---|
143 | a few packages we will build soon. We create this small linker
|
---|
144 | script, as this is what is done in <xref
|
---|
145 | linkend="chapter-building-system"/>.</para>
|
---|
146 | </listitem>
|
---|
147 | </varlistentry>
|
---|
148 |
|
---|
149 | </variablelist>
|
---|
150 |
|
---|
151 | <para>Move the shared libraries to the
|
---|
152 | <filename class="directory">/lib</filename> directory, where they are
|
---|
153 | expected to reside:</para>
|
---|
154 |
|
---|
155 | <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
|
---|
156 |
|
---|
157 | <para>Because the libraries have been moved, one symlink points to
|
---|
158 | a non-existent file. Recreate it:</para>
|
---|
159 |
|
---|
160 | <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
|
---|
161 |
|
---|
162 | </sect2>
|
---|
163 |
|
---|
164 | <!-- - - - - - - - - - -->
|
---|
165 | <!-- Multilib - 32bit -->
|
---|
166 | <!-- - - - - - - - - - -->
|
---|
167 | <sect2 arch="ml_32,ml_all">
|
---|
168 | <title>Building Ncurses - 32bit</title>
|
---|
169 |
|
---|
170 | <para>Clean previous build:</para>
|
---|
171 |
|
---|
172 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
173 |
|
---|
174 | <para>Prepare Ncurses for compilation:</para>
|
---|
175 |
|
---|
176 | <screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \
|
---|
177 | CXX="$LFS_TGT-g++ -m32" \
|
---|
178 | ./configure --prefix=/usr \
|
---|
179 | --host=$LFS_TGT32 \
|
---|
180 | --build=$(./config.guess) \
|
---|
181 | --libdir=&usr-lib-m32; \
|
---|
182 | --mandir=/usr/share/man \
|
---|
183 | --with-shared \
|
---|
184 | --without-debug \
|
---|
185 | --without-ada \
|
---|
186 | --without-normal \
|
---|
187 | --enable-pc-files \
|
---|
188 | --enable-widec \
|
---|
189 | --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen>
|
---|
190 |
|
---|
191 | <para>Compile the package:</para>
|
---|
192 |
|
---|
193 | <screen><userinput remap="make">make</userinput></screen>
|
---|
194 |
|
---|
195 | <para>Install the package:</para>
|
---|
196 |
|
---|
197 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
---|
198 | ln -s libncursesw.so DESTDIR&usr-lib-m32;/libcursesw.so
|
---|
199 | cp -Rv DESTDIR&usr-lib-m32;/* $LFS&usr-lib-m32;
|
---|
200 | rm -rf DESTDIR</userinput></screen>
|
---|
201 |
|
---|
202 | </sect2><!-- m32 -->
|
---|
203 |
|
---|
204 | <!-- - - - - - - - - - -->
|
---|
205 | <!-- Multilib - x32bit -->
|
---|
206 | <!-- - - - - - - - - - -->
|
---|
207 | <sect2 arch="ml_x32,ml_all">
|
---|
208 | <title>Building Ncurses - x32bit</title>
|
---|
209 |
|
---|
210 | <para>Clean previous build:</para>
|
---|
211 |
|
---|
212 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
213 |
|
---|
214 | <para>Prepare Ncurses for compilation:</para>
|
---|
215 |
|
---|
216 | <screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \
|
---|
217 | CXX="$LFS_TGT-g++ -mx32" \
|
---|
218 | ./configure --prefix=/usr \
|
---|
219 | --host=$LFS_TGTX32 \
|
---|
220 | --build=$(./config.guess) \
|
---|
221 | --libdir=&usr-lib-mx32; \
|
---|
222 | --mandir=/usr/share/man \
|
---|
223 | --with-shared \
|
---|
224 | --without-debug \
|
---|
225 | --without-ada \
|
---|
226 | --without-normal \
|
---|
227 | --enable-pc-files \
|
---|
228 | --enable-widec \
|
---|
229 | --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen>
|
---|
230 |
|
---|
231 | <para>Compile the package:</para>
|
---|
232 |
|
---|
233 | <screen><userinput remap="make">make</userinput></screen>
|
---|
234 |
|
---|
235 | <para>Install the package:</para>
|
---|
236 |
|
---|
237 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
---|
238 | ln -s libncursesw.so DESTDIR&usr-lib-mx32;/libcursesw.so
|
---|
239 | cp -Rv DESTDIR&usr-lib-mx32;/* $LFS&usr-lib-mx32;
|
---|
240 | rm -rf DESTDIR</userinput></screen>
|
---|
241 |
|
---|
242 | </sect2><!-- mx32 -->
|
---|
243 |
|
---|
244 | <sect2 role="content">
|
---|
245 | <title/>
|
---|
246 |
|
---|
247 | <para>Details on this package are located in
|
---|
248 | <xref linkend="contents-ncurses" role="."/></para>
|
---|
249 |
|
---|
250 | </sect2>
|
---|
251 |
|
---|
252 | </sect1>
|
---|