summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2015-06-11 00:33:34 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2015-06-11 00:33:34 +0000
commit39d0abcb48355c17594f6be8bac97f644a19657b (patch)
treee908b06436383f83f66b3440f43fe942bf935392 /media-libs/clutter
parentStable for arm. Bug #551682. (diff)
downloadhistorical-39d0abcb48355c17594f6be8bac97f644a19657b.tar.gz
historical-39d0abcb48355c17594f6be8bac97f644a19657b.tar.bz2
historical-39d0abcb48355c17594f6be8bac97f644a19657b.zip
Add upstream patch to fix touchpad detection. Add upstream patches to fix totem crashes with nvidia-drivers (bug #549036, thanks to Harris Landgarten and Pacho Ramos).
Package-Manager: portage-2.2.20/cvs/Linux x86_64 Manifest-Sign-Key: 0x18E5B6F2D8D5EC8D
Diffstat (limited to 'media-libs/clutter')
-rw-r--r--media-libs/clutter/ChangeLog14
-rw-r--r--media-libs/clutter/Manifest27
-rw-r--r--media-libs/clutter/clutter-1.22.2-r1.ebuild116
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch32
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch109
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch130
-rw-r--r--media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch36
7 files changed, 458 insertions, 6 deletions
diff --git a/media-libs/clutter/ChangeLog b/media-libs/clutter/ChangeLog
index cbc40ffdbc63..9cdb9ce3a8a9 100644
--- a/media-libs/clutter/ChangeLog
+++ b/media-libs/clutter/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for media-libs/clutter
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/clutter/ChangeLog,v 1.96 2015/06/08 22:23:32 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/clutter/ChangeLog,v 1.97 2015/06/11 00:33:29 tetromino Exp $
+
+*clutter-1.22.2-r1 (11 Jun 2015)
+
+ 11 Jun 2015; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +clutter-1.22.2-r1.ebuild,
+ +files/clutter-1.22.2-clutter_gdk_get_visual.patch,
+ +files/clutter-1.22.2-clutter_gdk_get_visual-2.patch,
+ +files/clutter-1.22.2-cogl-visual-xlib.patch,
+ +files/clutter-1.22.2-touchpad-detection.patch:
+ Add upstream patch to fix touchpad detection. Add upstream patches to fix
+ totem crashes with nvidia-drivers (bug #549036, thanks to Harris Landgarten
+ and Pacho Ramos).
*clutter-1.22.2 (08 Jun 2015)
diff --git a/media-libs/clutter/Manifest b/media-libs/clutter/Manifest
index daf066891ced..a7a3893f2b19 100644
--- a/media-libs/clutter/Manifest
+++ b/media-libs/clutter/Manifest
@@ -1,6 +1,10 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX clutter-1.22.2-clutter_gdk_get_visual-2.patch 1080 SHA256 da94a1f4ecf3c419ab000ff36cd1870e4951abf044dac1f7a797698fcacb92cd SHA512 3c567dafc0faeaaa144427b52ce50d52763e4294874175adf4fc9dace417103f56a1fb16b2e2affeaabe9dbe8e86e54e78232f22e9cae927cd5362336bad992f WHIRLPOOL ffccb3461461402a1737929f0110d92993015cd60e412796a019009c0ad6c00d94127df06610e081840c41197a07115e24bfed56cd4ae28ba7b3a42ba80ea7a6
+AUX clutter-1.22.2-clutter_gdk_get_visual.patch 3438 SHA256 fc981badb1268b78a168f43d3ad322b78a752d100445748daf91570814f08a66 SHA512 9513a7ac822a5c7a93bbf0b83d707f9351427f1653c5370c90a7c8be6593c1704dd700f37a809a5218f0c5f389f5d84de4c5e53e09d721b8c70448691912d7fd WHIRLPOOL 81cb7092222627b82c185ca6eb89b1b518ea1425e402d2434bc653cfc57811128afdfba8dbddedff626f3bb9bdbe76fd0a056e75a574b3cdf8fd9e3e1e5bdc41
+AUX clutter-1.22.2-cogl-visual-xlib.patch 4836 SHA256 1ce63fdbdd7658dcfac362242a5d794f5624d0987c026fe59b177fa8a33e1696 SHA512 13f2216b4072dcb5d24b2a2d23cc8851cf6dca5b4e4f74a4fcd35f07a2889b969221e4e1eddb84b5ad155d9dfc48aed43b6d7822e0aafd8be0196f1e2d6f8443 WHIRLPOOL a4af018376c359d63e230af6efd8549e5f997b39e9cd94823f4c371f119ff4a1122e2364b171329495558095ddeb7a6bb064da2fa7f6808a37949674c88d9fc9
+AUX clutter-1.22.2-touchpad-detection.patch 1252 SHA256 0da1018648dad1b45079b9dcefefd723ac5756201e02e1ef9e5a8af4d7ecc51a SHA512 cdbe208fce5e59c5d67f37a1632b701dcb4d14e487e12deceb43c6074fd28a4e839e4accba55efdc91b12caea5de1939f7392392e5fe060b50bdbe2ef15f446f WHIRLPOOL 80d9d059eef77e82b6c80bf80ab045ef328294e8ab6ef35c75b4cfcf552b5953c9856f46681be2042bff4967881edbac9693711ce13aa9681af89f7b6486b5fa
DIST clutter-1.18.4.tar.xz 5237900 SHA256 4eea1015cd6d4b4945cb5d4a60e52275b0d70e13852d6d99c9abc0cd4deeb60c SHA512 a2ef71c3114cda5861cc88a3c826e6144dc44b8e63a1ece58d2bb7999e731cea612231c1f67af85f2bdddf02bbd80d27e5e35b4867fb378d6698c7b1b654aa62 WHIRLPOOL f03d6aaeca310da29b03b273a0695cd3407a9b76507195a6eca64d60bc4f0de6fac3f01eaf16b71dc1f0e04c0c40dd2e08caeb6dd44d47728ad7ceb2903146e5
DIST clutter-1.20.0.tar.xz 5237780 SHA256 cc940809e6e1469ce349c4bddb0cbcc2c13c087d4fc15cda9278d855ee2d1293 SHA512 2e6c582c0a31c61104c9f73fb870c61dd4331c247e111ecc3d9823c9cc3d24d9d3743f25d672498693170ca41419f13cc5ad2e1763e3a24bfd2c5c07b627b5e3 WHIRLPOOL 8e75af9837313db3d8a2c4d9191a1738140248b39a2e4bb5309c1c029a55825f7f306952d21677b2f9ad75b3d0d0a5488517955ba05a2a05274d3f866bc77868
DIST clutter-1.20.2.tar.xz 5255576 SHA256 8fa5287e964e1811c339d95252b434a2bc0c60f1f42f1c854f29c71c7efeca94 SHA512 c9d8283a9d562608f5af42b1a3d1199d83ab18262e7fde6d221e1440ed5cadd3a82f9cf3f41a67330178773b05e63d07f8c24d87efb55df52e1bf2dc9e668788 WHIRLPOOL 9743048c63030dbc83b00bb9380bcc50bd6fcf71b0a4d77f44510063a7e3f687d720b4e07537d7e215b0ce4423e0af78959bceb483fe7749703c32d9ffae8a67
@@ -8,13 +12,26 @@ DIST clutter-1.22.2.tar.xz 5304752 SHA256 8e69d21d9f7e8e89eafc072e2615c289903260
EBUILD clutter-1.18.4.ebuild 2818 SHA256 666e526478a35b5ab8e4bee634bc643440ebb22c77d67257b1bb49ccc04ccbe9 SHA512 d928387b75440c57ed7256223b96163ceb7fc1ebf3dc5dd5615367b848a53ef12c306b9e7936ae83773b136c51717816a1466727ed0bb249d8407f0627d03213 WHIRLPOOL 1cd2baf9f2ab0dcc6c4dfa9751a101d37484cbaf88fb02620a9991035ff7fe00f251e025d88c65b4ab49ed827aeec3ad2f0eadf4e965c69388e791fe3e55de71
EBUILD clutter-1.20.0.ebuild 3218 SHA256 619f6370746d8601a1b5859ba71062cf61105215fdcd41044b8e05b2aa63a33d SHA512 13b580dda0a0168982bc8ee7f9bdd21a5c63ace69978753ee5c526df0a245511b275e9b11aa0bdbfde87fe2781202cce9eaed111faf2d2c83e3806db8a835d93 WHIRLPOOL 16313d1c2cefdb131998ce88ccf95996d2338e9580e6d3828a77493b8c0e82eff17c95cc2b90f022fc17ea95e8f41c606abf81c25407052b7eefbd8659d74ae1
EBUILD clutter-1.20.2.ebuild 3218 SHA256 7525f19a9b912876305af1658e5b1cf006b267c39c4bc6fe9c5e39e5125b14f5 SHA512 4a9146fefa2cf5576fcbfda453f069216b01f359f2c152314f89a7ff2f9a8a62b48b2e086929305417315a7300a7e9140d1f1a9fad0f42d0628aa9aac221c38e WHIRLPOOL 4d61953d955e94a520c7dfb78bdd2da616e1a3562f16390abca319f0c2f7373bffef85fb2834965c0f3e1e2620620841f768df2a0068c9c50d4b8adf80b0837c
+EBUILD clutter-1.22.2-r1.ebuild 3386 SHA256 1f3e9c788119288624730bb1913477a1f08afc5d84cf8d29411930f390afe4d4 SHA512 70c0b2c75d36c64177af0ea55a12cf39149cded89f981818596a80c9617e9739c065afdfdada14d0dcfb5d6d6248f5f89e8fb4552b0e15709b975be5b4f6d625 WHIRLPOOL dcf3fb5a57b9eb0e3c03d28cb883707f3192a79f695421c1a77e62797ab74d4667b888dbe0cfba5bad797083d4aa278f6b70410adbfff3d0b2b59684e15ad943
EBUILD clutter-1.22.2.ebuild 3096 SHA256 2143bc02e26dc185077e1c2f13d079a31e560a5e77f97a9adbac822eabd5d02c SHA512 91d35c71ddc33a27432bab864bcbb563fb8e5fc283e2a943f1692c5adff056f94a8c39db78d701e78e0dfb046914d66eb923b32c788ff4c8b24535f8043b8766 WHIRLPOOL f2415825a2c6652152db2312196729f3b794c7c8b2603521bdf2579d9acb36a75490096732bc1603ee2cf04e08560803c0cabb5f1da1ffbe3c3360aea9e06e7b
-MISC ChangeLog 15141 SHA256 0cb7fbc8eedd4b13fa39f0234337dc84c24c46dfba1d035a2f006a3577598dc4 SHA512 48e5074ceca888716e14fc54f1c225ff99c35ba3960efc590abdb953e1b2839e7c1a2c6b3f208cae966248d0af82a8b2ef485faa41943e2ba8d91c5cc850b1b9 WHIRLPOOL 668c1b06914364fa947c74cafdc9673af84eff7385d04b0b334b4c0e709c1291e9ca365a4cb36130061c4a7168c5695024407564e0ddb86109c1d2e1159ddcc6
+MISC ChangeLog 15652 SHA256 271817341f7b4b40918029611f655ae7e81005814f6515ec2eade673d63f8e5e SHA512 e79e632b0121ce38425098f5ec1559e89ecb1621464a2a5bf87235a4f652ab11f7a5a0155e0642b197be8a9be4aa96d4a62b730cd2a648aa3b8da7d221cf2695 WHIRLPOOL c37eb1c428d8420ea11fa14420465d19f4bd1f8f7fd9d00394bfa254d94cf6c7a2ae00cb7e6527261d7dd7d7d04802f36900cfe45fcfa9724edc9e8820e9cf31
MISC metadata.xml 322 SHA256 6d3e994cdd0ab9a54f0fc5507a6a30ff169d80218391b388afb261b6c9c2708c SHA512 704ff34a347ff87d97915e16166b2ae7e55db69e05dda0bc73724d9b73938c73f75a2b62815f0934fc4b5816a79841497501c0f4ed98fd00f42816576528ed9f WHIRLPOOL 93beab4d31d116edc299769391946eeac37f9662611f13dd833b1c3416cedc96e7d77d1fa7a739ce384dc67164b006924ae1ca7c453ca3c95bbc368bb68f7fce
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
+Version: GnuPG v2.0
-iEYEAREIAAYFAlV2FeUACgkQ1fmVwcYIWAYcHQCg2GP95NXC4Yk7rLjwShn4drB0
-V3MAn3ikma0Dx3oxbaghJE3TCh1Dr9MP
-=CR5H
+iQJ8BAEBCABmBQJVeNdaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RTNCRkUzRDRBNkI2MEEwQkYwQzMyOEEx
+OEU1QjZGMkQ4RDVFQzhEAAoJEBjltvLY1eyNbEMP/0PTqoyvdg9AFuZk6Pw/4RnV
+zSqgTmcNs80aXBGhUOGw0mrRajo2FQ6eIbgXTgunmTcjpLji5uNydhq5akHkFe+s
+QaH2XCpSLs4D4jaqi/YuLQXrrF/MMw25UAATiGIr/5yjAaI1cfvjGNfCVMyRIo2k
+C6ivNblqrrUuCQ7EmddnLmbvjxOAfmjNjnCG9hltsStxd+uyob2kODWKyhZrueTM
+X/UtyZfwWnjBowmJWllI5uiExg5US4kXT6TqoJMwfR3rQwe4wWuomDAfqMxwjI6L
+TCPBViW0s42+d4OgnFH5Tb45buJSuIdwSIdEdfe544vVXv/tbgyWFVJQGfX3AfG5
+os0tsLtVmWGLfeDHjV/fNxMqhbKzltz/RJpR5qMwjaS4Crtf3AcSEu5osGIvg6wp
+IcZMJrTdIA4VH7TXHuW0gg6G+BEGWLrFpYJc7ukpg6/guOR3GIsoiJd4D09HW7za
+OCxwvLkKG+IoAEbiMk0zj/66H+i1C5hThC8kXejagHy7e1NMiRm2ULfmLX0lMC4k
+jc5GDOY3qBgv4XGbQoJGRuErWq6pOMunMAIM8r5DMtI+eXBRw+IEFm7Qel+TWq08
+bpK8xcbteg30GvpyqfiGXGqANX6nANx/Q8Iy+hoEYdMYDJc9ZPq5WBBll8AzIsmG
+Aw5E8//vgF2y3FUugzaF
+=64Xb
-----END PGP SIGNATURE-----
diff --git a/media-libs/clutter/clutter-1.22.2-r1.ebuild b/media-libs/clutter/clutter-1.22.2-r1.ebuild
new file mode 100644
index 000000000000..f658ad7776d8
--- /dev/null
+++ b/media-libs/clutter/clutter-1.22.2-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/clutter/clutter-1.22.2-r1.ebuild,v 1.1 2015/06/11 00:33:29 tetromino Exp $
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit autotools eutils gnome2 virtualx
+
+HOMEPAGE="https://wiki.gnome.org/Projects/Clutter"
+DESCRIPTION="Clutter is a library for creating graphical user interfaces"
+
+LICENSE="LGPL-2.1+ FDL-1.1+"
+SLOT="1.0"
+IUSE="aqua debug doc egl gtk +introspection test wayland +X"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ wayland? ( egl )
+"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+# NOTE: glx flavour uses libdrm + >=mesa-7.3
+# >=libX11-1.3.1 needed for X Generic Event support
+# do not depend on tslib, it does not build and is disable by default upstream
+RDEPEND="
+ >=dev-libs/glib-2.39.0:2
+ >=dev-libs/atk-2.5.3[introspection?]
+ >=dev-libs/json-glib-0.12[introspection?]
+ >=media-libs/cogl-1.20.0:1.0=[introspection?,pango,wayland?]
+ >=x11-libs/cairo-1.14:=[aqua?,glib]
+ >=x11-libs/pango-1.30[introspection?]
+
+ virtual/opengl
+ x11-libs/libdrm:=
+
+ egl? (
+ >=dev-libs/libinput-0.8
+ media-libs/cogl[gles2,kms]
+ >=virtual/libgudev-136
+ x11-libs/libxkbcommon
+ )
+ gtk? ( >=x11-libs/gtk+-3.3.18:3[aqua?] )
+ introspection? ( >=dev-libs/gobject-introspection-1.39 )
+ X? (
+ media-libs/fontconfig
+ >=x11-libs/libX11-1.3.1
+ x11-libs/libXext
+ x11-libs/libXdamage
+ x11-proto/inputproto
+ >=x11-libs/libXi-1.3
+ >=x11-libs/libXcomposite-0.4 )
+ wayland? (
+ dev-libs/wayland
+ x11-libs/gdk-pixbuf:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.20
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ doc? (
+ >=dev-util/gtk-doc-1.20
+ >=app-text/docbook-sgml-utils-0.6.14[jadetex]
+ dev-libs/libxslt )
+ test? ( x11-libs/gdk-pixbuf )"
+
+# Tests fail with both swrast and llvmpipe
+# They pass under r600g or i965, so the bug is in mesa
+#RESTRICT="test"
+
+src_prepare() {
+ # From upstream git, 1.22 branch
+ epatch "${FILESDIR}"/${P}-touchpad-detection.patch
+ epatch "${FILESDIR}"/${P}-cogl-visual-xlib.patch
+ epatch "${FILESDIR}"/${P}-clutter_gdk_get_visual.patch
+ epatch "${FILESDIR}"/${P}-clutter_gdk_get_visual-2.patch
+
+ # We only need conformance tests, the rest are useless for us
+ sed -e 's/^\(SUBDIRS =\).*/\1 accessibility conform/g' \
+ -i tests/Makefile.am || die "am tests sed failed"
+ sed -e 's/^\(SUBDIRS =\)[^\]*/\1 accessibility conform/g' \
+ -i tests/Makefile.in || die "in tests sed failed"
+
+ eautoreconf
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # XXX: Conformance test suite (and clutter itself) does not work under Xvfb
+ # (GLX error blabla)
+ # XXX: coverage disabled for now
+ # XXX: What about cex100/win32 backends?
+ gnome2_src_configure \
+ --disable-maintainer-flags \
+ --disable-mir-backend \
+ --disable-gcov \
+ --disable-cex100-backend \
+ --disable-win32-backend \
+ --disable-tslib-input \
+ $(use_enable aqua quartz-backend) \
+ $(usex debug --enable-debug=yes --enable-debug=minimum) \
+ $(use_enable doc docs) \
+ $(use_enable egl egl-backend) \
+ $(use_enable egl evdev-input) \
+ $(use_enable gtk gdk-backend) \
+ $(use_enable introspection) \
+ $(use_enable test gdk-pixbuf) \
+ $(use_enable wayland wayland-backend) \
+ $(use_enable wayland wayland-compositor) \
+ $(use_enable X xinput) \
+ $(use_enable X x11-backend)
+}
+
+src_test() {
+ Xemake check -C tests/conform
+}
diff --git a/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch
new file mode 100644
index 000000000000..c857d9dc7c87
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual-2.patch
@@ -0,0 +1,32 @@
+From 19064c4f444ed3fd596580cb98876619133c7f22 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 19:13:13 +0100
+Subject: [PATCH 3/3] build: Reset interface_age
+
+We don't usually add symbols inside a stable branch, but given that the
+newly added clutter_gdk_get_visual() function is necessary to make
+Clutter work when embedded inside GTK running on nVidia binary drivers,
+I decided to break the rule. This requires resetting the interface age,
+so that the soname version changes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ed67ea1..5b590ed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,7 +31,7 @@ m4_define([clutter_micro_version], [3])
+ # ...
+ #
+ # • for development releases: keep clutter_interface_age to 0
+-m4_define([clutter_interface_age], [2])
++m4_define([clutter_interface_age], [0])
+
+ m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
+
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch
new file mode 100644
index 000000000000..d157ac1ee690
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-clutter_gdk_get_visual.patch
@@ -0,0 +1,109 @@
+From ab63b30a9b1812b0e53bcddcd55f00fd507347dc Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 12:02:13 +0100
+Subject: [PATCH 2/3] gdk: Add function to retrieve the GdkVisual
+
+Straight from Cogl.
+
+This allows us to propagate the GdkVisual Cogl and Clutter use to
+embedding toolkits, like GTK+.
+
+The function is annotated as being added to the 1.22 development
+cycle because it will be backported to the stable branch, so that
+downstream developers can package up a version of Clutter that does
+not crash on nVidia.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+(cherry picked from commit 2d5b5aa82aacab7cc523e5877afbb864592b7651)
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+ clutter/gdk/clutter-backend-gdk.c | 48 ++++++++++++++++++++++++++++++
+ clutter/gdk/clutter-gdk.h | 3 ++
+ doc/reference/clutter/clutter-sections.txt | 1 +
+ 3 files changed, 52 insertions(+)
+
+diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
+index 47bd671..01ba8cb 100644
+--- a/clutter/gdk/clutter-backend-gdk.c
++++ b/clutter/gdk/clutter-backend-gdk.c
+@@ -498,3 +498,51 @@ clutter_gdk_disable_event_retrieval (void)
+
+ disable_event_retrieval = TRUE;
+ }
++
++/**
++ * clutter_gdk_get_visual:
++ *
++ * Retrieves the #GdkVisual used by Clutter.
++ *
++ * This function should be used when embedding Clutter inside GDK-based
++ * foreign toolkits, to ensure that the visual applied to the #GdkWindow
++ * used to render the #ClutterStage is the correct one.
++ *
++ * Returns: (transfer none): a #GdkVisual instance
++ *
++ * Since: 1.22
++ */
++GdkVisual *
++clutter_gdk_get_visual (void)
++{
++ ClutterBackend *backend = clutter_get_default_backend ();
++ GdkScreen *screen;
++
++ if (backend == NULL)
++ {
++ g_critical ("The Clutter backend has not been initialised");
++ return NULL;
++ }
++
++ if (!CLUTTER_IS_BACKEND_GDK (backend))
++ {
++ g_critical ("The Clutter backend is not a GDK backend");
++ return NULL;
++ }
++
++ screen = CLUTTER_BACKEND_GDK (backend)->screen;
++ g_assert (screen != NULL);
++
++#if defined(GDK_WINDOWING_X11) && defined(COGL_HAS_XLIB_SUPPORT)
++ {
++ XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
++ if (xvisinfo != NULL)
++ return gdk_x11_screen_lookup_visual (screen, xvisinfo->visualid);
++ }
++#endif
++
++ if (gdk_screen_get_rgba_visual (screen) != NULL)
++ return gdk_screen_get_rgba_visual (screen);
++
++ return gdk_screen_get_system_visual (screen);
++}
+diff --git a/clutter/gdk/clutter-gdk.h b/clutter/gdk/clutter-gdk.h
+index a009378..c5b979b 100644
+--- a/clutter/gdk/clutter-gdk.h
++++ b/clutter/gdk/clutter-gdk.h
+@@ -61,6 +61,9 @@ ClutterStage * clutter_gdk_get_stage_from_window (GdkWindow *window);
+ CLUTTER_AVAILABLE_IN_1_10
+ void clutter_gdk_disable_event_retrieval (void);
+
++CLUTTER_AVAILABLE_IN_1_22
++GdkVisual * clutter_gdk_get_visual (void);
++
+ G_END_DECLS
+
+ #endif /* __CLUTTER_GDK_H__ */
+diff --git a/doc/reference/clutter/clutter-sections.txt b/doc/reference/clutter/clutter-sections.txt
+index 327f185..d521dc1 100644
+--- a/doc/reference/clutter/clutter-sections.txt
++++ b/doc/reference/clutter/clutter-sections.txt
+@@ -1516,6 +1516,7 @@ clutter_gdk_handle_event
+ clutter_gdk_set_display
+ clutter_gdk_get_default_display
+ clutter_gdk_set_stage_foreign
++clutter_gdk_get_visual
+ </SECTION>
+
+ <SECTION>
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch b/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch
new file mode 100644
index 000000000000..52cf929a006b
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-cogl-visual-xlib.patch
@@ -0,0 +1,130 @@
+From 44fc1c87489bb7bbe1d28eb0f551794db333e1fb Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 10 Jun 2015 11:55:50 +0100
+Subject: [PATCH 1/3] gdk: Use the Cogl visual on Xlib winsys
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GDK 3.16 started selecting different visuals, to best comply with the
+requirements for OpenGL, and this has broken Clutter on GLX drivers that
+are fairly picky in how they select visuals and GLXFBConfig.
+
+GDK selects GLXFBConfig that do not include depth or stencil buffers;
+Cogl, on the other hand, needs both depth and stencil buffers, and keeps
+selecting the first available visual, assuming that the GLX driver will
+give us the best compliant one, as per specification. Sadly, some
+drivers will return incompatible configurations, and then bomb out when
+you try to embed Clutter inside GTK+, because of mismatched visuals.
+
+Cogl has an old, deprecated, Clutter-only API that allows us to retrieve
+the XVisualInfo mapping to the GLXFBConfig it uses; this means we should
+look up the GdkVisual for it when creating our own GdkWindows, instead
+of relying on the RGBA and system GdkVisuals exposed by GDK — at least
+on X11.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=747489
+(cherry picked from commit c91621e8c28bb190eaa9d59e08b180589a255cf3)
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+ clutter/gdk/clutter-stage-gdk.c | 50 ++++++++++++++++++++++++++++++-----------
+ 1 file changed, 37 insertions(+), 13 deletions(-)
+
+diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
+index e855a98..82f7679 100644
+--- a/clutter/gdk/clutter-stage-gdk.c
++++ b/clutter/gdk/clutter-stage-gdk.c
+@@ -29,6 +29,10 @@
+
+ #include <cogl/cogl.h>
+
++#ifdef COGL_HAS_XLIB_SUPPORT
++#include <cogl/cogl-xlib.h>
++#endif
++
+ #define GDK_DISABLE_DEPRECATION_WARNINGS
+
+ #include <gdk/gdk.h>
+@@ -183,7 +187,7 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ GdkWindowAttr attributes;
+ gboolean cursor_visible;
+ gboolean use_alpha;
+- gfloat width, height;
++ gfloat width, height;
+
+ if (backend->cogl_context == NULL)
+ {
+@@ -191,12 +195,7 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ return FALSE;
+ }
+
+- if (stage_gdk->foreign_window)
+- {
+- width = gdk_window_get_width (stage_gdk->window);
+- height = gdk_window_get_height (stage_gdk->window);
+- }
+- else
++ if (!stage_gdk->foreign_window)
+ {
+ if (stage_gdk->window != NULL)
+ {
+@@ -239,13 +238,34 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+ attributes.cursor = stage_gdk->blank_cursor;
+ }
+
+- attributes.visual = NULL;
++ /* If the ClutterStage:use-alpha is set, but GDK does not have an
++ * RGBA visual, then we unset the property on the Stage
++ */
+ if (use_alpha)
+ {
+- attributes.visual = gdk_screen_get_rgba_visual (backend_gdk->screen);
++ if (gdk_screen_get_rgba_visual (backend_gdk->screen) == NULL)
++ {
++ clutter_stage_set_use_alpha (stage_cogl->wrapper, FALSE);
++ use_alpha = FALSE;
++ }
++ }
+
+- if (attributes.visual == NULL)
+- clutter_stage_set_use_alpha (stage_cogl->wrapper, FALSE);
++#if defined(GDK_WINDOWING_X11) && defined(COGL_HAS_XLIB_SUPPORT)
++ if (GDK_IS_X11_DISPLAY (backend_gdk->display))
++ {
++ XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
++ if (xvisinfo != NULL)
++ {
++ attributes.visual = gdk_x11_screen_lookup_visual (backend_gdk->screen,
++ xvisinfo->visualid);
++ }
++ }
++ else
++#endif
++ {
++ attributes.visual = use_alpha
++ ? gdk_screen_get_rgba_visual (backend_gdk->screen)
++ : gdk_screen_get_system_visual (backend_gdk->screen);
+ }
+
+ if (attributes.visual == NULL)
+@@ -263,11 +283,15 @@ clutter_stage_gdk_realize (ClutterStageWindow *stage_window)
+
+ clutter_stage_gdk_set_gdk_geometry (stage_gdk);
+ }
++ else
++ {
++ width = gdk_window_get_width (stage_gdk->window);
++ height = gdk_window_get_height (stage_gdk->window);
++ }
+
+ gdk_window_ensure_native (stage_gdk->window);
+
+- g_object_set_data (G_OBJECT (stage_gdk->window),
+- "clutter-stage-window", stage_gdk);
++ g_object_set_data (G_OBJECT (stage_gdk->window), "clutter-stage-window", stage_gdk);
+
+ stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context,
+ width, height);
+--
+2.4.3
+
diff --git a/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch b/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch
new file mode 100644
index 000000000000..ad65105b13c8
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.22.2-touchpad-detection.patch
@@ -0,0 +1,36 @@
+From a4aad807d5cc6842043e12897cfac3a516825c0f Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Sun, 17 May 2015 00:50:56 +0200
+Subject: [PATCH] x11: Fix touchpad detection
+
+Commit 79849ef1d5fff9acd310cd68d59df0c7cf2cb28f had a typo in the
+device property format check. This property is formated in 8-bit
+items, not 32-bit.
+
+This went unnoticed till now because some touchpads were still being
+detected as such due to a second check below:
+
+ else if (strstr (name, "touchpad") != NULL)
+ source = CLUTTER_TOUCHPAD_DEVICE;
+
+https://bugzilla.gnome.org/show_bug.cgi?id=749482
+---
+ clutter/x11/clutter-device-manager-xi2.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
+index 17c491e..1b101c4 100644
+--- a/clutter/x11/clutter-device-manager-xi2.c
++++ b/clutter/x11/clutter-device-manager-xi2.c
+@@ -242,7 +242,7 @@ is_touchpad_device (ClutterBackendX11 *backend_x11,
+ /* We don't care about the data */
+ XFree (data);
+
+- if (rc != Success || type != XA_INTEGER || format != 32 || nitems != 1)
++ if (rc != Success || type != XA_INTEGER || format != 8 || nitems != 1)
+ return FALSE;
+
+ return TRUE;
+--
+2.4.3
+