diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/Portfile ./Portfile
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/Portfile	2009-12-22 21:21:11.000000000 -0500
+++ ./Portfile	2010-01-06 15:39:36.000000000 -0500
@@ -1,13 +1,14 @@
-# $Id: Portfile 61886 2009-12-23 02:21:11Z jmr@macports.org $
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 57407 2009-09-10 19:52:45Z snc@macports.org $
 
 PortSystem 1.0
 
 name            emacs
-version         22.3
-revision        2
+version         23.1
+
 categories      editors
-maintainers     nomaintainer
-description     The GNU Emacs text editor (command line only)
+maintainers     ambulatoryclam.net:dports
+description     The GNU Emacs text editor
 long_description \
     GNU Emacs is a self-documenting, customizable, extensible real-time \
     display editor. Users new to Emacs will be able to use basic        \
@@ -19,9 +20,12 @@
 platforms       darwin freebsd
 homepage        http://www.gnu.org/software/emacs/emacs.html
 master_sites    gnu
-checksums       md5 aa8ba34f548cd78b35914ae5a7bb87eb
-patchfiles	patch-Makefile.in.diff \
-		patch-leim-Makefile.in.diff
+checksums       md5     a620d4452769d04ad8864d662f34f8dd \
+                sha1    e993445d14d2fdedd1418bc32c8c4ea30442bc51 \
+                rmd160  c557149f59916b82f0ae156f87406126b03671b4
+patchfiles     	patch-unexmacosx.c.diff \
+                patch-s-darwin.h.diff
+
 configure.args  --without-x \
                 --without-carbon
 
@@ -31,14 +35,6 @@
     xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
     delete ${destroot}${prefix}/bin/ctags
     delete ${destroot}${prefix}/share/man/man1/ctags.1
-    if {[variant_isset carbon]} {
-        global version
-        delete ${destroot}${prefix}/bin/emacs ${destroot}${prefix}/bin/emacs-${version}
-    }
-}
-
-platform darwin 7 {
-    depends_build-append    port:autoconf
 }
 
 livecheck.type  regex
@@ -75,14 +71,3 @@
     depends_lib-append      lib:libgtk.2:gtk2 \
                             lib:libglib.2:glib2
 }
