[MacPorts] #40333: py-wxpython-2.8 dependencies: add proper variants for proper use of wxWidgets-2.8 vs. wxgtk-2.8
MacPorts
noreply at macports.org
Mon Dec 30 16:12:51 PST 2013
#40333: py-wxpython-2.8 dependencies: add proper variants for proper use of
wxWidgets-2.8 vs. wxgtk-2.8
-------------------------------------------------+-------------------------
Reporter: mojca@… | Owner: macports-
Type: defect | tickets@…
Priority: Normal | Status: new
Component: ports | Milestone:
Resolution: | Version:
Port: py-wxpython-2.8 spe grass py-dsv | Keywords:
py-pyface py-robotframework-ride py26-pyphant |
-------------------------------------------------+-------------------------
Comment (by mojca@…):
Here are some thoughts.
I would suggest to use the same names for variants as for `wxWidgets`
dependents, namely:
* `variant wxwidgets30 conflicts wxgtk28 wxwidgets28 description {Use
wxPython 3.0 (not fully functional yet)}`
* `variant wxwidgets28 conflicts wxgtk28 wxwidgets30 description {Use
32-bit Carbon-based wxPython 2.8}`
* `variant wxgtk28 conflicts wxwidgets28 wxwidgets30 description {Use
GTK-based wxPython 2.8}`
Some restrictions:
* `wxwidgets30` option shouldn't be available for `${python.version} <
27`
The variant `wxwidgets28` could do something like the following:
{{{
# this also sets `supported_archs i386 ppc` which is nice,
# while on the other hand it probably shouldn't blacklist `clang`
wxWidgets.use wxWidgets-2.8
depends_lib-append port:py${python.version}-wxpython-2.8
require_active_variants port:py${python.version}-wxpython-2.8 carbon gtk
}}}
so maybe the syntax could be:
{{{
variant wxwidgets28 conflicts wxgtk28 wxwidgets30 description {Use 32-bit
Carbon-based wxPython 2.8} {
wxPython.depends ${python.version} wxWidgets-2.8
# conditionally print the following notes on x86_64
notes "To run, use 'arch -i386 <binary_name>' to use 32-bit
architecture"
}
}}}
where "`wxPython.depends 27 wxWidgets2.8`" could take care of the
following:
{{{
universal_variant no
supported_archs i386 ppc
pre-fetch {
# 10.8 (or later) -or- 10.7 with Xcode 4.4 (or later)
if {${os.major} >= 12 || [vercmp $xcodeversion 4.4] >= 0} {
ui_error "Port depends on wxWidgets-2.8 which cannot be built on
Moc OS X >= 10.7 with Xcode >= 4.4"
return -code return "Port depends on wxWidgets-2.8 which cannot be
built on Moc OS X >= 10.7 with Xcode >= 4.4"
}
}
depends_lib-append port:py${python.version}-wxpython-2.8
require_active_variants port:py${python.version}-wxpython-2.8 carbon gtk
}}}
and the strategy to select the right variant could be something like the
following (partially pseudocode):
{{{
if {![variant_isset wxwidgets30] && ![variant_isset wxwidgets28] &&
![variant_isset wxgtk28]} {
# if wxpython-2.8 is already installed, use the installed one
if {wxPython.is_installed ${python.version} 2.8} {
# if py2X-wxpython-2.8 +carbon was installed
if { wxPython.is_active ${python.version} wxWidgets-2.8 } {
default_variants +wxwidgets28
} else {
default_variants +wxgtk28
}
} else {
if {wxPython.is_carbon_supported} {
default_variants +wxwidgets28
} else {
default_variants +wxgtk28
}
}
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/40333#comment:5>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list