# $Id: Portfile,v 1.23 2006/02/19 21:05:22 blb Exp $

PortSystem 1.0
name		libpcap
version		0.9.4
revision	0
categories	net
maintainers	opendarwin.org@darkart.com
description	Packet Capture library
long_description	The Packet Capture library provides a high level interface to packet \
	capture systems. All  packets  on  the network, even those  destined \
	for  other  hosts,  are  accessible through this mechanism.
homepage	http://www.tcpdump.org/
platforms	darwin
master_sites	${homepage}release/
checksums	md5 79025766e8027df154cb1f32de8a7974 \
		sha1 046f7624e66da51eba1ed2cb169695d1e7f31c29
configure.args	--mandir=${prefix}/share/man
configure.env	CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
patchfiles	patch-Makefile.in

pre-configure	{
	reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
	${worksrcpath}/Makefile.in
}

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

variant no-shared {
	configure.env-delete	CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
	patchfiles-delete	patch-Makefile.in
	pre-configure	{
		reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
		Makefile.in
		}
}

