# $Id: Portfile,v 1.6 2006/04/06 01:26:44 mij Exp $

PortSystem 1.0
name		gnet2
version		2.0.7
revision	1
categories	devel
maintainers	mij@opendarwin.org
description	Simple network library
homepage	http://www.gnetlibrary.org/
platforms	darwin

long_description GNet is a simple network library written in C.  It is \
		 object-oriented, and built upon GLib.

master_sites	http://www.gnetlibrary.org/src/

distname	gnet-${portversion}
checksums	sha1 01c41bd492c6fd33d31800d0c5146a09315f7f6d

depends_lib	port:glib2 port:gettext port:libiconv

post-configure	{ reinplace "s|-pthread|-lpthread|g" \
		    ${workpath}/${distname}/src/Makefile
		  reinplace "s|-pthread|-lpthread|g" \
		    ${workpath}/${distname}/examples/Makefile
		  reinplace "s|-pthread|-lpthread|g" \
		    ${workpath}/${distname}/tests/Makefile }

post-destroot	{ system "ln -fs libgnet-2.0.0.0.4.dylib \
		    ${destroot}${prefix}/lib/libgnet.2.dylib" }

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