-
-variant carbon conflicts x11 description {Adds a Mac (Carbon) version of Emacs} {
-    configure.args-delete   --without-carbon
-    configure.args-append   --with-carbon \
-                            --enable-carbon-app=${applications_dir}
-}
-
-variant atsui requires carbon description {Adds a Mac (Carbon) version of Emacs that uses the ATSUI protocol} {
-    configure.cflags-append -DUSE_ATSUI
-}
-
diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-Makefile.in.diff ./files/patch-Makefile.in.diff
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-Makefile.in.diff	2008-08-12 15:31:09.000000000 -0400
+++ ./files/patch-Makefile.in.diff	1969-12-31 19:00:00.000000000 -0500
@@ -1,27 +0,0 @@
---- Makefile.in.orig	2008-08-11 18:46:00.000000000 +0100
-+++ Makefile.in	2008-08-11 18:48:32.000000000 +0100
-@@ -438,7 +438,6 @@
- 	      (cd $${dir}; tar -chf - . ) \
- 		| (cd $${dest}; umask 022; \
-                    tar -xvf - && cat > /dev/null) || exit 1; \
--	      find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\
- 	      for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \
- 		chmod a+rx $${subdir} ; \
- 		rm -rf $${subdir}/RCS ; \
-@@ -478,7 +477,7 @@
- 	   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); chmod a+r DOC*; \
- 	    if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
- 	else true; fi
- 	-unset CDPATH; \
-@@ -490,7 +489,6 @@
- 	   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} {} ';') ; \
- 	else true; fi
- 	-unset CDPATH; \
- 	if [ -n "${GZIP_PROG}" ]; \
diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-leim-Makefile.in.diff ./files/patch-leim-Makefile.in.diff
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-leim-Makefile.in.diff	2008-08-12 15:31:09.000000000 -0400
+++ ./files/patch-leim-Makefile.in.diff	1969-12-31 19:00:00.000000000 -0500
@@ -1,10 +0,0 @@
---- leim/Makefile.in.orig	2008-08-11 18:46:16.000000000 +0100
-+++ leim/Makefile.in	2008-08-11 18:48:39.000000000 +0100
-@@ -253,7 +253,6 @@
- 	    done) \
- 	else true; fi
- 	-chmod -R a+r ${INSTALLDIR}
--	-find ${INSTALLDIR} -exec chown $${LOGNAME:-$$USERNAME} '{}' ';'
- 
- clean mostlyclean:
- 	rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-s-darwin.h.diff ./files/patch-s-darwin.h.diff
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-s-darwin.h.diff	1969-12-31 19:00:00.000000000 -0500
+++ ./files/patch-s-darwin.h.diff	2009-11-29 00:30:41.000000000 -0500
@@ -0,0 +1,13 @@
+--- src/s/darwin.h	2009/02/04 11:31:30	1.53
++++ src/s/darwin.h	2009/08/28 22:49:58	1.54
+@@ -171,6 +171,9 @@
+ #define malloc unexec_malloc
+ #define realloc unexec_realloc
+ #define free unexec_free
++/* Don't use posix_memalign because it is not compatible with
++   unexmacosx.c.  */
++#undef HAVE_POSIX_MEMALIGN
+ #endif
+ 
+ /* The ncurses library has been moved out of the System framework in
+
diff -urN /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-unexmacosx.c.diff ./files/patch-unexmacosx.c.diff
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/editors/emacs/files/patch-unexmacosx.c.diff	1969-12-31 19:00:00.000000000 -0500
+++ ./files/patch-unexmacosx.c.diff	2009-11-29 00:29:08.000000000 -0500
@@ -0,0 +1,76 @@
+--- src/unexmacosx.c	2009/01/08 03:16:02	1.29
++++ src/unexmacosx.c	2009/08/28 22:49:46	1.30
+@@ -582,6 +582,14 @@
+       printf ("LC_UUID          ");
+       break;
+ #endif
++#ifdef LC_DYLD_INFO
++    case LC_DYLD_INFO:
++      printf ("LC_DYLD_INFO     ");
++      break;
++    case LC_DYLD_INFO_ONLY:
++      printf ("LC_DYLD_INFO_ONLY");
++      break;
++#endif
+     default:
+       printf ("unknown          ");
+     }
+@@ -819,6 +827,7 @@
+ 	       || strncmp (sectp->sectname, "__const", 16) == 0
+ 	       || strncmp (sectp->sectname, "__cfstring", 16) == 0
+ 	       || strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
++	       || strncmp (sectp->sectname, "__program_vars", 16) == 0
+ 	       || strncmp (sectp->sectname, "__objc_", 7) == 0)
+ 	{
+ 	  if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
+@@ -1086,6 +1095,36 @@
+   curr_header_offset += lc->cmdsize;
+ }
+ 
++#ifdef LC_DYLD_INFO
++/* Copy a LC_DYLD_INFO(_ONLY) load command from the input file to the output
++   file, adjusting the file offset fields.  */
++static void
++copy_dyld_info (struct load_command *lc, long delta)
++{
++  struct dyld_info_command *dip = (struct dyld_info_command *) lc;
++
++  if (dip->rebase_off > 0)
++    dip->rebase_off += delta;
++  if (dip->bind_off > 0)
++    dip->bind_off += delta;
++  if (dip->weak_bind_off > 0)
++    dip->weak_bind_off += delta;
++  if (dip->lazy_bind_off > 0)
++    dip->lazy_bind_off += delta;
++  if (dip->export_off > 0)
++    dip->export_off += delta;
++
++  printf ("Writing ");
++  print_load_command_name (lc->cmd);
++  printf (" command\n");
++
++  if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
++    unexec_error ("cannot write dyld info command to header");
++
++  curr_header_offset += lc->cmdsize;
++}
++#endif
++
+ /* Copy other kinds of load commands from the input file to the output
+    file, ones that do not require adjustments of file offsets.  */
+ static void
+@@ -1152,6 +1191,12 @@
+       case LC_TWOLEVEL_HINTS:
+ 	copy_twolevelhints (lca[i], linkedit_delta);
+ 	break;
++#ifdef LC_DYLD_INFO
++      case LC_DYLD_INFO:
++      case LC_DYLD_INFO_ONLY:
++	copy_dyld_info (lca[i], linkedit_delta);
++	break;
++#endif
+       default:
+ 	copy_other (lca[i]);
+ 	break;
+
