# -*- 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 99736 2012-11-15 15:13:11Z jmr@macports.org $

PortSystem          1.0

name                zmq22
version             2.2.0
revision            0
categories          devel net
license             LGPL-3+
platforms           darwin
maintainers         inconsistent.nl:merijn

description         ØMQ (ZeroMQ) lightweight messaging kernel, 2.2.x branch

long_description    The ØMQ lightweight messaging kernel is a library which \
                    extends the standard socket interfaces with features \
                    traditionally provided by specialised messaging middleware \
                    products. ØMQ sockets provide an abstraction of asynchronous \
                    message queues, multiple messaging patterns, message \
                    filtering (subscriptions), seamless access to multiple \
                    transport protocols and more.

homepage            http://www.zeromq.org/
master_sites        http://download.zeromq.org/

distname            zeromq-${version}

checksums           rmd160  63c6ca84c292a72ffb0e18f1a97a6fa744a6be7c \
                    sha256  43904aeb9ea6844f72ca02e4e53bf1d481a1a0264e64979da761464e88604637

if {[catch {set installed [lindex [registry_active zmq] 0]}]} {
    conflicts       zmq
} else {
    set version [lindex $installed 1]
    if {[vercmp $version 3.2] < 0} {
        pre-activate {
            # provide an upgrade path for the zmq-update to 3.2
            registry_deactivate_composite zmq "" [list ports_nodepcheck 1]
        }
    } else {
        conflicts   zmq
    }
}

conflicts-append    zmq20

universal_variant   yes

variant pgm description {build with PGM extension} {
    configure.args-append   --with-pgm
}

livecheck.type      regex
livecheck.url       ${homepage}area:download
livecheck.regex     zeromq-(\[0-9.\]+)${extract.suffix}
