# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name                ssldump
version             0.9b3
revision            4
categories          net
license             BSD-old
maintainers         nomaintainer
description         SSLv3/TLS network protocol analyzer.
long_description    ssldump is an SSLv3/TLS network protocol analyzer. It \
                    identifies TCP connections on the chosen network interface \
                    and attempts to interpret them as SSLv3/TLS traffic. When \
                    it identifies SSLv3/TLS traffic, it decodes the records \
                    and displays them in a textual form to stdout. If provided \
                    with the appropriate keying material, it will also decrypt \
                    the connections and display the application data traffic.
platforms           darwin

homepage            http://ssldump.sourceforge.net
master_sites        sourceforge:project/${name}/${name}/${version}

checksums           rmd160  941cf8f2ef8459ec4f9ce65772e134505d46566f \
                    sha256  6422c16718d27c270bbcfcc1272c4f9bd3c0799c351f1d6dd54fdc162afdab1e

depends_build       port:libtool

depends_lib         port:libpcap \
                    path:lib/libssl.dylib:openssl

# Include Debian's patches since the last release was 2004
patchfiles          \
                    patch-add-AES-ciper-suites.diff \
                    patch-add-missing-include.diff \
                    patch-fix-MD5_CTX_undeclared.diff \
                    patch-fix-table-stop.diff \
                    patch-manpage.diff \
                    patch-base-pcap-snoop.c \
                    patch-reinstate--y-nroff-flag.diff \
                    patch-support-TUN-interfaces.diff \
                    patch-update-for-glibc2.20.diff

pre-configure {
    xinstall -m 644 -W ${prefix}/share/libtool/build-aux config.guess config.sub ${worksrcpath}
}
configure.args      --mandir=${destroot}${prefix}/share/man \
                    --prefix=${destroot}${prefix} \
                    --with-pcap=${prefix} \
                    --with-openssl=${prefix}

pre-destroot {
    # Trash INSTALL because the FS might be case unsensitive.
    file delete -force ${worksrcpath}/INSTALL
}