# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name			libsockets
version			2.3.3
categories		devel net
platforms		darwin
maintainers		mww
description		C++ Sockets is a C++ wrapper for BSD-style sockets.
long_description	${description}

homepage		http://www.alhem.net/Sockets/
master_sites	${homepage}:tar \
				http://www.die.net/doc/linux/include/uuid/:header
distfiles		uuid.h:header \
				Sockets-${version}.tar.gz:tar
checksums		uuid.h sha1 c466612c98aea27d92423589018e1a69d480c793 \
				Sockets-${version}.tar.gz sha1 1344dcfcfd3cac4f28f041c9d8a0bcf5f4c3bab9
patchfiles		patch-Makefile.diff patch-Makefile.Defines.macosx.diff

depends_lib		port:openssl

worksrcdir		Sockets-${version}

extract.only	Sockets-${version}.tar.gz
post-extract {
	file copy ${distpath}/uuid.h ${worksrcpath}
	xinstall -m 755 ${filespath}/configure ${worksrcpath}
	xinstall -m 755 ${filespath}/create-dylib.sh ${worksrcpath}
}

configure.env-append	PLATFORM="macosx" PREFIX="${prefix}"
build.target-append	libSockets.dylib

post-destroot {
	xinstall -m 755 -W ${worksrcpath} \
		libSockets.1.0.0.dylib libSockets.dylib ${destroot}${prefix}/lib
}

livecheck.type	freshmeat
livecheck.name	csockets

