[98865] trunk/dports/devel/zmq22/Portfile

cal at macports.org cal at macports.org
Thu Oct 18 18:20:41 PDT 2012


Revision: 98865
          http://trac.macports.org//changeset/98865
Author:   cal at macports.org
Date:     2012-10-18 18:20:40 -0700 (Thu, 18 Oct 2012)
Log Message:
-----------
zmq22: provide upgrade path from zmq < 3.2

Modified Paths:
--------------
    trunk/dports/devel/zmq22/Portfile

Modified: trunk/dports/devel/zmq22/Portfile
===================================================================
--- trunk/dports/devel/zmq22/Portfile	2012-10-19 01:20:18 UTC (rev 98864)
+++ trunk/dports/devel/zmq22/Portfile	2012-10-19 01:20:40 UTC (rev 98865)
@@ -29,7 +29,23 @@
 checksums           rmd160  63c6ca84c292a72ffb0e18f1a97a6fa744a6be7c \
                     sha256  43904aeb9ea6844f72ca02e4e53bf1d481a1a0264e64979da761464e88604637
 
-conflicts           zmq
+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
+            set deactivate_proc registry_deactivate_composite
+            if {[info commands registry_deactivate_composite] == {}} {
+                set deactivate_proc registry_deactivate
+            }
+            $deactivate_proc zmq "" [list ports_nodepcheck 1]
+        }
+    } else {
+        conflicts   zmq
+    }
+}
 
 universal_variant   yes
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121018/aa9e93ea/attachment.html>


More information about the macports-changes mailing list