--- sshguard-1.5-r2.ebuild 2013-01-17 12:39:50.000000000 +0400 +++ sshguard-1.5-r3.ebuild 2013-01-17 12:48:29.218781699 +0400 @@ -13,16 +13,19 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86 ~x86-fbsd" -IUSE="ipfilter kernel_FreeBSD kernel_linux" +IUSE="ipfilter iptables kernel_FreeBSD kernel_linux tcpd" -CDEPEND="kernel_linux? ( net-firewall/iptables ) - kernel_FreeBSD? ( !ipfilter? ( sys-freebsd/freebsd-pf ) )" +CDEPEND="iptables? ( net-firewall/iptables ) + kernel_FreeBSD? ( !tcpd? ( !ipfilter? ( sys-freebsd/freebsd-pf ) ) ) + tcpd? ( sys-apps/tcp-wrappers )" DEPEND="${CDEPEND} sys-devel/flex" RDEPEND="${CDEPEND} sys-apps/openrc virtual/logger" +REQUIRED_USE="^^ ( ipfilter iptables tcpd )" + DOCS=( README Changes scripts/sshguard_backendgen.sh ) src_prepare() { @@ -35,12 +38,20 @@ local myconf if use kernel_linux; then - einfo "Selected firewall backend: iptables" - myconf="--with-firewall=iptables" + if use iptables; then + einfo "Selected firewall backend: iptables" + myconf="--with-firewall=iptables" + elif use tcpd; then + einfo "Selected firewall backend: tcp-wrappers" + myconf="--with-firewall=hosts" + fi elif use kernel_FreeBSD; then if use ipfilter; then einfo "Selected firewall backend: ipfw" myconf="--with-firewall=ipfw" + elif use tcpd; then + einfo "Selected firewall backend: tcp-wrappers" + myconf="--with-firewall=hosts" else einfo "Selected firewall backend: pf" myconf="--with-firewall=pf"