[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ B ] [ C ] [ D ] [ next ]


Debian Tcl/Tk Policy
Chapter 1 - Tcl/Tk Packaging


1.1 Versions

At any given time, the binary packages tcl and tk represent the current default Debian Tcl/Tk version. They contain Tcl and Tk shells /usr/bin/tclsh and /usr/bin/wish which are symlinks to the current default version binaries. For backward compatibility they provide the virtual packages tclsh and wish but it isn't recommended to reference them in packages dependencies anymore. The packages tcl and tk are provided by the Debian tcltk-defaults source package, in order to manage modules and extensions packaging and upgrading better. Modules should preferably use those packages when appropriate (i.e. they are either version independent or properly versioned to inhibit the use of a non compatible versions, see Dependencies, Section 2.2), but it is not mandatory. The default packages are

     	tcl
     	tk
     	tcl-dev
     	tk-dev
     	tcl-doc
     	tk-doc

The default Debian Tcl/Tk version should always be the latest stable upstream release that can be integrated in the distribution. Starting from 8.0, Tcl and Tk share the same version numbering. The default packages depend on the appropriate versioned packages and provide useful additional symlinks. Default packages versions follow upstream versions, so that packages can use appropriate versioning constraints on them when it is needed.

Apart from the default version, legacy versions of Tcl/Tk may be included as well in the distribution, as long as they are needed by other packages, or as long as it seems reasonable to provide them. (Note: For the scope of this document, Tcl/Tk versions mean the result of 'info tclversion' command, i.e. Tcl/Tk 8.5 and 8.5.14 are subminor versions of the same Tcl/Tk version 8.5, but Tcl 8.6 and 8.5 are indeed different versions. The patchlevel intends the result of the 'info patchlevel' command, i.e. Tcl/Tk 8.5.14 and 8.5.13 have the same version but different patchlevels).

In addition, unstable/development version of Tcl/Tk may be included in the unstable/experimental distribution.

For any version, the main Tcl and Tk packages are called tclX.Y and tkX.Y respectively. They are always packaged as separate sources, as for upstream. Names of related packages or extensions must follow the same convention if the inclusion of multiple versions make sense or if they work only with specific versions of Tcl or Tk.

To avoid definition clashes with Debian terminology, we will call modules any Tcl/Tk packages which consist uniquely of Tcl/Tk sources, and extension any program which extends consistently Tcl/Tk using TEA and shared libraries. Note that this is not completely consistent with Tcl terminology, which started from version 8.5 also introduces .tm modules and traditionally deals with packages and script libraries.


1.2 Main packages

For every Tcl/Tk versions provided in the distribution, the packages libtclX.Y and libtkX.Y comprise a corresponding Tcl/Tk libraries, core modules and extensions of the upstream Tcl/Tk distribution. They provide infrastructure for embedding Tcl into external programs. Any such packages includes a Provides: item of the virtual package libtcl and a Provides: item for the libtk virtual package.

Also, the packages tclX.Y and tkX.Y ship the binaries /usr/bin/tclshX.Y, /usr/bin/wishX.Y. Starting from Jessie they don't provide alternatives for files /usr/bin/tclsh and /usr/bin/wish. If an application uses one of those, it has to depend on tcl or tk package.

Tools and files for the development of Tcl/Tk extensions are split off in two separate packages tclX.Y-dev and tkX.Y-dev. Documentation is provided separately in packages tclX.Y-doc and tkX.Y-doc.


1.3 Tcl and Tk Interpreters


1.3.1 Interpreters Names

Tcl/Tk scripts depending on the default Tcl/Tk version (see Main packages, Section 1.2) or not depending on a specific Tcl/Tk version must use tclsh and/or wish (unversioned) as the interpreter name and must depend on tcl and/or tk package.

