spim stable port information

Package: spim
Version: 7.4
Revision: 1
Description: MIPS simulator
License: Restrictive
Homepage: http://pages.cs.wisc.edu/~larus/spim.html
Maintainer: Monic Polynomial

Source: http://pages.cs.wisc.edu/~larus/SPIM/%n-%v.tar.gz
Source-MD5: 4aae83509d47a5a98d37db5b469cbe9e
SourceDirectory: %n-%v

PatchFile: %n.patch
PatchFile-MD5: f169c5bfb70280b58ddbaca65177d752

BuildDepends: fink (>= 0.24.12)

CompileScript: <<
#!/bin/bash -ev
cd spim
./Configure
make EXCEPTION_DIR=%p/lib/spim
<<

InstallScript: <<
#!/bin/bash -ev
cd spim
make BIN_DIR=%i/bin EXCEPTION_DIR=%i/lib/spim MAN_DIR=%i/share/man/man1 install install-man
/usr/bin/install -d -m 700 %i/share/spim
/bin/cp -R ../Tests %i/share/spim
/bin/chmod -R go=u-w %i/share/spim
<<

DocFiles: ChangeLog README VERSION COPYING Documentation/BLURB Documentation/SPIM.html Documentation/TeX

DescDetail: <<
spim is a self-contained simulator that will run MIPS32 assembly language
programs. It reads and executes assembly language programs written for this
processor. spim also provides a simple debugger and minimal set of operating
system services. spim does not execute binary (compiled) programs.

spim implements almost the entire MIPS32 assembler-extended instruction set.
(It omits most floating point comparisons and rounding modes and the memory
system page tables.) The MIPS architecture has several variants that differ in
various ways (e.g., the MIPS64 architecture supports 64-bit integers and
addresses), which means that spim will not run programs compiled for all types
of MIPS processors. MIPS compilers also generate a number of assembler
directives that spim cannot process. These directives usually can be safely
deleted.

Earlier versions of spim (before 7.0) implemented the MIPS-I instruction set
used on the MIPS R2000/R3000 computers. This architecture is obsolete (though,
has never been surpassed for its simplicity and elegance). spim now supports
the more modern MIPS32 architecture, which is the MIPS-I instruction set
augmented with a large number of occasionally useful instructions. MIPS code
from earlier versions of SPIM should run without changes, except code that
handles exceptions and interrupts. This part of the architecture changed over
time (and was poorly implemented in earlier versions of spim). Code of this
sort need to be updated. Examples of the new code are in
%p/lib/spim/exceptions.s and
%p/share/spim/Tests/tt.io.s.

spim implements both a simple, terminal-style interface and a window interface.
The spim program provides a simple terminal interface and the xspim program
provides the windowing interface.
<<

spim stable port .patch

diff -Nurd spim-7.4.ori/COPYING spim-7.4/COPYING
--- spim-7.4.ori/COPYING 1969-12-31 21:00:00.000000000 -0300
+++ spim-7.4/COPYING 2009-04-08 07:18:25.000000000 -0300
@@ -0,0 +1,18 @@
+SPIM is copyrighted by James R. Larus and distributed under the
+following conditions:
+
+ You may make copies of SPIM for your own use and modify those copies.
+
+ All copies of SPIM must retain my name and copyright notice.
+
+ You may not sell SPIM or distribute SPIM in conjunction with a
+ commercial product or service without the expressed written consent of
+ James Larus.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+James Larus
+Microsoft Research
+(larus@microsoft.com)
diff -Nurd spim-7.4.ori/spim/Makefile spim-7.4/spim/Makefile
--- spim-7.4.ori/spim/Makefile 2009-01-23 01:51:11.000000000 -0200
+++ spim-7.4/spim/Makefile 2009-04-08 07:46:22.000000000 -0300
@@ -54,13 +54,10 @@


# Full path for the directory that will hold the executable files:
-BIN_DIR = /usr/bin

# Full path for the directory that will hold the exception handler:
-EXCEPTION_DIR = /usr/lib/spim

# Full path for the directory that will hold the man files:
-MAN_DIR = /usr/share/man/en


# If you have flex, use it instead of lex. If you use flex, define this
@@ -174,11 +171,15 @@
rm -f spim spim.exe *.o TAGS test.out lex.yy.c y.tab.c y.tab.h y.output

install: spim
- install -D spim $(BIN_DIR)/spim
- install -D -m 0444 $(CPU_DIR)/exceptions.s $(EXCEPTION_DIR)/exceptions.s
+ mkdir -p $(BIN_DIR)
+ mkdir -p $(EXCEPTION_DIR)
+ install spim $(BIN_DIR)
+ install -m 0444 $(CPU_DIR)/exceptions.s $(EXCEPTION_DIR)

install-man:
- install -D -m 0444 $(DOC_DIR)/spim.man $(MAN_DIR)
+ mv $(DOC_DIR)/spim.man $(DOC_DIR)/spim.1
+ mkdir -p $(MAN_DIR)
+ install -m 0444 $(DOC_DIR)/spim.1 $(MAN_DIR)

very-clean: clean
rm -f configuration

spim _unstable_ port .patch