Gentoo Archives: gentoo-devhelp

From: Nikos Chantziaras <realnc@×××××.de>
To: Mike Frysinger <vapier@g.o>
Cc: gentoo-devhelp@l.g.o
Subject: [gentoo-devhelp] Re: Mutually exclusive USE flags
Date: Wed, 03 Feb 2010 23:48:21
Message-Id: 4B6A0B3B.3080505@arcor.de
In Reply to: Re: [gentoo-devhelp] Re: Mutually exclusive USE flags by Mike Frysinger
1 On 02/03/2010 03:49 AM, Mike Frysinger wrote:
2 > On Sunday 31 January 2010 11:18:47 Nikos Chantziaras wrote:
3 >> In pkg_setup():
4 >>
5 >> if use alsa&& use oss ; then
6 >> einfo
7 >> ewarn "You have enabled both the \"alsa\" as well as the \"oss\" USE
8 >> flags. It"
9 >> ewarn "is not possible to build mozilla-firefox or xulrunner with
10 >> support for"
11 >> ewarn "both. ALSA will be used in this case. If you want OSS
12 >> support, unset the"
13 >> ewarn "\"alsa\" USE flag and leave only \"oss\" set."
14 >> fi
15 >
16 > i personally use terse messages like:
17 > You have USE='oss alsa'. It is not possible to use both, so
18 > ALSA has been selected by default.
19 > i figure the end user can figure out the rest. up to you of course.
20
21 Rather up to the maintainer of the ebuilds :)
22
23
24 >> In src_configure():
25 >>
26 >> # Enable/Disable audio in firefox
27 >> if use alsa || use oss ; then
28 >> mozconfig_annotate '' --enable-ogg
29 >> mozconfig_annotate '' --enable-wave
30 >> fi
31 >>
32 >>
33 >> In this last one, I'm not sure how to pass something to the first
34 >> argument of mozconfig_annotate. The original was:
35 >>
36 >> mozconfig_use_enable alsa ogg
37 >>
38 >> which translates into:
39 >>
40 >> mozconfig_annotate 'alsa' --enable-ogg
41 >>
42 >> The point is that the user will see which USE flags are responsible for
43 >> "--enable-*" and "--disable-*" options. Unfortunately, this:
44 >>
45 >> mozconfig_use_enable ( alsa || oss ) ogg
46 >>
47 >> is not possible. Should I therefore write the block twice in a nested
48 >> if block or leave it as is (and losing the information about which USE
49 >> flag resulted in "--enable-ogg|wave"?)
50 >
51 > wouldnt these make more sense behind USE=ogg and USE=wav ?
52
53 Probably, but again: it's not really up to me. I just wanted to come up
54 with something that will not result in too much pain with the one
55 maintaining the ebuilds.