# -*- 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-pysam
version             0.15.4
revision            1

categories-append   science
platforms           darwin
license             MIT BSD
maintainers         {soap.za.net:git @SoapZA} openmaintainer

description         Python interface for the SAM/BAM sequence \
                    alignment and mapping format
long_description    Pysam is a python module for reading and manipulating \
                    Samfiles. It's a lightweight wrapper of the samtools C-API.

homepage            https://github.com/pysam-developers/pysam

checksums           rmd160  9ed516489fef88f37047168aa1d126177a7f8fee \
                    sha256  a535e15cbd6e27f4ab74cabca30ca1df7eea283cb91d3b536d47fe113fee066f \
                    size    1605385

python.versions     27 36 37 38

patchfiles          patch-pysam-remove-RPATH.diff

if {${name} ne ${subport}} {
    depends_build       port:py${python.version}-setuptools \
                        port:py${python.version}-cython

    use_parallel_build  no

    depends_lib-append  port:bzip2 \
                        port:curl \
                        port:xz \
                        port:zlib

    post-extract {
        # Fix permissions
        fs-traverse item ${worksrcpath} {
            if {[file isdirectory ${item}]} {
                file attributes ${item} -permissions a+rx
            } elseif {[file isfile ${item}]} {
                file attributes ${item} -permissions a+r
            }
        }
    }

    livecheck.type      none

    configure.env       HTSLIB_MODE=shared
}
