# $Id: Portfile,v 1.1 2004/07/16 19:51:19 olegb Exp $
PortSystem	  1.0
name		  frotz
version		  2.43
categories	  games
maintainers	  pack-darwinports@rattus.net
description	  an interpreter for Infocom Z-Code games
long_description  Frotz provides a portable implementation of the zcode \
		  virtual machine used for all Infocom text adventures and \
		  many of those written by other authors. 
homepage	  http://www.cs.csubak.edu/~driffi/proj/frotz/
master_sites      http://www.cs.csubak.edu/~dgriffi/proj/frotz/files/frotz-2.43.tar.gz
checksums	  frotz-2.43.tar.gz md5 efe51879e012b92bb8d5f4a82e982677
patchfiles	  patch-Makefile patch-src-common-main.c \
	   	  patch-src-common-process.c
configure	 {
	reinplace "s|^PREFIX = /usr/local|PREFIX = ${prefix}|" \
		"${worksrcpath}/Makefile"
	reinplace "s|MAN_PREFIX = \$(PREFIX)|MAN_PREFIX = \$(PREFIX)/share|" \
		"${worksrcpath}/Makefile"
}

destroot {
	reinplace "s|^PREFIX = ${prefix}|PREFIX = ${destroot}${prefix}|" \
		"${worksrcpath}/Makefile"
	system "cd ${worksrcpath} && make install"
}
