ncurses.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. <sect1 id="ch-tools-ncurses" role="wrap">
  8. <?dbhtml filename="ncurses.html"?>
  9. <sect1info condition="script">
  10. <productname>ncurses</productname>
  11. <productnumber>&ncurses-version;</productnumber>
  12. <address>&ncurses-url;</address>
  13. </sect1info>
  14. <title>Ncurses-&ncurses-version;</title>
  15. <indexterm zone="ch-tools-ncurses">
  16. <primary sortas="a-Ncurses">Ncurses</primary>
  17. <secondary>tools</secondary>
  18. </indexterm>
  19. <sect2 role="package">
  20. <title/>
  21. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  22. href="../chapter06/ncurses.xml"
  23. xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&ncurses-ch5-sbu;</seg>
  29. <seg>&ncurses-ch5-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Ncurses</title>
  35. <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
  36. <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
  37. <para>Prepare Ncurses for compilation:</para>
  38. <screen><userinput remap="configure">./configure --prefix=/tools \
  39. --with-shared \
  40. --without-debug \
  41. --without-ada \
  42. --enable-widec \
  43. --enable-overwrite</userinput></screen>
  44. <variablelist>
  45. <title>The meaning of the configure options:</title>
  46. <varlistentry>
  47. <term><parameter>--without-ada</parameter></term>
  48. <listitem>
  49. <para>This ensures that Ncurses does not build support for the Ada
  50. compiler which may be present on the host but will not be available
  51. once we enter the <command>chroot</command> environment.</para>
  52. </listitem>
  53. </varlistentry>
  54. <varlistentry>
  55. <term><parameter>--enable-overwrite</parameter></term>
  56. <listitem>
  57. <para>This tells Ncurses to install its header files into
  58. <filename class="directory">/tools/include</filename>, instead of
  59. <filename class="directory">/tools/include/ncurses</filename>, to
  60. ensure that other packages can find the Ncurses headers
  61. successfully.</para>
  62. </listitem>
  63. </varlistentry>
  64. <varlistentry>
  65. <term><parameter>--enable-widec</parameter></term>
  66. <listitem>
  67. <para>This switch causes wide-character libraries (e.g., <filename
  68. class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
  69. to be built instead of normal ones (e.g., <filename
  70. class="libraryfile">libncurses.so.&ncurses-version;</filename>).
  71. These wide-character libraries are usable in both multibyte and
  72. traditional 8-bit locales, while normal libraries work properly
  73. only in 8-bit locales. Wide-character and normal libraries are
  74. source-compatible, but not binary-compatible.</para>
  75. </listitem>
  76. </varlistentry>
  77. </variablelist>
  78. <para>Compile the package:</para>
  79. <screen><userinput remap="make">make</userinput></screen>
  80. <para>This package has a test suite, but it can only be run after the
  81. package has been installed. The tests reside in the
  82. <filename class="directory">test/</filename> directory. See the
  83. <filename>README</filename> file in that directory for further details.
  84. </para>
  85. <para>Install the package:</para>
  86. <screen><userinput remap="install">make install
  87. ln -s libncursesw.so /tools/lib/libncurses.so</userinput></screen>
  88. </sect2>
  89. <sect2 arch="ml_32,ml_all" role="installation">
  90. <title>Installation of Ncurses - 32 bit</title>
  91. <para>Prepare Ncurses for compilation:</para>
  92. <screen><userinput remap="configure">make distclean &amp;&amp;
  93. CC="${LFS_TGT}-gcc -m32" \
  94. ./configure --prefix=/tools \
  95. --libdir=/tools/lib32 \
  96. --with-shared \
  97. --without-debug \
  98. --without-ada \
  99. --enable-widec \
  100. --enable-overwrite \
  101. --host="${LFS_TGT32}"</userinput></screen>
  102. <para>Compile the package:</para>
  103. <screen><userinput remap="make">make</userinput></screen>
  104. <para>To test the results, issue:</para>
  105. <screen><userinput remap="test">make check</userinput></screen>
  106. <para>Install the package:</para>
  107. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_32 install &amp;&amp;
  108. cp -Rv DESTDIR_32/tools/lib32/* /tools/lib32</userinput></screen>
  109. </sect2>
  110. <sect2 arch="ml_x32,ml_all" role="installation">
  111. <title>Installation of Ncurses - x32 bit</title>
  112. <para>Repeat for the x32-ABI:</para>
  113. <screen><userinput remap="configure">make distclean &amp;&amp;
  114. CC="${LFS_TGT}-gcc -mx32" \
  115. ./configure --prefix=/tools \
  116. --libdir=/tools/libx32 \
  117. --with-shared \
  118. --without-debug \
  119. --without-ada \
  120. --enable-widec \
  121. --enable-overwrite \
  122. --host="${LFS_TGTX32}"</userinput></screen>
  123. <screen><userinput remap="make">make</userinput></screen>
  124. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR_x32 install &amp;&amp;
  125. cp -Rv DESTDIR_x32/tools/libx32/* /tools/libx32</userinput></screen>
  126. </sect2>
  127. <sect2 role="content">
  128. <title/>
  129. <para>Details on this package are located in
  130. <xref linkend="contents-ncurses" role="."/></para>
  131. </sect2>
  132. </sect1>