Index: trunk/dports/emulators/simh/Portfile
===================================================================
--- trunk/dports/emulators/simh/Portfile	(revision 37840)
+++ trunk/dports/emulators/simh/Portfile	(revision 37841)
@@ -4,5 +4,5 @@
 
 name		simh
-version		v37-3
+version		v38-0
 categories	emulators
 platforms	darwin
@@ -21,5 +21,14 @@
 homepage	http://simh.trailing-edge.com
 master_sites	http://simh.trailing-edge.com/sources/
-checksums	md5 370305b11e3516d3416cbb78aedf1050
+
+checksums	md5     d4bf6b7708e1f429e1e9b3c9e3e93b24		\
+		sha1    e1afbebede7dc4b2e0f7b13fca3ee6aa8d34f9c1	\
+		rmd160  f1986d45f9b17a905957d1dca4eaa70098a7cae6
+
+patchfiles	patch-vax780_defs.h.diff	\
+		patch-vaxmod_defs.h.diff	\
+		patch-vax_cpu.c.diff		\
+		patch-sim_defs.h.diff
+
 use_zip		yes
 distname	${name}${version}
@@ -32,11 +41,18 @@
 build.target	"USE_NETWORK=1 all"
 
+build		{
+#		system "export OSTYPE"
+		system "cd ${worksrcpath} && OSTYPE=darwin make USE_NETWORK=1 all"
+}
+
 post-extract	{
-		reinplace "s|-lrt||g" ${worksrcpath}/makefile
 		reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/makefile
 }
 
 destroot {
-		set binaries [ exec ls ${worksrcpath}/BIN ]
+		set binaries {altair altairz80 eclipse gri h316 hp2100
+		    	      i1401 i1620 i7094 ibm1130 id16 id32 lgp
+			      nova pdp1 pdp10 pdp11 pdp15 pdp4 pdp7
+			      pdp8 pdp9 s3 sds vax vax780 }
 		foreach binary $binaries {
 			system "install -c -m 755 ${worksrcpath}/BIN/${binary} ${destroot}${prefix}/bin/simh-${binary}"
Index: trunk/dports/emulators/simh/files/patch-sim_defs.h.diff
===================================================================
--- trunk/dports/emulators/simh/files/patch-sim_defs.h.diff	(revision 37841)
+++ trunk/dports/emulators/simh/files/patch-sim_defs.h.diff	(revision 37841)
@@ -0,0 +1,10 @@
+--- sim_defs.h.sav	2008-06-25 14:10:17.000000000 -0400
++++ sim_defs.h	2008-06-25 14:12:21.000000000 -0400
+@@ -165,6 +165,7 @@
+ 
+ #if defined (__GNUC__)                                  /* GCC */
+ #define SIM_INLINE inline
++#define SIM_INLINE_DECL
+ #elif defined (_MSC_VER)                                /* Microsoft C Compilers */
+ #define SIM_INLINE __inline
+ #else                                                   /* default */
Index: trunk/dports/emulators/simh/files/patch-vax780_defs.h.diff
===================================================================
--- trunk/dports/emulators/simh/files/patch-vax780_defs.h.diff	(revision 37841)
+++ trunk/dports/emulators/simh/files/patch-vax780_defs.h.diff	(revision 37841)
@@ -0,0 +1,23 @@
+--- VAX/vax780_defs.h.sav	2008-06-25 14:03:21.000000000 -0400
++++ VAX/vax780_defs.h	2008-06-25 14:05:24.000000000 -0400
+@@ -411,13 +411,13 @@
+ 
+ /* Function prototypes for physical memory interface (inlined) */
+ 
+-SIM_INLINE int32 ReadB (uint32 pa);
+-SIM_INLINE int32 ReadW (uint32 pa);
+-SIM_INLINE int32 ReadL (uint32 pa);
+-SIM_INLINE int32 ReadLP (uint32 pa);
+-SIM_INLINE void WriteB (uint32 pa, int32 val);
+-SIM_INLINE void WriteW (uint32 pa, int32 val);
+-SIM_INLINE void WriteL (uint32 pa, int32 val);
++SIM_INLINE_DECL int32 ReadB (uint32 pa);
++SIM_INLINE_DECL int32 ReadW (uint32 pa);
++SIM_INLINE_DECL int32 ReadL (uint32 pa);
++SIM_INLINE_DECL int32 ReadLP (uint32 pa);
++SIM_INLINE_DECL void WriteB (uint32 pa, int32 val);
++SIM_INLINE_DECL void WriteW (uint32 pa, int32 val);
++SIM_INLINE_DECL void WriteL (uint32 pa, int32 val);
+ void WriteLP (uint32 pa, int32 val);
+ 
+ /* Function prototypes for I/O */
Index: trunk/dports/emulators/simh/files/patch-vax_cpu.c.diff
===================================================================
--- trunk/dports/emulators/simh/files/patch-vax_cpu.c.diff	(revision 37841)
+++ trunk/dports/emulators/simh/files/patch-vax_cpu.c.diff	(revision 37841)
@@ -0,0 +1,11 @@
+--- VAX/vax_cpu.c.sav	2008-06-25 14:08:05.000000000 -0400
++++ VAX/vax_cpu.c	2008-06-25 14:08:15.000000000 -0400
+@@ -372,7 +372,7 @@
+ t_stat cpu_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc);
+ t_stat cpu_show_idle (FILE *st, UNIT *uptr, int32 val, void *desc);
+ int32 cpu_get_vsw (int32 sw);
+-SIM_INLINE int32 get_istr (int32 lnt, int32 acc);
++SIM_INLINE_DECL int32 get_istr (int32 lnt, int32 acc);
+ int32 ReadOcta (int32 va, int32 *opnd, int32 j, int32 acc);
+ t_bool cpu_show_opnd (FILE *st, InstHistory *h, int32 line);
+ int32 cpu_psl_ipl_idle (int32 newpsl);
Index: trunk/dports/emulators/simh/files/patch-vaxmod_defs.h.diff
===================================================================
--- trunk/dports/emulators/simh/files/patch-vaxmod_defs.h.diff	(revision 37841)
+++ trunk/dports/emulators/simh/files/patch-vaxmod_defs.h.diff	(revision 37841)
@@ -0,0 +1,23 @@
+--- VAX/vaxmod_defs.h.sav	2008-06-25 14:03:30.000000000 -0400
++++ VAX/vaxmod_defs.h	2008-06-25 14:06:27.000000000 -0400
+@@ -448,13 +448,13 @@
+ 
+ /* Function prototypes for physical memory interface (inlined) */
+ 
+-SIM_INLINE int32 ReadB (uint32 pa);
+-SIM_INLINE int32 ReadW (uint32 pa);
+-SIM_INLINE int32 ReadL (uint32 pa);
+-SIM_INLINE int32 ReadLP (uint32 pa);
+-SIM_INLINE void WriteB (uint32 pa, int32 val);
+-SIM_INLINE void WriteW (uint32 pa, int32 val);
+-SIM_INLINE void WriteL (uint32 pa, int32 val);
++SIM_INLINE_DECL int32 ReadB (uint32 pa);
++SIM_INLINE_DECL int32 ReadW (uint32 pa);
++SIM_INLINE_DECL int32 ReadL (uint32 pa);
++SIM_INLINE_DECL int32 ReadLP (uint32 pa);
++SIM_INLINE_DECL void WriteB (uint32 pa, int32 val);
++SIM_INLINE_DECL void WriteW (uint32 pa, int32 val);
++SIM_INLINE_DECL void WriteL (uint32 pa, int32 val);
+ void WriteLP (uint32 pa, int32 val);
+ 
+ /* Function prototypes for I/O */
