[ 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 virtual packages tclsh and wish are provided by all source package versions of Tcl and Tk. So pseudo-default Tcl and Tk exist, but they are generally a choice of the administrator by means of update-alternatives use. Starting from Lenny release, proper default packages are also 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. This is consistent with the use of alternatives. 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 and alternatives. 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.4 and 8.4.16 are subminor versions of the same Tcl/Tk version 8.4, but Tcl 8.5 and 8.3 are indeed different versions. The patchlevel intends the result of the 'info patchlevel' command, i.e. Tcl/Tk 8.4.16 and 8.4.15 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 tclX.Y and tkX.Y comprise a complete distribution for deployment of Tcl/Tk scripts and applications. The packages include the binaries /usr/bin/tclshX.Y, /usr/bin/wishX.Y and core modules and extensions of the upstream Tcl/Tk distribution. Any Tcl package includes a Provides: item of the virtual package tclsh and any Tk package includes a Provides: item for the wish virtual package. They also provide alternatives for files /usr/bin/tclsh and /usr/bin/wish.

Tools and files for the development of Tcl/Tk packages 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 should use tclsh and/or wish(unversioned) as the interpreter name.

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


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. Administrators could also override default versions of the interpreters using update-alternatives, so maintainers must always consider that the default Tcl/Tk interpreters could be altered by administrators, so packages should always require a compatible version to avoid issues, when appropriate.


1.4 Tcl/Tk libraries

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


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 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 (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.7 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.2.0

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