# $Id: Portfile,v 1.46 2006/06/15 15:38:17 ricci Exp $

PortSystem 1.0
name		ethereal
version		0.99.0
revision	1
categories	net
maintainers	opendarwin.org@darkart.com
description	Graphical network analyzer and capture tool
homepage	http://ethereal.com/
platforms	darwin

long_description A network analyzer that lets you capture and \
		 interactively browse Ethernet frames. \
		 Packet data can be read from a file, or live from a local \
		 network interface.

master_sites	http://www.ethereal.com/distribution/	\
		ftp://ftp.ethereal.com/pub/ethereal/all-versions/ \
		ftp://ftp.planetmirror.com/pub/ethereal/all-versions/ \
		ftp://ftp.mirrors.wiretapped.net/pub/security/packet-capture/ethereal/all-versions/ \
		ftp://gd.tuwien.ac.at/infosys/security/ethereal/all-versions/ \
		ftp://ftp.sunet.se/pub/network/monitoring/ethereal/all-versions/ \
		ftp://ftp.ayamura.org/pub/ethereal/all-versions/ \
		ftp://ftp.azc.uam.mx/mirrors/ethereal/all-versions/

checksums	md5	f9905b9d347acdc05af664a7553f7f76 \
		sha1	466299ac49f21904ed91b93e81667f226637e868 \
		rmd160	f86e21ae60d53e1ed60b61e58c2941ecfd4d8696

use_bzip2	yes

depends_lib	port:glib2 \
		port:gtk2 \
		port:openssl \
		port:libpcap \
		port:zlib

patchfiles	patch-epan-filesystem.c

configure.args	--enable-gtk2 \
		--with-net-snmp=no --with-ucd-snmp=no \
		--disable-usr-local \
		--without-adns \
		--without-pcre \
		--disable-ipv6 \
		--with-pcap=${prefix} \
		--with-ssl=${prefix} \
		--with-zlib=${prefix} \
		--mandir=\\\${prefix}/share/man \
		--infodir=\\\${prefix}/share/info

configure.env LDFLAGS="-Wl,-search_paths_first"

platform darwin 6 {
	build.env-append	MACOSX_DEPLOYMENT_TARGET=10.2
	configure.env-append	MACOSX_DEPLOYMENT_TARGET=10.2
}

platform darwin 7 {
	build.env-append	MACOSX_DEPLOYMENT_TARGET=10.3
	configure.env-append	MACOSX_DEPLOYMENT_TARGET=10.3
}

platform darwin 8 {
	build.env-append	MACOSX_DEPLOYMENT_TARGET=10.4
	configure.env-append	MACOSX_DEPLOYMENT_TARGET=10.4
}

platform darwin 9 {
	build.env-append	MACOSX_DEPLOYMENT_TARGET=10.5
	configure.env-append	MACOSX_DEPLOYMENT_TARGET=10.5
}

variant adns {
	configure.args-append	--with-adns=${prefix}
	configure.args-delete	--without-adns
	depends_lib-append	port:adns
}

variant ipv6 {
	configure.args-append	--enable-ipv6
	configure.args-delete	--disable-ipv6
}

variant net-snmp {
	configure.args-append	--with-net-snmp=${prefix}/bin/net-snmp-config
	configure.args-delete	--with-net-snmp=no
	depends_lib-append	port:net-snmp
}

variant pcre {
	configure.args-append	--with-pcre=${prefix}
	configure.args-delete	--without-pcre
	depends_lib-append	lib:libpcre:pcre
}

variant no_ssl {
	configure.args-append --without-ssl
	depends_lib-delete	port:openssl
}

variant no_x11	{
	depends_lib-delete	port:gtk2
	configure.args-delete	--disable-gtk2
	configure.args-append	--disable-ethereal
}

#
##EOF
