ActiveState has created a Tcl Extension Archive tool called teacup which simplifies the installation of binary extensions to Tcl. It’s included with ActiveTcl, but if you’re using Tcl from MacPorts and want to use teacup, it’s fairly easy:
1. Download teacup for MacOS X
The teacup binary can be downloaded from this location:
Here is a direct link to the latest teacup binary. The file is named file.exe — simply rename that to teacup and put it in /usr/local/bin or another convenient place in your $PATH.
2. Create the installation repository
You will need an installation repository where teacup can store its data locally. The default location is /Library/Tcl/teapot and you can create it like this:
$ sudo teacup create Repository @ /Library/Tcl/teapot Created
3. Patch MacPorts tclsh to handle teapot repositories
$ sudo teacup setup /opt/local/bin/tclsh Looking at tcl shell /opt/local/bin/tclsh ... Already able to handle Tcl Modules. Already has the platform packages. Patching: Adding code to handle teapot repositories ... Done
4. Link teacup to MacPorts tclsh
$ sudo teacup link make /Library/Tcl/teapot /opt/local/bin/tclsh Ok
That’s it! You’re done. You should now be able to list available packages within TEA using teacup list and install them using sudo teacup install "packagename".
I’ve tested this on MacOS X 10.6.1 Snow Leopard with Tcl 8.5.7 from MacPorts.
Tags: HOWTO, Tcl, ActiveState, TEA, teacup
Latest comments