public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: status/portage-configs/, gnome-extra/bug-buddy/files/, gnome-extra/bug-buddy/
@ 2011-06-02 16:37 Nirbheek Chauhan
  0 siblings, 0 replies; only message in thread
From: Nirbheek Chauhan @ 2011-06-02 16:37 UTC (permalink / raw
  To: gentoo-commits

commit:     4209dea662be5f96b62289ca059b6b35963832c0
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sat May 21 19:00:30 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Thu Jun  2 16:35:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=4209dea6

gnome-extra/bug-buddy with gtk3 crash handler module!

* Added patch to build crash handler module for gtk+:3 (when USE=gtk3).
  Submitted upstream at gnome bug 623614

Signed-off-by: Nirbheek Chauhan <nirbheek <AT> gentoo.org>

---
 gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild |   70 +++++++++
 .../bug-buddy-2.32.0-gnomesession-debug.patch      |   27 ++++
 .../files/bug-buddy-2.32.0-gtk3-segvhandler.patch  |  157 ++++++++++++++++++++
 status/portage-configs/package.keywords.gnome3     |    1 +
 4 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild b/gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild
new file mode 100644
index 0000000..4086a86
--- /dev/null
+++ b/gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/bug-buddy/bug-buddy-2.32.0-r2.ebuild,v 1.7 2011/03/23 07:57:04 nirbheek Exp $
+
+EAPI="3"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit autotools gnome2 eutils
+if [[ ${PV} = 9999 ]]; then
+	inherit gnome2-live
+fi
+
+DESCRIPTION="A graphical bug reporting tool"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="Ximian-logos GPL-2"
+SLOT="2"
+IUSE="eds +gtk3"
+if [[ ${PV} = 9999 ]]; then
+	KEYWORDS=""
+else
+	KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+fi
+
+RDEPEND=">=gnome-base/libbonobo-2
+	>=dev-libs/glib-2.16:2
+	>=dev-libs/libxml2-2.4.6
+	>=x11-libs/gtk+-2.14:2
+	>=net-libs/libsoup-2.4:2.4
+	>=gnome-base/libgtop-2.13.3:2
+	>=gnome-base/gconf-2:2
+	|| ( dev-libs/elfutils dev-libs/libelf )
+	>=sys-devel/gdb-5.1
+	gtk3? ( x11-libs/gtk+:3 )
+	eds? ( >=gnome-extra/evolution-data-server-1.3 )"
+DEPEND="${RDEPEND}
+	>=app-text/gnome-doc-utils-0.3.2
+	>=dev-util/pkgconfig-0.9
+	>=dev-util/intltool-0.40"
+
+pkg_setup() {
+	G2CONF="${G2CONF}
+		--enable-gtk2-segv-handler
+		$(use_enable gtk3 gtk3-segv-handler)
+		$(use_enable eds)"
+	DOCS="AUTHORS ChangeLog NEWS README TODO"
+}
+
+src_prepare() {
+	# Revert this commit as it causes gnome-session to always run in debug mode, bug #348722
+	EPATCH_OPTS="-R" epatch "${FILESDIR}/${PN}-2.32.0-gnomesession-debug.patch"
+
+	# gtk3 crash handler module: https://bugzilla.gnome.org/show_bug.cgi?id=623614
+	epatch "${FILESDIR}/${PN}-2.32.0-gtk3-segvhandler.patch"
+	eautoreconf
+
+	gnome2_src_prepare
+}
+
+pkg_postinst() {
+	# Prevent old gnomebreakpad to be requested, bug #348351
+	local gconftool="${EROOT}usr/bin/gconftool-2"
+	local GCONF_CONFIG_SOURCE="$("${gconftool}" --get-default-source | sed "s;:/;:${ROOT};")"
+
+	"${gconftool}" --direct --config-source "${GCONF_CONFIG_SOURCE}" --type=bool \
+		--set /apps/gnome_settings_daemon/gtk-modules/gnomebreakpad false || die
+
+	gnome2_pkg_postinst
+}

diff --git a/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gnomesession-debug.patch b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gnomesession-debug.patch
new file mode 100644
index 0000000..18d5de4
--- /dev/null
+++ b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gnomesession-debug.patch
@@ -0,0 +1,27 @@
+From 475fa5697d0aad6883318e9c51af81f51c9030e4 Mon Sep 17 00:00:00 2001
+From: Fernando Herrera <fherrera@onirica.com>
+Date: Tue, 22 Jun 2010 20:18:23 +0000
+Subject: Do not call old log_handler if it is not glib's default
+
+See https://bugzilla.gnome.org/show_bug.cgi?id=622068
+---
+diff --git a/segv_handler/gnome-segvhanlder.c b/segv_handler/gnome-segvhanlder.c
+index de64df5..ae3196e 100644
+--- a/segv_handler/gnome-segvhanlder.c
++++ b/segv_handler/gnome-segvhanlder.c
+@@ -284,6 +284,13 @@ gtk_module_init (int *argc, char** argv[])
+                 	sigaction(SIGBUS, setptr, NULL);
+ 
+ 		old_handler = g_log_set_default_handler (bug_buddy_log_handler, NULL);
++
++		/* We cannot call previous log handlers other than glib's default
++                 * because we don't know its previous user_data and they may rely on it
++                 * See https://bugzilla.gnome.org/show_bug.cgi?id=622068 */
++		if (old_handler != g_log_default_handler) {
++			old_handler = NULL;
++		}
+ 	}
+ 	return 0;
+ }
+--
+cgit v0.8.3.1

