[69423] trunk/dports/tex/rubber/Portfile
Ryan Schmidt
ryandesign at macports.org
Mon Jul 5 23:41:53 PDT 2010
On Jul 6, 2010, at 01:05, Emmanuel Hainry wrote:
> Citando Ryan Schmidt :
>>
>
>> On Jul 5, 2010, at 09:38, milosh at macports.org wrote:
>>
>>> +default_variants +python26
>>
>> This variant should only be the default if the user has not already requested to use a different one.
>>
>>> +variant python24 description {Use python2.4} {
>>> + depends_lib-append port:python24
>>> + configure.args-append --python=${prefix}/bin/python2.4
>>> +}
>>> +
>>> +variant python25 description {Use python2.5} {
>>> + depends_lib-append port:python25
>>> + configure.args-append --python=${prefix}/bin/python2.5
>>> +}
>>> +
>>> +variant python26 description {Use python2.6} {
>>> + depends_lib-append port:python26
>>> + configure.args-append --python=${prefix}/bin/python2.6
>>> +}
>>> +
>>> +variant python27 description {Use python2.7} {
>>> + depends_lib-append port:python27
>>> + configure.args-append --python=${prefix}/bin/python2.7
>>> +}
>>
>> These variants should be marked as conflicting with one another.
>
> I never used "conflicts". How does it work? And what does it do? I
> would expect that if you choose a variant, it will prevent any
> conflicting variant to be selected. From your first remark, I gather
> it is not the case.
>
> As I said earlier, variants, I can write (and conflicts, I will
> add), but tcl code, I do not know.
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
}
More information about the macports-dev
mailing list