diff -Naur emacs-22.1.orig/01carbon-emacs.el emacs-22.1/01carbon-emacs.el
--- emacs-22.1.orig/01carbon-emacs.el	1970-01-01 00:00:00.000000000 +0000
+++ emacs-22.1/01carbon-emacs.el	2007-06-08 13:59:50.000000000 +0000
@@ -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 emacs-22.1.orig/Emacs.finkwrap emacs-22.1/Emacs.finkwrap
--- emacs-22.1.orig/Emacs.finkwrap	1970-01-01 00:00:00.000000000 +0000
+++ emacs-22.1/Emacs.finkwrap	2006-03-06 15:42:52.000000000 +0000
@@ -0,0 +1,3 @@
+#!/bin/bash
+. @PREFIX@/bin/init.sh
+exec -a "$0" "$0.bin" "$@"
diff -Naur emacs-22.1.orig/Makefile.in emacs-22.1/Makefile.in
--- emacs-22.1.orig/Makefile.in	2007-05-14 14:56:28.000000000 +0000
+++ emacs-22.1/Makefile.in	2007-06-07 13:14:37.000000000 +0000
@@ -436,8 +436,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} {} ';' ;\
+                   tar -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 ; \
@@ -476,8 +475,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; tar -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 -f DOC; fi); \
 	else true; fi
 	-unset CDPATH; \
@@ -488,8 +487,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; tar -xvf - --no-same-owner --no-same-permissions && cat > /dev/null) || exit 1; \
 	else true; fi
 	-unset CDPATH; \
 	if [ -n "${GZIP_PROG}" ]; \
diff -Naur emacs-22.1.orig/configure emacs-22.1/configure
--- emacs-22.1.orig/configure	2007-05-25 12:43:29.000000000 +0000
+++ emacs-22.1/configure	2007-06-07 13:14:37.000000000 +0000
@@ -1807,7 +1807,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
 
@@ -22935,6 +22935,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 emacs-22.1.orig/emacs.bash emacs-22.1/emacs.bash
--- emacs-22.1.orig/emacs.bash	1970-01-01 00:00:00.000000000 +0000
+++ emacs-22.1/emacs.bash	2006-03-06 15:42:52.000000000 +0000
@@ -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 emacs-22.1.orig/fix-info emacs-22.1/fix-info
--- emacs-22.1.orig/fix-info	1970-01-01 00:00:00.000000000 +0000
+++ emacs-22.1/fix-info	2007-06-07 13:22:34.000000000 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+THE_INFO_PREFIX=$1
+
+for file in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
+           elisp eintr emacs emacs-mime eshell eudc flymake \
+           forms gnus idlwave info message mh-e newsticker org pcl-cvs \
+           pgg reftex sc ses sieve speedbar tramp vip viper widget \
+           woman smtpmail url rcirc erc
+do
+    ./mangle-info ${THE_INFO_PREFIX}/${file}
+done
diff -Naur emacs-22.1.orig/lisp/startup.el emacs-22.1/lisp/startup.el
--- emacs-22.1.orig/lisp/startup.el	2007-05-14 14:56:29.000000000 +0000
+++ emacs-22.1/lisp/startup.el	2007-06-07 13:14:37.000000000 +0000
@@ -292,6 +292,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.")
 
@@ -815,8 +819,20 @@
     ;; be loaded from site-run-file and wants to test if -q was given
     ;; should check init-file-user instead, since that is already set.
     ;; See cus-edit.el for an example.
+
+    ;; (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 screen.
diff -Naur emacs-22.1.orig/mangle-info emacs-22.1/mangle-info
--- emacs-22.1.orig/mangle-info	1970-01-01 00:00:00.000000000 +0000
+++ emacs-22.1/mangle-info	2006-03-06 15:42:52.000000000 +0000
@@ -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};
