Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [gentoo-dev] gtk2/gtk3 use flags

35 views
Skip to first unread message

hasufell

unread,
Aug 16, 2013, 1:20:01 PM8/16/13
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

https://bugs.gentoo.org/show_bug.cgi?id=420493

gtk2 and gtk3 useflags are discouraged and should only be used in
special cases

file a bug for those if there is not one already


On 08/16/2013 07:12 PM, Michael Weber wrote:
> Hello,
>
> gtk is a global use flag [1], gtk2 and gtk3 are used in
> metadata.xml [2].
>
> Is there a consensus how to use these flags if an app provides
> gtk2 and gtk3 gui in parallel or exclusive?
>
> Michael
>
> [1] /usr/portage/profiles/use.desc gtk - Add support for
> x11-libs/gtk+ (The GIMP Toolkit)
>
>
> [2] egrep "gtk(2|3)" /usr/portage/profiles/use.local.desc
> app-admin/gtkdiskfree:gtk3 - Use GTK+3 instead of 2
> app-editors/emacs:gtk3 - Link against version 3 of the GIMP
> Toolkit instead of version 2 (x11-libs/gtk+)
> app-editors/emacs-vcs:gtk3 - Link against version 3 of the GIMP
> Toolkit instead of version 2 (x11-libs/gtk+) app-i18n/fcitx:gtk3 -
> Install GTK3 IM module app-i18n/fcitx-configtool:gtk3 - Use GTK+3
> instead of 2 app-i18n/ibus:gtk3 - Enable support for gtk+3
> app-i18n/ibus-anthy:deprecated - Install deprecated pygtk2 library
> app-i18n/ibus-unikey:gtk3 - Enable support for gtk+3
> app-i18n/imsettings:gtk3 - Enable support for x11-libs/gtk+:3
> app-i18n/scim:gtk3 - Enable support for x11-libs/gtk+:3
> app-i18n/uim:gtk3 - Enable support for x11-libs/gtk+:3
> app-office/libreoffice:gtk3 - Enable highly experimental gtk3
> frontend dev-java/icedtea-web:gtk2 - Use x11-libs/gtk+:2 instead of
> x11-libs/gtk+:3 dev-java/icedtea-web:gtk3 - Use x11-libs/gtk+:3
> (default) dev-python/matplotlib:gtk3 - Use x11-libs/gtk+:3 instead
> of x11-libs/gtk+:2 lxde-base/lxdm:gtk3 - Use GTK+3 instead of 2
> mail-client/claws-mail:gtk3 - Build support for GTK+3
> media-libs/libcanberra:gtk3 - 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. media-plugins/audacious-plugins:gtk3 - Link
> against version 3 of the GIMP Toolkit instead of version 2
> (x11-libs/gtk+) media-sound/audacious:gtk3 - Link against version 3
> of the GIMP Toolkit instead of version 2 (x11-libs/gtk+)
> media-sound/jalv:gtk2 - Adds support for GTK+2 in addition to
> GTK+3 controlled by the gtk useflag. media-sound/mp3splt-gtk:gtk3 -
> Link against x11-libs/gtk+:3 instead of x11-libs/gtk+:2
> net-analyzer/wireshark:gtk2 - Build the wireshark executable with
> a GTK+ UI version 2. net-analyzer/wireshark:gtk3 - Build the
> wireshark executable with a GTK+ UI version 3. net-dns/avahi:gtk3 -
> Build the avahi-ui-gtk3 library, and use gtk3 for the avahi
> utilities under USE=utils net-libs/gtk-vnc:gtk3 - Build the gtk3
> gtk-vnc library and other gtk3 assets net-misc/spice-gtk:gtk3 -
> Link against x11-libs/gtk+:3 instead of x11-libs/gtk+:2
> net-p2p/eiskaltdcpp:gtk3 - Use x11-libs/gtk+:3 instead of
> x11-libs/gtk+:2 www-client/dwb:gtk3 - Link against x11-libs/gtk+:3
> instead of x11-libs/gtk+:2 www-client/uget:gtk3 - Use
> x11-libs/gtk+:3 instead of x11-libs/gtk+:2 www-client/uzbl:gtk3 -
> Use x11-libs/gtk+:3 instead of x11-libs/gtk+:2
> x11-themes/light-themes:gtk3 - Support GTK 3.x, too
> x11-wm/fvwm:gtk2-perl - Enable GTK2 Perl bindings
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSDl4dAAoJEFpvPKfnPDWz5YYH/0LjB0mC/qSrWuXXwnpD0y+B
k/xuq3to8Gyvm6TuFr5uZ7+x0ljW5Z5VMmGxhgEv91zcXkkaCoEjXVtQ79ZDgJ7i
FM6q69Ok3xFOK0NqPGYrJrawdG1lG9JcMISz+8sVNVXmqtUHbJASoePNGLbv6KSE
pEq39R7WOuerKZmHDglB0T5j2dOOPP389iOSfsj6tH3bAjuVPlYKaesolTMyT3/N
9hTTwBPrMDYUonYG5aM3Hhzdr3o8vMmlj2B5BCNgfkSGMIBRLdIDhnUEqZ8NlYC0
NAKkf1x9offmGSa+nB5tnW8n4AZPB0FYM5VdNEwpo7IKxpGJFN6W3R99ozJf6Sc=
=wDsG
-----END PGP SIGNATURE-----

