[108887] users/mojca/wxports

mojca at macports.org mojca at macports.org
Sun Aug 4 02:18:02 PDT 2013


Revision: 108887
          https://trac.macports.org/changeset/108887
Author:   mojca at macports.org
Date:     2013-08-04 02:18:02 -0700 (Sun, 04 Aug 2013)
Log Message:
-----------
mojca/wx: first working PortGroup code (thanks to pixilla)

Modified Paths:
--------------
    users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl
    users/mojca/wxports/math/gnuplot/Portfile

Property Changed:
----------------
    users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl

Modified: users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl
===================================================================
--- users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl	2013-08-04 08:30:26 UTC (rev 108886)
+++ users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl	2013-08-04 09:18:02 UTC (rev 108887)
@@ -1,23 +1,71 @@
 # -*- 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: $
+# $Id$
 
 options     wxWidgets.confpath
 options     wxWidgets.confscript
 
+# Poedit also needs
+# build.env-append  GETTEXT_PREFIX=${prefix} WX_ROOT=${prefix}
+
+options     wxWidgets.supported_versions
+option_proc wxWidgets.supported_versions wxWidgets._set_supported_versions
+
 options     wxWidgets.use_version
 option_proc wxWidgets.use_version wxWidgets._set_version
 
+# TODO
+# - parameters can be "2.8", "3.0" or "2.8 3.0"
+#
+# This parameter should be set for every port and could be useful on Tiger
+# to switch to 2.8 automatically even when 3.0 is the default elsewhere
+# or to provent using 3.0 for ports that don't support this
+#
+# With proper implementation wxWidgets.use_version should only be needed in Portfile
+# in special cases (when a specific port wants to support multiple wxWidgets versions)
+# or in the PortGroup itself (but then we might need another name)
+proc wxWidgets._set_supported_versions {option action args} {
+}
+
 proc wxWidgets._set_version {option action args} {
+    global prefix
     if {"set" != ${action}} {
         return
     }
 
     if {${args} == "2.8"} {
-        wxWidgets.confpath   {${prefix}/libexec/wxWidgets/2.8}
+        wxWidgets.confpath   ${prefix}/libexec/wxWidgets/2.8
+        # wxWidgets is not universal and is 32-bit only
+        universal_variant    no
+        supported_archs      i386 ppc
+        # TODO
+        # - doesn't build on 10.8 (darwin 12) or later
+        # - probably doesn't built on 10.7 (darwin 11) with Xcode 4.4 or later
+        # - needs to use 10.6 SDK on 10.7 with earlier versions of Xcode
+        #   wxWidgets itself uses
+        #       --with-macosx-version-min=10.6
+        #       --with-macosx-sdk=${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
+        #       --with-macosx-sdk=${developer_dir}/SDKs/MacOSX10.6.sdk
+        #   some ports use
+        #       configure.cxxflags-append -isysroot ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
+        #       configure.cxxflags-append -isysroot ${developer_dir}/SDKs/MacOSX10.6.sdk
+        # example from a port (needs a review/patch):
+        #
+        # platform darwin 11 {
+        #     if {[vercmp $xcodeversion 4.4] >= 0} {
+        #         # doesn't work!!!
+        #     } elseif {[vercmp $xcodeversion 4.3] >= 0} {
+        #         configure.cxxflags-append -isysroot ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
+        #     } else {
+        #         configure.cxxflags-append -isysroot ${developer_dir}/SDKs/MacOSX10.6.sdk
+        #     }
+        # }
     } elseif {${args} == "3.0"} {
-        wxWidgets.confpath   {${prefix}/libexec/wxWidgets/2.9}
+        wxWidgets.confpath   ${prefix}/libexec/wxWidgets/2.9
     } else {
         # throw an error
     }
     wxWidgets.confscript {${wxWidgets.confpath}/wx-config}
 }
+
+# default that can be overridden
+wxWidgets.use_version   3.0


Property changes on: users/mojca/wxports/_resources/port1.0/group/wxwidgets-1.0.tcl
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Modified: users/mojca/wxports/math/gnuplot/Portfile
===================================================================
--- users/mojca/wxports/math/gnuplot/Portfile	2013-08-04 08:30:26 UTC (rev 108886)
+++ users/mojca/wxports/math/gnuplot/Portfile	2013-08-04 09:18:02 UTC (rev 108887)
@@ -78,6 +78,14 @@
 
 configure.ccache            no
 
+# TODO: just temporary
+pre-fetch {
+    ui_info "some debugging:"
+    ui_info "    wxWidgets.use_version: '${wxWidgets.use_version}'"
+    ui_info "    supported_archs:       '${supported_archs}'"
+    ui_info "    wxWidgets.confpath:    '${wxWidgets.confpath}'"
+}
+
 variant aquaterm description "Enable AquaTerm terminal" {
     depends_lib-append      port:aquaterm
     configure.args-delete   --without-aquaterm
@@ -115,25 +123,20 @@
 # If it is acceptable to depend on wxWidgets-devel only,
 # one could delete the variant that depends on wxWidgets 2.8.
 variant wxwidgets conflicts wxwidgets30 description "Enable wxt terminal (wxWidgets 2.8, 32-bit only)" {
+    # port lint Warning: Dependency path:lib/pkgconfig/pango.pc:pango specified multiple times in depends_lib
+    # Does the wxwidgets variant depend on the pangocairo variant?
+    # depends_lib-delete      path:lib/pkgconfig/pango.pc:pango
     wxWidgets.use_version   2.8
     depends_lib-append      port:wxWidgets-2.8 path:lib/pkgconfig/pango.pc:pango
     configure.args-delete   --disable-wxwidgets
-    configure.args-append   --with-wx-config=${prefix}/libexec/wxWidgets/2.8
-    #configure.args-append   --with-wx-config=${wxWidgets.confpath}
+    configure.args-append   --with-wx-config=${wxWidgets.confpath}
 }
-if {[variant_isset wxwidgets]} {
-    # wxWidgets is not universal and is 32-bit only
-    universal_variant       no
-    supported_archs         i386 ppc
-}
 
 variant wxwidgets30 conflicts wxwidgets description "Enable wxt terminal (using wxWidgets 2.9, supports 64-bit)" {
     wxWidgets.use_version   3.0
     depends_lib-append      port:wxWidgets-3.0 path:lib/pkgconfig/pango.pc:pango
     configure.args-delete   --disable-wxwidgets
-    configure.args-append   --with-wx-config=${prefix}/libexec/wxWidgets/2.9
-    ## doesn't work yet
-    #configure.args-append   --with-wx-config=${wxWidgets.confpath}
+    configure.args-append   --with-wx-config=${wxWidgets.confpath}
 }
 
 variant qt description "Enable qt terminal" {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130804/69444cc1/attachment-0001.html>


More information about the macports-changes mailing list