Ticket #37334: Portfile.2

File Portfile.2, 2.8 KB (added by petrrr, 11 years ago)
Line 
1# -*- 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
2# $Id$
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                py-obspy
8version             0.8.3
9categories-append   science
10platforms           darwin
11supported_archs     noarch
12maintainers         bo.ingv.it:Peter.Danecek openmaintainer
13
14license             LGPL-3
15
16description         Python framework for processing seismological data
17long_description    ObsPy is an open-source project dedicated to provide a Python \
18                    framework for processing seismological data. It provides \
19                    support for file formats and signal processing routines \
20                    which allow the manipulation, analysis and visualization \
21                    of seismological time series. The goal of the ObsPy project is \
22                    to facilitate rapid application development for seismology.
23
24homepage            http://obspy.org/
25
26use_zip             yes
27distname            obspy-${version}
28master_sites        http://pypi.python.org/packages/source/o/obspy
29
30checksums           md5    ffb704ed3a33f0299a8e0352437e6639 \
31                    rdm160 4c74a75a8a26073dd5f016410cece3391d7ad712 \
32                    sha256 b14d44b0645d7eca2f1e1d50ffc157a8df7594f407a2ca66aedc19506b3d5813
33
34python.versions     26 27
35
36if {${subport} != ${name}} {
37    depends_build         port:py${python.version}-distribute
38    depends_lib-append    port:py${python.version}-numpy \
39                          port:py${python.version}-scipy \
40                          port:py${python.version}-lxml \
41                          port:py${python.version}-suds \
42                          port:py${python.version}-sqlalchemy
43}
44
45# hook to deactivate old installations of py-obspy-core ("deactivate hack")
46pre-activate { 
47    if {${subport} == ${name}} {
48        if {[file exists ${prefix}/share/doc/py-obspy-core/README ]
49            && ![catch {set vers [lindex [registry_active py-obspy-core] 0]}] 
50            && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} { 
51            registry_deactivate py-obspy-core "" [list ports_nodepcheck 1] 
52        }
53    } else {
54        if {${python.version} == 26
55            && [file exists ${prefix}/bin/obspy-runtests-2.6 ]
56            && ![catch {set vers [lindex [registry_active py26-obspy-core] 0]}] 
57            && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} { 
58            registry_deactivate py26-obspy-core "" [list ports_nodepcheck 1] 
59        }
60        if {${python.version} == 27
61            && [file exists ${prefix}/bin/obspy-runtests-2.7 ]
62            && ![catch {set vers [lindex [registry_active py26-obspy-core] 0]}] 
63            && [rpm-vercomp [lindex $vers 1] 0.8.0] < 0} { 
64            registry_deactivate py27-obspy-core "" [list ports_nodepcheck 1] 
65        }
66    }
67}