tcl.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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.2">
  7. <!ENTITY itcl-ver "4.2.1">
  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 binutils and GCC 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.</para>
  41. <!-- <para>Note that the Tcl package used here is a minimal version needed
  42. to run the LFS tests. For the full package, see the
  43. <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>-->
  44. <para>First, unpack the documentation by issuing the following command:</para>
  45. <screen><userinput remap="pre">tar -xf ../tcl&tcl-version;-html.tar.gz --strip-components=1</userinput></screen>
  46. <para>Prepare Tcl for compilation:</para>
  47. <screen><userinput remap="configure">SRCDIR=$(pwd)
  48. cd unix
  49. ./configure --prefix=/usr \
  50. --mandir=/usr/share/man \
  51. $([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</userinput></screen>
  52. <variablelist>
  53. <title>The meaning of the configure options:</title>
  54. <varlistentry>
  55. <term><parameter>$([ "$(uname -m)" = x86_64 ] &amp;&amp; echo --enable-64bit)</parameter></term>
  56. <listitem>
  57. <para>The construct <parameter>$(&lt;shell command&gt;)</parameter>
  58. is replaced by the output of the shell command. Here this output is
  59. empty if running on a 32 bit machine, and is
  60. <parameter>--enable-64bit</parameter> if running on a 64 bit machine.
  61. </para>
  62. </listitem>
  63. </varlistentry>
  64. </variablelist>
  65. <para>Build the package:</para>
  66. <screen><userinput remap="make">make
  67. sed -e "s|$SRCDIR/unix|/usr/lib|" \
  68. -e "s|$SRCDIR|/usr/include|" \
  69. -i tclConfig.sh
  70. sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
  71. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \
  72. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
  73. -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \
  74. -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
  75. sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
  76. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \
  77. -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \
  78. -i pkgs/itcl&itcl-ver;/itclConfig.sh
  79. unset SRCDIR</userinput></screen>
  80. <para>The various <quote>sed</quote> instructions after the
  81. <quote>make</quote> command removes references to the build directory from
  82. the configuration files and replaces them with the install directory.
  83. This is not mandatory for the remainder of LFS, but may be needed in case a
  84. package built later uses Tcl.</para>
  85. <para>To test the results, issue:</para>
  86. <screen><userinput remap="test">make test</userinput></screen>
  87. <note>
  88. <para>
  89. In the test results there are several places associated with clock.test
  90. that indicate a failure, but the summary at the end indicates no
  91. failures. clock.test passes on a complete LFS system.
  92. </para>
  93. </note>
  94. <para>Install the package:</para>
  95. <screen><userinput remap="install">make install</userinput></screen>
  96. <para>Make the installed library writable so debugging symbols can
  97. be removed later:</para>
  98. <screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
  99. <para>Install Tcl's headers. The next package, Expect, requires them.</para>
  100. <screen><userinput remap="install">make install-private-headers</userinput></screen>
  101. <para>Now make a necessary symbolic link:</para>
  102. <screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
  103. <para>Finally, rename a man page that conflicts with a Perl man page:</para>
  104. <screen><userinput remap="install">mv /usr/share/man/man3/{Thread,Tcl_Thread}.3</userinput></screen>
  105. </sect2>
  106. <sect2 id="contents-tcl" role="content">
  107. <title>Contents of Tcl</title>
  108. <segmentedlist>
  109. <segtitle>Installed programs</segtitle>
  110. <segtitle>Installed library</segtitle>
  111. <seglistitem>
  112. <seg>
  113. tclsh (link to tclsh&tcl-major-version;) and
  114. tclsh&tcl-major-version;
  115. </seg>
  116. <seg>
  117. libtcl&tcl-major-version;.so and
  118. libtclstub&tcl-major-version;.a
  119. </seg>
  120. </seglistitem>
  121. </segmentedlist>
  122. <variablelist>
  123. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  124. <?dbfo list-presentation="list"?>
  125. <?dbhtml list-presentation="table"?>
  126. <varlistentry id="tclsh&tcl-major-version;">
  127. <term><command>tclsh&tcl-major-version;</command></term>
  128. <listitem>
  129. <para>The Tcl command shell</para>
  130. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  131. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  132. </indexterm>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry id="tclsh">
  136. <term><command>tclsh</command></term>
  137. <listitem>
  138. <para>A link to tclsh&tcl-major-version;</para>
  139. <indexterm zone="ch-tools-tcl tclsh">
  140. <primary sortas="b-tclsh">tclsh</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="libtcl&tcl-major-version;.so">
  145. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  146. <listitem>
  147. <para>The Tcl library</para>
  148. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  149. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="libtclstub&tcl-major-version;.a">
  154. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  155. <listitem>
  156. <para>The Tcl Stub library</para>
  157. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  158. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. </variablelist>
  163. </sect2>
  164. </sect1>