# -*- 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

PortSystem          1.0
PortGroup           python 1.0

name                py-ligo-gracedb
version             2.1.2
revision            0
categories-append   science
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
license             GPL-3+

# The GPL and OpenSSL licenses conflict with each other, and our build
# dependency on Python results in an indirect dependency on OpenSSL.
# However, there is no real conflict in the case of LALSuite because Python
# is used as a separately installed interpreter.
license_noconflict  openssl

description         Gravitational-wave Candidate Event Database
long_description \
    A prototype system to organize candidate events from \
    gravitational-wave searches and to provide an environment to record \
    information about follow-ups. This package provides a simple client \
    tool to submit candidate events to the database.

homepage        https://www.lsc-group.phys.uwm.edu/daswg/projects/gracedb.html
master_sites    https://software.igwn.org/lscsoft/source/
distname        ligo-gracedb-${version}

patchfiles      runner_fix.patch
patch.pre_args  -p1

checksums           rmd160  641ab74254dd5a1888e3e20ced07806baafbb5da \
                    sha256  e19afb097420bf1681eac4f5ee2c6601d6b0fe49cc2c169200a5738142877054 \
                    size    2207473

python.versions     27 36 37 38
python.default_version  27

if {${name} ne ${subport}} {
    depends_build-append    port:py${python.version}-setuptools
    depends_lib-append      port:py${python.version}-ligo-common \
                            port:py${python.version}-six
    livecheck.type      none
}

if {${name} eq ${subport}} {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {ligo-gracedb-(\d+(?:\.\d+)*).tar.gz}
}
