From: Matthew Kennedy <mkennedy@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] ebuild USE priority
Date: 14 May 2002 23:55:32 -0500 [thread overview]
Message-ID: <1021438533.3630.45.camel@sartre.shacknet.nu> (raw)
In-Reply-To: <1021414998.4192.7.camel@maas.wired>
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
next prev parent reply other threads:[~2002-05-15 4:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2002-05-15 10:51 ` Erik Grinaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1021438533.3630.45.camel@sartre.shacknet.nu \
--to=mkennedy@gentoo.org \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox