summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-05-02 06:54:42 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-05-02 06:54:42 +0000
commit034481185c9496a501d3c4ede69dc7c30288e731 (patch)
treecb248616b5fc0b48e677a6e6ed1887c52e7bb06a /x11-libs/gtk+
parentmarked x86 per bug 414163 (diff)
downloadhistorical-034481185c9496a501d3c4ede69dc7c30288e731.tar.gz
historical-034481185c9496a501d3c4ede69dc7c30288e731.tar.bz2
historical-034481185c9496a501d3c4ede69dc7c30288e731.zip
Fix annotation button in evince (bug #412751, thanks to Geraint Yang). Fix inefficient scrolling.
Package-Manager: portage-2.2.0_alpha101/cvs/Linux x86_64
Diffstat (limited to 'x11-libs/gtk+')
-rw-r--r--x11-libs/gtk+/ChangeLog11
-rw-r--r--x11-libs/gtk+/Manifest18
-rw-r--r--x11-libs/gtk+/files/gtk+-3.4.1-extraneous-events-scrolling.patch70
-rw-r--r--x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-adjustment.patch55
-rw-r--r--x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-rename.patch61
-rw-r--r--x11-libs/gtk+/gtk+-3.4.1-r1.ebuild220
6 files changed, 429 insertions, 6 deletions
diff --git a/x11-libs/gtk+/ChangeLog b/x11-libs/gtk+/ChangeLog
index c19a7d0526c9..a6ef65350d4e 100644
--- a/x11-libs/gtk+/ChangeLog
+++ b/x11-libs/gtk+/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for x11-libs/gtk+
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.585 2012/04/29 16:18:28 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.586 2012/05/02 06:54:42 tetromino Exp $
+
+*gtk+-3.4.1-r1 (02 May 2012)
+
+ 02 May 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +gtk+-3.4.1-r1.ebuild, +files/gtk+-3.4.1-extraneous-events-scrolling.patch,
+ +files/gtk+-3.4.1-toolpalette-adjustment.patch,
+ +files/gtk+-3.4.1-toolpalette-rename.patch:
+ Fix annotation button in evince (bug #412751, thanks to Geraint Yang).
+ Fix inefficient scrolling.
29 Apr 2012; Markus Meier <maekke@gentoo.org> gtk+-2.24.10-r1.ebuild:
x86 stable, bug #410611
diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest
index 02fb060c390b..01883df551ab 100644
--- a/x11-libs/gtk+/Manifest
+++ b/x11-libs/gtk+/Manifest
@@ -23,6 +23,9 @@ AUX gtk+-3.2.2-toolbutton-icon-widget-GtkMisc.patch 2093 RMD160 552e6e0df6e683d7
AUX gtk+-3.2.4-fallback-theme.patch 2880 RMD160 bf88b6a0610513d065aa243274726f303bb98728 SHA1 cc9044a95ae816062f953d1da0434098de2e26e7 SHA256 d021df0cc77b7033b57b62e0a3585c2fe7ae6d50273f0819b5de3acfdb73336c
AUX gtk+-3.3.18-fallback-theme.patch 2841 RMD160 01f69c2800ae57c1e21e22ba5be562061cae20b0 SHA1 0800ab93bd2b1b311ead6bd2a423fec984fb78f1 SHA256 a552218132b903835a480881803e29be678a311d3a653b8111eba1fd0ea04922
AUX gtk+-3.3.20-wayland-xkbcommon-headers.patch 1347 RMD160 b21bfb4fdca683e385b08f181ce10922bc1d3b58 SHA1 d74d0fe0ca3058044f22520fdc288e5c0758311d SHA256 9876be3bf2ef19413248e5de51e285aa1545b3d94751e840692b811c7b4bd9a9
+AUX gtk+-3.4.1-extraneous-events-scrolling.patch 3418 RMD160 912717e3348c9f363709c887f56354a3bb3a131b SHA1 c8f27b8c5a0f49ff750f5ecb3a2791909edebd2a SHA256 49b0ab6747618815f3d0df1b619263f21c38ab323ceb2ab2bca440e4d57efa16
+AUX gtk+-3.4.1-toolpalette-adjustment.patch 1766 RMD160 4cab2ddf622426fc634c8f5f0d210f5421c85c9a SHA1 e47271055c46b68062e635fecea93043ec077703 SHA256 39edf79b13488b61cd0df2da8dfbff596d3a9f79f5f303d82f185690f15698a7
+AUX gtk+-3.4.1-toolpalette-rename.patch 1785 RMD160 52cd193b0b983bbd909458b61c1621522ecca73a SHA1 abb44f9cb573f2a1cc0f4a884321ad04e9ddf3ec SHA256 81c1a48d3af97296c02d0c4ddd595a58af86f0cd502e0e3c9e46ca2e06aac4e9
AUX gtkrc 627 RMD160 3171e0c9132bb2a9119c51750702db23c4a5f076 SHA1 cdb4665e94e1b9e8bc3985390eecca463469c3b3 SHA256 22e4197e5976ed623233399049082383033b613176d77126d246a1f6cb747294
AUX settings.ini 96 RMD160 ff8d7e28f097820b15ea1d2168d9405db1a5707b SHA1 92c3120655ba14f163846a22d5c94fa50b0eb437 SHA256 a42c86c26b5bfa0da806961e28cdff21da6e2f7c35febf67c67d7f2667658163
DIST gtk+-1.2.10-r8-gentoo.diff.bz2 81223 RMD160 fa41bb12e41f0c60c605dbeac03a1aaa905f4333 SHA1 7350d1ed147e52ddc870a4d4b52073f7407d9f0d SHA256 517bdadbaa0e13285b2d72a667b311219342306d4f68d838c3c1dbc5bfbf1684
@@ -48,13 +51,18 @@ EBUILD gtk+-3.2.3.ebuild 6772 RMD160 bc8b01274b35fc412918a382060f5947fb47099f SH
EBUILD gtk+-3.2.4-r1.ebuild 7017 RMD160 11ea6d5328d86a9a96f86731646f1f5b4dae4971 SHA1 28477e257f99ce7ffd090c367e388c2648d876bd SHA256 cb7180072273195f139a3ad444d0f4bf8c20c530952581672ecfe56d9182b03f
EBUILD gtk+-3.2.4.ebuild 6912 RMD160 2dae7816d7c2fa9ef1f15ca0c7f7657f0c9c2759 SHA1 cb825154ae19abb4692e645dfa7946e14dda5d7a SHA256 c561ae0cb065d05953d2f367766a3c481267184695bc34a9a11138d29dc1a821
EBUILD gtk+-3.4.0.ebuild 6955 RMD160 5f511aebb053f45296094104565a92c20646311e SHA1 764d1a086e1c702c3a1596140aaaab9976aa1849 SHA256 09290e7becf898d61f81598c8ccb94ce85b3bccc21893441ea2b81ba5d8c6c28
+EBUILD gtk+-3.4.1-r1.ebuild 7136 RMD160 8051a6d7a65437efd760b2c2d719f542acf4cab7 SHA1 50179fbda7b66ddb3994c95992940efa5432d90e SHA256 d03542037238a164e885e31039cf54455bcef9903e5b8d22266ceb8a609270e6
EBUILD gtk+-3.4.1.ebuild 6944 RMD160 4e2a824a190f74bbd558e77b5ee115ae036cf22c SHA1 0c24748bd8da6ba843ebf2607bda3a57cee4020b SHA256 1381fd0d6980c316da18e3395327d68acc00c3f306feb9d0ba0f1ea205d07795
-MISC ChangeLog 90051 RMD160 bc5a412e4f2dc133f49b6a47eb5926d296a45bcb SHA1 791f52f2d46a5cac651ce2bac539a43827050b42 SHA256 c9cefe2d322ddd120fcc22572d3cf445c2858a56357f8dc9177bb259bc0f470f
+MISC ChangeLog 90420 RMD160 6a5faafcb74810ad03ffc516177b9aca457d5d37 SHA1 1b73cc6d8b09ca53510ee5ec8e9435917a9845ec SHA256 ad3c938252363113055dd40303cb282255e39ea4a413df7b0508fde2b46291c3
MISC metadata.xml 870 RMD160 a94fb5c6acb8fb9015e5f4c40c8b9b1eb3ddf9d8 SHA1 2769a95a236ce2a234c7d5bd75231de142345445 SHA256 90835d0edfdbbc25c781b0c7bcf9b7b6db82ce5f412082ec56d250891e1853ea
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk+daosACgkQkKaRLQcq0GLs0QCfQdVYc/jnfnLUhp4FE0fI0X3z
-0B8AoJivGhbAYWzeh3UHNYRAXDvfrAwL
-=qVCH
+iQEcBAEBAgAGBQJPoNo4AAoJEJ0WA1zPCt1hk1IH+gOusV9WInEHmftyLCsy6GM7
+bsFbhZC/MRX3Z9gqq0xkaFhsX7VeqwQB/udLnffAeOm20NDCymPlbhApIpLWqzWX
+BsmiPIEyScRgSn7KXnFykxsU1ryMNO7SDD5qnpSPmltV5yG6W4c9u7IZG+3ucLtA
+WA3HDZ02fsbjykML3NyXfZ4DHOSGBPhEgt3KiAFHn3b3ktUPV0J2CKlM6XsG52oJ
+yTSVVVapBKI9yAcuPwkLC5bakCmQ+D++NMKVkwYQYa7fCQDZwtOBbtqFyM6inzqp
+B6UuXQq8xL8OWqNIS7PO56l7m1si2XXMi+6V7/qCGWErZwG3AfDwdgVKFmzePzc=
+=eC/N
-----END PGP SIGNATURE-----
diff --git a/x11-libs/gtk+/files/gtk+-3.4.1-extraneous-events-scrolling.patch b/x11-libs/gtk+/files/gtk+-3.4.1-extraneous-events-scrolling.patch
new file mode 100644
index 000000000000..ea93d98abfde
--- /dev/null
+++ b/x11-libs/gtk+/files/gtk+-3.4.1-extraneous-events-scrolling.patch
@@ -0,0 +1,70 @@
+From 37e3722d3a80be13bd8f7a4d3ac8edc923fc2750 Mon Sep 17 00:00:00 2001
+From: Cosimo Cecchi <cosimoc@gnome.org>
+Date: Fri, 20 Apr 2012 17:34:08 -0400
+Subject: [PATCH] xi2: ignore extraneous events for smooth scroll
+
+Since the event will be ignored anyway after it's translated (slave
+devices are disabled), don't let it run in the smooth scroll code path,
+as it will burn our caches for the actual event we're interested in.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=673644
+---
+ gdk/x11/gdkdevicemanager-xi2.c | 23 +++++++++++++++--------
+ 1 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
+index a34bd09..15f095b 100644
+--- a/gdk/x11/gdkdevicemanager-xi2.c
++++ b/gdk/x11/gdkdevicemanager-xi2.c
+@@ -1305,13 +1305,24 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
+ case XI_Motion:
+ {
+ XIDeviceEvent *xev = (XIDeviceEvent *) ev;
+- GdkDevice *source_device;
++ GdkDevice *source_device, *device;
+ gdouble delta_x, delta_y;
+
+ source_device = g_hash_table_lookup (device_manager->id_table,
+ GUINT_TO_POINTER (xev->sourceid));
++ device = g_hash_table_lookup (device_manager->id_table,
++ GUINT_TO_POINTER (xev->deviceid));
+
+- if (scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
++ /* When scrolling, X might send events twice here; once with both the
++ * device and the source device set to the physical device, and once
++ * with the device set to the master device.
++ * Since we are only interested in the latter, and
++ * scroll_valuators_changed() updates the valuator cache for the
++ * source device, we need to explicitly ignore the first event in
++ * order to get the correct delta for the second.
++ */
++ if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE &&
++ scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
+ &xev->valuators, &delta_x, &delta_y))
+ {
+ event->scroll.type = GDK_SCROLL;
+@@ -1333,9 +1344,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
+ event->scroll.delta_x = delta_x;
+ event->scroll.delta_y = delta_y;
+
+- event->scroll.device = g_hash_table_lookup (device_manager->id_table,
+- GUINT_TO_POINTER (xev->deviceid));
+-
++ event->scroll.device = device;
+ gdk_event_set_source_device (event, source_device);
+
+ event->scroll.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
+@@ -1350,9 +1359,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
+ event->motion.x_root = (gdouble) xev->root_x;
+ event->motion.y_root = (gdouble) xev->root_y;
+
+- event->motion.device = g_hash_table_lookup (device_manager->id_table,
+- GINT_TO_POINTER (xev->deviceid));
+-
++ event->motion.device = device;
+ gdk_event_set_source_device (event, source_device);
+
+ event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
+--
+1.7.8.6
+
diff --git a/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-adjustment.patch b/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-adjustment.patch
new file mode 100644
index 000000000000..78b715dc30af
--- /dev/null
+++ b/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-adjustment.patch
@@ -0,0 +1,55 @@
+From 67e2e41907add988746f59857ef86d6ea37b8392 Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Fri, 27 Apr 2012 03:33:57 +0200
+Subject: [PATCH] toolpalette: Configure adjustment properly
+
+https://bugzilla.gnome.org/show_bug.cgi?id=673650
+---
+ gtk/gtktoolpalette.c | 17 +++++++----------
+ 1 files changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
+index 0dd9b21..0655bff 100644
+--- a/gtk/gtktoolpalette.c
++++ b/gtk/gtktoolpalette.c
+@@ -665,30 +665,27 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
+ /* update the scrollbar to match the displayed adjustment */
+ if (adjustment)
+ {
+- gdouble value, lower, upper;
++ gdouble lower, upper;
++
++ total_size = MAX (0, total_size);
++ page_size = MIN (total_size, page_size);
+
+ if (GTK_ORIENTATION_VERTICAL == palette->priv->orientation ||
+ GTK_TEXT_DIR_LTR == direction)
+ {
+ lower = 0;
+- upper = MAX (0, total_size);
+-
+- value = MIN (offset, upper - page_size);
+- gtk_adjustment_clamp_page (adjustment, value, offset + page_size);
++ upper = total_size;
+ }
+ else
+ {
+- lower = page_size - MAX (0, total_size);
++ lower = page_size - total_size;
+ upper = page_size;
+
+ offset = -offset;
+-
+- value = MAX (offset, lower);
+- gtk_adjustment_clamp_page (adjustment, offset, value + page_size);
+ }
+
+ gtk_adjustment_configure (adjustment,
+- value,
++ offset,
+ lower,
+ upper,
+ page_size * 0.1,
+--
+1.7.8.6
+
diff --git a/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-rename.patch b/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-rename.patch
new file mode 100644
index 000000000000..bdbadc0c263a
--- /dev/null
+++ b/x11-libs/gtk+/files/gtk+-3.4.1-toolpalette-rename.patch
@@ -0,0 +1,61 @@
+From 27ff5516cce371395c0e8c22ae3e25f91078771c Mon Sep 17 00:00:00 2001
+From: Benjamin Otte <otte@redhat.com>
+Date: Fri, 27 Apr 2012 03:28:22 +0200
+Subject: [PATCH] toolpalette: Rename variable
+
+The variable that holds the total size for all widget allocations
+shouldn't be called page_start.
+---
+ gtk/gtktoolpalette.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
+index be6297a..0dd9b21 100644
+--- a/gtk/gtktoolpalette.c
++++ b/gtk/gtktoolpalette.c
+@@ -473,7 +473,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
+ gint remaining_space = 0;
+ gint expand_space = 0;
+
+- gint page_start, page_size = 0;
++ gint total_size, page_size;
+ gint offset = 0;
+ guint i;
+ guint border_width;
+@@ -652,14 +652,14 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
+ child_allocation.y += border_width;
+ child_allocation.y += offset;
+
+- page_start = child_allocation.y;
++ total_size = child_allocation.y;
+ }
+ else
+ {
+ x += border_width;
+ x += offset;
+
+- page_start = x;
++ total_size = x;
+ }
+
+ /* update the scrollbar to match the displayed adjustment */
+@@ -671,14 +671,14 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
+ GTK_TEXT_DIR_LTR == direction)
+ {
+ lower = 0;
+- upper = MAX (0, page_start);
++ upper = MAX (0, total_size);
+
+ value = MIN (offset, upper - page_size);
+ gtk_adjustment_clamp_page (adjustment, value, offset + page_size);
+ }
+ else
+ {
+- lower = page_size - MAX (0, page_start);
++ lower = page_size - MAX (0, total_size);
+ upper = page_size;
+
+ offset = -offset;
+--
+1.7.8.6
+
diff --git a/x11-libs/gtk+/gtk+-3.4.1-r1.ebuild b/x11-libs/gtk+/gtk+-3.4.1-r1.ebuild
new file mode 100644
index 000000000000..f51b48c7b9bf
--- /dev/null
+++ b/x11-libs/gtk+/gtk+-3.4.1-r1.ebuild
@@ -0,0 +1,220 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-3.4.1-r1.ebuild,v 1.1 2012/05/02 06:54:42 tetromino Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic gnome.org gnome2-utils libtool virtualx
+
+DESCRIPTION="Gimp ToolKit +"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="LGPL-2"
+SLOT="3"
+# NOTE: This gtk+ has multi-gdk-backend support, see:
+# * http://blogs.gnome.org/kris/2010/12/29/gdk-3-0-on-mac-os-x/
+# * http://mail.gnome.org/archives/gtk-devel-list/2010-November/msg00099.html
+# I tried this and got it all compiling, but the end result is unusable as it
+# horribly mixes up the backends -- grobian
+IUSE="aqua colord cups debug doc examples +introspection packagekit test vim-syntax wayland X xinerama"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ xinerama? ( X )"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+# 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
+COMMON_DEPEND="X? (
+ x11-libs/libXrender
+ x11-libs/libX11
+ >=x11-libs/libXi-1.3
+ x11-libs/libXt
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.3
+ x11-libs/libXcursor
+ x11-libs/libXfixes
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ xinerama? ( x11-libs/libXinerama )
+ )
+ wayland? (
+ dev-libs/wayland
+ media-libs/mesa[egl,wayland]
+ x11-libs/cairo[opengl]
+ x11-libs/libxkbcommon
+ )
+ >=dev-libs/glib-2.32
+ >=x11-libs/pango-1.30[introspection?]
+ >=dev-libs/atk-2.2[introspection?]
+ >=x11-libs/cairo-1.10.0[aqua?,glib,svg,X?]
+ >=x11-libs/gdk-pixbuf-2.26:2[introspection?,X?]
+ >=x11-libs/gtk+-2.24:2
+ media-libs/fontconfig
+ x11-misc/shared-mime-info
+ colord? ( >=x11-misc/colord-0.1.9 )
+ cups? ( >=net-print/cups-1.2 )
+ introspection? ( >=dev-libs/gobject-introspection-1.32 )"
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/pkgconfig-0.9
+ X? (
+ x11-proto/xextproto
+ x11-proto/xproto
+ x11-proto/inputproto
+ x11-proto/damageproto
+ xinerama? ( x11-proto/xineramaproto )
+ )
+ >=dev-util/gtk-doc-am-1.11
+ doc? (
+ >=dev-util/gtk-doc-1.11
+ ~app-text/docbook-xml-dtd-4.1.2 )
+ test? (
+ media-fonts/font-misc-misc
+ media-fonts/font-cursor-misc )"
+# gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90
+# gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90
+# >=xorg-server-1.11.4 needed for
+# http://mail.gnome.org/archives/desktop-devel-list/2012-March/msg00024.html
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gail-1000
+ !<x11-libs/vte-0.31.0:2.90
+ packagekit? ( app-admin/packagekit-base )
+ X? ( !<x11-base/xorg-server-1.11.4 )"
+PDEPEND="vim-syntax? ( app-vim/gtk-syntax )"
+
+strip_builddir() {
+ local rule=$1
+ shift
+ local directory=$1
+ shift
+ sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
+ || die "Could not strip director ${directory} from build."
+}
+
+src_prepare() {
+ # -O3 and company cause random crashes in applications. Bug #133469
+ replace-flags -O3 -O2
+ strip-flags
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=65410
+ epatch "${FILESDIR}/${PN}-3.3.18-fallback-theme.patch"
+
+ # Apparently needed for new libxkbcommon headers; bug #408131
+ epatch "${FILESDIR}/${PN}-3.3.20-wayland-xkbcommon-headers.patch"
+
+ # In next release
+ epatch "${FILESDIR}/${P}-extraneous-events-scrolling.patch"
+ epatch "${FILESDIR}/${P}-toolpalette-rename.patch"
+ epatch "${FILESDIR}/${P}-toolpalette-adjustment.patch"
+
+ # Non-working test in gentoo's env
+ sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \
+ -i gtk/tests/testing.c || die "sed 1 failed"
+ sed '\%/recent-manager/add%,/recent_manager_purge/ d' \
+ -i gtk/tests/recentmanager.c || die "sed 2 failed"
+
+ # FIXME: multiple reftests fail when run from portage (but succeed when
+ # run from a manual compile in a temp directory)
+ sed -e 's:\(SUBDIRS.*\)reftests:\1:' \
+ -i tests/Makefile.* || die "sed 3 failed"
+
+ # Test results depend on the list of mounted filesystems!
+ rm -v tests/a11y/pickers.{ui,txt} || die "rm failed"
+
+ if ! use test; then
+ # don't waste time building tests
+ strip_builddir SRC_SUBDIRS tests Makefile.am
+ [[ ${PV} != 9999 ]] && strip_builddir SRC_SUBDIRS tests Makefile.in
+ fi
+
+ if ! use examples; then
+ # don't waste time building demos
+ strip_builddir SRC_SUBDIRS demos Makefile.am
+ [[ ${PV} != 9999 ]] && strip_builddir SRC_SUBDIRS demos Makefile.in
+ fi
+
+ [[ ${PV} = 9999 ]] && gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf="$(use_enable aqua quartz-backend)
+ $(use_enable colord)
+ $(use_enable cups cups auto)
+ $(use_enable doc gtk-doc)
+ $(use_enable introspection)
+ $(use_enable packagekit)
+ $(use_enable wayland wayland-backend)
+ $(use_enable X x11-backend)
+ $(use_enable X xcomposite)
+ $(use_enable X xdamage)
+ $(use_enable X xfixes)
+ $(use_enable X xkb)
+ $(use_enable X xrandr)
+ $(use_enable xinerama)
+ --disable-papi
+ --enable-gtk2-dependency"
+
+ # Passing --disable-debug is not recommended for production use
+ use debug && myconf="${myconf} --enable-debug=yes"
+
+ # need libdir here to avoid a double slash in a path that libtool doesn't
+ # grok so well during install (// between $EPREFIX and usr ...)
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)" ${myconf}
+}
+
+src_test() {
+ # Tests require a new gnome-themes-standard, but adding it to DEPEND
+ # would result in circular dependencies.
+ # https://bugzilla.gnome.org/show_bug.cgi?id=669562
+ if ! has_version '>=x11-themes/gnome-themes-standard-3.3.91'; then
+ ewarn "Tests will be skipped beecause >=gnome-themes-standard-3.3.90"
+ ewarn "is not installed. Please re-run tests after installing the"
+ ewarn "required version of gnome-themes-standard."
+ return 0
+ fi
+ unset DBUS_SESSION_BUS_ADDRESS
+ # Exporting HOME fixes tests using XDG directories spec since all defaults
+ # are based on $HOME. It is also backward compatible with functions not
+ # yet ported to this spec.
+ XDG_DATA_HOME="${T}" HOME="${T}" Xemake check || die "tests failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ insinto /etc/gtk-3.0
+ doins "${FILESDIR}"/settings.ini
+
+ dodoc AUTHORS ChangeLog* HACKING NEWS* README*
+
+ # Remove unneeded *.la files
+ find "${D}" -name '*.la' -exec rm -f {} +
+
+ # add -framework Carbon to the .pc files
+ use aqua && for i in gtk+-3.0.pc gtk+-quartz-3.0.pc gtk+-unix-print-3.0.pc; do
+ sed -i -e "s:Libs\: :Libs\: -framework Carbon :" "${ED}"usr/$(get_libdir)/pkgconfig/$i || die "sed failed"
+ done
+}
+
+pkg_preinst() {
+ gnome2_schemas_savelist
+}
+
+pkg_postinst() {
+ gnome2_schemas_update
+
+ local GTK3_MODDIR="${EROOT}usr/$(get_libdir)/gtk-3.0/3.0.0"
+ gtk-query-immodules-3.0 > "${GTK3_MODDIR}/immodules.cache" \
+ || ewarn "Failed to run gtk-query-immodules-3.0"
+
+ if ! has_version "app-text/evince"; then
+ elog "Please install app-text/evince for print preview functionality."
+ elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
+ elog "add it to your settings.ini file."
+ fi
+}
+
+pkg_postrm() {
+ gnome2_schemas_update
+}