diff --git a/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gtk3-segvhandler.patch b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gtk3-segvhandler.patch
new file mode 100644
index 0000000..7223076
--- /dev/null
+++ b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gtk3-segvhandler.patch
@@ -0,0 +1,157 @@
+From 49b325144942068066a9b56dae2fd29f704c2f99 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Sat, 21 May 2011 04:41:18 -0400
+Subject: [PATCH] Build gnomesegvhandler module for gtk-2 and gtk-3
+
+This patch allows bug-buddy's crash handler module to be built both for
+gtk-2 and 3. To test, export GTK_MODULES=gnomesegvhandler and make a
+gtk (2 or 3) application crash; if bug-buddy is installed, it will run
+and handle the crash.
+
+Details:
+* configure will take --enable-gtk2-segv-handler and --enable-gtk3-segv-handler
+  options. By default, both options are "auto" (if the appropriate
+  version of gdk is detected, the module for that version of gtk will be
+  built), but can be set to "yes" or "no" to override that behavior.
+* Both modules have the same name (libgnomesegvhandler, same as
+  bug-buddy uses currently). They are built in separate subdirectories
+  under segv_handler.
+* The GDK_DISPLAY() macro in gnome-segvhanlder.c has been replaced with
+  gdk_x11_get_default_xdisplay(), which AFAIK has been the recommended
+  replacement for that macro since the first release of gdk-2. This is
+  necessary since in gdk-3, GDK_DISPLAY is finally gone for good.
+* Removed a comment about a long-abandoned idea that does not make sense
+  (550135, resolved as NOTABUG in 2009).
+
+Signed-off-by: Alexandre Rostovtsev <tetromino@gmail.com>
+---
+ configure.in                     |   54 +++++++++++++++++++++++++++++++++-----
+ segv_handler/Makefile.am         |   28 +++++++++++++++----
+ segv_handler/gnome-segvhanlder.c |    5 +---
+ 3 files changed, 70 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 46e1401..0d05707 100644
+--- a/configure.in
++++ b/configure.in
+@@ -73,13 +73,51 @@ AC_CHECK_LIB(elf, elf_version)
+ AC_CHECK_HEADERS([libelf.h],[],[AC_MSG_ERROR([libelf.h not found.])])
+ AC_CHECK_HEADERS([gelf.h],[],[AC_MSG_ERROR([gelf.h not found.])])
+ 
+-GDK_REQUIRED="x11 gdk-x11-2.0 >= 2.9"
+-PKG_CHECK_MODULES(GNOME_SEGV_HANDLER,
+-[
+-	$GDK_REQUIRED
+-])
+-AC_SUBST(GNOME_SEGV_HANDLER_CFLAGS)
+-AC_SUBST(GNOME_SEGV_HANDLER_LIBS)
++AC_ARG_ENABLE([gtk2-segv-handler],
++        [AC_HELP_STRING([--enable-gtk2-segv-handler],
++                        [Enable crash handler module for Gtk+ 2 [default=auto]])],
++                        enable_gtk2_segv_handler="$enableval", enable_gtk2_segv_handler=auto)
++if test "x$enable_gtk2_segv_handler" != "xno" ; then
++    GDK_REQUIRED="x11 gdk-x11-2.0 >= 2.9"
++    PKG_CHECK_MODULES(GNOME2_SEGV_HANDLER, [$GDK_REQUIRED],
++        [
++          enable_gtk2_segv_handler=yes
++          AC_SUBST(GNOME2_SEGV_HANDLER_CFLAGS)
++          AC_SUBST(GNOME2_SEGV_HANDLER_LIBS)
++        ],
++        [
++          if test "x$enable_gtk2_segv_handler" = "xyes" ; then
++            AC_MSG_ERROR([Gtk+ 2 crash handler module requirements ($GDK_REQUIRED) not met:
++
++$GNOME2_SEGV_HANDLER_PKG_ERRORS])
++          fi
++          enable_gtk2_segv_handler=no
++        ])
++fi
++AM_CONDITIONAL(GNOME2_SEGV_HANDLER, test "x$enable_gtk2_segv_handler" = "xyes")
++
++AC_ARG_ENABLE([gtk3-segv-handler],
++        [AC_HELP_STRING([--enable-gtk3-segv-handler],
++                        [Enable crash handler module for Gtk+ 3 [default=auto]])],
++                        enable_gtk3_segv_handler="$enableval", enable_gtk3_segv_handler=auto)
++if test "x$enable_gtk3_segv_handler" != "xno" ; then
++    GDK_REQUIRED="x11 gdk-x11-3.0"
++    PKG_CHECK_MODULES(GNOME3_SEGV_HANDLER, [$GDK_REQUIRED],
++        [
++          enable_gtk3_segv_handler=yes
++          AC_SUBST(GNOME3_SEGV_HANDLER_CFLAGS)
++          AC_SUBST(GNOME3_SEGV_HANDLER_LIBS)
++        ],
++        [
++          if test "x$enable_gtk3_segv_handler" = "xyes" ; then
++            AC_MSG_ERROR([Gtk+ 3 crash handler module requirements ($GDK_REQUIRED) not met:
++
++$GNOME3_SEGV_HANDLER_PKG_ERRORS])
++          fi
++          enable_gtk3_segv_handler=no
++        ])
++fi
++AM_CONDITIONAL(GNOME3_SEGV_HANDLER, test "x$enable_gtk3_segv_handler" = "xyes")
+ 
+ 
+ PKG_CHECK_MODULES(GNOME_CRASH, $GTK_REQUIRED)
+@@ -127,4 +165,6 @@ Configuration:
+ 
+ 	LIBS:	${BUG_BUDDY_LIBS}
+ 
++	Gtk+ 2 crash handler module:	${enable_gtk2_segv_handler}
++	Gtk+ 3 crash handler module:	${enable_gtk3_segv_handler}
+ "
+diff --git a/segv_handler/Makefile.am b/segv_handler/Makefile.am
+index 5e6c8cb..adf145b 100644
+--- a/segv_handler/Makefile.am
++++ b/segv_handler/Makefile.am
+@@ -1,9 +1,25 @@
+-INCLUDES = -I. -DNDEBUG -D_REENTRANT $(GNOME_SEGV_HANDLER_CFLAGS)
++if GNOME2_SEGV_HANDLER
+ 
+-module_LTLIBRARIES = libgnomesegvhandler.la
++module2_LTLIBRARIES = gtk2/libgnomesegvhandler.la
+ 
+-moduledir = $(libdir)/gtk-2.0/modules
++module2dir = $(libdir)/gtk-2.0/modules
+ 
+-libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
+-libgnomesegvhandler_la_LIBADD = $(GNOME_SEGV_HANDLER_LIBS)
+-libgnomesegvhandler_la_LDFLAGS = -rpath $(moduledir) -module -avoid-version @LDFLAGS@
++gtk2_libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
++gtk2_libgnomesegvhandler_la_CFLAGS = -I. -DNDEBUG -D_REENTRANT $(GNOME2_SEGV_HANDLER_CFLAGS)
++gtk2_libgnomesegvhandler_la_LIBADD = $(GNOME2_SEGV_HANDLER_LIBS)
++gtk2_libgnomesegvhandler_la_LDFLAGS = -rpath $(module2dir) -module -avoid-version @LDFLAGS@
++
++endif
++
++if GNOME3_SEGV_HANDLER
++
++module3_LTLIBRARIES = gtk3/libgnomesegvhandler.la
++
++module3dir = $(libdir)/gtk-3.0/modules
++
++gtk3_libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
++gtk3_libgnomesegvhandler_la_CFLAGS = -I. -DNDEBUG -D_REENTRANT $(GNOME3_SEGV_HANDLER_CFLAGS)
++gtk3_libgnomesegvhandler_la_LIBADD = $(GNOME3_SEGV_HANDLER_LIBS)
++gtk3_libgnomesegvhandler_la_LDFLAGS = -rpath $(module3dir) -module -avoid-version @LDFLAGS@
++
++endif
+diff --git a/segv_handler/gnome-segvhanlder.c b/segv_handler/gnome-segvhanlder.c
+index ae3196e..df3ee3d 100644
+--- a/segv_handler/gnome-segvhanlder.c
++++ b/segv_handler/gnome-segvhanlder.c
+@@ -202,10 +202,7 @@ release_grabs (void)
+         gdk_pointer_ungrab(GDK_CURRENT_TIME);
+         gdk_keyboard_ungrab(GDK_CURRENT_TIME);
+ 
+-        /* TODO: can we replace this with gdk_x11_ungrab_server ()?
+-         * see http://bugzilla.gnome.org/show_bug.cgi?id=550135.
+-         */
+-	XUngrabServer (GDK_DISPLAY ());
++	XUngrabServer (gdk_x11_get_default_xdisplay ());
+ 
+         gdk_flush();
+ 
+-- 
+1.7.5.rc3
+

diff --git a/status/portage-configs/package.keywords.gnome3 b/status/portage-configs/package.keywords.gnome3
index 8dc7d35..d3477cf 100644
--- a/status/portage-configs/package.keywords.gnome3
+++ b/status/portage-configs/package.keywords.gnome3
@@ -54,6 +54,7 @@ gnome-base/gsettings-desktop-schemas
 gnome-base/gvfs
 gnome-base/libgnomekbd
 gnome-extra/at-spi
+gnome-extra/bug-buddy
 gnome-extra/evolution-data-server
 gnome-extra/evolution-exchange
 gnome-extra/evolution-mapi



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-02 16:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-02 16:37 [gentoo-commits] proj/gnome:master commit in: status/portage-configs/, gnome-extra/bug-buddy/files/, gnome-extra/bug-buddy/ Nirbheek Chauhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox