--- screen-4.0.2-r1.ebuild~	2005-01-01 16:43:56.000000000 +0100
+++ screen-4.0.2-r1.ebuild	2005-02-25 16:33:09.257974728 +0100
@@ -11,10 +11,11 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64 ppc64 s390"
-IUSE="pam nethack uclibc"
+IUSE="pam nethack uclibc kerberos"
 
 RDEPEND=">=sys-libs/ncurses-5.2
-	pam? ( >=sys-libs/pam-0.75 )"
+	pam? ( >=sys-libs/pam-0.75 )
+	kerberos? ( virtual/krb5 )"
 DEPEND="${RDEPEND}
 	>=sys-apps/sed-4
 	>=sys-devel/autoconf-2.58"
@@ -35,6 +36,9 @@
 
 	# Don't use utempter even if it is found on the system
 	epatch ${FILESDIR}/${PV}-no-utempter.patch
+	
+	# Add Kerberos support
+	epatch ${FILESDIR}/screen-krb-noconf.diff
 
 	# Fix manpage.
 	sed -i \
@@ -67,6 +71,7 @@
 		--with-socket-dir=/var/run/screen \
 		--with-sys-screenrc=/etc/screenrc \
 		--enable-rxvt_osc \
+	        $(use_with kerberos krb5 /usr) \
 		|| die "econf failed"
 
 	# Second try to fix bug 12683, this time without changing term.h
