summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-07-20 22:48:29 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2009-07-20 22:48:29 +0000
commita6f97f1cf599c5d7df0f102b0a640c6e3ec5cfbd (patch)
treef8c37684844c22b2afba1a88995a1bb800cf1797
parentFix compilation with libxklavier-4, bug #278367 (diff)
downloadgentoo-2-a6f97f1cf599c5d7df0f102b0a640c6e3ec5cfbd.tar.gz
gentoo-2-a6f97f1cf599c5d7df0f102b0a640c6e3ec5cfbd.tar.bz2
gentoo-2-a6f97f1cf599c5d7df0f102b0a640c6e3ec5cfbd.zip
Fix build with libxklavier-4, bug #278450. Fix potential crash due to extra gconf_entry_free, bug #270319.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
-rw-r--r--gnome-base/gnome-control-center/ChangeLog9
-rw-r--r--gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-gconf-unref.patch16
-rw-r--r--gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-libxklavier4.patch43
-rw-r--r--gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild9
4 files changed, 75 insertions, 2 deletions
diff --git a/gnome-base/gnome-control-center/ChangeLog b/gnome-base/gnome-control-center/ChangeLog
index 70078dd92475..cad3202277d5 100644
--- a/gnome-base/gnome-control-center/ChangeLog
+++ b/gnome-base/gnome-control-center/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-base/gnome-control-center
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.31 2009/05/21 19:27:28 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/ChangeLog,v 1.32 2009/07/20 22:48:29 eva Exp $
+
+ 20 Jul 2009; Gilles Dartiguelongue <eva@gentoo.org>
+ gnome-control-center-2.26.0.ebuild,
+ +files/gnome-control-center-2.26.0-gconf-unref.patch,
+ +files/gnome-control-center-2.26.0-libxklavier4.patch:
+ Fix build with libxklavier-4, bug #278450. Fix potential crash due to
+ extra gconf_entry_free, bug #270319.
21 May 2009; Nirbheek Chauhan <nirbheek@gentoo.org>
gnome-control-center-2.26.0.ebuild:
diff --git a/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-gconf-unref.patch b/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-gconf-unref.patch
new file mode 100644
index 000000000000..24e8938d81e7
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-gconf-unref.patch
@@ -0,0 +1,16 @@
+Fix excessive gconf_entry_free. It causes capplets crashes when gconf isn't build with g_asserts.
+
+Gnome: http://bugzilla.gnome.org/show_bug.cgi?id=583117
+Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=270319
+--- a/capplets/common/gconf-property-editor.c
++++ b/capplets/common/gconf-property-editor.c
+@@ -351,7 +351,8 @@
+ gconf_entry = gconf_client_get_entry (client, GCONF_PROPERTY_EDITOR (obj)->p->key, NULL, TRUE, NULL);
+ GCONF_PROPERTY_EDITOR (obj)->p->callback (client, 0, gconf_entry, obj);
+ GCONF_PROPERTY_EDITOR (obj)->p->inited = TRUE;
+- gconf_entry_free (gconf_entry);
++ if (gconf_entry)
++ gconf_entry_free (gconf_entry);
+ g_object_unref (client);
+
+ return obj;
diff --git a/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-libxklavier4.patch b/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-libxklavier4.patch
new file mode 100644
index 000000000000..b652c58dffc8
--- /dev/null
+++ b/gnome-base/gnome-control-center/files/gnome-control-center-2.26.0-libxklavier4.patch
@@ -0,0 +1,43 @@
+From d6c2ab27173cdcab49f152fa190c5594b661f107 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Tue, 21 Jul 2009 00:30:10 +0200
+Subject: [PATCH] Add support for libxklavier-4
+
+Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=278450
+---
+ capplets/keyboard/gnome-keyboard-properties-xkb.c | 4 ++++
+ configure.in | 2 ++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c
+index a0171ac..4cfe305 100644
+--- a/capplets/keyboard/gnome-keyboard-properties-xkb.c
++++ b/capplets/keyboard/gnome-keyboard-properties-xkb.c
+@@ -155,7 +155,11 @@ setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset)
+
+ engine = xkl_engine_get_instance (GDK_DISPLAY ());
+ config_registry = xkl_config_registry_get_instance (engine);
++#ifdef HAVE_XKL_4
++ xkl_config_registry_load (config_registry, FALSE);
++#else
+ xkl_config_registry_load (config_registry);
++#endif
+
+ gkbd_keyboard_config_init (&initial_config, xkb_gconf_client,
+ engine);
+diff --git a/configure.in b/configure.in
+index 515f053..3f7eae2 100644
+--- a/configure.in
++++ b/configure.in
+@@ -180,6 +180,8 @@ CAPPLET_LIBS="$CAPPLET_LIBS $XCURSOR_LIBS"
+ dnl ==============
+ dnl gswitchit
+ dnl ==============
++PKG_CHECK_MODULES(LIBXKLAVIER, [libxklavier >= 4],
++ [AC_DEFINE(HAVE_XKL_4, [1], [libxklavier-4 support])])
+ PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4.1 libxklavier >= 3.6])
+ AC_SUBST(LIBGNOMEKBD_CFLAGS)
+ AC_SUBST(LIBGNOMEKBD_LIBS)
+--
+1.6.3.3
+
diff --git a/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild b/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild
index e6163626c41c..4d5cc1aeab02 100644
--- a/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild
+++ b/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild,v 1.3 2009/05/21 19:27:28 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-control-center/gnome-control-center-2.26.0.ebuild,v 1.4 2009/07/20 22:48:29 eva Exp $
EAPI="2"
@@ -77,6 +77,7 @@ DOCS="AUTHORS ChangeLog NEWS README TODO"
pkg_setup() {
G2CONF="${G2CONF}
--disable-update-mimedb
+ --disable-static
--enable-canberra
$(use_enable eds aboutme)
$(use_enable hal)
@@ -97,6 +98,12 @@ src_prepare() {
# applied *after* teh automagics patch
epatch "${FILESDIR}"/${P}-default-background.patch
+ # Add support for libxklavier-4, bug #278450
+ epatch "${FILESDIR}/${PN}-2.26.0-libxklavier4.patch"
+
+ # Check pointer before unreferecing gconf client, bug #270319
+ epatch "${FILESDIR}/${PN}-2.26.0-gconf-unref.patch"
+
eautoreconf
}