diff --git a/lang/jython/Portfile b/lang/jython/Portfile
index d16804b..7f67e5a 100644
--- a/lang/jython/Portfile
+++ b/lang/jython/Portfile
@@ -3,7 +3,7 @@
 PortSystem          1.0
 
 name                jython
-version             2.5.2
+version             2.7.0
 categories          lang python java
 platforms           darwin
 maintainers         nomaintainer
@@ -14,13 +14,13 @@ long_description    \
     100% Pure Java, and seamlessly integrated with the \
     Java platform. It thus allows you to run Python on any \
     Java platform.
+license             PSF
 
 homepage            http://www.jython.org/
-master_sites        sourceforge:project/jython/jython/${version}
-fetch.type          svn
-set und_vers        [string map {. _} ${version}]
-svn.url             https://svn.code.sf.net/p/jython/svn/tags/Release_${und_vers}/jython
-distname            jython
+master_sites        http://search.maven.org/remotecontent?filepath=org/python/jython-installer/${version}
+fetch.type          hg
+hg.url              https://hg.python.org/jython
+hg.tag              v${version}
 
 depends_build       bin:ant:apache-ant
 depends_lib         bin:java:kaffe
@@ -28,26 +28,37 @@ depends_lib         bin:java:kaffe
 use_configure       no
 build.cmd           ant
 build.target        developer-build
+set java_ver        1.7
+set have_java       [catch { exec /usr/libexec/java_home -F -v ${java_ver} } java_home ]
+build.env           JAVA_HOME=${java_home}
 
-destroot    {
-    move ${worksrcpath}/dist/jython-dev.jar ${worksrcpath}/dist/jython.jar
-    
-    xinstall -m 755 ${worksrcpath}/dist/bin/jython ${destroot}${prefix}/bin/
-    reinplace "s|JYTHON_HOME_1=`dirname \"\$PRG\"`|JYTHON_HOME_1=${prefix}/share/java/${name}|" ${destroot}${prefix}/bin/jython
+pre-fetch {
+    if {![variant_isset installer] && ${have_java} == 1} {
+       return -code error "Java ${java_ver} is required to build from source"
+    }
+}
 
+set bin_name        jython.py
+
+destroot {
     xinstall -m 755 -d ${destroot}${prefix}/share/java/
     copy ${worksrcpath}/dist \
         ${destroot}${prefix}/share/java/${name}
 }
+
 post-destroot {
-    xinstall -m 777 -d ${destroot}${prefix}/share/java/${name}/cachedir/packages
-    system "touch ${destroot}${prefix}/share/java/${name}/cachedir/packages/blank"
+    set fp [open ${destroot}${prefix}/bin/${name} w]
+    puts $fp "#!/bin/sh"
+    puts $fp "${prefix}/share/java/${name}/bin/${bin_name} \\"
+    puts $fp "  -Dpython.cachedir=\"\$HOME/.jython_cachedir\" \"\$@\""
+    close $fp
+    system "chmod +x ${destroot}${prefix}/bin/${name}"
 }
 
 variant installer description {Use installer, rather than building from source} {
     fetch.type      standard
-    distname        ${name}_installer-${version}
-    worksrcdir      
+    distname        ${name}-installer-${version}
+    worksrcdir
     extract.suffix  .jar
     distfiles       ${distname}${extract.suffix}
     extract.cmd     cp
@@ -55,23 +66,26 @@ variant installer description {Use installer, rather than building from source}
     extract.pre_args
     extract.post_args ${worksrcpath}
     depends_build-delete bin:ant:apache-ant
-    checksums           md5     7c7d9abd8985df480edeacd27ed9dcd5 \
-                        sha1    d4534a691edf40aa1d51723dfe3e22db1e39b432 \
-                        rmd160  898f92c07a44beb76c1a51cbb5ad8c0a874f06bd
+    checksums           rmd160  4f9cf193cc9a41b1fc603d02932778d3fbeb3e11 \
+                        sha256  b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf
 
     pre-build {
         xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
     }
 
     build.cmd       java
-    build.target    
+    build.target
+    build.env
     build.args      -jar ${distname}${extract.suffix}
     build.post_args -s -d ${destroot}${prefix}/share/java/${name}
-    destroot        {
-        reinplace -E "s|^JYTHON_HOME_FALLBACK=.*|JYTHON_HOME_FALLBACK=\"${prefix}/share/java/${name}\"|" ${destroot}${prefix}/share/java/${name}/jython
-        move ${destroot}${prefix}/share/java/${name}/jython ${destroot}${prefix}/bin/
-    }
+
+    set bin_name    jython
+
+    destroot {}
 }
+
 default_variants +installer
 
-livecheck.type  sourceforge
+livecheck.type      regex
+livecheck.url       ${homepage}downloads.html
+livecheck.regex     "Jython (\\d+(?:\\.\\d+)*)"
