diff options
authorMart Raudsepp <>2014-08-23 11:57:27 +0300
committerMart Raudsepp <>2014-08-23 13:35:12 +0300
commit4098bc1270e15bcd4556069c77978d9913718100 (patch)
parentAdd x11-libs/gtk+:3 modified to accept raspberrypi-userland[wayland] as a way... (diff)
gtk+: Add a USE=gtk3-only for building without gtk2 dependency
Useful for gtk3 only wayland only systems like aiming with my RPi work. At some point main gentoo tree could swap around which SLOT provides gtk-update-icon-cache dependency and allow a gtk3 only system (and disallow a gtk2 only system), or split gtk-update-icon-cache build out into a separate package, in which the gtk version dep can be chosen, if it deps on gtk really at all. It should really be a hard blocker on gtk2 (!!x11-libs/gtk+:2), but a soft blocker allows for easier migration to gtk3-only for me, where the gtk2 linking remaining libs/apps keep the libs around as a preserved-lib, needing rebuild against gtk3 or unmerge of the gtk2 using stuff.
2 files changed, 7 insertions, 4 deletions
diff --git a/x11-libs/gtk+/gtk+-3.12.2.ebuild b/x11-libs/gtk+/gtk+-3.12.2.ebuild
index 210357d..e571a3a 100644
--- a/x11-libs/gtk+/gtk+-3.12.2.ebuild
+++ b/x11-libs/gtk+/gtk+-3.12.2.ebuild
@@ -18,7 +18,7 @@ SLOT="3"
# *
# I tried this and got it all compiling, but the end result is unusable as it
# horribly mixes up the backends -- grobian
-IUSE="aqua cloudprint colord cups debug examples +introspection test vim-syntax wayland X xinerama"
+IUSE="aqua cloudprint colord cups debug examples +introspection gtk3-only test vim-syntax wayland X xinerama"
|| ( aqua wayland X )
xinerama? ( X )
@@ -28,14 +28,15 @@ KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd
# FIXME: introspection data is built against system installation of gtk+:3
# NOTE: cairo[svg] dep is due to bug 291283 (not patched to avoid eautoreconf)
-# Use gtk+:2 for gtk-update-icon-cache
+# Use gtk+:2 for gtk-update-icon-cache unless USE=gtk3-only
- >=x11-libs/gtk+-2.24:2
+ gtk3-only? ( !x11-libs/gtk+:2 )
+ !gtk3-only? ( >=x11-libs/gtk+-2.24:2 )
@@ -148,7 +149,7 @@ src_configure() {
$(use_enable xinerama) \
--disable-papi \
--enable-man \
- --enable-gtk2-dependency \
+ $(use_enable !gtk3-only gtk2-dependency) \
--with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
diff --git a/x11-libs/gtk+/metadata.xml b/x11-libs/gtk+/metadata.xml
index f29cdbe..854fe0b 100644
--- a/x11-libs/gtk+/metadata.xml
+++ b/x11-libs/gtk+/metadata.xml
@@ -12,6 +12,8 @@
<flag name="cloudprint">Enable printing via Google Cloud Print.</flag>
<flag name="colord">Use <pkg>x11-misc/colord</pkg> for color management
in printing</flag>
+ <flag name="gtk3-only">Use only a gtk3 system without gtk2 via building
+ gtk-update-icon-cache from gtk3 SLOT</flag>
<flag name="packagekit">Enable support for the distro-neutral package
manager GUI <pkg>app-admin/packagekit</pkg> in application chooser</flag>