--- Portfile.orig	2009-10-29 11:04:05.000000000 +0100
+++ Portfile	2009-10-29 13:43:49.000000000 +0100
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name		sbcl
-version		1.0.30
+version		1.0.32
 set subrevision	""
 categories	lang
 maintainers	gwright waqar
@@ -52,6 +52,25 @@
 }
 
 patchfiles	patch-use-mach-exception-handler.diff
+platform darwin 10 {
+    set bootversion 1.0.29
+    set subbootversion "-r2"
+    global host_lisp
+
+    if {${build_arch} == "x86_64"} {
+	patchfiles-append patch-posix-tests.diff
+	distfiles-append sbcl-${bootversion}-x86_64-darwin-binary${subbootversion}${extract.suffix}
+	checksums-append sbcl-${bootversion}-x86_64-darwin-binary${subbootversion}${extract.suffix} \
+	    md5 47c99c60ec44e57070807c0890ba1c90
+	set host_lisp	"\"${workpath}/${name}-${bootversion}-x86_64-darwin/src/runtime/sbcl --core ${workpath}/${name}-${bootversion}-x86_64-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null\" "
+    } else {
+	distfiles-append sbcl-${bootversion}-x86-darwin-binary${subbootversion}${extract.suffix}
+	checksums-append sbcl-${bootversion}-x86-darwin-binary${subbootversion}${extract.suffix} \
+	    md5 6e6b027a5fd05ef0c8faee30d89ffe54
+	set host_lisp	"\"${workpath}/${name}-${bootversion}-x86-darwin/src/runtime/sbcl --core ${workpath}/${name}-${bootversion}-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null\" "
+    }
+}
+
 
 		
 distfiles	${name}-${version}-source${subrevision}${extract.suffix}
@@ -60,9 +79,9 @@
 worksrcdir	${name}-${version}
 
 checksums	${distname}${extract.suffix}				\
-                    md5     64a96ad21a5d57f27639c0801c00fe74		\
-                    sha1    446fe474566f4709d9852278e950f253a20722d6	\
-                    rmd160  96c5b38d495bbd959730162828b4d58ead245b5e
+                    md5     95e1f683e307fa4cbf053db37fbd1456		\
+                    sha1    545a034b131537f5f29b13a3cb8b2b61a932abad	\
+                    rmd160  d94c5a3589dd3c213a4dbbe4208e8ce12692bfe7
 
 post-patch	{
 	reinplace "s|/usr/local/lib/${name}|${prefix}/lib/${name}|g" \
@@ -75,7 +94,7 @@
 
 
 build		{
-	system "ulimit -s 8192"
+	system "ulimit -s 16384"
 	system "unset LD_PREBIND && unset LD_PREBIND_ALLOW_OVERLAP && cd ${worksrcpath} && sh make.sh ${host_lisp}"
 }
 

