# $Id: Portfile,v 1.2 2006/07/20 01:04:14 pguyot Exp $

PortSystem 1.0
name				ssldump
version				0.9b3
categories			net
maintainers			pguyot@kallisys.net
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.
homepage			http://www.rtfm.com/ssldump/
platforms			darwin
master_sites		${homepage}
checksums			md5 ac8c28fe87508d6bfb06344ec496b1dd \
					sha1 a633a9a811a138eac5ed440d583473b644135ef5 \
					rmd160 941cf8f2ef8459ec4f9ce65772e134505d46566f
patchfiles			patch-ssl_ssldecode_c
pre-configure {
	file copy -force /usr/share/libtool/config.guess ${worksrcpath}/
	file copy -force /usr/share/libtool/config.sub ${worksrcpath}/
}
configure.args		--mandir=${destroot}${prefix}/share/man \
					--prefix=${destroot}${prefix} \
					--with-pcap=${prefix} \
					--with-openssl=${prefix}
depends_lib			port:libpcap \
					port:openssl \
					lib:libz:zlib

platform darwin {
	# There seems to be a conflict between pcap.h (calling pcap-bpf.h) and
	# net/bpf.h.
	# This conflict apparently doesn't affect OpenBSD (judging from their port
	# of ssldump), so let's only fix it on darwin.
	patchfiles-append	patch-base-pcap-snoop.c
}

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