tcl.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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-ch5-sbu;</seg>
  30. <seg>&tcl-ch5-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 chell 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> after the <quote>make</quote> command
  80. remove references to the build directory from various configuration files,
  81. and replaces them with the install directory. This is not mandatory
  82. for the remaining of LFS, but may be needed in case a package built later
  83. 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
  90. to build.</para>
  91. <screen><userinput remap="install">make install-private-headers</userinput></screen>
  92. <para>Now make a necessary symbolic link:</para>
  93. <screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
  94. </sect2>
  95. <sect2 id="contents-tcl" role="content">
  96. <title>Contents of Tcl</title>
  97. <segmentedlist>
  98. <segtitle>Installed programs</segtitle>
  99. <segtitle>Installed library</segtitle>
  100. <seglistitem>
  101. <seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg>
  102. <seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg>
  103. </seglistitem>
  104. </segmentedlist>
  105. <variablelist>
  106. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  107. <?dbfo list-presentation="list"?>
  108. <?dbhtml list-presentation="table"?>
  109. <varlistentry id="tclsh&tcl-major-version;">
  110. <term><command>tclsh&tcl-major-version;</command></term>
  111. <listitem>
  112. <para>The Tcl command shell</para>
  113. <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;">
  114. <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
  115. </indexterm>
  116. </listitem>
  117. </varlistentry>
  118. <varlistentry id="tclsh">
  119. <term><command>tclsh</command></term>
  120. <listitem>
  121. <para>A link to tclsh&tcl-major-version;</para>
  122. <indexterm zone="ch-tools-tcl tclsh">
  123. <primary sortas="b-tclsh">tclsh</primary>
  124. </indexterm>
  125. </listitem>
  126. </varlistentry>
  127. <varlistentry id="libtcl&tcl-major-version;.so">
  128. <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
  129. <listitem>
  130. <para>The Tcl library</para>
  131. <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so">
  132. <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="libtclstub&tcl-major-version;.a">
  137. <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
  138. <listitem>
  139. <para>The Tcl Stub library</para>
  140. <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a">
  141. <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
  142. </indexterm>
  143. </listitem>
  144. </varlistentry>
  145. </variablelist>
  146. </sect2>
  147. </sect1>