# -*- 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
# $Id: Portfile 107349 2013-06-26 02:42:59Z jmr@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-pylibmc
version             1.2.3
revision            2
license             BSD
platforms           darwin

maintainers         stromnov openmaintainer

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://pypi.python.org/pypi/pylibmc
master_sites        http://pypi.python.org/packages/source/p/pylibmc/
distname            pylibmc-${version}

checksums           rmd160  1c585c4457a7dfb76982dc215e6b5f8c21d1156d \
                    sha256  0157c72ce8b6aeefe52c77be5e1d059481b58127e0f9d2d6c216f6b1c68da6dc

python.versions     25 26 27

if {$subport != $name} {
    depends_lib-append  port:libmemcached

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

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

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     pylibmc-(\\d+(?:\\.\\d+)*)${extract.suffix}
}
