--- Portfile.orig	2009-05-27 10:52:59.000000000 +0200
+++ Portfile	2009-05-27 11:19:44.000000000 +0200
@@ -1,9 +1,11 @@
-# $Id: Portfile 51114 2009-05-18 15:39:08Z jeremyhu@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 2009-05-27 JrCs $
 
 PortSystem      1.0
 
 name            xemacs
-version         21.4.22
+version         21.5.29
 set sumo_date   2009-02-17
 categories      editors x11
 platforms       darwin
@@ -16,43 +18,47 @@
     Emacs, in particular GNU Emacs.
 
 homepage        http://www.xemacs.org
-master_sites    http://ftp.xemacs.org/pub/xemacs/xemacs-21.4/:xemacs \
-                ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.4/:xemacs \
+master_sites    http://ftp.xemacs.org/pub/xemacs/xemacs-21.5/:xemacs \
+                ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.5/:xemacs \
                 http://ftp.xemacs.org/pub/xemacs/packages/:package \
                 ftp://ftp.xemacs.org/pub/xemacs/packages/:package \
                 http://mirrors.ibiblio.org/pub/mirrors/xemacs/packages/:package
 
-use_bzip2       yes
 set xemacs_dist ${name}-${version}${extract.suffix}
 set sumo_dist   ${name}-sumo-${sumo_date}${extract.suffix}
 set mule_dist   ${name}-mule-sumo-${sumo_date}${extract.suffix}
 
 distfiles       ${xemacs_dist}:xemacs ${sumo_dist}:package ${mule_dist}:package
 
-checksums           xemacs-21.4.22.tar.bz2 \
-                    md5     060bf7565cb3233c6e7071354e9a23a4 \
-                    sha1    67876eb2bbedc02e7b660db8b4c31b5b98be865e \
-                    rmd160  0e747204bda24b1b1520b81a301f7c8573a76231 \
-                    xemacs-sumo-2009-02-17.tar.bz2 \
-                    md5     4ccf48e0ef0c37858dd0240f6343402a \
-                    sha1    13eab46524c8e9070e71289c06d49e831e48b7b2 \
-                    rmd160  a9912b3720e2b6d91017f14b6e5c11275acdeefd \
-                    xemacs-mule-sumo-2009-02-17.tar.bz2 \
-                    md5     e24b5544961e8f56e6adf1742eaf4078 \
-                    sha1    dc50bc3b62e5ff1cd766c7e4f31880bd200caad5 \
-                    rmd160  506b7465687ff9dafe26f46e049b6aad8915eb49
+checksums       xemacs-21.5.29.tar.gz \
+                md5     5364192ae0d3de23d9f4ce197e6493b5 \
+                sha1    0815975a2a7e9720d1a8fe0b347b0f977786e2a5 \
+                rmd160  96b951fd44915b3b73a9d69a7ab80c1237fdecc7 \
+                xemacs-sumo-2009-02-17.tar.gz \
+                md5     d2d59fbab3bddc4d07cb756671ad8589 \
+                sha1    61ce4ca12eeffeb42a2b65ea394192ca6ea70f42 \
+                rmd160  ca54e474f3cef4e717067204599ecaf0570304c3 \
+                xemacs-mule-sumo-2009-02-17.tar.gz \
+                md5     cd851669fe748370827eab3dd8ca9599 \
+                sha1    feab4c720f4cb8c28c9b5864add23e01966cb2aa \
+                rmd160  0d97c461b7a278437b4c73f224127af35734f628
 
 configure.args  --mandir=${prefix}/share/man \
+                --with-system-packages=${prefix}/share/xemacs \
+                --with-pdump \
                 --without-postgresql \
                 --without-ldap \
                 --with-sound=none \
-                --pdump \
-                --site-prefixes=${prefix} \
                 --with-tty \
+                --with-ncurses \
                 --with-dialogs=athena \
                 --with-widgets=athena \
                 --with-athena=3d \
                 --with-database=gdbm \
+                --with-zlib \
+                --with-png \
+                --with-jpeg \
+                --with-tiff \
                 --with-mule
 
 depends_lib     port:libpng port:Xaw3d port:ncurses port:gdbm port:jpeg \
@@ -60,18 +66,17 @@
 
 destroot.args   prefix=${destroot}${prefix} mandir=${destroot}${prefix}/share/man/man1
 
-destroot.keepdirs ${destroot}${prefix}/lib/xemacs
+destroot.keepdirs ${destroot}${prefix}/share/xemacs
 post-destroot {
-    set xemacs_lib ${destroot}${prefix}/lib/xemacs-${version}
-    xinstall -d -m 0555 ${xemacs_lib}
-    system "cd ${destroot}${prefix}/lib && ln -s xemacs-${version} xemacs"
+    set xemacs_pkg_dir ${destroot}${prefix}/share/xemacs
+    xinstall -d -m 0555 ${xemacs_pkg_dir}
     if {[file exists ${workpath}/mule-packages]} {
         ui_debug "Installing mule-sumo distribution into destroot"
-        file copy ${workpath}/mule-packages ${xemacs_lib}/
+        file copy ${workpath}/mule-packages ${xemacs_pkg_dir}/
     }
     if {[file exists ${workpath}/xemacs-packages]} {
         ui_debug "Installing sumo distribution into destroot"
-        file copy ${workpath}/xemacs-packages ${xemacs_lib}
+        file copy ${workpath}/xemacs-packages ${xemacs_pkg_dir}
     }
 }
 
@@ -81,4 +86,3 @@
     depends_lib-delete    port:gettext
     distfiles-delete      ${sumo_dist}:package ${mule_dist}:package
 }
-
