# $Id: Portfile,v 1.8 2003/10/12 15:43:43 mij Exp $

PortSystem 1.0
name		pan2
version		0.14.2
categories	news
maintainers	mij@opendarwin.org
description	News reader for gtk2
homepage	http://pan.rebelbase.com/
platforms	darwin

long_description Pan2 is a newsreader for GTK2/GNOME2 that is based on \
		 the Agent newsreader for Windows OSes.

master_sites	http://pan.rebelbase.com/download/releases/${version}/SOURCE/ \
		http://pan.rebelbase.com/download/obsolete/${version}/SOURCE/


distname	pan-${portversion}
checksums	md5 ed3188e7059bb6d6c209ee5d46ac1852

use_bzip2	yes

depends_lib	lib:libgtk.2:gtk2 lib:libxml2.2:libxml2 lib:libgnet.2:gnet2
depends_build	path:${prefix}/include/gnuregex.h:gnuregex

patchfiles	patch-Makefile.in patch-pan-filters-filter-phrase.h \
		patch-pan-filters-score.c

post-patch	{ reinplace "s|DATADIRNAME=lib|DATADIRNAME=share|g" \
		    ${worksrcpath}/configure
		  reinplace "s|(libdir)/locale|(prefix)/share/locale|g" \
		    ${worksrcpath}/po/Makefile.in.in }

configure.env	CPPFLAGS="-I${prefix}/include -no-cpp-precomp" \
		LDFLAGS="-L${prefix}/lib -bind_at_load"
