On Wed, 2002-05-15 at 06:55, Matthew Kennedy wrote: > On Tue, 2002-05-14 at 17:23, Erik Grinaker wrote: > > The ebuild is for the Unix Amiga Emulator, or uae for short. uae allows > > you to select which backend to compile against during ./configure, and > > you can choose *either* x, svgalib, ncurses or sdl. > > When creating the xemacs-gamma ebuild I encountered the same dillema. > When you say "*either*", I assume you mean that X, svga, ncurse and sdl > are optional, but mutually exclusive. Yep, that's right. > > If a user has, say, both X and svga in his USE variable, how do I > > determine whether to use X or svgalib for backend? > > XEmacs gamma supports gtk OR motif OR lucid interfaces (each of which > can be considered a use flag) in mutual exclusion. Of course, I don't > want to dictate one of those three to the user, since my preference may > not be theirs. > > I thought of a priority scheme, but couldn't see clearly how that would > be done. How did you do it, BTW? Well, I haven't completed the ebuild yet, but I decided to go for my own priorities ; use ncurses && backend="--with-asciiart" use svga && backend="--with-svgalib" use sdl && backend="--with-sdl --with-sdl-sound --with-sdl-gfx" use X && backend="--with-x" These are set in reverse so that the last one that matches will be active. But I'm really not satisfied with this, because if a user would like to have, as you say later in your mail, an svga emulator while having both x and svga in his USE then his only option would be to manually change USE before emerging. > What I ended up doing was checking for an env. var. named USE_PREF which > is localized to xemacs-gamma. It allows the user to merge xemacs-gamma > like this: > > USE_PREF=gtk app-editors/xemacs-gamma This seems to be quite sensible, even though it creates it's share of troubles when checking DEPENDs. Does any of the Gentoo developers have any thoughts on this? -- Erik Grinaker Freelance UNIX/Linux systems consultant "Perfection is acheived not when there is nothing more to add, but rather when there is nothing more to take away" - Antoine de Saint-Exupéry