Is it possible to set "default_variants" per platform ? Basically, I want to set +aqua for platform macosx, and +x11 for platform puredarwin or platform freebsd. I tried the most straight-forward approach, wrapping default_variants in platform, but it didn't work... For now I made due with "variant aqua requires macosx". I also seemed to have the misguided notion that the default variants would somehow go away when actually providing some variants ? Not so, I had to give an explicit "+x11 -aqua" to get rid of the defaults... --anders
On Jul 12, 2007, at 07:14, Anders F Björklund wrote:
Is it possible to set "default_variants" per platform ?
Basically, I want to set +aqua for platform macosx, and +x11 for platform puredarwin or platform freebsd. I tried the most straight-forward approach, wrapping default_variants in platform, but it didn't work...
For now I made due with "variant aqua requires macosx".
It should be possible. Off the top of my head: platform macosx { default_variants +aqua } platform puredarwin { default_variants +x11 }
I also seemed to have the misguided notion that the default variants would somehow go away when actually providing some variants ? Not so, I had to give an explicit "+x11 -aqua" to get rid of the defaults...
I noticed that too. See my solution in the e.g. the minivmac portfile: if { ![variant_isset mac128k] && ![variant_isset mac512k] && ! [variant_isset mac512ke] && ![variant_isset macse] } { default_variants +macplus } It gives you the default variant only if you have not already selected another variant.
Ryan Schmidt wrote:
I tried the most straight-forward approach, wrapping default_variants in platform, but it didn't work...
It should be possible. Off the top of my head:
platform macosx { default_variants +aqua }
platform puredarwin { default_variants +x11 }
This was the setting that didn't work that I mentioned, as it didn't pick up anything from the aqua variant ?
I also seemed to have the misguided notion that the default variants would somehow go away when actually providing some variants ? Not so, I had to give an explicit "+x11 -aqua" to get rid of the defaults...
I noticed that too. See my solution in the e.g. the minivmac portfile:
if { ![variant_isset mac128k] && ![variant_isset mac512k] && ![variant_isset mac512ke] && ![variant_isset macse] } { default_variants +macplus }
It gives you the default variant only if you have not already selected another variant.
OK, a bit longwinded but I guess it'll do too... The archive got a "+macosx+aqua", but that's OK. --anders
On 12 Jul 2007, at 08:14, Anders F Björklund wrote:
Is it possible to set "default_variants" per platform ?
Basically, I want to set +aqua for platform macosx, and +x11 for platform puredarwin or platform freebsd. I tried the most straight-forward approach, wrapping default_variants in platform, but it didn't work...
For now I made due with "variant aqua requires macosx".
I also seemed to have the misguided notion that the default variants would somehow go away when actually providing some variants ? Not so, I had to give an explicit "+x11 -aqua" to get rid of the defaults...
You could try this: variant aqua conflicts x11 requires macosx {} variant x11 conflicts aqua {} Randall Wood rhwood@mac.com http://shyramblings.blogspot.com "The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
Randall Wood wrote:
You could try this:
variant aqua conflicts x11 requires macosx {}
variant x11 conflicts aqua {}
Here is what I ended up with: default_variants +aqua platform macosx {} variant aqua requires macosx description "Use the wxMac port of wxWidgets" { depends_lib-append port:wxWidgets ... } variant x11 conflicts aqua description "Use the wxGTK port of wxWidgets" { depends_lib-append port:wxgtk ... } I'm not very happy with it, so need to investigate why the default variants I tried weren't working... (the above also needs a code snippet to deactivate -aqua and add +x11 for puredarwin and freebsd etc) The three wxWidgets ports could also need some more refining, so probably give it a real overhaul later. Currently you can't for instance install both of wxMac and wxGTK, without having file conflicts... --anders
participants (3)
-
Anders F Björklund
-
Randall Wood
-
Ryan Schmidt