* [gentoo-dev] ebuild USE priority
@ 2002-05-14 22:23 Erik Grinaker
2002-05-14 22:51 ` Per Wigren
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Erik Grinaker @ 2002-05-14 22:23 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Hi all
I'm making an ebuild here, and have run into a small "problem".
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.
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?
According to what I believe is common sense I would prioritize them as
X, sdl, svga, ncurses - but is there a better way to do this, or do I
just go by feeling?
--
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-14 22:23 [gentoo-dev] ebuild USE priority Erik Grinaker
@ 2002-05-14 22:51 ` Per Wigren
2002-05-14 23:53 ` Spider
2002-05-15 4:55 ` Matthew Kennedy
2 siblings, 0 replies; 7+ messages in thread
From: Per Wigren @ 2002-05-14 22:51 UTC (permalink / raw
To: gentoo-dev
I'd say that you should go for this order: SDL, X11, SVGA..
And don't forget to --enable-penguins! :) It doesn't make UAE slower (more
than maybe 0.5%) on singleprocessor-systems, but it is noticably faster on
SMP!
Hmm... Maybe there is a USE-variable for SMP? Or some other way to check it?
// Wigren
Wednesday 15 May 2002 00.23 skrev Erik Grinaker:
> Hi all
>
> I'm making an ebuild here, and have run into a small "problem".
>
> 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.
>
> 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?
>
> According to what I believe is common sense I would prioritize them as
> X, sdl, svga, ncurses - but is there a better way to do this, or do I
> just go by feeling?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-14 22:23 [gentoo-dev] ebuild USE priority Erik Grinaker
2002-05-14 22:51 ` Per Wigren
@ 2002-05-14 23:53 ` Spider
2002-05-15 0:44 ` Erik Grinaker
2002-05-15 4:55 ` Matthew Kennedy
2 siblings, 1 reply; 7+ messages in thread
From: Spider @ 2002-05-14 23:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
begin quote
On 15 May 2002 00:23:18 +0200
Erik Grinaker <erikg@wired-networks.net> wrote:
>
> According to what I believe is common sense I would prioritize them as
> X, sdl, svga, ncurses - but is there a better way to do this, or do I
> just go by feeling?
I'd actually say:
sdl, X, svga, ncurses ...
mostly based on the fact that SDL is a layer over X
//Spider
--
begin .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-14 23:53 ` Spider
@ 2002-05-15 0:44 ` Erik Grinaker
2002-05-15 0:55 ` Spider
0 siblings, 1 reply; 7+ messages in thread
From: Erik Grinaker @ 2002-05-15 0:44 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
On Wed, 2002-05-15 at 01:53, Spider wrote:
> On 15 May 2002 00:23:18 +0200
> Erik Grinaker <erikg@wired-networks.net> wrote:
> > According to what I believe is common sense I would prioritize them as
> > X, sdl, svga, ncurses - but is there a better way to do this, or do I
> > just go by feeling?
>
> I'd actually say:
> sdl, X, svga, ncurses ...
>
> mostly based on the fact that SDL is a layer over X
true - but when i tested it sdl was waaaaay slower than x - and as many
users most probably have sdl enabled, perhaps without even knowing, i
thought x would be a sensible default.
--
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-15 0:44 ` Erik Grinaker
@ 2002-05-15 0:55 ` Spider
0 siblings, 0 replies; 7+ messages in thread
From: Spider @ 2002-05-15 0:55 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
begin quote
On 15 May 2002 02:44:28 +0200
Erik Grinaker <erikg@wired-networks.net> wrote:
> true - but when i tested it sdl was waaaaay slower than x - and as
> many users most probably have sdl enabled, perhaps without even
> knowing, i thought x would be a sensible default.
then go for that :)
//Spider
--
begin .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-14 22:23 [gentoo-dev] ebuild USE priority Erik Grinaker
2002-05-14 22:51 ` Per Wigren
2002-05-14 23:53 ` Spider
@ 2002-05-15 4:55 ` Matthew Kennedy
2002-05-15 10:51 ` Erik Grinaker
2 siblings, 1 reply; 7+ messages in thread
From: Matthew Kennedy @ 2002-05-15 4:55 UTC (permalink / raw
To: gentoo-dev
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.
> 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?
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
Inside the ebuild, I have a case statement which set the ./configure
flags based on the value of USE_PREF. If no USE_PREF is given, then it
defaults to a reasonable choice ("lucid" in xemacs-gamma's case).
*** Note: USE_PREF is undocumented of course, unused by any other
package AFAIK, and not an official Gentoo thing. ***
Personally, I think my USE_PREF implementation sucks still because it
really messes up RDEPEND/DEPEND. ie. RDEPEND/DEPEND become a function of
USE_PREF.
Perhaps I should have created the following?
app-editors/xemacs-gamma-gtk
app-editors/xemacs-gamma-lucid
app-editors/xemacs-gamma-motif
Ugh. What if you have two sets of mutually exclusive USE flags -- just
multiply out the number of ebuilds you create.
Perhaps I could have one app-editors/xemacs-gamma and build xemacs
several times (one build for every use flag in gtk, motif, lucid),
renaming the final binaries to /usr/bin/xemacs-21.4.8-{gtk,motif,lucid}.
Even provide an xemacs-update script in the spirit of
opengl-update/java-config just to complete my madness :)
(ie. It's not possible to build a gtk, motif AND lucid based xemacs in a
single ./configure)
> According to what I believe is common sense I would prioritize them as
> X, sdl, svga, ncurses - but is there a better way to do this, or do I
Are you using the order in which X, sdl and svga appear in USE? What if
I have X and svga in USE, but I want an svga amiga emulator? That's kind
dillema I'm talking about.
Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] ebuild USE priority
2002-05-15 4:55 ` Matthew Kennedy
@ 2002-05-15 10:51 ` Erik Grinaker
0 siblings, 0 replies; 7+ messages in thread
From: Erik Grinaker @ 2002-05-15 10:51 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-05-15 11:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-14 22:23 [gentoo-dev] ebuild USE priority Erik Grinaker
2002-05-14 22:51 ` Per Wigren
2002-05-14 23:53 ` Spider
2002-05-15 0:44 ` Erik Grinaker
2002-05-15 0:55 ` Spider
2002-05-15 4:55 ` Matthew Kennedy
2002-05-15 10:51 ` Erik Grinaker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox