glfs/general/prog/tcl.xml

197 lines
6.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY tcl-download-http "http://prdownloads.sourceforge.net/tcl/tcl&tcl-version;-src.tar.gz">
<!ENTITY tcl-download-ftp " ">
<!-- <!ENTITY tcl-download-ftp "ftp://ftp.us.xemacs.org/pub/tcl/tcl8_4/tcl&tcl-version;-src.tar.gz">-->
<!ENTITY tcl-md5sum "629dfea34e4087eb4683f834060abb63">
<!ENTITY tcl-size "3.4 MB">
<!ENTITY tcl-buildsize "22.5 MB">
<!ENTITY tcl-time "0.3 SBU (additional 0.9 SBU to run the test suite)">
]>
<sect1 id="tcl" xreflabel="Tcl-&tcl-version;">
<?dbhtml filename="tcl.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Tcl-&tcl-version;</title>
<indexterm zone="tcl">
<primary sortas="a-Tcl">Tcl</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Tcl</title>
<para>The <application>Tcl</application> package contains the Tool Command
Language, a robust general-purpose scripting language.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&tcl-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&tcl-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &tcl-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &tcl-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &tcl-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &tcl-time;</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Tcl</title>
<note>
<para>This package is also installed in LFS during the bootstrap phase.
At the time of the LFS-6.1 release, &tcl-version; was not available. The
significant difference between the two installations (other than
installing to <filename class="directory">/usr</filename>) is that the
package is installed in such a way that there is no need to keep the build
directory around after installation.</para>
</note>
<para>Install <application>Tcl</application> by running the following
commands:</para>
<screen><userinput>export VERSION=&tcl-version; &amp;&amp;
export V=`echo $VERSION | cut -d "." -f 1,2` &amp;&amp;
export DIR=$PWD &amp;&amp;
cd unix &amp;&amp;
./configure --prefix=/usr --enable-threads &amp;&amp;
make &amp;&amp;
sed -i "s:${DIR}/unix:/usr/lib:" tclConfig.sh &amp;&amp;
sed -i "s:${DIR}:/usr/include/tcl${V}:" tclConfig.sh &amp;&amp;
sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',\
TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh</userinput></screen>
<para>To test the results, issue: <command>make test</command>.</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
install -v -d /usr/include/tcl${V}/unix &amp;&amp;
install -v -m644 *.h /usr/include/tcl${V}/unix/ &amp;&amp;
install -v -d /usr/include/tcl${V}/generic &amp;&amp;
install -v -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ &amp;&amp;
rm -v -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h &amp;&amp;
ln -v -nsf ../../include/tcl${V} /usr/lib/tcl${V}/include &amp;&amp;
ln -v -sf libtcl${V}.so /usr/lib/libtcl.so &amp;&amp;
ln -v -sf tclsh${V} /usr/bin/tclsh</userinput></screen>
<para>Clean up the unprivileged user's environment using the following
commands:</para>
<screen><userinput>unset VERSION &amp;&amp;
unset V &amp;&amp;
unset DIR</userinput></screen>
<!--
<caution>
<para>If you build the package as an ordinary user and then switch to
root to install the package, ensure you set the environment variables
<envar>V</envar> and <envar>VERSION</envar> before running the installation
commands.</para>
</caution>
-->
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><parameter>--enable-threads</parameter>: This switch forces the package
to build with thread support.</para>
<para><command>sed -i ...</command>: The <application>Tcl</application>
package assumes that the source used to build
<application>Tcl</application> is always kept around for compiling packages
that depend on <application>Tcl</application>. These <command>sed</command>s
remove the reference to the build directory and replace them by saner
system-wide locations.</para>
<para><command>install ...</command>: These commands install the internal
headers into a system-wide location.</para>
<para><command>ln -v -sf ...</command>: These commands create compatibility
symbolic links.</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>tclsh and tclsh8.4</seg>
<seg>libtcl.so and libtclstub8.4.a</seg>
<seg>/usr/include/tcl8.4 and /usr/lib/tcl8.4</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="tclsh">
<term><command>tclsh</command></term>
<listitem>
<para> is a symlink to the <command>tclsh8.4</command>
program.</para>
<indexterm zone="tcl tclsh">
<primary sortas="g-tclsh">tclsh</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="tclsh8.4">
<term><command>tclsh8.4</command></term>
<listitem>
<para> is a simple shell containing the
<application>Tcl</application> interpreter.</para>
<indexterm zone="tcl tclsh8.4">
<primary sortas="b-tclsh8.4">tclsh8.4</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libtcl">
<term><filename role="library">libtcl.so</filename></term>
<listitem>
<para>contains the API functions required
by <application>Tcl</application>.</para>
<indexterm zone="tcl libtcl">
<primary sortas="c-libtcl">libtcl.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>