Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is Gentoo wiping out Gtk 2 support from packages that support it?
Date: Fri, 08 Jul 2011 19:24:49
Message-Id: 1310152006.231514.31.camel@localhost.localdomain
In Reply to: Re: [gentoo-user] Is Gentoo wiping out Gtk 2 support from packages that support it? by Alan McKinnon
1 On Friday, July 8 at 17:19 (+0200), Alan McKinnon said:
2
3 > On Friday 08 July 2011 09:14:36 Albert Hopkins did opine thusly:
4 > > On Friday, July 8 at 13:11 (+0100), Stroller said:
5 > > > Taking a look at this bug today, is there any reason why the
6 > > > ebuild shouldn't simply RDEPEND="x11-libs/gtk+" (i.e. remove
7 > > > the explicit dep on gtk3), detect what version you have
8 > > > installed on your system and then either run --enable-gtk3 or
9 > > > --enable-gtk2 during src_configure(), depending upon which
10 > > > you're using?
11 > >
12 > > ebuilds generally don't do this, because it is bad. What you have
13 > > and what you want aren't necessarily the same thing. Consider:
14 > >
15 > > * You don't yet have any gtk installed
16 > > * You have gtk2 but actually *want* the gtk3 version, so you
17 > > want the ebuild to pull in gtk3 (or vice versa)
18 > > * You have both gtk2 and gtk3 installed.
19 > > * You have gtk installed, but don't want gtk support for a
20 > > particular package (if gtk support is optional for that
21 > > package).
22 >
23 > easy.
24 >
25 > Two USE flags: gtk2 and gtk3
26 >
27 > in ebuild:
28 >
29 > DEPEND="
30 > gtk2? (x11-libs/gtk+:2)
31 > gtk3? (x11-libs/gtk+:3)
32 > "
33 >
34 > in src-configure() write the code such that it establishes a
35 > precedence
36 >
37 > If both flags are set, build against gtk+:3
38 > If only one flag is set, build against that toolkit
39 > If no flags are set, do something appropriate.
40 >
41
42 You mean like what they did with portage and python2/3?
43
44 Well, there was bugs in that (I reported 1 or 2 bugs myself). It works
45 now (depending on your expectation of "works" but is very ugly.
46
47 > IIRC, it is frowned upon to have conditionals in DEPENDS based on USE
48 > flags so the above is best - take the small hit on disk space if both
49 > are set and gtk+:2 is used nowhere else (highly unlikely for quite a
50 > while still)
51 >
52 They could do that.. I don't see it happening though.
53
54 I didn't want to comment on this thread (having been on both sides of
55 the fence). But I will say this. The best thing about Gentoo is it's a
56 "meta-distribution". It gives you more control and more ease to do
57 things "your" way. I think people should learn to take more advantage
58 of the latter. I do.

Replies

Subject Author
Re: [gentoo-user] Is Gentoo wiping out Gtk 2 support from packages that support it? Stroller <stroller@××××××××××××××××××.uk>