[31844] trunk/dports/x11/gtk2/Portfile
Ryan Schmidt
ryandesign at macports.org
Mon Dec 10 09:50:04 PST 2007
On Dec 10, 2007, at 11:42, Weissmann Markus wrote:
> On 10.12.2007, at 18:27, Ryan Schmidt wrote:
>
>> On Dec 10, 2007, at 08:43, Weissmann Markus wrote:
>>
>>> On 10.12.2007, at 15:23, Ryan Schmidt wrote:
>>>
>>>> On Dec 10, 2007, at 08:16, Weissmann Markus wrote:
>>>>
>>>>> Hmmm... wouldn't it be much cleaner and easier to only have one
>>>>> variant "quartz" as "quartz" and "x11" are mutually exclusive
>>>>> anyway?
>>
>> Since there is a choice to be made for x11 support or quartz
>> support, I think it makes sense to list both of these as variants.
>> The port should (and now does) ensure that exactly one of these is
>> selected at all times.
>
> well, I prefer to not making this a philosophical problem:
> With one variant, you get two different installations, with two
> variants, you get four.
That's certainly one way to use variants. That's the "checkbox" way.
> In this case (gtk2), two of the four variants are "errors" and are
> then fixed (with the defaults variant) or with a user warning. I
> think it would be better to eliminate the problem altogether then
> trying to fix it's effects.
I prefer to think of this as the "radio button" way. It's perfectly
acceptable to mark variants as conflicting with one another. That's
why the "conflicts" keyword exists. If I were writing a GUI to
install ports, I'd make it so variants were represented as
checkboxes, except when the "conflicts" keyword is encountered, which
turns those variants into radio buttons.
See also my minivmac portfile, which has 5 variants for selecting
which ancient Mac model you want it to emulate. Exactly one variant
must be selected. All the variants conflict with one another, and one
of them is the default:
$ port variants minivmac
minivmac has the variants:
mac128k: Emulate a Macintosh with 128K RAM and 2 drives
mac512k: Emulate a Macintosh 512K with 512K RAM and 2 drives
mac512ke: Emulate a Macintosh 512Ke with 512K RAM and 6 drives
macplus: Emulate a Macintosh Plus with 4 MB RAM and 6 drives
(default)
macse: Emulate a Macintosh SE with 4 MB RAM and 6 drives
$
More information about the macports-dev
mailing list