--- Portfile	2009-09-10 16:02:42.000000000 -0400
+++ /Users/macports/Downloads/Portfile	2009-08-30 10:31:39.000000000 -0400
@@ -1,9 +1,9 @@
-# $Id: Portfile 57407 2009-09-10 19:52:45Z snc@macports.org $
+# $Id$
 
 PortSystem 1.0
 
 name            emacs
-version         22.3
+version         23.1
 revision        1
 categories      editors
 maintainers     gmail.com:darren.bane
@@ -19,11 +19,8 @@
 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
-configure.args  --without-x \
-                --without-carbon
+checksums       md5 a620d4452769d04ad8864d662f34f8dd
+configure.args  --with-x-toolkit=no
 
 depends_lib     port:ncurses
 
@@ -31,31 +28,25 @@
     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
+livecheck.check regex
 livecheck.url   http://ftp.gnu.org/gnu/emacs/?C=M&O=D
 livecheck.regex ${name}-(\\d+\\.\\d+\\w*)\\.tar
 
 variant x11 description {Builds emacs as a X11 program with Lucid widgets} {
-    configure.args-delete   --without-x
+    configure.args-delete   --with-x-toolkit=no
     configure.args-append   --with-x-toolkit=lucid \
-                            --without-carbon \
                             --with-xpm \
                             --with-jpeg \
                             --with-tiff \
                             --with-gif \
                             --with-png
     depends_lib-append      port:xorg-libXmu \
-                            port:xorg-libXaw \
                             port:xpm \
                             lib:libjpeg:jpeg \
                             lib:libtiff:tiff \
@@ -76,13 +67,3 @@
                             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
-}
-

