aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08/tcl.xml
blob: 41e4b80aa1f1115c956dab89a987fd29d5b0d33e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
  <!ENTITY tdbc-ver          "1.1.3">
  <!ENTITY itcl-ver          "4.2.2">
]>

<sect1 id="ch-system-tcl" role="wrap">
  <?dbhtml filename="tcl.html"?>

  <sect1info condition="script">
    <productname>tcl</productname>
    <productnumber>&tcl-version;</productnumber>
    <address>&tcl-url;</address>
  </sect1info>

  <title>Tcl-&tcl-version;</title>

  <indexterm zone="ch-system-tcl">
    <primary sortas="a-Tcl">Tcl</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The <application>Tcl</application> package contains the Tool Command Language,
    a robust general-purpose scripting language. The <application>Expect</application> package
    is written in the <application>Tcl</application> language.</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&tcl-tmp-sbu;</seg>
        <seg>&tcl-tmp-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Tcl</title>

    <para>This package and the next two (Expect and DejaGNU) are
    installed to support running the test suites for binutils and GCC and other
    packages.  Installing three packages for testing purposes may seem
    excessive, but it is very reassuring, if not essential, to know that the
    most important tools are working properly.</para>

<!--    <para>Note that the Tcl package used here is a minimal version needed
    to run the LFS tests.  For the full package, see the
    <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>-->

    <para>First, unpack the documentation by issuing the following command:</para>

<screen><userinput remap="pre">tar -xf ../tcl&tcl-version;-html.tar.gz --strip-components=1</userinput></screen>

    <para>Prepare Tcl for compilation:</para>

<screen><userinput remap="configure">SRCDIR=$(pwd)
cd unix
./configure --prefix=/usr           \
            --mandir=/usr/share/man</userinput></screen>

    <para>Build the package:</para>

<screen><userinput remap="make">make

sed -e "s|$SRCDIR/unix|/usr/lib|" \
    -e "s|$SRCDIR|/usr/include|"  \
    -i tclConfig.sh

sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|"    \
    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|"            \
    -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh

sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
    -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|"    \
    -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|"            \
    -i pkgs/itcl&itcl-ver;/itclConfig.sh

unset SRCDIR</userinput></screen>

    <para>The various <quote>sed</quote> instructions after the
    <quote>make</quote> command removes references to the build directory from
    the configuration files and replaces them with the install directory.
    This is not mandatory for the remainder of LFS, but may be needed in case a
    package built later uses Tcl.</para>

    <para>To test the results, issue:</para>

<screen><userinput remap="test">make test</userinput></screen>
<!--
   <note>
      <para>
         In the test results there are several places associated with clock.test
         that indicate a failure, but the summary at the end indicates no
         failures. clock.test passes on a complete LFS system.
      </para>
    </note>
-->
    <para>One test, unixInit-1.2, is known to fail.</para>

    <para>Install the package:</para>

<screen><userinput remap="install">make install</userinput></screen>

    <para>Make the installed library writable so debugging symbols can
    be removed later:</para>

<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>

    <para>Install Tcl's headers. The next package, Expect, requires them.</para>

<screen><userinput remap="install">make install-private-headers</userinput></screen>

    <para>Now make a necessary symbolic link:</para>

<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>

    <para>Rename a man page that conflicts with a Perl man page:</para>

    <screen><userinput remap="install">mv /usr/share/man/man3/{Thread,Tcl_Thread}.3</userinput></screen>

    <para>If you downloaded the optional documentation, install it by issuing
    the following commands:</para>

 <screen><userinput remap="install">mkdir -v -p /usr/share/doc/tcl-&tcl-version;
cp -v -r  ../html/* /usr/share/doc/tcl-&tcl-version;</userinput></screen>

  </sect2>

  <sect2 id="contents-tcl" role="content">
    <title>Contents of Tcl</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed library</segtitle>

      <seglistitem>
        <seg>
          tclsh (link to tclsh&tcl-major-version;) and
          tclsh&tcl-major-version;
        </seg>
        <seg>
          libtcl&tcl-major-version;.so and
          libtclstub&tcl-major-version;.a
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="tclsh&tcl-major-version;">
        <term><command>tclsh&tcl-major-version;</command></term>
        <listitem>
          <para>The Tcl command shell</para>
          <indexterm zone="ch-system-tcl tclsh&tcl-major-version;">
            <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="tclsh">
        <term><command>tclsh</command></term>
        <listitem>
          <para>A link to tclsh&tcl-major-version;</para>
          <indexterm zone="ch-system-tcl tclsh">
            <primary sortas="b-tclsh">tclsh</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libtcl&tcl-major-version;.so">
        <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term>
        <listitem>
          <para>The Tcl library</para>
          <indexterm zone="ch-system-tcl libtcl&tcl-major-version;.so">
            <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libtclstub&tcl-major-version;.a">
        <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term>
        <listitem>
          <para>The Tcl Stub library</para>
          <indexterm zone="ch-system-tcl libtclstub&tcl-major-version;.a">
            <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>