Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Change USE flags when compiling with FEATURES=test
Date: Sun, 18 Mar 2012 07:19:28
Message-Id: pan.2012.03.18.07.18.04@cox.net
In Reply to: Re: [gentoo-dev] Change USE flags when compiling with FEATURES=test by Kent Fredric
1 Kent Fredric posted on Sun, 18 Mar 2012 08:43:55 +1300 as excerpted:
2
3 > I think what would be more practical is a sane way to enable FEATURES=""
4 > on a per-package level like USE flags in portage, then you could enable
5 > FEATURES="test" for that one package and it would always build that
6 > package with USE="test"
7 >
8 > Paludis does this already via an extended use.conf syntax:
9
10 > Perhaps portage does this already and I'm hiding under a rock, but I
11 > haven't seen it
12
13 What's you're definition of "sane"? Does it include the
14 /etc/portage/package.env and/or /etc/portage/env/cat-egory/pkg files
15 configuration options?
16
17 I've been using (and prefer) the latter for quite some time for various
18 per-package settings (tho not the particular one in question here)
19 without an issue. The former is newer but somewhat more limited, to
20 make.conf style direct variable assignments, while the latter allows full
21 bash flexibility, which I take advantage of.
22
23 For example, the following /etc/portage/env/media-video/smplayer-0.6.9-r1
24 allowed me to avoid editing the ebuild directly. (IIRC it was a patch
25 necessary to build the package with gcc-4.6. I'm on smplayer-0.7.1 now,
26 but the version-specific package-path limited deployment to just that one
27 version.)
28
29 post_src_prepare () {
30 sed -i '1i#define OF(x) x' src/findsubtitles/quazip/*.h
31 }
32
33
34 See the /etc/portage/package.env and /etc/portage/env/ sections of the
35 portage (5) manpage for the details.
36
37 So... Does that fit your definition of "sane"? =:^)
38
39 --
40 Duncan - List replies preferred. No HTML msgs.
41 "Every nonfree program has a lord, a master --
42 and if you use the program, he is your master." Richard Stallman

Replies