# $Id: Portfile,v 1.7 2005/06/28 15:36:24 michaelm Exp $

PortSystem 1.0
name            spim
version         7.1
categories      emulators devel lang x11
maintainers     stewartsmith@mac.com
description     an assembly language MIPS R2000/R3000 simulator
long_description \
	SPIM S20 is a software simulator that runs assembly language programs for \
	the MIPS R2000/R3000 RISC computers.  SPIM can read and immediately run \
	files containing assembly language statements.  SPIM is a self-contained \
	system for running these programs and contains a debugger and interface to \
	the operating system. \
	\
	SPIM implements almost the entire MIPS assembler-extended instruction set \
	for the R2000/R3000 (I've omitted some the complex floating point comparisons \
	and details of the memory system page tables).  The MIPS architecture has \
	evolved considerably since then (in particular the 64 bit extensions), which \
	means that SPIM will not run programs compiled for recent MIPS or SGI \
	processors.
homepage        http://www.cs.wisc.edu/~larus/spim.html
platforms       darwin

master_sites    http://www.cs.wisc.edu/~larus/SPIM/
distname        ${name}-${version}
checksums       md5 24546da54bca92d96bf2ea284e81d6eb

depends_lib     lib:libX11.6:XFree86

worksrcdir      ${name}-${version}

patchfiles      patch-Configure patch-Makefile patch-spim.c
post-patch {
	reinplace s|__PREFIX__|${prefix}| ${worksrcpath}/Makefile
}

configure.cmd   ./Configure

build.target    spim xspim

pre-destroot {
	xinstall -d ${destroot}${prefix}/share/spim
}
destroot.target install install.man
