Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: Stroller <root@××××××××××××××××××.uk>
Cc: gentoo-dev@g.o
Subject: [gentoo-dev] Re: Use of USE flags..? Was: Re: [gentoo-dev] Enemy Territory ebuild
Date: Tue, 21 Oct 2003 20:20:36
Message-Id: 1066767790.31734.9.camel@localhost
1 On Tue, 2003-10-21 at 13:39, Stroller wrote:
2 > On Oct 21, 2003, at 2:15 pm, Chris Gianelloni wrote:
3 > >
4 > > I would definitely *not* use a USE flags at all, since a USE flag is
5 > > for
6 > > adding or removing optional features from a package. If anything were
7 > > to be used, it would be a FEATURE flag.
8 >
9 > I am aware of the -devs attitude towards USE-flag bloat, and my
10 > original posting "you can never have too many USE flags" was intended
11 > as a joke (obviously a very poor one). However, from a user perspective
12 > USE flags are quite desirable - they keep all options in one place, I
13 > can `emerge -vp someapp` & easily use `ufed` to determine what each
14 > flag means & change it as required.
15
16 However, a USE flag has a specific function and should stay that way to
17 keep confusion down. There are already a few cases where USE flags are
18 used to do things they shouldn't be.
19
20 > You say that "a USE flag is for adding or removing optional features
21 > from a package", however I am not really clear what this means. My
22 > recent experimentation, for instance, with the prelinking & the "pic"
23 > USE flag seems to indicate that "-fPIC" will be added to the user's
24 > CFLAGS. But only, I think, if the package supports prelinking..?
25
26 The -fPIC is actually used to enable PIC support in applications. For
27 example, if you were to have -fPIC in your CFLAGS, there are some
28 packages that will NOT compile. The pic USE flag is for enabling -fPIC
29 in a way which is suitable to the package. It isn't just tacking
30 "-fPIC" onto your CFLAGS and that's it. In many cases it requires
31 patches to the source, which aren't needed when not compiling with
32 -fPIC.
33
34 > Having USE flags change CFLAGS seems to me to be non-intuitive, and I
35 > don't really see how a "patches" USE flag is any different from the
36 > existing "mmx", "oss", or (to be honest) any other USE flags.
37
38 Let's take... a fictional game I would like to call GentooRulez.
39 GentooRulez can use mmx, but only if it is added on the ./configure line
40 with a --enable-mmx. Otherwise, it builds without. This is the prime
41 example of when to use the mmx USE flag.
42
43 Now, a new version of GentooRulez comes out and you want to merge it
44 using patches. You are wanting to tell PORTAGE itself to use patches.
45 It makes no changes to the actual configuration/build. FEATURES control
46 portage itself. USE flags control the package compilation/install
47 options.
48
49 > Could someone be so kind as to explain when a USE flag should & should
50 > not be used, and what is the difference between USE flags & FEATUREs..?
51 >
52 > Many thanks,
53 >
54 > Stroller.
55 --
56 Chris Gianelloni
57 Developer, Gentoo Linux
58 Games Team
59
60 Is your power animal a pengiun?

Attachments

File name MIME type
signature.asc application/pgp-signature