# -*- 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
# $Id: Portfile 120037 2014-05-14 12:19:42Z stromnov@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-zmq
version             14.3.0
revision            0
categories-append   devel net
platforms           darwin
license             LGPL

python.versions     26 27 31 32 33 34

maintainers         gmail.com:jrjsmrtn openmaintainer

description         Python bindings for ØMQ

long_description    PyZMQ is a lightweight and super-fast messaging library \
                    built on top of the ZeroMQ library.

homepage            http://github.com/zeromq/pyzmq
master_sites        http://pypi.python.org/packages/source/p/pyzmq/

distname            pyzmq-${version}

checksums           rmd160  e12a0a86e1bc37e2d51d301aa279bef007d677db \
                    sha256  c9ea255e868308b1b85f9ed2de73a2d8c23573f4111f692fdd2e6d5f8ec64660

if {${name} ne ${subport}} {
    depends_lib-append     path:lib/libzmq.dylib:zmq

    post-patch {
        set setup_cfg ${worksrcpath}/setup.cfg
        file copy ${worksrcpath}/setup.cfg.template ${setup_cfg}
        reinplace "s|/usr/local|${prefix}|g" ${setup_cfg}
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       ${master_sites}
    livecheck.regex     {pyzmq-(\d+(?:\.\d+)*)\.[tz]}
}