Tcl/Tk scripts that only work with a specific Tcl/Tk version must explicitly use the versioned interpreter name (tclshX.Y and/or wishX.Y) and must depend on the specific Tcl/Tk versioned package (tclX.Y and/or tkX.Y respectively).


1.3.2 Interpreters Locations

The path name for the Tcl interpreter is /usr/bin/tclsh or /usr/bin/tclshX.Y.

The path name for the Tk interpreter is /usr/bin/wish or /usr/bin/wishX.Y.

If a maintainer would like to provide the user a possibility to override the Debian Tcl interpreter, he may want to use /usr/bin/env tclsh or /usr/bin/env tclshX.Y. The same consideration applies for Tk and the wish interpreter. Starting from Jessie administrators no longer can override default versions of the interpreters using update-alternatives, which provided some flexibility but caused confusion for program maintainers before.


1.4 Tcl/Tk libraries

The Tcl and Tk libraries are provided by libtclX.Y and libtkX.Y respectively. These packages install /usr/lib/$(DEB_HOST_MULTIARCH)/libtclX.Y.so (soname is libtclX.Y.so) and /usr/lib/$(DEB_HOST_MULTIARCH)/libtkX.Y.so (soname is libtkX.Y.so).


1.5 Tools/files for Development of Tcl/Tk modules and extensions

Some tools and files for development of Tcl/Tk modules and extensions are packaged as tclX.Y-dev and tkX.Y-dev. These packages provide header files as well as static and stub libraries. Header files are installed in /usr/include/tclX.Y directory (for both Tcl and Tk). Default packages tcl-dev and tk-dev provide symlinks to the right versioned header files directory

     	/usr/include/tcl -> /usr/include/tclX.Y
     	/usr/include/tk -> /usr/include/tclX.Y

See net section and Possible issues building Tcl/Tk extensions, Appendix C for more information about possible issues with extension building due to Debian customizations.


1.6 Multiarch support

The Tcl and Tk libraries and development packages can be installed for several architectures simultaneously. They ship architecture dependent files in /usr/lib/$(DEB_HOST_MULTIARCH) directory. See also section Possible issues building Tcl/Tk extensions, Appendix C for information on how to package multiarchified Tcl/Tk extension.


1.7 Auto_load Path

The package search path (auto_path) for both Tcl and Tk is a list searched in the following order:

Site modules and extensions:
     	/usr/local/lib/tcltk (architecture dependent files)
     	/usr/local/share/tcltk (architecture independent files)
Packaged modules and extensions:
     	/usr/lib/tcltk/$(DEB_HOST_MULTIARCH) (architecture dependent files)
     	/usr/lib/tcltk (architecture dependent files)
     	/usr/share/tcltk (architecture independent files)
Version specific core modules and extensions:
     	/usr/share/tcltk/tclX.Y
     	/usr/share/tcltk/tkX.Y (for Tk only)

Maintainers must ensure that modules and extensions are correctly installed in subdirs of the paths above consistently. See Tcl/Tk modules loading, Appendix B for more information about Tcl/Tk specific ways of dealing with modules and extensions loading. Developers must consider that these defaults impact TEA-based modules and use preferably system-wide tcl.m4 (it isn't TEA-compatible though) instead of private one (see Possible issues building Tcl/Tk extensions, Appendix C).


1.8 Documentation

Default packages tcl-doc and tk-doc which depend on default versioned tclX.Y-doc and tkX.Y-doc are provided. Since different tclX.Y-doc and tkX.Y-doc conflict in files and cannot be installed simultaneously, tcl-doc and tk-doc only recommend tclX.Y-doc and tkX.Y-doc to allow administrators to install any desirable package with Tcl/Tk manual pages. The package tcl-doc also includes a copy of the up-to-date version of this policy.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ A ] [ B ] [ C ] [ D ] [ next ]


Debian Tcl/Tk Policy

version 0.3.0

Francesco Paolo Lovergine frankie@debian.org
Sergei Golovan sgolovan@debian.org