Index: files/patch-mzscheme-Makefile.in.diff
===================================================================
--- files/patch-mzscheme-Makefile.in.diff	(révision 0)
+++ files/patch-mzscheme-Makefile.in.diff	(révision 0)
@@ -0,0 +1,24 @@
+--- mzscheme/Makefile.in.orig	2009-03-16 02:22:47.000000000 +0100
++++ mzscheme/Makefile.in	2009-05-25 09:34:19.000000000 +0200
+@@ -320,8 +320,8 @@
+ 	$(MAKE) unix-install-cgc
+ 	mkdir -p "$(MZFWDIR)/Versions/$(FWVERSION)"
+ 	cp $(MZFW) $(MZFWDIR)/Versions/$(FWVERSION)/
+-	/usr/bin/install_name_tool -change "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "@FRAMEWORK_PREFIX@PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "$(bindir)/mzscheme@CGC_INSTALLED@"
+-	/usr/bin/strip -S "$(bindir)/mzscheme@CGC_INSTALLED@"
++	/usr/bin/install_name_tool -change "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "@FRAMEWORK_PREFIX@PLT_MzScheme.framework/Versions/$(FWVERSION)/PLT_MzScheme" "$(DESTDIR)$(bindir)/mzscheme@CGC_INSTALLED@"
++	/usr/bin/strip -S "$(DESTDIR)/$(bindir)/mzscheme@CGC_INSTALLED@"
+ 
+ osx-install-cgc-final:
+ 	$(MAKE) unix-install-cgc-final
+@@ -331,8 +331,8 @@
+ 	$(MAKE) unix-install-3m
+ 	mkdir -p "$(MZFWDIR)/Versions/$(FWVERSION)_3m"
+ 	cp $(MZFWMMM) $(MZFWDIR)/Versions/$(FWVERSION)_3m/
+-	/usr/bin/install_name_tool -change "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "@FRAMEWORK_PREFIX@PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "$(bindir)/mzscheme@MMM_INSTALLED@"
+-	/usr/bin/strip -S "$(bindir)/mzscheme@MMM_INSTALLED@"
++	/usr/bin/install_name_tool -change "@executable_path/PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "@FRAMEWORK_PREFIX@PLT_MzScheme.framework/Versions/$(FWVERSION)_3m/PLT_MzScheme" "$(DESTDIR)/$(bindir)/mzscheme@MMM_INSTALLED@"
++	/usr/bin/strip -S "$(DESTDIR)/$(bindir)/mzscheme@MMM_INSTALLED@"
+ 
+ osx-install-3m-final:
+ 	$(MAKE) unix-install-3m-final
Index: files/patch-collects-setup-unixstyle-install.ss.diff
===================================================================
--- files/patch-collects-setup-unixstyle-install.ss.diff	(révision 0)
+++ files/patch-collects-setup-unixstyle-install.ss.diff	(révision 0)
@@ -0,0 +1,11 @@
+--- ../collects/setup/unixstyle-install.ss.orig	2009-05-21 20:37:16.000000000 +0200
++++ ../collects/setup/unixstyle-install.ss	2009-05-21 20:36:39.000000000 +0200
+@@ -179,7 +179,7 @@
+                   (regexp-replace* #rx"[\"`'$\\]" (dir: 'bin) "\\\\&"))
+           (write-bytes buf (current-output-port) (cdadr m))))))
+   (let ([magic (with-input-from-file file (lambda () (read-bytes 10)))])
+-    (cond [(regexp-match #rx#"^\177ELF" magic)
++    (cond [(or (regexp-match #rx#"^\177ELF" magic) (regexp-match #rx#"^\316\372\355\376" magic))
+            (let ([temp (format "~a-temp-for-install"
+                                (regexp-replace* #rx"/" file "_"))])
+              (with-handlers ([exn? (lambda (e) (delete-file temp) (raise e))])
Index: files/patch-configure.diff
===================================================================
--- files/patch-configure.diff	(révision 0)
+++ files/patch-configure.diff	(révision 0)
@@ -0,0 +1,11 @@
+--- configure.orig	2009-05-21 18:42:53.000000000 +0200
++++ configure	2009-05-21 18:45:28.000000000 +0200
+@@ -2069,7 +2069,7 @@
+ else
+   if test "$OS" = "Darwin" ; then
+     enable_quartz=yes
+-    enable_origtree=yes
++    enable_origtree=no
+   fi
+ fi
+ 
Index: Portfile
===================================================================
--- Portfile	(révision 51362)
+++ Portfile	(copie de travail)
@@ -3,7 +3,8 @@
 PortSystem 1.0
 
 name            mzscheme
-version         372
+version         4.1.5
+epoch           1
 categories      lang scheme
 platforms       darwin
 maintainers     nomaintainer
@@ -14,15 +15,16 @@
 set subdir      ${version}/mz/
 master_sites \
   http://download.plt-scheme.org/bundles/${subdir} \
-  http://plt.cs.uchicago.edu/bundles/${subdir} \
+  http://www.eecs.northwestern.edu/plt-scheme/${subdir} \
   http://www.cs.utah.edu/plt/download/${subdir} \
-  ftp://archive.informatik.uni-tuebingen.de/unix/language/plt/${subdir} \
+  http://mirror.informatik.uni-tuebingen.de/mirror/plt/${subdir} \
   ftp://infogroep.be/pub/plt/bundles/${subdir} \
-  http://gd.tuwien.ac.at/languages/scheme/plt/${subdir}
+  http://gd.tuwien.ac.at/languages/scheme/plt/${subdir} \
+  http://russell.cs.bilgi.edu.tr/plt-bundles/${subdir}
 distfiles       mz-${version}-src-unix.tgz
-checksums           md5     c755f4ba7191636c5eb587745e4c6a67 \
-                    sha1    1601d3acc8d785656c9bbbefef6be7ea325b9b10 \
-                    rmd160  b3389d390668dec5cc5b598307e0e1080f815e2f
+checksums           md5     cc8545ac0346776c089da63b9ef1d188 \
+                    sha1    54438d051d199bb713453362fa3bc75edef277e4 \
+                    rmd160  47362cd4fc0be7b119f60390e51e54865c5c92b8
 depends_lib     port:jpeg \
                 port:libpng \
                 port:libiconv
@@ -30,6 +32,8 @@
 worksrcdir      mz-${version}/src
 set frameworks  ${prefix}/Library/Frameworks
 
+patchfiles patch-configure.diff patch-collects-setup-unixstyle-install.ss.diff patch-mzscheme-Makefile.in.diff
+
 post-patch {
   reinplace "s|collects|share/mzscheme|g" \
     ${worksrcpath}/mzscheme/src/startup.ss \
@@ -38,28 +42,26 @@
     ${worksrcpath}/mzscheme/src/file.c
   reinplace "s|@FRAMEWORK_INSTALL_DIR@|${destroot}${frameworks}|" \
     ${worksrcpath}/mzscheme/Makefile.in
+  reinplace "s|-I\$(srcdir)|-iquote \$(srcdir)|g" \
+    ${worksrcpath}/foreign/gcc/libffi/include/Makefile.in \
+    ${worksrcpath}/foreign/gcc/libffi/Makefile.in \
+    ${worksrcpath}/foreign/Makefile.in \
+    ${worksrcpath}/Makefile.in \
+    ${worksrcpath}/mzscheme/dynsrc/Makefile.in \
+    ${worksrcpath}/mzscheme/gc/doc/Makefile.in \
+    ${worksrcpath}/mzscheme/gc/include/Makefile.in \
+    ${worksrcpath}/mzscheme/gc/Makefile.in \
+    ${worksrcpath}/mzscheme/gc2/Makefile.in \
+    ${worksrcpath}/mzscheme/Makefile.in \
+    ${worksrcpath}/mzscheme/sgc/Makefile.in \
+    ${worksrcpath}/mzscheme/src/Makefile.in    
 }
 
 configure.args  --enable-libfw
 
-destroot.destdir    prefix=${destroot}${prefix}
 post-destroot {
-  file delete -force ${destroot}${prefix}/install \
-    ${destroot}${prefix}/share/man
-  file rename ${destroot}${prefix}/collects \
-    ${destroot}${prefix}/share/mzscheme
-  xinstall -m 755 -d ${destroot}${prefix}/share/doc/ \
-    ${destroot}${prefix}/share/mzscheme/${version}/
-  file rename ${destroot}${prefix}/man \
-    ${destroot}${prefix}/share/man
-  file rename ${destroot}${prefix}/doc \
-    ${destroot}${prefix}/share/doc
-  file delete -force ${destroot}${prefix}/lib/buildinfo
-
   ln -s ${frameworks}/PLT_MzScheme.framework/Versions/${version}/PLT_MzScheme \
     ${destroot}${prefix}/lib/libmzscheme.${version}.dylib
   
   system "/usr/bin/install_name_tool -change PLT_MzScheme.framework/Versions/${version}_3m/PLT_MzScheme ${frameworks}/PLT_MzScheme.framework/Versions/${version}_3m/PLT_MzScheme ${destroot}${prefix}/bin/mzscheme"
-
-  ln -s .. ${destroot}${prefix}/share/mzscheme/${version}/collects
 }
