dev-libs/tdb looks for gdbm.h during configure and dies if it doesn't find it. So it needs a DEPEND on sys-libs/gdbm.
thx, added :)