Updated 2018-02-17 03:53:48 by jsuntheimer72

The latest Tcl/Tk on Debian, the easy way.

Step One: Make an /etc/apt/preferences file that looks something like this:
Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600

Step Two: Add the sid repos, something like this:
echo "deb http://deb.debian.org/debian unstable main non-free contrib" > /etc/apt/sources.list.d/sid.list

Step Three:
apt update

Step Four: Install all your tcl goodies from Sid
apt -t unstable install -y tcl8.6 tcl tk8.6 tk tcl-expect tdom tcllib tklib tkcon tcl-sugar
apt -t unstable install -y tcl8.6-dev tcl-dev tk8.6-dev tk-dev tcl8.6-doc tk8.6-doc

Not everything will necessarily be installed from Sid, but if there is a new release of anything, you will get it (aka 8.6.8 circa 1/2018). The preferences file ensures that you don't install anything from Sid that you do not desire.

Unofficial repositories

  1. Debian-cosy is a repository of unofficial debian packages, mostly made by Victor Wagner and Artem Chuprina
    deb http://ftp.45.free.net/pub/debian-cosy sarge local updates tcl
    deb-src http://ftp.45.free.net/pub/debian-cosy sarge local updates tcl

Contains ... I dunno ... lots of stuff

peterc 2008-11-17: "Firefox can't find the server at ftp.45.free.net." Link looks dead.

Packages available from official repositories

As the extensions are packaged separately it would be useful to have a list of cross references. This would help developers used to ActiveState TCL able to quickly set up their Debian environment.

First column is the option to tcl command package require, second column is the debian package as given to apt-get install, and third column is a description. This list is meant to track the unstable release policy.
LibraryPackageDescription
Tcl tcl-8.4 The base tcl package
tcl-8.4-doc Tcl man pages
Tk tk-8.4 The base tk package
tk-8.4-doc Tk man pages
Tcllib tcllib The Standard Tcl Library
Tclx tclx8.4 Extended Tcl (TclX) - shared library
tclx8.4-doc Extended Tcl (TclX) - manpages
Thread tclthread Script level access to Tcl threading
Img libtk-img Extended image format support for Tcl/Tk
snack libsnack2 Sound extension
Tktable tktable Table extension for Tcl/Tk
BLT blt BLT extension library for Tcl/Tk
Tix tix Tix library for Tk
tkdnd tkdnd adds native drag & drop capabilities to the Tk toolkit

... more packages to follow ...

escargo 25 Oct 2007 - Note this Debian news: [1]

As already announced to all interested maintainers whose packages depend on Tcl/Tk, there is an ongoing effort of drafting a policy for team maintenance of Tcl/Tk main packages and their modules/extensions. This is now an announce to the larger audience of all maintainers in order to inform also people who could be interested in packaging Tcl/Tk related packages in the next future.

See also: http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/

escargo 21 Feb 2008 - Note this later Debian news (Making the recently released Tcl/Tk 8.5 the default package in Lenny.)

RLH 21 Feb 2008 - Are they looking for a maintainer? I just picked up a gig that makes me the Debian admin for a company. Once I get settled in and comfortable with Debian I would have no problem becoming the Debian package maintainer or one of them anyway.

escargo - You would have to ask them. I'm reasonably sure they would welcome the help, especially with 8.3 removal and /usr/lib transition.

RLH - Will do...

Superlinux Sunday, April 29 2012: Well in Debian GNU/Linux (squeeze) you can have both TCL 8.4 and 8.5. and the default stays on 8.4 . Tcl 8.4 has not the widget ttk::combobox ; whereas, 8.5 has it. Therefore to make 8.5 the default we submit the following commands as root:
#For tclsh
update-alternatives --set tclsh /usr/bin/tclsh8.5 
#And for wish:
update-alternatives --set wish /usr/bin/wish8.5 

You can list the alternatives this way:
#for tclsh. one of the possible alternatives /usr/bin/tclsh8.5 :
update-alternatives --list tclsh 
#and for wish .one of the possible alternatives /usr/bin/wish8.5 :
update-alternatives --set wish /usr/bin/wish8.5 

aspect Sunday April 29 2012: It's also worth noting that 8.6 is currently available in the experimental repositories. Try something like:
echo deb ftp://ftp.debian.org/pub/debian experimental main contrib non-free > /etc/apt-sources.list.d/experimental.list
echo 'Package *
Pin: release a=stable
Pin-Priority: 700' > /etc/apt/preferences.d/pin-stable
aptitude update
aptitude install tcl8.6 tk8.6

Edit the above to suit your local mirror and pin to whichever flavour you prefer to track so you don't end up installing experimental packages that might break your system!

jsuntheimer72 Feb 01, 2018: Here are the officially recommended locations for system-wide tcl-related installs, gleaned from the Debian Tcl/Tk Policy [2], and followed by the official packages:
 Always install your package stuff in a per-package sub-directory of /usr/share/tcltk (for scripted modules)
 and/or /usr/lib/tcltk (for shared library extensions) along with the needed index file.

For .tm files, see the "defaults" section in https://core.tcl.tk/tips/doc/trunk/tip/189.md . Debian follows this scheme for .tm style modules.