Index: zmq/Portfile
===================================================================
--- zmq/Portfile	(revision 120305)
+++ zmq/Portfile	(working copy)
@@ -4,36 +4,66 @@
 PortSystem          1.0
 
 name                zmq
-version             3.2.4
-categories          devel net
+
+categories          devel sysutils net
 license             LGPL-3+
 platforms           darwin
-maintainers         inconsistent.nl:merijn
+maintainers         inconsistent.nl:merijn stromnov michaelld openmaintainer
 
-description         ØMQ (ZeroMQ) lightweight messaging kernel
+description         0MQ (ZeroMQ) lightweight messaging kernel
 
-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.
+long_description    \
+    The 0MQ lightweight messaging kernel is a library which extends the \
+    standard socket interfaces with features traditionally provided by \
+    specialised messaging middleware products. 0MQ 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/
 
+depends_lib-append  port:libsodium
+
+if {${subport} eq ${name}} {
+
+    version             3.2.4
+
+    checksums           rmd160 9f62881bc5d910cc1d1eb91df6be0ad3ca09d541 \
+                        sha256 df96a141c85b65c2cb6c0db22223126623a09eecbfccb7f74400f3f938742f59
+
+    conflicts           zmq-devel zmq22
+
+}
+
+subport zmq22 {
+
+    version             2.2.0
+
+    checksums           rmd160 63c6ca84c292a72ffb0e18f1a97a6fa744a6be7c \
+                        sha256 43904aeb9ea6844f72ca02e4e53bf1d481a1a0264e64979da761464e88604637
+
+    conflicts           zmq zmq-devel
+
+}
+
+subport zmq-devel {
+
+    version             4.0.4
+
+    checksums           rmd160 6971d9842ce6bc9197c9c8179eabde29ad54a81a \
+                        sha256 1ef71d46e94f33e27dd5a1661ed626cd39be4d2d6967792a275040e34457d399
+
+    conflicts           zmq zmq22
+
+}
+
 distname            zeromq-${version}
 worksrcdir          zeromq-[strsed ${version} {g/[^0-9.].*$//}]
 
-checksums           rmd160  9f62881bc5d910cc1d1eb91df6be0ad3ca09d541 \
-                    sha256  df96a141c85b65c2cb6c0db22223126623a09eecbfccb7f74400f3f938742f59
+# macports libtool allows linking against libc++,
+# the libtool in the distribution does not
 
-conflicts           zmq20 zmq22
-
-universal_variant   yes
-
-# macports libtool allows linking against libc++, the libtool in the distribution does not
 depends_build       port:libtool
 build.args          LIBTOOL=${prefix}/bin/glibtool
 
@@ -41,6 +71,8 @@
     configure.args-append   --with-pgm
 }
 
+set major           [lindex [split ${version} .] 0]
+
 livecheck.type      regex
 livecheck.url       ${homepage}area:download
-livecheck.regex     zeromq-(\[0-9.\]+)${extract.suffix}
+livecheck.regex     zeromq-(${major}.\[0-9.\]+)${extract.suffix}
Index: zmq-devel/Portfile
===================================================================
--- zmq-devel/Portfile	(revision 120305)
+++ zmq-devel/Portfile	(working copy)
@@ -1,46 +0,0 @@
-# -*- 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$
-
-PortSystem          1.0
-
-name                zmq-devel
-version             4.0.4
-revision            1
-categories          devel net
-platforms           darwin
-license             LGPL-3+
-
-maintainers         stromnov openmaintainer
-
-description         ØMQ (ZeroMQ) lightweight messaging kernel
-
-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}
-worksrcdir          zeromq-[strsed ${version} {g/[^0-9.].*$//}]
-
-checksums           rmd160  6971d9842ce6bc9197c9c8179eabde29ad54a81a \
-                    sha256  1ef71d46e94f33e27dd5a1661ed626cd39be4d2d6967792a275040e34457d399
-
-conflicts           zmq zmq20 zmq22
-
-universal_variant   yes
-
-depends_lib-append  port:libsodium
-
-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.]+(?:-rc[0-9])?)\.[tz]}
Index: zmq20/Portfile
===================================================================
--- zmq20/Portfile	(revision 120305)
+++ zmq20/Portfile	(working copy)
@@ -1,34 +0,0 @@
-# -*- 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$
-
-PortSystem          1.0
-name                zmq20
-version             2.0.11
-categories          devel net
-license             LGPL-3+
-platforms           darwin
-maintainers         nomaintainer
-description         ØMQ lightweight messaging kernel, 2.0.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.
-
-conflicts           zmq
-homepage            http://www.zeromq.org/
-master_sites        http://download.zeromq.org/
-distname            zeromq-${version}
-checksums           md5     72cdd7141cc3a002c3acadd4dadbfd75 \
-                    sha1    45f1de83eb41cf7b6f074b874ef9b9718446f43a \
-                    rmd160  09ab5d4d67010671fc52acb190cbdae5f1f4abf7
-
-universal_variant   no
-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}
Index: zmq22/Portfile
===================================================================
--- zmq22/Portfile	(revision 120305)
+++ zmq22/Portfile	(working copy)
@@ -1,56 +0,0 @@
-# -*- 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$
-
-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}
