[116163] trunk/dports/gis/grass/Portfile

mojca at macports.org mojca at macports.org
Mon Jan 20 05:46:28 PST 2014


Revision: 116163
          https://trac.macports.org/changeset/116163
Author:   mojca at macports.org
Date:     2014-01-20 05:46:28 -0800 (Mon, 20 Jan 2014)
Log Message:
-----------
grass: add support also for Carbon-based wxWidgets 2.8 (untested, temporary before wx3.0 support is complete)

Modified Paths:
--------------
    trunk/dports/gis/grass/Portfile

Modified: trunk/dports/gis/grass/Portfile
===================================================================
--- trunk/dports/gis/grass/Portfile	2014-01-20 10:07:00 UTC (rev 116162)
+++ trunk/dports/gis/grass/Portfile	2014-01-20 13:46:28 UTC (rev 116163)
@@ -351,22 +351,28 @@
 # TODO: in principle wxWidgets is optional and could be disable with
 #       --disable-wxwidgets if there is demand for that
 #       grass 4.6.3 is not compatible with wxWidgets 3.0 yet
-variant wxwidgets30 conflicts wxgtk28 description {Use Cocoa-based wxWidgets 3.0 (experimental)} {
+variant wxwidgets30 conflicts wxwidgets28 wxgtk28 description {Use Cocoa-based wxWidgets 3.0 (experimental)} {
     wxWidgets.use         wxPython-3.0
     depends_lib-append    port:${wxWidgets.port}
     configure.args-append --with-wxwidgets=${wxWidgets.wxconfig}
 }
-variant wxgtk28 conflicts wxwidgets30 description {Use GTK-based wxWidgets 2.8} {
+variant wxwidgets28 conflicts wxwidgets30 wxgtk28 description {Use Carbon-based wxWidgets 2.8} {
+    # untested (might not work)
+    wxWidgets.use         wxWidgets-2.8
+    depends_lib-append    port:${wxWidgets.port}
+    configure.args-append --with-wxwidgets=${wxWidgets.wxconfig}
+}
+variant wxgtk28 conflicts wxwidgets30 wxwidgets28 description {Use GTK-based wxWidgets 2.8} {
     wxWidgets.use         wxGTK-2.8
     depends_lib-append    port:${wxWidgets.port}
     configure.args-append --with-wxwidgets=${wxWidgets.wxconfig}
 }
 
-if {![variant_isset wxwidgets30] && ![variant_isset wxgtk28]} {
+if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] && ![variant_isset wxgtk28]} {
     default_variants-append +wxgtk28
 }
 if {![variant_isset python26] && ![variant_isset python27]} {
-    if {[variant_isset wxgtk28]} {
+    if {[variant_isset wxgtk28] || [variant_isset wxwidgets28]} {
         default_variants-append +python26
     } else {
         default_variants-append +python27
@@ -374,21 +380,30 @@
 }
 
 # TODO: if py27-wxpython-3.0 is installed, grass +wxgtk28 cannot be installed with +python27
-#       we could remove this by disabling wxpython support altogether
+#       we could remove this limitation by disabling wxpython support altogether
 #       (in case there is demand for it)
-if {[variant_isset wxgtk28]} {
+# TODO: the code below is ugly; any suggestions for improving it are welcome
+if {[variant_isset wxwidgets30]} {
     if {[variant_isset python26]} {
-        depends_lib-append port:py26-wxpython-2.8
-        require_active_variants py26-wxpython-2.8 gtk carbon
+        depends_lib-append port:py26-wxpython-3.0
     } elseif {[variant_isset python27]} {
-        depends_lib-append port:py27-wxpython-2.8
-        require_active_variants py27-wxpython-2.8 gtk carbon
+        depends_lib-append port:py27-wxpython-3.0
     }
-} elseif {[variant_isset wxwidgets30]} {
+} else {
     if {[variant_isset python26]} {
-        depends_lib-append port:py26-wxpython-3.0
+        depends_lib-append port:py26-wxpython-2.8
+        if {[variant_isset wxwidgets28]} {
+            require_active_variants py26-wxpython-2.8 carbon gtk
+        } else {
+            require_active_variants py26-wxpython-2.8 gtk carbon
+        }
     } elseif {[variant_isset python27]} {
-        depends_lib-append port:py27-wxpython-3.0
+        depends_lib-append port:py27-wxpython-2.8
+        if {[variant_isset wxwidgets28]} {
+            require_active_variants py27-wxpython-2.8 carbon gtk
+        } else {
+            require_active_variants py27-wxpython-2.8 gtk carbon
+        }
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140120/bf4cdf63/attachment.html>


More information about the macports-changes mailing list