$> sudo emerge dev-lang/tkThis will install the newest stable Tk and Tcl (because Tk depends on Tcl in Gentoo) depending on your settings and architecture. To install a testing or experimental package do something like:
#> echo "dev-lang/tcl ~x86" >> /etc/portage/package.keywords #> echo "dev-lang/tk ~x86" >> /etc/portage/package.keywords #> emerge =dev-lang/tk-8.4.12and the stable version should be replaced with a newer version. (In case the installed version is not new enough) Tcl and Tk 8.5 should be installed in parallell to the 8.4 tree, but that has to wait until we are ready.The core packages of Tcl and Tk are located in dev-lang/tcl and dev-lang/tk. The rest is located in dev-tcltk/* in standard Portage. (Portage is the name of the package repository system used in Gentoo). It is important that the overlay directory structure follow the structure in Portage. Portage is normally located in /usr/portage. For the overlay directory structure it is suggested to use /usr/local/portage or, as I like to do, $HOME/portage.To manage packages, Portage offers a python program called emerge. In order to tell emerge about the overlay directory edit the file /etc/make.conf and add the line:
PORTDIR_OVERLAY="/usr/local/portage /home/myusername/portage"We start with tcllib-1.8 and create a directory structure inside the overlay directory:
$> mkdir -p $HOME/portage/dev-tcltk/tcllibThen we just copy the already existing tcllib-1.7.ebuild file from /usr/portage and rename it to tcllib-1.8.ebuild:
$> cp /usr/portage/dev-tcltk/tcllib/tcllib-1.7.ebuild $HOME/portage/dev-tcltk/tcllib/tcllib-1.8.ebuildWe need to edit this ebuild because there are some paches applied which we want to ignore for now:
$> vi $HOME/portage/dev-tcltk/tcllib/tcllib-1.8.ebuildComment out the epatch lines and save the file. Now we can finish the preparation by running
$> ebuild $HOME/portage/dev-tcltk/tcllib/tcllib-1.8.ebuild digestThis will download tcllib-1.8 and create a md5 checksum for emerge. Now we can install tcllib-1.8:
#> echo "dev-tcltk/tcllib ~x86" >> /etc/portage/package.keywords $> sudo emerge dev-tcltk/tcllibNow tcllib-1.8 should hopefully be downloaded (from the local cache) and installed. If it doesn't work as planned then do
$> sudo emerge =dev-tcltk/tcllib-1.7in order to put back an official version.Now we move on to see if we can get tktreectrl version 2.1 installed (It is a part of ActiveTCL and logically important to have available on _any_ distribution)
$> mkdir -p $HOME/portage/dev-tcltk/tktreectrl $> vi $HOME/portage/dev-tcltk/tktreectrl/tktreectrl-2.1.ebuildInsert into that file:
inherit eutils DESCRIPTION="TkTreeCtrl is a flexible listbox widget for Tk" HOMEPAGE="http://tktreectrl.sourceforge.net/" SRC_URI="mirror://sourceforge/tktreectrl/${P}.tar.gz" LICENSE="BSD" SLOT="0" IUSE="" KEYWORDS="~x86" DEPEND=">=dev-lang/tcl-8.3.1" src_unpack() { unpack ${A} } src_compile() { econf || die } src_install() { make DESTDIR=${D} install || die dodoc ChangeLog PACKAGES* README STATUS *.txt }Then create the digest file
$> ebuild $HOME/portage/dev-tcltk/tktreectrl/tktreectrl-2.1.ebuild digestAnd then at the end install it:
#> echo "dev-tcltk/tktreectrl ~x86" >> /etc/portage/package.keywords $> sudo emerge dev-tcltk/tktreectrland now the package should be compiled and installed for you. So far I have some problem with the documentation, but at least the important part is solved.Next up is getting tkcon and then Tcl and Tk 8.5 onto the system.
2006-04-07, SB: Got frustrated that many of the packages that ActiveTcl provides do not have an ebuild for Gentoo. The uttermost frust was to face the fact that tkcon is not a part of standard Gentoo.2006-04-09, SB: Updating. I use kuroo (emerge app-portage/kuroo) to manage my Gentoo packages, and the packages in the overlay does not show up in there, so I have to use emerge from the command line, which is not a big problem, but it has to be solved sometime.