You may need at least to set the following USE variables:
USE = "berkdb crypt gdbm java kerberos ldap pam samba sasl ssl -ipv6"
Software installation is easy:
server root # emerge heimdal pam_krb5 nss_ldap cyrus-sasl openldapClient machines only need... ????