# -*- 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.1
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  c12e997e5ed700434b47a01a0001e753a5ab9470 \
                    sha256  8a8dd406487d419d58c6d944efd91e8189b360a0c4d9e8c6ebe3990d646ae7e9 \
                    size    64227

python.versions     27 35 36 37 38

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
}