How to force exactly one variant.
Bryan Blackburn
blb at macports.org
Tue Feb 24 12:56:21 PST 2009
On Tue, Feb 24, 2009 at 08:50:51PM +0100, Martin Krischik said:
> Hello,
>
> I have a little problem gnat-gcc port: You need to specify a bootstrap
> compiler - that is exactly one. Which leaves me with two problems:
>
> 1) if no bootstrap compiler is specified I would like to display a
> helpful description.
(Note, untested)
pre-fetch {
if {![variant_isset choice1] && ![variant_isset choice2]} {
return -code error "You must choose choice1 or choice2"
}
}
>
> 2) If two bootstrap compiler are chosen then an error should be displayed
variant choice1 conflicts choice2 {}
variant choice2 conflicts choice1 {}
port should then handle pointing out the problem if someone tries both
+choice1 and +choice2.
Bryan
>
> Any ideas from the Portfile gurus?
>
> Martin
> --
> Martin Krischik
> krischik at users.sourceforge.net
More information about the macports-dev
mailing list