Toolkit USE Flags
This page summarizes main points from discussions about toolkit (GTK, Qt) USE flags (gtk2, gtk3, qt4, qt5, etc.). The centithreads go back to 2005. It seems sometimes the discussion is going in circles, and it's hard to read all of the previous replies. This is an attempt to summarize the main points, pros and cons, to facilitate a more productive and informed effort towards a usable solution.
Use cases
List of use cases (i.e. scenarios people want to work, or things that happen with packages, etc):
- Enable just gtk2 for just gtk2 support if available [1]
- app-i18n/uim , x11-themes/light-themes --> flag provides support for gtk3 apps, in addition to gtk(2) [2]
- gnome-base/librsvg --> flag for gtk3 libraries *and* executables [3]
- media-sound/audacious --> REQUIRED_USE="^^ ( gtk gtk3 )" with default switching from version to version (current stable is gtk, previous was gtk3) [4]
- www-client/midori --> USE=deprecated instead of USE=gtk3 in unstable [5]
- media-libs/libcanberra --> USE=gtk3 enables extra support, in addition to gtk: "Enables building of gtk+3 helper library, gtk+3 runtime sound effects and the canberra-gtk-play utility. To enable the gtk+3 sound effects add canberra-gtk-module to the colon separated list of modules in the GTK_MODULES environment variable." — very unclear: is it needed? recommended? also, why doesn't the package handle the environment variable by itself? [6]
- we need to ship webkit with gtk2 and gtk3 support [7]
- MATE desktop can be built against gtk+ 2 or gtk+ 3, and upstream supports doing both [8]
- a single process cannot load both gtk2 and gtk3 - you *will* get random crashes [9]
- only three packages (providing libs) needed exception to the rule to avoid unreasonable maintenance overhead: spice, gtk-vnc and avahi [10]
- Let's take Emacs as an example. The upstream package supports Athena widgets (both in Xaw and Xaw3d variants), Motif, GTK2, and GTK3. [11]
- You're trying to compare gtk to qt directly. They are not the same. gtk regards only the graphic library, qt is a library of utility functions too. Qt can be considered like gtk+glib, and that make things more complex. [12]
- users that currently have -qt are going to be confused when it no longer does what they expect [13]
- The gtk 'solution' forced some ugly things like masking gtk+:3, gconf:3, ... and then selecting packages based on specific -r200 / -r300 revisions. So much work to avoid regressing into gtk3! [14]
- QA has spoken out pretty clearly against unversioned gtk or qt useflags, and in favour of explicit versioned useflags. [15]
- x11-misc/spacefm supports multiple toolkits as well [16]
- I would really like a way to toggle gtk3 for testing [17]
- Suppose you want to run on an embedded system with limited RAM and the ability to choose means you can use one of the two libraries exclusively, thus eliminating the need to load the other library? [18]
Approach | Open questions | Pros | Cons | Supporters | Opponents |
---|---|---|---|---|---|
|
|
|
(opponents placeholder) | ||
gtk = any version, gtkN = gtkN support [22] |
|
|
|||
|
|
|
| ||
gtkN = gtkN support, no non-versioned gtk [56] |
(open questions placeholder) |
|
(opponents placeholder) | ||
gtk=newest GTK version, gtkN=only for older versions [67] | (open questions placeholder) | (pros placeholder) |
|
|
(opponents placeholder) |
remove gtkN, make latest version default, possibly add USE flags or separate packages for deprecated versions [70] |
(pros placeholder) | ||||
USE_QT_VERSIONS in make.conf, and single qt USE flag [84] |
(open questions placeholder) | (pros placeholder) |
|
|
|
eselect module [88] | (open questions placeholder) | (pros placeholder) |
|
(supporters placeholder) | (opponents placeholder) |
fork Gentoo for legacy toolkit support [92] |
(open questions placeholder) | (pros placeholder) | (cons placeholder) |
|
|