Michael Weber

unread,
Aug 16, 2013, 1:20:02 PM8/16/13
to
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber <x...@gentoo.org>

Ben de Groot

unread,
Aug 16, 2013, 2:30:02 PM8/16/13
to
As mentioned on IRC, there's this:

https://wiki.gentoo.org/wiki/Gnome_Team_Policies#gtk3

--
Cheers,

Ben | yngwin
Gentoo developer

Ulrich Mueller

unread,
Aug 16, 2013, 4:30:01 PM8/16/13
to
>>>>> On Sat, 17 Aug 2013, Ben de Groot wrote:

> As mentioned on IRC, there's this:
> https://wiki.gentoo.org/wiki/Gnome_Team_Policies#gtk3

Does this reflect usage of the flags in the tree? Looking at the list
in the original posting, the most common pattern seems to be USE=gtk
to enable GTK+, and USE=gtk3 to link against GTK+3 instead of 2.

Ulrich

Samuli Suominen

unread,
Aug 17, 2013, 8:40:02 AM8/17/13
to
On 16/08/13 20:12, Michael Weber wrote:
> Hello,
>
> gtk is a global use flag [1], gtk2 and gtk3 are used in metadata.xml [2].
>
> Is there a consensus how to use these flags if an app provides gtk2
> and gtk3 gui in parallel or exclusive?

'gtk' uses best possible version as defined by the package maintainer

'gtk3' is a special flag that is used when package supports both gtk and
gtk3 at the same time, and matches the criteria of sanity which is a)
it's an library that is used by multiple programs b) is not easy to
split, which would otherwise be preferred over using the USE flag

'gtk2' is never required, those matching it down from the list have weak
design which goes against every other ebuild in tree, but is still
package maintainers decision

special flags like 'IUSE="+deprecated"' can be used if there is a need
to enable the old GTK+ implementation by default, but still provide the
new one, in programs. like if enabling GTK+3 instead of GTK+2 would
disable you from using flash plug-in in a browser, would qualify in.

imho :)

- Samuli

Sergey Popov

unread,
Aug 20, 2013, 9:40:02 AM8/20/13
to
16.08.2013 21:15, hasufell пишет:
> https://bugs.gentoo.org/show_bug.cgi?id=420493
>
> gtk2 and gtk3 useflags are discouraged and should only be used in
> special cases
>
> file a bug for those if there is not one already

What's about maintainer wish to support both of toolkits? I have dropped
GTK2 support in gtkdiskfree[1], but it seems that proxied maintainer
will quit if i keep things that way :-/

[1] - https://bugs.gentoo.org/show_bug.cgi?id=463578

--
Best regards, Sergey Popov
Gentoo developer
Gentoo Desktop Effects project lead
Gentoo Qt project lead
Gentoo Proxy maintainers project lead

signature.asc

Ian Stakenvicius

unread,
Aug 20, 2013, 10:00:02 AM8/20/13
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 20/08/13 09:31 AM, Sergey Popov wrote:
> 16.08.2013 21:15, hasufell пишет:
>> https://bugs.gentoo.org/show_bug.cgi?id=420493
>>
>> gtk2 and gtk3 useflags are discouraged and should only be used
>> in special cases
>>
>> file a bug for those if there is not one already
>
> What's about maintainer wish to support both of toolkits? I have
> dropped GTK2 support in gtkdiskfree[1], but it seems that proxied
> maintainer will quit if i keep things that way :-/
>
> [1] - https://bugs.gentoo.org/show_bug.cgi?id=463578
>

gtk3 = support specifically for the gtk3 toolkit (or not), otherwise
'gtk' to support whatever.

It should be noted that with slot-operators, as long as the package's
./configure is resolving gtk deps in the correct order (that is, gtk3
first, then if missing gtk2), then IUSE="gtk" is enough to just handle
it via enabling or disabling all gtk related support.

(And even if it isn't, has_version would allow you to take care of
this too, although it's more hacky that way.)

The only time you really -need- to have a specific flag for gtk3 is
when both are installed and you specifically only want to build it
against gtk2 (say, for testing).


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iF4EAREIAAYFAlITdUcACgkQ2ugaI38ACPAnQgD/b0JrPDG3/Rg3HkF1O7rueSZo
Pq91UOP94tt+4/nAc3sBALCPKdg49zMfvOtFfaDA4kKdpbqn0J5IECezmiwaKqAn
=pZGv
-----END PGP SIGNATURE-----

Gilles Dartiguelongue

unread,
Aug 20, 2013, 7:30:01 PM8/20/13
to
Le samedi 17 août 2013 à 15:33 +0300, Samuli Suominen a écrit :
> On 16/08/13 20:12, Michael Weber wrote:
> > Hello,
> >
> > gtk is a global use flag [1], gtk2 and gtk3 are used in metadata.xml [2].
> >
> > Is there a consensus how to use these flags if an app provides gtk2
> > and gtk3 gui in parallel or exclusive?
>
> 'gtk' uses best possible version as defined by the package maintainer
>
> 'gtk3' is a special flag that is used when package supports both gtk and
> gtk3 at the same time, and matches the criteria of sanity which is a)
> it's an library that is used by multiple programs b) is not easy to
> split, which would otherwise be preferred over using the USE flag
>
> 'gtk2' is never required, those matching it down from the list have weak
> design which goes against every other ebuild in tree, but is still
> package maintainers decision
>
> special flags like 'IUSE="+deprecated"' can be used if there is a need
> to enable the old GTK+ implementation by default, but still provide the
> new one, in programs. like if enabling GTK+3 instead of GTK+2 would
> disable you from using flash plug-in in a browser, would qualify in.
>
> imho :)

Quick read says that it is exactly what the gnome herd said over and
over on this list and on IRC.

I'll also write it down again for regular applications, having a USE
flag for controlling build of your application against gtk+:2 or 3 is
not what the gnome team recommends. Either the gtk3 UI is working or it
is not satisfying, there is no in the middle.

--
Gilles Dartiguelongue <e...@gentoo.org>
Gentoo

Gilles Dartiguelongue

unread,
Aug 20, 2013, 7:40:01 PM8/20/13
to
Le mardi 20 août 2013 à 17:31 +0400, Sergey Popov a écrit :
> 16.08.2013 21:15, hasufell пишет:
> > https://bugs.gentoo.org/show_bug.cgi?id=420493
> >
> > gtk2 and gtk3 useflags are discouraged and should only be used in
> > special cases
> >
> > file a bug for those if there is not one already
>
> What's about maintainer wish to support both of toolkits? I have dropped
> GTK2 support in gtkdiskfree[1], but it seems that proxied maintainer
> will quit if i keep things that way :-/

The upstream maintainer is free to support both toolkits if he wishes to
do so, but we strongly recommend to only select one slot for
applications in gentoo tree, the one which works best for the
application.
signature.asc

Ben de Groot

unread,
Aug 21, 2013, 12:20:02 AM8/21/13
to
When upstream supports both, and the maintainer wishes to do so as
well, I would strongly recommend to support both, so that end-users
can make their own choices. Some may wish to use the applications in a
light-weight gtk2-only environment such as LXDE. As long as gtk+:2 is
supported in the tree, I don't see why we should artificially restrict
such choices for our users.

Gilles Dartiguelongue

unread,
Aug 21, 2013, 3:10:02 AM8/21/13
to
The reasons are enumerated on the wiki and are just a summary of the
older thread where this was discussed.

Of course, since there is no body to impose such rules, you are free to
go against gnome team self imposed policy and recommendation.
0 new messages