Changeset 146156


Ignore:
Timestamp:
Mar 1, 2016, 12:40:44 PM (3 years ago)
Author:
mojca@…
Message:

wxWidgets-1.0.tcl: add wxWidgets-3.0-devel, document the PortGroup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/wxWidgets-1.0.tcl

    r146155 r146156  
    11# -*- 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
    22# $Id$
     3
     4# This PortGroup is to be used with all projects that depend on wxWidgets
     5# (including some that need wxPython).
     6#
     7# Usage:
     8#
     9# After the PortSystem 1.0 line, put:
     10#
     11#   PortGroup           wxWidgets 1.0
     12#
     13# Then, assuming that the port needs wxWidgets 3.0, use
     14#
     15#   wxWidgets.use       wxWidgets-3.0
     16#
     17# to specify the version/variant of wxWidgets.
     18#
     19# Valid options for wxWidgets.use are as follows:
     20#
     21# * 'wxWidgets-3.0'
     22#   You should generally use this one unless there are valid reasons for
     23#   a different choice.
     24#
     25# * 'wxPython-3.0'
     26#   This is almost the same as 'wxWidgets-3.0' except that a separate
     27#   instance of wxWidgets was made available for cases when wxPython
     28#   releases lag behind the wxWidgets releases.
     29#   You should only use this option for ports that need both wxPython
     30#   (usually py27-wxpython) as well as require linking of C++ code against
     31#   wxWidgets via the usual ./configure && make. Using 'wxPython-3.0'
     32#   avoids any version mismatches between wxPython and wxWidgets.
     33#
     34# * 'wxWidgets-2.8' or 'wxGTK-2.8'
     35#   For projects that are still not fully compatible with wxWidgets 3.0
     36#   (even though we strongly encourage you to try to make the package work
     37#   with wxWidgets 3.0 instead).
     38#   'wxWidgets-2.8' requires Carbon and can only be compiled as 32-bit app
     39#   against MacOSX10.6.sdk or earlier. It gives a native look and feel and
     40#   might be preferred to wxGTK on systems where it works.
     41#   'wxGTK-2.8' should work on modern systems as well, but depends on X11.
     42#
     43# * 'wxGTK-3.0'
     44#   Mainly for testing purposes. wxGTK 3.0 currently uses GTK 3 (and could
     45#   be compiled against quartz if desired). Many programs make assumptions
     46#   that GTK != Mac, some programs work with wxGTK, but not with wxOSX.
     47#   This could help you write proper patches and submit them upstream.
     48#
     49# * 'wxWidgets-3.0-libcxx'
     50#   A workaround to make software written in C++11 (but without other C++
     51#   dependencies) work on OS X < 10.9. This is just wxWidgets 3.0
     52#   compiled against libc++ even where libstdc++ is default. See also
     53#   https://trac.macports.org/wiki/LibcxxOnOlderSystems
     54#
     55# * 'wxWidgets-3.0-devel'
     56#   Tracking latest commits from the 3.0 branch for development purposes.
     57#   (This variant will be removed at some point, so try not to rely on its
     58#   existence.)
     59#
     60# * 'wxWidgets-3.2'
     61#   At the moment still mainly for development purposes, for testing ports
     62#   for compatibility with wxWidgets 3.1/3.2.
     63#   It uses wxWidgets 3.1 at the moment, but will switch to wxWidgets 3.2
     64#   after the first release of version 3.2 becomes available.
     65#   If you already want to provide a special variant for your port with
     66#   'wxWidgtes-3.2', you might only need a revbump after the switch to 3.2
     67#
     68#
     69# You should note an important aspect of 'wxWidgets.use' though:
     70# it does not actually do anything useful yet other than failing during
     71# the 'pre-fetch' phase in case your OS is not compatible with the choice.
     72#
     73# To actually use wxWidgets, you need at least two additional steps:
     74#
     75# * add a dependency with
     76#   depends_lib[-append] port:${wxWidgets.port}
     77#
     78# * add the appropriate configure flags
     79#   (depending on the project configuration/requirements)
     80#
     81# For adding appropirate configure flags you can you use any of the
     82# following variables:
     83#
     84# * wxWidgets.prefix
     85# * wxWidgets.wxdir
     86# * wxWidgets.wxconfig
     87# * wxWidgets.wxrc
     88#
     89# Examples of their typical values are:
     90#
     91# * wxWidgets.prefix (PATH)
     92#   /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0
     93#
     94# * wxWidgets.wxdir (PATH)
     95#   /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin
     96#
     97# * wxWidgets.wxconfig (SHELL SCRIPT)
     98#   /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config
     99#
     100# * wxWidgets.wxrc (BINARY)
     101#   /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wxrc
     102#
     103#
     104# You should study your port's build scripts to figure out the proper
     105# configuration flag. A typical configure-based build would work with:
     106#
     107#   configure.args[-append] \
     108#       --with-wxdir=${wxWidgets.wxdir}
     109#
     110# and equally well with either one of the following:
     111#
     112#       --with-wx-config=${wxWidgets.wxconfig}
     113#       --with-wx-prefix=${wxWidgets.prefix}
     114#
     115# A CMake-based installation could require
     116#
     117#   configure.args-append \
     118#       -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig}
     119#
     120# and/or:
     121#
     122#       -DwxWidgets_wxrc_EXECUTABLE=${wxWidgets.wxrc}
     123#
     124# Sometimes enviromental variables are required, like:
     125#
     126#   configure.env[-append] \
     127#       WX_CONFIG=${wxWidgets.wxconfig}
     128#
     129# and/or:
     130#
     131#       WXRC=${wxWidgets.wxrc}
     132#
     133# But you should always check the build documentation.
     134#
     135#
     136# You are strongly encouraged not to use any hardcoded values
     137# (not even for the port name)
     138# to minimize problems in case the layout changes in the future.
     139# If you switch to a different version of wxWidgets it would also be
     140# sufficient to change one single line line with 'wxWidgets.use <name>'.
    3141
    4142options     wxWidgets.name
     
    28166option_proc wxWidgets.use wxWidgets._set
    29167
    30 ## TODO:
    31 ## If the need for this ever arises ...
    32 ##
    33 ## This parameter could be set for every port and could be useful on Tiger
    34 ## to switch to 2.8 automatically even when 3.0 is the default elsewhere
    35 ## or to provent using 3.0 for ports that don't support this
    36 ##
    37 ## With proper implementation wxWidgets.use should only be needed in Portfile
    38 ## in special cases (when a specific port wants to support multiple wxWidgets versions)
    39 #
    40 # options     wxWidgets.supported_versions
    41 # option_proc wxWidgets.supported_versions wxWidgets._set_supported_versions
    42 # proc wxWidgets._set_supported_versions {option action args} {}
    43 
    44168## TODO: it would be nice to make the changes reversible
    45169##
    46 ## parameters: "wxWidgets-2.8" "wxGTK-2.8" "wxWidgets-3.0" "wxGTK-3.0" "wxPython-3.0"
     170## parameters:
     171## - wxWidgets-2.8
     172## - wxGTK-2.8
     173## - wxWidgets-3.0
     174## - wxGTK-3.0
     175## - wxPython-3.0
     176## - wxWidgets-3.0-libcxx
     177## - wxWidgets-3.0-devel
     178## - wxWidgets-3.2
    47179proc wxWidgets._set {option action args} {
    48180    global prefix frameworks_dir os.major
     
    121253            }
    122254        }
     255    # temporary development version of wxWidgets 3.0.x
     256    } elseif {${args} eq "wxWidgets-3.0-devel"} {
     257        wxWidgets.name      "wxWidgets"
     258        wxWidgets.version   "3.0-devel"
     259        wxWidgets.port      "wxWidgets-3.0-devel"
     260        if {${os.major} < 9} {
     261            pre-fetch {
     262                ui_error "${wxWidgets.port} requires Mac OS X 10.5 or later."
     263                return -code error "incompatible Mac OS X version"
     264            }
     265        }
    123266    # preliminary support for wxWidgets 3.1/3.2
    124267    } elseif {${args} eq "wxWidgets-3.2"} {
     
    134277    } else {
    135278        # throw an error
    136         ui_error "invalid parameter for wxWidgets.use; use one of: wxWidgets-2.8/wxGTK-2.8/wxWidgets-3.0/wxGTK-3.0/wxPython-3.0"
     279        ui_error "invalid parameter for wxWidgets.use; use one of:\n\twxWidgets-2.8/wxGTK-2.8/wxWidgets-3.0/wxGTK-3.0/wxPython-3.0/wxWidgets-3.2"
     280        # wxWidgets-3.0-libcxx, wxWidgets-3.0-devel
    137281        return -code return "invalid parameter for wxWidgets.use"
    138282    }
Note: See TracChangeset for help on using the changeset viewer.