# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-pylibmc
version             1.6.0
revision            0
license             BSD
platforms           darwin

maintainers         nomaintainer

description         Python memcached client wrapped on libmemcached.
long_description    pylibmc is a Python wrapper around the accompanying \
                    C Python extension _pylibmc, which is a wrapper around \
                    libmemcached from TangentOrg

homepage            http://sendapatch.se/projects/pylibmc/
master_sites        pypi:p/pylibmc/
distname            pylibmc-${version}

checksums           rmd160  d427f286e6a8ea7c9daacce0f2b16b01f5314293 \
                    sha256  5ef97be4ca5527d5b87dbe77cfdd94b427028caf4136feff7da23c40e1ded6d8 \
                    size    65925

python.versions     27 34 35 36 37

if {${name} ne ${subport}} {
    depends_lib-append  port:libmemcached \
                        port:zlib

    if {${os.platform} eq "darwin" && ${os.major} <= 10} {
        patchfiles-append patch-pylibmcmodule.c.diff
    }

    build.target        build_ext
    build.args-append   --with-libmemcached=${prefix}

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE \
            ${destroot}${docdir}
    }

    livecheck.type      none
}