ncurses.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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>Then, run the following commands to build the <quote>tic</quote>
  38. program on the build host:</para>
  39. <screen><userinput remap="pre">mkdir build
  40. cd build
  41. ../configure
  42. make -C include
  43. make -C progs tic
  44. cd ..</userinput></screen>
  45. <para>Prepare Ncurses for compilation:</para>
  46. <screen><userinput remap="configure">./configure --prefix=/usr \
  47. --host=$LFS_TGT \
  48. --build=$(./config.guess) \
  49. --mandir=/usr/share/man \
  50. --with-shared \
  51. --without-debug \
  52. --without-ada \
  53. --without-normal \
  54. --enable-widec \
  55. --enable-pc-files</userinput></screen>
  56. <variablelist>
  57. <title>The meaning of the new configure options:</title>
  58. <varlistentry>
  59. <term><parameter>--without-ada</parameter></term>
  60. <listitem>
  61. <para>This ensures that Ncurses does not build support for the Ada
  62. compiler which may be present on the host but will not be available
  63. once we enter the <command>chroot</command> environment.</para>
  64. </listitem>
  65. </varlistentry>
  66. <varlistentry>
  67. <term><parameter>--enable-widec</parameter></term>
  68. <listitem>
  69. <para>This switch causes wide-character libraries (e.g., <filename
  70. class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
  71. to be built instead of normal ones (e.g., <filename
  72. class="libraryfile">libncurses.so.&ncurses-version;</filename>).
  73. These wide-character libraries are usable in both multibyte and
  74. traditional 8-bit locales, while normal libraries work properly
  75. only in 8-bit locales. Wide-character and normal libraries are
  76. source-compatible, but not binary-compatible.</para>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry>
  80. <term><parameter>--enable-pc-files</parameter></term>
  81. <listitem>
  82. <para>This switch generates and installs .pc files for pkg-config.
  83. </para>
  84. </listitem>
  85. </varlistentry>
  86. <varlistentry>
  87. <term><parameter>--without-normal</parameter></term>
  88. <listitem>
  89. <para>This switch disables building and installing most static libraries.
  90. </para>
  91. </listitem>
  92. </varlistentry>
  93. <!--
  94. <varlistentry>
  95. <term><parameter>- -disable-db-install</parameter></term>
  96. <listitem>
  97. <para>This switch disables building the terminfo database: it is not
  98. needed at this stage, and if <command>tic</command> is too old,
  99. it cannot compile recent databases.</para>
  100. </listitem>
  101. </varlistentry>
  102. -->
  103. </variablelist>
  104. <para>Compile the package:</para>
  105. <screen><userinput remap="make">make</userinput></screen>
  106. <para>Install the package:</para>
  107. <!-- TODO: check and document -->
  108. <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
  109. ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen>
  110. <para>Move the shared libraries to the
  111. <filename class="directory">/lib</filename> directory, where they are
  112. expected to reside:</para>
  113. <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
  114. <para>Because the libraries have been moved, one symlink points to
  115. a non-existent file. Recreate it:</para>
  116. <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
  117. </sect2>
  118. <sect2 role="content">
  119. <title/>
  120. <para>Details on this package are located in
  121. <xref linkend="contents-ncurses" role="."/></para>
  122. </sect2>
  123. </sect1>