# $Id: Portfile 47624 2009-03-02 09:18:32Z ryandesign@macports.org $ PortSystem 1.0 name spim version 7.4 revision 1 categories emulators devel lang x11 maintainers nomaintainer 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://pages.cs.wisc.edu/~larus/spim.html platforms darwin master_sites http://pages.cs.wisc.edu/~larus/SPIM distname ${name} dist_subdir ${name}/${version} checksums md5 5251ec442ef364ed8dede5dbda86fb47 \ sha1 e929fc5c2e258818a2325b1378740b3dd68dd5b6 \ rmd160 6fbce1b50fb669ec068ac7000b88a899d447dec0 depends_lib port:xorg-libXaw port:xorg-libXp depends_build port:rman port:flex port:bison path:bin/xmkmf:imake worksrcdir ${name}-${version} patchfiles patch-spim_Makefile.diff patch-xspim_Imakefile.diff configure { system "cd ${worksrcpath}/spim && ./Configure" system "cd ${worksrcpath}/xspim && xmkmf && ./Configure" } post-configure { reinplace {s|$(DESTDIR)$(MAN_DIR)/$(DOC_DIR)/xspim.$(MANSUFFIX)|$(DESTDIR)$(MAN_DIR)/xspim.$(MANSUFFIX)|} ${worksrcpath}/xspim/Makefile } build { system "cd ${worksrcpath}/spim && make prefix=${prefix} spim" system "cd ${worksrcpath}/xspim && make prefix=${prefix} xspim" } test { system "cd ${worksrcpath}/spim && make test" } destroot { system "cd ${worksrcpath}/spim && make DESTDIR=${destroot} prefix=${prefix} install install-man" system "cd ${worksrcpath}/xspim && make DESTDIR=${destroot} prefix=${prefix} install install.man" }