diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/01carbon-emacs.el emacs-22.0.50.cvs20060316/01carbon-emacs.el
--- emacs-22.0.50.cvs20060316.orig/01carbon-emacs.el	Thu Jan  1 00:00:00 1970
+++ emacs-22.0.50.cvs20060316/01carbon-emacs.el	Mon Mar  6 15:42:52 2006
@@ -0,0 +1,13 @@
+(if (eq window-system 'mac)
+  (progn
+    ;; append "PREFIX/sbin" "PREFIX/bin" to exec-path
+    (if (not (member "@PREFIX@/sbin" exec-path))
+    	(setq exec-path (append '("@PREFIX@/sbin") exec-path))
+    )
+    (if (not (member "@PREFIX@/bin" exec-path))
+	(setq exec-path (append '("@PREFIX@/bin") exec-path))
+      )
+
+    ;; inline image support
+    (auto-image-file-mode)
+  ))
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/Emacs.finkwrap emacs-22.0.50.cvs20060316/Emacs.finkwrap
--- emacs-22.0.50.cvs20060316.orig/Emacs.finkwrap	Thu Jan  1 00:00:00 1970
+++ emacs-22.0.50.cvs20060316/Emacs.finkwrap	Mon Mar  6 15:42:52 2006
@@ -0,0 +1,3 @@
+#!/bin/bash
+. @PREFIX@/bin/init.sh
+exec -a "$0" "$0.bin" "$@"
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/Makefile.in emacs-22.0.50.cvs20060316/Makefile.in
--- emacs-22.0.50.cvs20060316.orig/Makefile.in	Fri Mar  3 12:00:55 2006
+++ emacs-22.0.50.cvs20060316/Makefile.in	Sun Mar 19 12:43:18 2006
@@ -422,8 +422,7 @@
 	  && (echo "Copying $${dir} to $${dest}..." ; \
 	      (cd $${dir}; tar -chf - . ) \
 		| (cd $${dest}; umask 022; \
-                   tar -xvf - && cat > /dev/null) || exit 1; \
-	      find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\
+                   gtar -xvf - --no-same-owner --no-same-permissions && cat > /dev/null) || exit 1; \
 	      for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \
 		chmod a+rx $${subdir} ; \
 		rm -rf $${subdir}/RCS ; \
@@ -462,8 +461,8 @@
 	then \
 	   echo "Copying etc/DOC-* to $(DESTDIR)${docdir} ..." ; \
 	   (cd ./etc; tar -chf - DOC*) \
-	     |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
-	   (cd $(DESTDIR)$(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
+	     |(cd $(DESTDIR)${docdir}; umask 022; gtar -xvf - --no-same-owner --no-same-permissions && cat > /dev/null) || exit 1; \
+	   (cd $(DESTDIR)$(docdir); chmod a+r DOC*; \
 	    if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \
 	else true; fi
 	-unset CDPATH; \
@@ -474,8 +473,7 @@
 	then \
 	   echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
 	   (cd lisp; tar -chf - *.el *.elc) \
-	     |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
-	   (cd $(DESTDIR)${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \
+	     |(cd $(DESTDIR)${lispdir}; umask 022; gtar -xvf - --no-same-owner --no-same-permissions && cat > /dev/null) || exit 1; \
 	else true; fi
 	-unset CDPATH; \
 	if [ -n "${GZIP_PROG}" ]; \
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/configure emacs-22.0.50.cvs20060316/configure
--- emacs-22.0.50.cvs20060316.orig/configure	Fri Mar  3 11:32:03 2006
+++ emacs-22.0.50.cvs20060316/configure	Sun Mar 19 12:36:55 2006
@@ -1359,7 +1359,7 @@
 etcdir='${datadir}/emacs/${version}/etc'
 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
 docdir='${datadir}/emacs/${version}/etc'
-gamedir='${localstatedir}/games/emacs'
+gamedir='${localstatedir}/games/@EMACS-FLAVOR@'
 
 gameuser=games
 
@@ -22782,6 +22782,7 @@
 echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
    { (exit 1); exit 1; }; }
 fi
+version="@EMACS-VERSION@"
 
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/emacs.bash emacs-22.0.50.cvs20060316/emacs.bash
--- emacs-22.0.50.cvs20060316.orig/emacs.bash	Thu Jan  1 00:00:00 1970
+++ emacs-22.0.50.cvs20060316/emacs.bash	Mon Mar  6 15:42:52 2006
@@ -0,0 +1,3 @@
+#!/bin/bash
+exec -a "@PREFIX@/Applications/Emacs22.app/Contents/MacOS/Emacs" \
+    "@PREFIX@/Applications/Emacs22.app/Contents/MacOS/Emacs.bin" "$@"
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/fix-info emacs-22.0.50.cvs20060316/fix-info
--- emacs-22.0.50.cvs20060316.orig/fix-info	Thu Jan  1 00:00:00 1970
+++ emacs-22.0.50.cvs20060316/fix-info	Mon Mar  6 15:42:52 2006
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+THE_INFO_PREFIX=$1
+
+for file in ada-mode autotype ccmode cl dired-x ebrowse ediff efaq \
+            emacs emacs-mime eshell eudc forms gnus idlwave info message mh-e \
+            pcl-cvs reftex sc speedbar vip viper widget woman
+do
+    ./mangle-info ${THE_INFO_PREFIX}/${file}
+done
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/lisp/startup.el emacs-22.0.50.cvs20060316/lisp/startup.el
--- emacs-22.0.50.cvs20060316.orig/lisp/startup.el	Mon Feb 27 01:56:19 2006
+++ emacs-22.0.50.cvs20060316/lisp/startup.el	Sun Mar 19 12:36:55 2006
@@ -289,6 +289,10 @@
 
 (defvar default-frame-background-mode)
 
+(defconst fink-emacs-flavor '@EMACS-FLAVOR@
+  "A symbol representing the particular fink flavor of emacs running.
+Something like 'emacs20, 'xemacs20, etc.")
+
 (defvar pure-space-overflow nil
   "Non-nil if building Emacs overflowed pure space.")
 
@@ -806,8 +810,20 @@
     ;; Run the site-start library if it exists.  The point of this file is
     ;; that it is run before .emacs.  There is no point in doing this after
     ;; .emacs; that is useless.
+
+    ;; (if site-run-file
+    ;;     (load site-run-file t t))
+
+    ;; Fink version of site-start.
     (if site-run-file
-	(load site-run-file t t))
+        (progn
+          ;; Load all the fink package snippets.
+          ;; It's in here because we want -q to kill it too.
+          (if (load "fink-startup" t t nil)
+              (fink-startup fink-emacs-flavor))
+          ;; Now the normal site file...
+          (load site-run-file t t nil)))
+
 
     ;; Sites should not disable this.  Only individuals should disable
     ;; the startup message.
diff -Naur --exclude=*.orig emacs-22.0.50.cvs20060316.orig/mangle-info emacs-22.0.50.cvs20060316/mangle-info
--- emacs-22.0.50.cvs20060316.orig/mangle-info	Thu Jan  1 00:00:00 1970
+++ emacs-22.0.50.cvs20060316/mangle-info	Mon Mar  6 15:42:52 2006
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w -i
+
+use English;
+use strict;
+
+$RS = undef;
+
+my $prefix = "@EMACS-FLAVOR@";
+
+my $x = <>;
+if(!($x =~ m/^(\s*START-INFO-DIR-ENTRY\s+\*\s*[^:]+:\s*)\(([^\)]+)\)/mo)) {
+  die "Couldn't find START-INFO-DIR-ENTRY.";
+}
+   
+print ${PREMATCH};
+print "$1($prefix/$2)";
+print ${POSTMATCH};
