MacPorts GUI - mportopen invocation for variants

Bill Georgitzikis billgeo13 at gmail.com
Mon Jul 19 13:37:17 PDT 2010


On Jul 19, 2010, at 10:11 PM, Joshua Root wrote:

> On 2010-7-19 23:51 , bill georgitzikis wrote:
>> Hello everyone, i am Vasilis Georgitzikis, and I am working on the
>> MacPorts GUI and Framework for this year's GSoC, but i have stumbled
>> upon something that i can't seem to get past. I am trying to extend the
>> macports framework to support variants selection/installation, and i
>> have this tcl command when testing it with ncdu and the universal variant:
>> 
>> set portHandle [mportopen 
>> file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/ncdu
>> <http://rsync.macports.org/release/ports/sysutils/ncdu>    +universal];
>> mportexec  $portHandle install; mportclose $portHandle
>> 
>> Up untill now, nothing was passed as an option and variant, since the
>> framework didn't support either. I understand that in order to pass a
>> variant, i need to pass an option as well, but looking at the macports
>> code, i can't understand what option i need to pass when i simply want
>> to pass a variant. Also, should i pass the variant with the +/-, or does
>> mpopen simply expects the name? Please keep in mind that i am currently
>> working on 1.8.2.
> 
> If you don't want to set any options, pass an empty list. The variations
> arg is a list formatted as expected by 'array set', i.e. it represents a
> mapping of variant names to either + or -. So an example would be:
> 
> {foo + bar - baz +}
> 
> - Josh


Worked like a charm! Thank you very much, I've been trying to figure this out for ever.


More information about the macports-dev mailing list