This is one of the few ebuilds that hard-depends on gtk+:2 on a clean Gnome 3 installation. USE=gtk controls activation of engines however: * for gtk3-engine, it controls nothing but a noinst_PROGRAM probably only used by maintainers to generate the HighContrast theme * for gtk2-engine, it controls build of adwaita engine which is fine however, here comes the trick: the gtk+:2 ebuilds enable adwaita as the default theme engine without depending on gnome-themes-standard ebuild. This is not too much of a problem for a Gnome desktop since you probably have gnome-themes-standard[gtk] installed as pulled somewhere in the depgraph, however it fails hard for multilib builds since you might have an ABI enabled on gtk+:2 that is not mirrored on the themes and since there is nothing linking them, you will be left to wonder why the hell does your alternative ABI program complains about a missing theme engine. My proposition is to duplicate gnome-themes-standard into an gtk-engines-adwaita ebuild that will be added to gtk+:2 deptree and leave gnome-themes-standard to install themes only without any gtk+ dependency since none is needed anymore.
I think this split would make sense. I also think the gtk-engines-adwaita name makes perfect sense, as that's how they were prefixed for other engines back in the gtk2 days (like in x11-themes/gtk-engines-*). But would be good to first check what other distros are doing, those binary ones that can just dump it into separate packages per file listinsg. Maybe they have it split as well, and have some good naming. Otherwise it seems it's just about going ahead when someone has the time :)
So I came around this again today. Here is how a some other distros package this: https://packages.debian.org/source/sid/gnome-themes-standard https://apps.fedoraproject.org/packages/gnome-themes-standard/sources/spec Basically they split the gtk+-2 engine from theme and have different names for it. So I discussed this with leio and decided to go with x11-themes/gtk-engines-adwaita. After some more testing though, it appears that gtk+:2 would need to depend on both the engine and the theme for our ebuild to stop setting a broken default. Obviously to avoid dependency loops, the engine would have to go in PDEPEND while the theme itself can be a pure RDEPEND. This is not a problem for gtk+:3 as per the README, they are Adwaita and HighContrast are builtin. However gnome-tweak-tool does not should the themes if gnome-themes-standard is not installed so one of the gnome meta ebuilds will likely need to keep pulling this dependency for the time being. This is the a problem since it will not depend on gtk+:2 anymore anyway. Does anyone have any objection to making these changes to gtk+:2 ? Otherwise we can always revert our gtk+:2 settings override and just pull everything as a USE=legacy or something in gnome meta ebuilds ?
After discussing this again with leio this morning, we decided to go ahead with RDEPEND. Pushed in : https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3e4dcd717dbaee4bb20634df3ec01e5c3650f1b https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4031af5ccc64cc15bad17e4f30afea266675f03 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=873d0f434e310ef977633aa726e552e3e98f3305
Can someone please explain why I should now install these additional packages? My Gtk+ 2.x has been working fine (using x11-themes/oxygen-gtk), and I'd really prefer to have as little of the Gnome/Gtk+ ecosystem installed as I can possibly manage. [ebuild U ] x11-libs/gtk+-2.24.31-r1:2::gentoo [2.24.31:2::gentoo] USE="cups (-aqua) -examples -introspection {-test} -vim-syntax -xinerama (-debug%)" ABI_X86="(64) -32 -x32" 0 KiB [ebuild NS ] app-text/docbook-xml-dtd-4.3-r1:4.3::gentoo [4.1.2-r6:4.1.2::gentoo, 4.2-r2:4.2::gentoo, 4.4-r2:4.4::gentoo, 4.5-r1:4.5::gentoo] 0 KiB [ebuild N ] x11-themes/gtk-engines-adwaita-3.20.2::gentoo ABI_X86="(64) -32 -x32" 2,812 KiB [ebuild N ] x11-themes/gnome-themes-standard-3.20.2-r1::gentoo 0 KiB [ebuild N ] gnome-base/gsettings-desktop-schemas-3.20.0::gentoo USE="-introspection" 564 KiB As a workaround, I've added "x11-themes/gtk-engines-adwaita-3.20.2" and "x11-themes/gnome-themes-standard-3.20.2-r1" to my /etc/portage/profile/package.provided. After upgrading to x11-libs/gtk+-2.24.31-r1, my Gtk-2 apps (e.g., Eclipse and Inkscape) are still working fine, so evidently these extra packages are superfluous. Am I missing something? Thanks.
I you would please re-read this report, it would be clear to you that this is required to handle the default theming of the gtk+:2 that is currently set to match the default gtk+:3 theme that is Adwaita. The change amounts to about 18MB on a system without gnome installed, 3MB if gnome is installed. This is indeed not necessary if you customize your installation to use another theme but we must provide working defaults.
I think the issue being raised (which I was also wondering about) is that gtk+:2 seems to have worked fine without any explicit theme setting. I know I've never touched anything theme-related, and in fact I have dummy *-9999 theme packages in my local overlay to ensure theme stuff doesn't get installed, yet GTK2 applications all seem to work fine, including all default GTK2 icons. It's certainly possible that some sort of default got set long ago that I'm not aware of (I've been using Gentoo for several years now), but I wonder if the solution which has been applied here is actually masking a different problem.
(In reply to Andrew Church from comment #6) > I think the issue being raised (which I was also wondering about) is that > gtk+:2 seems to have worked fine without any explicit theme setting. Well, I can't say that Gtk+:2 works fine without any explicit theme setting, as I have explicitly set its theme (using kde-plasma/kde-gtk-config) to "oxygen-gtk". However, even without x11-themes/gnome-themes-standard and x11-themes/gtk-engines-adwaita installed, I still see that "Raleigh" is an option for Gtk+:2 theme. > I wonder if the solution which has been applied here is actually > masking a different problem. I wonder the same. I also wonder if maybe the minimum viable default requirement isn't to have gnome-themes-standard and gtk-engines-adwaita installed but rather just to have *some theme* installed. If that's true, then would it make sense to introduce a new virtual package (e.g., virtual/gtk-theme:2) that is satisfied by *any* installed Gtk+:2 theme package?
I agree with comments 6 and 7; having x11-libs/gtk+:2 depend on a virtual matching any theme seems preferable to me. The situation has gotten worse since those comments were posted: the current theme (=x11-themes/adwaita-icon-theme-3.24.0) has a hard DEPEND on x11-libs/gtk+:3 (with a comment indicating "gtk+:3 is needed for build for the gtk-encode-symbolic-svg utility"). So it has reached the point where x11-libs/gtk+:2 has x11-libs/gtk+:3 as a dependency!
Gary (comment 8) is exactly correct. When the default font was changed (which totally threw me and took quite some time to correct) I changed to the Raleigh theme in ~/.gtkrc-2.0. Since x11-themes/adwaita-icon-theme-3.24.0 went stable, a build time requirement for a theme I wasn't even using was forcing the install of gtk+3. At the suggestion of someone on the Gentoo forum I've added x11-themes/adwaita-icon-theme-3.22.0-r2 to /etc/portage/profile/package.provided and uninstalled the adwaita entirely...which seems to have worked around this. I can't even count how many things are wrong with that.