PortSystem      1.0

name			libpnet6
version			0.1.5
revision        1
categories		net devel
license			BSD-old
platforms		darwin freebsd
maintainers		nomaintainer
description		library for writing cross-platform network applications
long_description	libpnet6 is a powerful library for writing cross-platform \
				network applications. libpnet6 facilitates the writing of \
				professional quality client/server applications in the TCP, \
				UDP, and UNIX domain protocols, offering full support for \
				the IPv4 and IPv6 Internet protocols. In addition, advanced \
				networking functionality such as network inteface access and \
				configuration, and the reading and writing of raw packets on \
				the datalink are also supported.

homepage		https://pnet6.sourceforge.net
master_sites	sourceforge:pnet6
checksums       rmd160  dfd1dcc28ad1db0c1f8da861c8257387de223415 \
                sha256  8310b593164d8b847d993eb1a8c7e981018c82fc9a3702b3c806020be4e1036b \
                size    293924

patchfiles      patch-fix-Apple.diff

use_configure	no

build.target	unix

platform darwin	{
	build.target	macos
	destroot	{
		xinstall -m 644 ${worksrcpath}/lib/libpnet6.a ${destroot}${prefix}/lib
		xinstall -m 644 -W ${worksrcpath}/src pnet6.h pnet6sys.h pnet6pkt.h \
			pnet6tlp.h ${destroot}${prefix}/include
		xinstall -m 644 -W ${worksrcpath}/doc/man pnet6-addr.3 pnet6-api.3 \
			pnet6-aux.3 pnet6-if.3 pnet6-ip.3 pnet6-log.3 pnet6-pkt.3 \
			pnet6-raw.3 pnet6-socket.3 pnet6-tcp.3 pnet6-threads.3 pnet6-udp.3 \
			pnet6.3 ${destroot}${prefix}/share/man/man3
	}
}

platform freebsd	{
	build.target	bsd
	destroot.destdir	INST_ROOT=${destroot}${prefix} \
						MANDIR=${destroot}${prefix}/share/man/man3
	destroot.target		install-bsd
}
