# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 66636 2010-04-18 15:36:42Z ryandesign@macports.org $

PortSystem 1.0

name		gnet2
version		2.0.8
set branch	[join [lrange [split ${version} .] 0 1] .]
categories	devel
maintainers	nomaintainer
description	Simple network library
homepage	http://live.gnome.org/GNetLibrary
platforms	darwin

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

universal_variant   no

master_sites	gnome:sources/gnet/${branch}/

distname	gnet-${version}
use_bzip2	yes
checksums	md5 93327d2fca333d7e54ba2cf54e071165 \
			sha1 74a33dd25cc594b874e3a5171795efd99e567387

depends_lib	path:lib/pkgconfig/glib-2.0.pc: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.8.0.dylib \
		    ${destroot}${prefix}/lib/libgnet.2.dylib" }

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/gnet/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
