tcl.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. <!ENTITY tdbc-ver "1.1.1">
  7. <!ENTITY itcl-ver "4.2.0">
  8. ]>
  9. <sect1 id="ch-tools-tcl" role="wrap">
  10. <?dbhtml filename="tcl.html"?>
  11. <sect1info condition="script">
  12. <productname>tcl</productname>
  13. <productnumber>&tcl-version;</productnumber>
  14. <address>&tcl-url;</address>
  15. </sect1info>
  16. <title>Tcl-&tcl-version;</title>
  17. <indexterm zone="ch-tools-tcl">
  18. <primary sortas="a-Tcl">Tcl</primary>
  19. </indexterm>
  20. <sect2 role="package">
  21. <title/>
  22. <para>The <application>Tcl</application> package contains the Tool Command Language,
  23. a robust general-purpose scripting language. The <application>Expect</application> package
  24. is written in the <application>Tcl</application> language.</para>
  25. <segmentedlist>
  26. <segtitle>&buildtime;</segtitle>
  27. <segtitle>&diskspace;</segtitle>
  28. <seglistitem>
  29. <seg>&tcl-tmp-sbu;</seg>
  30. <seg>&tcl-tmp-du;</seg>
  31. </seglistitem>
  32. </segmentedlist>
  33. </sect2>
  34. <sect2 role="installation">
  35. <title>Installation of Tcl</title>
  36. <para>This package and the next two (Expect and DejaGNU) are
  37. installed to support running the test suites for GCC and binutils and other
  38. packages. Installing three packages for testing purposes may seem
  39. excessive, but it is very reassuring, if not essential, to know that the
  40. most important tools are working properly. These packages are required
  41. to run the test suites in <xref linkend="chapter-building-system"/>.</para>
  42. <para>Note that the Tcl package used here is a minimal version needed
  43. to run the LFS tests. For the full package, see the
  44. <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>
  45. <para>Prepare Tcl for compilation:</para>
  46. <screen><userinput remap="configure">SRCDIR=$(pwd)
  47. cd unix
  48. ./configure --prefix=/usr \
  49. --mandir=/usr/share/man \
  50. $([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
  51. <variablelist>
  52. <title>The meaning of the configure options:</title>
  53. <varlistentry>
  54. <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
  55. <listitem>
  56. <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
  57. is replaced by the output of the shell command. Here this output is
  58. empty if running on a 32 bit machine, and is
  59. <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
  60. </para>
  61. </listitem>
  62. </varlistentry>
  63. </variablelist>
  64. <para>Build the package:</para>
  65. <screen><userinput remap="make">make
  66. sed -e "s|$SRCDIR/unix|/usr/lib|" \
  67. -e "s|$SRCDIR|/usr/include|" \
  68. -i tclConfig.sh
  69. sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
  70. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
  71. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
  72. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
  73. -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
  74. sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
  75. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
  76. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
  77. -i pkgs/itcl&itcl-ver;/itclConfig.sh
  78. unset SRCDIR</userinput></screen>
  79. <para>The various <quote>sed</quote> instructions after the
  80. <quote>make</quote> command removes references to the build directory from
  81. the configuration files and replaces them with the install directory.
  82. This is not mandatory for the remainder of LFS, but may be needed in case a
  83. package built later uses Tcl.</para>
  84. <para>Install the package:</para>
  85. <screen><userinput remap="install">make install</userinput></screen>
  86. <para>Make the installed library writable so debugging symbols can
  87. be removed later:</para>
  88. <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
  89. <para>Install Tcl's headers. The next package, Expect, requires them.</para>
  90. <screen><userinput remap="install">make install-private-headers</userinput></screen>
  91. <para>Now make a necessary symbolic link:</para>
  92. <screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
  93. </sect2>
  94. <sect2 id="contents-tcl" role="content">
  95. <title>Contents of Tcl</title>
  96. <segmentedlist>
  97. <segtitle>Installed programs</segtitle>
  98. <segtitle>Installed library</segtitle>
  99. <seglistitem>
  100. <seg>
  101. tclsh (link to tclsh&tcl-major-version;) and
  102. tclsh&tcl-major-version;
  103. </seg>
  104. <seg>
  105. libtcl&tcl-major-version;.so and
  106. libtclstub&tcl-major-version;.a
  107. </seg>
  108. </seglistitem>
  109. </segmentedlist>
  110. <variablelist>
  111. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  112. <?dbfo list-presentation="list"?>
  113. <?dbhtml list-presentation="table"?>
  114. <varlistentry id="tclsh&tcl-major-version;">
  115. <term><command>tclsh&tcl-major-version;</command></term>
  116. <listitem>
  117. <para>The Tcl command shell</para>
  118. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  119. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  120. </indexterm>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="tclsh">
  124. <term><command>tclsh</command></term>
  125. <listitem>
  126. <para>A link to tclsh&tcl-major-version;</para>
  127. <indexterm zone="ch-tools-tcl tclsh">
  128. <primary sortas="b-tclsh">tclsh</primary>
  129. </indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="libtcl&tcl-major-version;.so">
  133. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  134. <listitem>
  135. <para>The Tcl library</para>
  136. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  137. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  138. </indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="libtclstub&tcl-major-version;.a">
  142. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  143. <listitem>
  144. <para>The Tcl Stub library</para>
  145. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  146. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  147. </indexterm>
  148. </listitem>
  149. </varlistentry>
  150. </variablelist>
  151. </sect2>
  152. </sect1>