[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[2fa922f] | 7 |
|
---|
[6dfcfecc] | 8 | <sect1 id="ch-tools-ncurses" role="wrap">
|
---|
[2fa922f] | 9 | <?dbhtml filename="ncurses.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>ncurses</productname>
|
---|
| 13 | <productnumber>&ncurses-version;</productnumber>
|
---|
| 14 | <address>&ncurses-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[2fa922f] | 17 | <title>Ncurses-&ncurses-version;</title>
|
---|
| 18 |
|
---|
[6dfcfecc] | 19 | <indexterm zone="ch-tools-ncurses">
|
---|
[2fa922f] | 20 | <primary sortas="a-Ncurses">Ncurses</primary>
|
---|
[6dfcfecc] | 21 | <secondary>tools</secondary>
|
---|
[2fa922f] | 22 | </indexterm>
|
---|
| 23 |
|
---|
| 24 | <sect2 role="package">
|
---|
| 25 | <title/>
|
---|
[6370fa6] | 26 |
|
---|
[6dfcfecc] | 27 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 28 | href="../chapter08/ncurses.xml"
|
---|
| 29 | xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
|
---|
[673b0d8] | 30 |
|
---|
[2fa922f] | 31 | <segmentedlist>
|
---|
| 32 | <segtitle>&buildtime;</segtitle>
|
---|
| 33 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 34 |
|
---|
[2fa922f] | 35 | <seglistitem>
|
---|
[6dfcfecc] | 36 | <seg>&ncurses-tmp-sbu;</seg>
|
---|
| 37 | <seg>&ncurses-tmp-du;</seg>
|
---|
[2fa922f] | 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
[673b0d8] | 40 |
|
---|
[2fa922f] | 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Ncurses</title>
|
---|
[004616a] | 45 |
|
---|
[6dfcfecc] | 46 | <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
|
---|
[2fa922f] | 47 |
|
---|
[6dfcfecc] | 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>
|
---|
[fa21b3d] | 59 |
|
---|
[2fa922f] | 60 | <para>Prepare Ncurses for compilation:</para>
|
---|
[73aedd1d] | 61 |
|
---|
[6dfcfecc] | 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 \
|
---|
[f8b27ab] | 68 | --without-normal \
|
---|
| 69 | --with-cxx-shared \
|
---|
[6dfcfecc] | 70 | --without-debug \
|
---|
| 71 | --without-ada \
|
---|
[e0f124e] | 72 | --disable-stripping \
|
---|
[f5976ac] | 73 | --enable-widec</userinput></screen>
|
---|
[fa21b3d] | 74 |
|
---|
[2fa922f] | 75 | <variablelist>
|
---|
[d51dfb9] | 76 | <title>The meaning of the new configure options:</title>
|
---|
[2fa922f] | 77 |
|
---|
[6dfcfecc] | 78 | <varlistentry>
|
---|
| 79 | <term><parameter>--with-manpage-format=normal</parameter></term>
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>This prevents Ncurses installing compressed manual
|
---|
| 82 | pages, which may happen if the host distribution itself
|
---|
| 83 | has compressed manual pages.</para>
|
---|
| 84 | </listitem>
|
---|
| 85 | </varlistentry>
|
---|
| 86 |
|
---|
[f8b27ab] | 87 | <varlistentry>
|
---|
| 88 | <term><parameter>--with-shared</parameter></term>
|
---|
| 89 | <listitem>
|
---|
| 90 | <para>This makes Ncurses build and install shared C libraries.</para>
|
---|
| 91 | </listitem>
|
---|
| 92 | </varlistentry>
|
---|
| 93 |
|
---|
| 94 | <varlistentry>
|
---|
| 95 | <term><parameter>--without-normal</parameter></term>
|
---|
| 96 | <listitem>
|
---|
| 97 | <para>This prevents Ncurses building and installing static C
|
---|
| 98 | libraries.</para>
|
---|
| 99 | </listitem>
|
---|
| 100 | </varlistentry>
|
---|
| 101 |
|
---|
| 102 | <varlistentry>
|
---|
| 103 | <term><parameter>--without-debug</parameter></term>
|
---|
| 104 | <listitem>
|
---|
| 105 | <para>This prevents Ncurses building and installing debug
|
---|
| 106 | libraries.</para>
|
---|
| 107 | </listitem>
|
---|
| 108 | </varlistentry>
|
---|
| 109 |
|
---|
| 110 | <varlistentry>
|
---|
| 111 | <term><parameter>--with-cxx-shared</parameter></term>
|
---|
| 112 | <listitem>
|
---|
| 113 | <para>This makes Ncurses build and install shared C++ bindings. It
|
---|
| 114 | also prevents it building and installing static C++ bindings.</para>
|
---|
| 115 | </listitem>
|
---|
| 116 | </varlistentry>
|
---|
| 117 |
|
---|
[6dfcfecc] | 118 | <varlistentry>
|
---|
| 119 | <term><parameter>--without-ada</parameter></term>
|
---|
| 120 | <listitem>
|
---|
| 121 | <para>This ensures that Ncurses does not build support for the Ada
|
---|
[6dff9ef] | 122 | compiler, which may be present on the host but will not be available
|
---|
[6dfcfecc] | 123 | once we enter the <command>chroot</command> environment.</para>
|
---|
| 124 | </listitem>
|
---|
| 125 | </varlistentry>
|
---|
| 126 |
|
---|
[e0f124e] | 127 | <varlistentry>
|
---|
| 128 | <term><parameter>--disable-stripping</parameter></term>
|
---|
| 129 | <listitem>
|
---|
[6dff9ef] | 130 | <para>This switch prevents the building system from
|
---|
| 131 | using the <command>strip</command> program from the host.
|
---|
| 132 | Using host tools on cross-compiled programs can cause failure.</para>
|
---|
[e0f124e] | 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 |
|
---|
[2fa922f] | 136 | <varlistentry>
|
---|
| 137 | <term><parameter>--enable-widec</parameter></term>
|
---|
| 138 | <listitem>
|
---|
| 139 | <para>This switch causes wide-character libraries (e.g., <filename
|
---|
| 140 | class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
---|
| 141 | to be built instead of normal ones (e.g., <filename
|
---|
| 142 | class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
---|
| 143 | These wide-character libraries are usable in both multibyte and
|
---|
| 144 | traditional 8-bit locales, while normal libraries work properly
|
---|
| 145 | only in 8-bit locales. Wide-character and normal libraries are
|
---|
| 146 | source-compatible, but not binary-compatible.</para>
|
---|
| 147 | </listitem>
|
---|
| 148 | </varlistentry>
|
---|
| 149 |
|
---|
| 150 | </variablelist>
|
---|
| 151 |
|
---|
| 152 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 153 |
|
---|
[0445a3d] | 154 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 155 |
|
---|
[2fa922f] | 156 | <para>Install the package:</para>
|
---|
[51b58ad] | 157 |
|
---|
[6dfcfecc] | 158 | <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
|
---|
[51b58ad] | 159 | echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</userinput></screen>
|
---|
[f8b27ab] | 160 | <!--
|
---|
[2bb813a] | 161 | <para>Remove an unneeded static library not handled by
|
---|
| 162 | <command>configure</command>:</para>
|
---|
| 163 |
|
---|
[f81a8a4] | 164 | <screen><userinput remap="install">rm -v $LFS/usr/lib/libncurses++w.a</userinput></screen>
|
---|
[f8b27ab] | 165 | -->
|
---|
[51b58ad] | 166 | <variablelist>
|
---|
| 167 | <title>The meaning of the install options:</title>
|
---|
| 168 |
|
---|
| 169 | <varlistentry>
|
---|
| 170 | <term><parameter>TIC_PATH=$(pwd)/build/progs/tic</parameter></term>
|
---|
| 171 | <listitem>
|
---|
[6dff9ef] | 172 | <para>We need to pass the path of the newly built
|
---|
| 173 | <command>tic</command> program that runs on the building machine, so
|
---|
[51b58ad] | 174 | the terminal database can be created without errors.</para>
|
---|
| 175 | </listitem>
|
---|
| 176 | </varlistentry>
|
---|
| 177 |
|
---|
| 178 | <varlistentry>
|
---|
| 179 | <term><command>echo "INPUT(-lncursesw)" > $LFS/usr/lib/libncurses.so</command></term>
|
---|
| 180 | <listitem>
|
---|
| 181 | <para>The <filename>libncurses.so</filename> library is needed by
|
---|
| 182 | a few packages we will build soon. We create this small linker
|
---|
| 183 | script, as this is what is done in <xref
|
---|
| 184 | linkend="chapter-building-system"/>.</para>
|
---|
| 185 | </listitem>
|
---|
| 186 | </varlistentry>
|
---|
| 187 |
|
---|
| 188 | </variablelist>
|
---|
[73aedd1d] | 189 |
|
---|
[2fa922f] | 190 | </sect2>
|
---|
| 191 |
|
---|
[6dfcfecc] | 192 | <!-- - - - - - - - - - -->
|
---|
| 193 | <!-- Multilib - 32bit -->
|
---|
| 194 | <!-- - - - - - - - - - -->
|
---|
| 195 | <sect2 arch="ml_32,ml_all">
|
---|
| 196 | <title>Building Ncurses - 32bit</title>
|
---|
[b3f1ebb3] | 197 |
|
---|
| 198 | <para>Clean previous build:</para>
|
---|
| 199 |
|
---|
| 200 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 201 |
|
---|
[6dfcfecc] | 202 | <para>Prepare Ncurses for compilation:</para>
|
---|
[b3f1ebb3] | 203 |
|
---|
[6dfcfecc] | 204 | <screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \
|
---|
| 205 | CXX="$LFS_TGT-g++ -m32" \
|
---|
| 206 | ./configure --prefix=/usr \
|
---|
| 207 | --host=$LFS_TGT32 \
|
---|
[9da9d014] | 208 | --build=$(./config.guess) \
|
---|
[0ebda11] | 209 | --libdir=/usr/lib32 \
|
---|
[6dfcfecc] | 210 | --mandir=/usr/share/man \
|
---|
| 211 | --with-shared \
|
---|
[f96a6d4] | 212 | --without-normal \
|
---|
| 213 | --with-cxx-shared \
|
---|
[6dfcfecc] | 214 | --without-debug \
|
---|
[a2ef756] | 215 | --without-ada \
|
---|
[af974a9c] | 216 | --disable-stripping \
|
---|
| 217 | --enable-widec</userinput></screen>
|
---|
[b3f1ebb3] | 218 |
|
---|
| 219 | <para>Compile the package:</para>
|
---|
| 220 |
|
---|
[6dfcfecc] | 221 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[b3f1ebb3] | 222 |
|
---|
| 223 | <para>Install the package:</para>
|
---|
| 224 |
|
---|
[6dfcfecc] | 225 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
---|
[0ebda11] | 226 | ln -s libncursesw.so DESTDIR/usr/lib32/libcursesw.so
|
---|
| 227 | cp -Rv DESTDIR/usr/lib32/* $LFS/usr/lib32
|
---|
[b3f1ebb3] | 228 | rm -rf DESTDIR</userinput></screen>
|
---|
| 229 |
|
---|
[6dfcfecc] | 230 | </sect2><!-- m32 -->
|
---|
[b3f1ebb3] | 231 |
|
---|
[6dfcfecc] | 232 | <!-- - - - - - - - - - -->
|
---|
| 233 | <!-- Multilib - x32bit -->
|
---|
| 234 | <!-- - - - - - - - - - -->
|
---|
| 235 | <sect2 arch="ml_x32,ml_all">
|
---|
| 236 | <title>Building Ncurses - x32bit</title>
|
---|
[b3f1ebb3] | 237 |
|
---|
| 238 | <para>Clean previous build:</para>
|
---|
| 239 |
|
---|
| 240 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 241 |
|
---|
[6dfcfecc] | 242 | <para>Prepare Ncurses for compilation:</para>
|
---|
[b3f1ebb3] | 243 |
|
---|
[6dfcfecc] | 244 | <screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \
|
---|
| 245 | CXX="$LFS_TGT-g++ -mx32" \
|
---|
| 246 | ./configure --prefix=/usr \
|
---|
| 247 | --host=$LFS_TGTX32 \
|
---|
[9da9d014] | 248 | --build=$(./config.guess) \
|
---|
[0ebda11] | 249 | --libdir=/usr/libx32 \
|
---|
[6dfcfecc] | 250 | --mandir=/usr/share/man \
|
---|
| 251 | --with-shared \
|
---|
[f96a6d4] | 252 | --without-normal \
|
---|
| 253 | --with-cxx-shared \
|
---|
[6dfcfecc] | 254 | --without-debug \
|
---|
[a2ef756] | 255 | --without-ada \
|
---|
[af974a9c] | 256 | --disable-stripping \
|
---|
| 257 | --enable-widec</userinput></screen>
|
---|
[b3f1ebb3] | 258 |
|
---|
| 259 | <para>Compile the package:</para>
|
---|
| 260 |
|
---|
[6dfcfecc] | 261 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[b3f1ebb3] | 262 |
|
---|
| 263 | <para>Install the package:</para>
|
---|
| 264 |
|
---|
[6dfcfecc] | 265 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install
|
---|
[0ebda11] | 266 | ln -s libncursesw.so DESTDIR/usr/libx32/libcursesw.so
|
---|
| 267 | cp -Rv DESTDIR/usr/libx32/* $LFS/usr/libx32
|
---|
[b3f1ebb3] | 268 | rm -rf DESTDIR</userinput></screen>
|
---|
| 269 |
|
---|
[6dfcfecc] | 270 | </sect2><!-- mx32 -->
|
---|
[2fa922f] | 271 |
|
---|
[6dfcfecc] | 272 | <sect2 role="content">
|
---|
| 273 | <title/>
|
---|
[2fa922f] | 274 |
|
---|
[6dfcfecc] | 275 | <para>Details on this package are located in
|
---|
| 276 | <xref linkend="contents-ncurses" role="."/></para>
|
---|
[2fa922f] | 277 |
|
---|
| 278 | </sect2>
|
---|
[673b0d8] | 279 |
|
---|
| 280 | </sect1>
|
---|