# $Id: Portfile,v 1.16 2005/06/20 18:07:25 mij Exp $

PortSystem 1.0
name		dopewars
version		1.5.10
categories	games
maintainers	mij@opendarwin.org
description	Rewrite of a game originally based on \"Drug Wars\"
homepage	http://dopewars.sourceforge.net/
platforms	darwin

long_description The idea of dopewars is to deal drugs on the streets \
		 of New York, amassing a huge fortune and paying off \
		 the loan shark, while avoiding the ever annoying \
		 police.

master_sites	sourceforge

checksums	md5 99f07eac91f1f272f43d16ba81205c66

depends_lib	lib:libgtk.2:gtk2 lib:libesd.0:esound

post-patch	{ reinplace "s| \$\(dopewars_DEPENDENCIES\)||g" ${worksrcpath}/src/Makefile.in
		  reinplace "s|need_relink=yes|need_relink=no|g" ${worksrcpath}/ltmain.sh
		  reinplace "s|LIBADD =|LIBADD = -module -avoid-version|g" ${worksrcpath}/src/plugins/Makefile.in }

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

configure.args	--enable-nls --enable-networking --without-sdl --with-pic \
		--enable-gui-client --enable-plugins --enable-shared \
		--enable-static --mandir=${prefix}/share/man

platform darwin 6 { depends_lib-append lib:libdl:dlcompat }
