# -*- 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 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-obspy
version             0.8.3
revision            1
categories-append   science
platforms           darwin
maintainers         bo.ingv.it:Peter.Danecek openmaintainer

license             LGPL-3

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.

homepage            http://obspy.org/

use_zip             yes
distname            obspy-${version}
master_sites        http://pypi.python.org/packages/source/o/obspy

checksums           md5     ffb704ed3a33f0299a8e0352437e6639 \
                    rmd160  4c74a75a8a26073dd5f016410cece3391d7ad712 \
                    sha256  b14d44b0645d7eca2f1e1d50ffc157a8df7594f407a2ca66aedc19506b3d5813

python.versions     26 27

if {${subport} != ${name}} {
    depends_build       port:py${python.version}-setuptools
    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

    # py-scipy is not universal
    universal_variant   no

    patchfiles          patch-setup.py.diff

    variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Compile with gcc 4.3} {
        depends_lib-append port:gcc43
        configure.compiler macports-gcc-4.3
    }

    variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Compile with gcc 4.4} {
        depends_lib-append port:gcc44
        configure.compiler macports-gcc-4.4
    }

    variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Compile with gcc 4.5} {
        depends_lib-append port:gcc45
        configure.compiler macports-gcc-4.5
    }

    variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Compile with gcc 4.6} {
        depends_lib-append port:gcc46
        configure.compiler macports-gcc-4.6
    }

    variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Compile with gcc 4.7} {
        depends_lib-append port:gcc47
        configure.compiler macports-gcc-4.7
    }

    if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
        default_variants +gcc47
    }
}
