--- Portfile.MP	2014-02-10 18:35:02.000000000 +0100
+++ Portfile	2014-02-10 17:03:59.000000000 +0100
@@ -4,49 +4,63 @@
 PortSystem          1.0
 PortGroup           python 1.0
 
+set _name           obspy
+set _n              [string index ${_name} 0]
+
 name                py-obspy
-version             0.8.4
-revision            2
+version             0.9.0
 categories-append   science
 platforms           darwin
-maintainers         bo.ingv.it:Peter.Danecek openmaintainer
-
 license             LGPL-3
 
+maintainers         bo.ingv.it:Peter.Danecek openmaintainer
+
 description         Python framework for processing seismological data
 
-long_description    ObsPy is an open-source project dedicated to provide a Python \
-                    framework for processing seismological data. It provides \
-                    support for file formats and signal processing routines \
-                    which allow the manipulation, analysis and visualization \
-                    of seismological time series. The goal of the ObsPy project is \
-                    to facilitate rapid application development for seismology.
+long_description    \
+    This port provides a development snapshot of the ObsPy package. \
+    ObsPy is an open-source project dedicated to provide a Python framework \
+    for processing seismological data. It provides support for file formats \
+    and signal processing routines which allow the manipulation, analysis \
+    and visualization of seismological time series. The goal of the ObsPy \
+    project is to facilitate rapid application development for seismology.
 
-homepage            http://obspy.org/
+homepage            http://www.obspy.org/
 
 use_zip             yes
-distname            obspy-${version}
-master_sites        https://pypi.python.org/packages/source/o/obspy/
+distname            ${_name}-${version}
+master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/
 
-checksums           md5     9da79d3a0604d433085ad4dc0e430100 \
-                    rmd160  4a5b6e486304cd4e0a96d94ddc8bf88eb0a6f574 \
-                    sha256  6e9e0a5c0e673ae41d64ca265d4abdadf2b83a60ff27c516a8dbb0e2b38965cf
+checksums           md5     f720f675e66e8b2b6518e41b9ab9ada4 \
+                    rmd160  b58932bc76e1bd21a2280d78aa868c767e3491b1 \
+                    sha256  91367c7d1b63a4289b4a0ee84d49978d7523776da10629aa40a3aab197fad5e7
 
 python.versions     26 27
 
 if {${name} ne ${subport}} {
-    depends_build-append    port:py${python.version}-setuptools
+    depends_build-append    port:py${python.version}-numpy
+    # Note: setuptools required only for developers
+
     depends_lib-append      port:py${python.version}-numpy \
                             port:py${python.version}-scipy \
                             port:py${python.version}-lxml \
                             port:py${python.version}-suds \
-                            port:py${python.version}-sqlalchemy
+                            port:py${python.version}-sqlalchemy \
+                            port:py${python.version}-matplotlib
+
+    # Note: Required for post-installation testing only
+    depends_run-append      port:py${python.version}-flake8 \
+                            port:py${python.version}-nose \
+                            port:py${python.version}-mock
 
     # py-scipy is not universal
     universal_variant       no
 
+    # Note: temporary workaround for numpy.distutils behaviour
     patchfiles              patch-setup.py.diff
 
+    # Check if and how to use compiler portgroup ...
+    #
     set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
     set default_fortran_variant +gcc48
 
@@ -86,11 +100,14 @@
             depends_build-append port:gcc${ver_no_dot}
 
             configure.fc  ${prefix}/bin/gfortran-mp-${ver}
-            compiler.library_path ${prefix}/lib/gcc${ver_no_dot}
+            configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+            configure.f90 ${prefix}/bin/gfortran-mp-${ver}
         }
     }
-}
 
-livecheck.type      regex
-livecheck.url       ${master_sites}
-livecheck.regex     ">obspy-(\\d+\\.\\d+\\.\\d+)\\.zip<"
+    livecheck.type  none
+} else {
+    livecheck.type  regex
+    livecheck.url   [lindex ${master_sites} 0]
+    livecheck.regex ">${_name}-(\\d+(\\.\\d+)+)\\${extract.suffix}<"
+}
