# $Id: Portfile 92837 2012-05-09 00:51:48Z ryandesign@macports.org $

PortSystem 1.0
name             ettercap-ng
version          0.7.3
revision         5
categories       net security
maintainers      gmail.com:ultrix
description      multipurpose sniffer/interceptor/logger for switched LAN
long_description \
    Ettercap is a multi-functional packet sniffer/interceptor/logger \
    that works on switched LANs. It allows the active and passive \
    dissection of numerous protocols, including ciphered ones, such as \
    SSH1, and includes features for network and host analysis. Four \
    modes are available: IP Based, MAC Address Based, ARP Based, and \
    PublicARP Based.
homepage         http://ettercap.sourceforge.net/
platforms        darwin freebsd

master_sites     sourceforge:ettercap
distname         ettercap-NG-${version}
checksums        md5 28fb15cd024162c55249888fe1b97820

patchfiles       patch-src-Makefile.in patch-configure \
                 patch-src-interfaces-curses-widgets-wdg.h \
                 patch-src__protocols__ec_tcp.c

depends_build    port:pkgconfig
depends_lib      port:openssl \
                 port:libpcap \
                 port:libnet11 \
                 port:pcre

configure.args   --disable-gtk \
                 --disable-plugins \
                 --with-openssl=${prefix} \
                 --with-libpcap=${prefix} \
                 --with-libnet=${prefix} \
                 --with-libpcre=${prefix} \
                 --mandir=\\\${prefix}/share/man \
                 --infodir=\\\${prefix}/share/info

variant gtk {
    depends_lib-append    port:gtk2
    configure.args-delete --disable-gtk
    configure.args-append --enable-gtk
}

variant plugins {
    depends_lib-append  port:libtool
    configure.args-delete --disable-plugins
    configure.args-append --enable-plugins
}

# fails, ticket #26060
universal_variant no
