courier-imap-1.7.1 builds fine without tcltk (USE="-tcltk").
courier-imap 1.7.2, 1.7.3, 1.7.3-r1 & 2.0 forces tcltk to be included.
relevant (correct?) line  (courier-imap-1.7.1.ebuild):
tcltk? ( >=dev-tcltk/expect-5.33.0 )
relevant (wrong?) line  (courier-imap-1.7.3-r1.ebuild):
The problem was that the courier-imap ebuild has a hard dependancy on expect as it really needs it for one of the authdaemond components.
Previously if you had USE="-tcltk", that part of authdaemond just didn't work at all.
Maybe -without-authdaemon could be used instead of forcing tcl, tk, expect and X to be installed? Seems like a nicer solution to me...
Nothing is forcing tk and Xfree at all in courier-imap and expect.
expect will ONLY pull in tk (and thus xfree) if you have the X use flag set.
If i run:
USE="-X -tcltk" emerge -epv courier-imap
It shows me that only TCL is being installed, and not X.
If you are getting xfree pulled in, then something else on your system is wanting it.
Ok... already have X installed just misread the ebuilds. But wouldn't it be preferable not having to install expect and tcl, just to use courier, when authdaemon is not used.
and FreeBSD (http://www.freebsd.org/cgi/cvsweb.cgi/ports/mail/courier-imap/Makefile?rev=1.51&content-type=text/x-cvsweb-markup) seems to do fine without them (tcl and expect that is).
As noted earlier when -without-authdaemon expect (and tcl) is not needed.
Would it be exceptable to modify the ebuild (for inclusion in gentoo) that disables authdeamon based on the tcltk use flag? ... or any other existing use flag?
1. the tcltk use flag is being split up soon to 'tcl' and 'tk' components.
2. What I would consider acceptable is a patch that would disable the module properly (I tried once before, but didn't continue very far. The module is 'authsystem.passwd').