# $Id: Portfile,v 1.16 2005/05/11 00:23:20 toby Exp $

PortSystem 1.0
name		libnet
version		1.0.2a
revision	3
categories	net
maintainers	jim@geovedi.com
description	A C library for creating IP packets
long_description	\
	libnet is a high-level API (toolkit) allowing the application \
	programmer to construct and inject network packets. It provides a \
	portable and simplified interface for low-level network packet \
	shaping, handling and injection. Libnet hides much of the tedium of \
	packet creation from the application programmer such as \
	multiplexing, buffer management, arcane packet header information, \
	byte-ordering, OS-dependent issues, and much more. Libnet features \
	portable packet creation interfaces at the IP layer and link layer, \
	as well as a host of supplementary and complementary functionality. \
	Using libnet, quick and simple packet assembly applications can be \
	whipped up with little effort. With a bit more time, more complex \
	programs can be written (Traceroute and ping were easily rewritten \
	using libnet and libpcap).
homepage	http://www.packetfactory.net/libnet/
platforms	darwin
master_sites	http://www.packetfactory.net/libnet/dist/deprecated/
checksums	md5 ddf53f0f484184390e8c2a1bd0853667
depends_build	path:/usr/include/netinet/ip_var.h:netinet-headers
patchfiles	patch-Makefile patch-include-libnet.h
worksrcdir	Libnet-${version}
post-configure	{ reinplace "s|\$\{prefix\}/man|\$\{prefix\}/share/man|g" ${worksrcpath}/Makefile }

variant darwin {
	pre-configure {
		file copy -force /usr/share/libtool/config.guess ${worksrcpath}/config.guess
		file copy -force /usr/share/libtool/config.sub ${worksrcpath}/config.sub
	}
}

platform darwin 8 {
	patchfiles-append patch-include__libnet__libnet-headers.h
}
