[84976] trunk/dports/devel

dports at macports.org dports at macports.org
Wed Oct 5 22:37:16 PDT 2011


Revision: 84976
          http://trac.macports.org/changeset/84976
Author:   dports at macports.org
Date:     2011-10-05 22:37:13 -0700 (Wed, 05 Oct 2011)
Log Message:
-----------
gwenhywfar4/aqbanking5: employ ugly registry_deactivate hack to allow
gwenhywfar4-gtk and aqbanking5-gtk to replace the older versions of
gwenhywfar and aqbanking

This is needed to allow gnucash to switch its dependencies without
causing a conflict on upgrade. replaced_by isn't appropriate, because
the old versions are still used for the kmymoney port.

Modified Paths:
--------------
    trunk/dports/devel/aqbanking5/Portfile
    trunk/dports/devel/gwenhywfar4/Portfile

Modified: trunk/dports/devel/aqbanking5/Portfile
===================================================================
--- trunk/dports/devel/aqbanking5/Portfile	2011-10-06 05:10:51 UTC (rev 84975)
+++ trunk/dports/devel/aqbanking5/Portfile	2011-10-06 05:37:13 UTC (rev 84976)
@@ -50,6 +50,10 @@
     conflicts-append    aqbanking5
     depends_lib-delete  port:gwenhywfar4 port:qt4-mac
     depends_lib-append  port:gwenhywfar4-gtk
+
+    # the registry_deactivate hack in gwenhywfar4-gtk will take care
+    # of this conflict
+    conflicts-delete    aqbanking
 }
 
 configure.cppflags-append "-L${prefix}/lib"

Modified: trunk/dports/devel/gwenhywfar4/Portfile
===================================================================
--- trunk/dports/devel/gwenhywfar4/Portfile	2011-10-06 05:10:51 UTC (rev 84975)
+++ trunk/dports/devel/gwenhywfar4/Portfile	2011-10-06 05:37:13 UTC (rev 84976)
@@ -55,6 +55,26 @@
     conflicts-append        gwenhywfar4
     depends_lib-append      port:gtk2
     configure.args-append   --with-guis=gtk2 --disable-qt4
+
+    # Allow gwenhywfar4-gtk and aqbanking5-gtk to replace the old
+    # gwenhywfar and aqbanking by deactivating them if installed. This
+    # allows gnucash to switch versions without conflicts.
+    #
+    # kmymoney still depends on gwenhywfar/aqbanking, so don't
+    # deactivate if it's installed.
+    conflicts-delete        gwenhywfar
+    pre-activate {
+        if {![catch {set vers [lindex [registry_active gwenhywfar] 0]}]} {
+            if {![catch {set vers [lindex [registry_active kmymoney] 0]}]} {
+                ui_error "${subport} conflicts with gwenhywfar and aqbanking. Please uninstall the ports that depend on them."
+                return -code error "conflict"
+            }
+            if {![catch {set vers [lindex [registry_active aqbanking] 0]}]} {
+                registry_deactivate_composite aqbanking "" [list ports_nodepcheck 1]
+            }
+            registry_deactivate_composite gwenhywfar "" [list ports_nodepcheck 1]
+        }
+    }
 }
 
 variant enable_local_install description "Enable local installation mode (plugins, data, locale and config are located relatively to the binary)" {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111005/3cf28840/attachment.html>


More information about the macports-changes mailing list