On Jul 6, 2010, at 2:41 AM, Ryan Schmidt wrote: > Yes, marking variants as conflicting with one another will prevent the user > from choosing more than one of them at the same time. So you want to write: > > variant python24 conflicts python25 python26 python27 description {Use python > 2.4} { > depends_lib-append port:python24 > configure.args-append --python=${prefix}/bin/python2.4 > } > > variant python25 conflicts python24 python26 python27 description {Use python > 2.5} { > depends_lib-append port:python25 > configure.args-append --python=${prefix}/bin/python2.5 > } > > variant python26 conflicts python24 python25 python27 description {Use python > 2.6} { > depends_lib-append port:python26 > configure.args-append --python=${prefix}/bin/python2.6 > } > > variant python27 conflicts python24 python25 python26 description {Use python > 2.7} { > depends_lib-append port:python27 > configure.args-append --python=${prefix}/bin/python2.7 > } > > As for default variants, you want to write: > > if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset > python26] && ![variant_isset python27]} { > default_variants +python26 > }
or, instead of that giant ever-growing if statement that needs to be updated whenever you add a new python version variant - just have the main part of the port depend on (and configure with) python26, then each variant can just remove the python26 dependency/configure arg and substitute their own. -- Daniel J. Luke +========================================================+ | *---------------- dl...@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+ _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev