Toolkit USE Flags
This page Article description::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
- app-i18n/uim , x11-themes/light-themes --> flag provides support for gtk3 apps, in addition to gtk(2)
- gnome-base/librsvg --> flag for gtk3 libraries *and* executables
- media-sound/audacious --> REQUIRED_USE="^^ ( gtk gtk3 )" with default switching from version to version (current stable is gtk, previous was gtk3)
- www-client/midori --> USE=deprecated instead of USE=gtk3 in unstable
- 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?
- we need to ship webkit with gtk2 and gtk3 support
- MATE desktop can be built against gtk+ 2 or gtk+ 3, and upstream supports doing both
- a single process cannot load both gtk2 and gtk3 - you *will* get random crashes
- only three packages (providing libs) needed exception to the rule to avoid unreasonable maintenance overhead: spice, gtk-vnc and avahi
- Let's take Emacs as an example. The upstream package supports Athena widgets (both in Xaw and Xaw3d variants), Motif, GTK2, and GTK3.
- 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.
- users that currently have -qt are going to be confused when it no longer does what they expect
- 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!
- QA has spoken out pretty clearly against unversioned gtk or qt useflags, and in favour of explicit versioned useflags.
- x11-misc/spacefm supports multiple toolkits as well
- I would really like a way to toggle gtk3 for testing
- 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?
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.