Index: files/patch-sitemap_gen_py.diff
===================================================================
--- files/patch-sitemap_gen_py.diff	(revision 0)
+++ files/patch-sitemap_gen_py.diff	(revision 0)
@@ -0,0 +1,40 @@
+--- sitemap_gen.py	(revision 36)
++++ sitemap_gen.py	(working copy)
+@@ -62,7 +62,7 @@
+ import fnmatch
+ import glob
+ import gzip
+-import md5
++import hashlib
+ import os
+ import re
+ import stat
+@@ -425,7 +425,7 @@
+     """ Output and count a warning.  Suppress duplicate warnings. """
+     if text:
+       text = encoder.NarrowText(text, None)
+-      hash = md5.new(text).digest()
++      hash = hashlib.md5(text).digest()
+       if not self._warns_shown.has_key(hash):
+         self._warns_shown[hash] = 1
+         print '[WARNING] ' + text
+@@ -438,7 +438,7 @@
+     """ Output and count an error.  Suppress duplicate errors. """
+     if text:
+       text = encoder.NarrowText(text, None)
+-      hash = md5.new(text).digest()
++      hash = hashlib.md5(text).digest()
+       if not self._errors_shown.has_key(hash):
+         self._errors_shown[hash] = 1
+         print '[ERROR] ' + text
+@@ -648,8 +648,8 @@
+     if not self.loc:
+       return None
+     if self.loc.endswith('/'):
+-      return md5.new(self.loc[:-1]).digest()
+-    return md5.new(self.loc).digest()
++      return hashlib.md5(self.loc[:-1]).digest()
++    return hashlib.md5(self.loc).digest()
+   #end def MakeHash
+ 
+   def Log(self, prefix='URL', level=3):
Index: Portfile
===================================================================
--- Portfile	(revision 84028)
+++ Portfile	(working copy)
@@ -1,30 +1,39 @@
 # $Id$
 
-PortSystem 1.0
-PortGroup python26 1.0
-name			sitemap_gen
-version			1.4
-categories		www python
-platforms		darwin
-maintainers		google.com:mstokely
-description		sitecopy website maintenance utility
-long_description The sitemap_gen.py script analyzes your web server \
-		and generates one or more Sitemap files. These files \
-		are XML listings of content you make available on your \
-		web server. The files can then be directly submitted \
-		to Google. \
-		Written by opensource@google.com.
-homepage		https://www.google.com/webmasters/sitemaps/docs/en/about.html
-master_sites    sourceforge:goog-sitemapgen
-checksums	md5 0cd37e1295631b5b1ac484cfac321297 \
-		sha1 693a041b0e7d9446766446291b2a80892399337c \
-		rmd160 b03442238c331f0f835d5e886de8094d3836bb33
+PortSystem          1.0
+PortGroup           python26 1.0
+name                sitemap_gen
+version             1.5
+categories          www python
+platforms           darwin
+maintainers         google.com:mstokely
+description         sitecopy website maintenance utility
+long_description    The sitemap_gen.py script analyzes your web server \
+                    and generates one or more Sitemap files. These files \
+                    are XML listings of content you make available on your \
+                    web server. The files can then be directly submitted \
+                    to Google.
 
+homepage            http://code.google.com/p/sitemap-generators/
+master_sites        googlecode:sitemap-generators
+distname            ${name}_${version}
+checksums           md5     98754e802722c0cc2ffcc8aedead67b6 \
+                    sha1    37126d3cb484ae28a6c7ff1ba8b2c96d2d79d1e8 \
+                    rmd160  3b781f8cfc8618263bb852ef58836e4ef1527ea5
+
+extract.mkdir       yes
+patchfiles          patch-sitemap_gen_py.diff
 post-destroot {
-	xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 0755 ${worksrcpath}/${name}.py ${destroot}${prefix}/bin/${name}
-	xinstall -m 0644 -W ${worksrcpath} COPYING README example_config.xml \
-		example_urllist.txt ${destroot}${prefix}/share/doc/${name}
-	reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.6|" \
-		${destroot}${prefix}/bin/sitemap_gen
+    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
+    xinstall -d -m 0755 ${destroot}${prefix}/share/examples/${name}
+    xinstall -m 0644 -W ${worksrcpath} \
+        AUTHORS ChangeLog COPYING README \
+        ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 0644 -W ${worksrcpath} \
+        example_config.xml example_urllist.txt \
+        ${destroot}${prefix}/share/examples/${name}
+
+    xinstall -m 0755 ${worksrcpath}/${name}.py ${destroot}${prefix}/bin/${name}
+    reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.6|" \
+        ${destroot}${prefix}/bin/sitemap_gen
 }
