Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: status/portage-configs/, gnome-extra/bug-buddy/files/, gnome-extra/bug-buddy/
Date: Thu, 02 Jun 2011 16:37:22
Message-Id: 4209dea662be5f96b62289ca059b6b35963832c0.nirbheek@gentoo
1 commit: 4209dea662be5f96b62289ca059b6b35963832c0
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Sat May 21 19:00:30 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 2 16:35:50 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=4209dea6
7
8 gnome-extra/bug-buddy with gtk3 crash handler module!
9
10 * Added patch to build crash handler module for gtk+:3 (when USE=gtk3).
11 Submitted upstream at gnome bug 623614
12
13 Signed-off-by: Nirbheek Chauhan <nirbheek <AT> gentoo.org>
14
15 ---
16 gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild | 70 +++++++++
17 .../bug-buddy-2.32.0-gnomesession-debug.patch | 27 ++++
18 .../files/bug-buddy-2.32.0-gtk3-segvhandler.patch | 157 ++++++++++++++++++++
19 status/portage-configs/package.keywords.gnome3 | 1 +
20 4 files changed, 255 insertions(+), 0 deletions(-)
21
22 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
23 new file mode 100644
24 index 0000000..4086a86
25 --- /dev/null
26 +++ b/gnome-extra/bug-buddy/bug-buddy-2.32.0-r300.ebuild
27 @@ -0,0 +1,70 @@
28 +# Copyright 1999-2011 Gentoo Foundation
29 +# Distributed under the terms of the GNU General Public License v2
30 +# $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 $
31 +
32 +EAPI="3"
33 +GCONF_DEBUG="no"
34 +GNOME2_LA_PUNT="yes"
35 +
36 +inherit autotools gnome2 eutils
37 +if [[ ${PV} = 9999 ]]; then
38 + inherit gnome2-live
39 +fi
40 +
41 +DESCRIPTION="A graphical bug reporting tool"
42 +HOMEPAGE="http://www.gnome.org/"
43 +
44 +LICENSE="Ximian-logos GPL-2"
45 +SLOT="2"
46 +IUSE="eds +gtk3"
47 +if [[ ${PV} = 9999 ]]; then
48 + KEYWORDS=""
49 +else
50 + KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
51 +fi
52 +
53 +RDEPEND=">=gnome-base/libbonobo-2
54 + >=dev-libs/glib-2.16:2
55 + >=dev-libs/libxml2-2.4.6
56 + >=x11-libs/gtk+-2.14:2
57 + >=net-libs/libsoup-2.4:2.4
58 + >=gnome-base/libgtop-2.13.3:2
59 + >=gnome-base/gconf-2:2
60 + || ( dev-libs/elfutils dev-libs/libelf )
61 + >=sys-devel/gdb-5.1
62 + gtk3? ( x11-libs/gtk+:3 )
63 + eds? ( >=gnome-extra/evolution-data-server-1.3 )"
64 +DEPEND="${RDEPEND}
65 + >=app-text/gnome-doc-utils-0.3.2
66 + >=dev-util/pkgconfig-0.9
67 + >=dev-util/intltool-0.40"
68 +
69 +pkg_setup() {
70 + G2CONF="${G2CONF}
71 + --enable-gtk2-segv-handler
72 + $(use_enable gtk3 gtk3-segv-handler)
73 + $(use_enable eds)"
74 + DOCS="AUTHORS ChangeLog NEWS README TODO"
75 +}
76 +
77 +src_prepare() {
78 + # Revert this commit as it causes gnome-session to always run in debug mode, bug #348722
79 + EPATCH_OPTS="-R" epatch "${FILESDIR}/${PN}-2.32.0-gnomesession-debug.patch"
80 +
81 + # gtk3 crash handler module: https://bugzilla.gnome.org/show_bug.cgi?id=623614
82 + epatch "${FILESDIR}/${PN}-2.32.0-gtk3-segvhandler.patch"
83 + eautoreconf
84 +
85 + gnome2_src_prepare
86 +}
87 +
88 +pkg_postinst() {
89 + # Prevent old gnomebreakpad to be requested, bug #348351
90 + local gconftool="${EROOT}usr/bin/gconftool-2"
91 + local GCONF_CONFIG_SOURCE="$("${gconftool}" --get-default-source | sed "s;:/;:${ROOT};")"
92 +
93 + "${gconftool}" --direct --config-source "${GCONF_CONFIG_SOURCE}" --type=bool \
94 + --set /apps/gnome_settings_daemon/gtk-modules/gnomebreakpad false || die
95 +
96 + gnome2_pkg_postinst
97 +}
98
99 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
100 new file mode 100644
101 index 0000000..18d5de4
102 --- /dev/null
103 +++ b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gnomesession-debug.patch
104 @@ -0,0 +1,27 @@
105 +From 475fa5697d0aad6883318e9c51af81f51c9030e4 Mon Sep 17 00:00:00 2001
106 +From: Fernando Herrera <fherrera@×××××××.com>
107 +Date: Tue, 22 Jun 2010 20:18:23 +0000
108 +Subject: Do not call old log_handler if it is not glib's default
109 +
110 +See https://bugzilla.gnome.org/show_bug.cgi?id=622068
111 +---
112 +diff --git a/segv_handler/gnome-segvhanlder.c b/segv_handler/gnome-segvhanlder.c
113 +index de64df5..ae3196e 100644
114 +--- a/segv_handler/gnome-segvhanlder.c
115 ++++ b/segv_handler/gnome-segvhanlder.c
116 +@@ -284,6 +284,13 @@ gtk_module_init (int *argc, char** argv[])
117 + sigaction(SIGBUS, setptr, NULL);
118 +
119 + old_handler = g_log_set_default_handler (bug_buddy_log_handler, NULL);
120 ++
121 ++ /* We cannot call previous log handlers other than glib's default
122 ++ * because we don't know its previous user_data and they may rely on it
123 ++ * See https://bugzilla.gnome.org/show_bug.cgi?id=622068 */
124 ++ if (old_handler != g_log_default_handler) {
125 ++ old_handler = NULL;
126 ++ }
127 + }
128 + return 0;
129 + }
130 +--
131 +cgit v0.8.3.1
132
133 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
134 new file mode 100644
135 index 0000000..7223076
136 --- /dev/null
137 +++ b/gnome-extra/bug-buddy/files/bug-buddy-2.32.0-gtk3-segvhandler.patch
138 @@ -0,0 +1,157 @@
139 +From 49b325144942068066a9b56dae2fd29f704c2f99 Mon Sep 17 00:00:00 2001
140 +From: Alexandre Rostovtsev <tetromino@×××××.com>
141 +Date: Sat, 21 May 2011 04:41:18 -0400
142 +Subject: [PATCH] Build gnomesegvhandler module for gtk-2 and gtk-3
143 +
144 +This patch allows bug-buddy's crash handler module to be built both for
145 +gtk-2 and 3. To test, export GTK_MODULES=gnomesegvhandler and make a
146 +gtk (2 or 3) application crash; if bug-buddy is installed, it will run
147 +and handle the crash.
148 +
149 +Details:
150 +* configure will take --enable-gtk2-segv-handler and --enable-gtk3-segv-handler
151 + options. By default, both options are "auto" (if the appropriate
152 + version of gdk is detected, the module for that version of gtk will be
153 + built), but can be set to "yes" or "no" to override that behavior.
154 +* Both modules have the same name (libgnomesegvhandler, same as
155 + bug-buddy uses currently). They are built in separate subdirectories
156 + under segv_handler.
157 +* The GDK_DISPLAY() macro in gnome-segvhanlder.c has been replaced with
158 + gdk_x11_get_default_xdisplay(), which AFAIK has been the recommended
159 + replacement for that macro since the first release of gdk-2. This is
160 + necessary since in gdk-3, GDK_DISPLAY is finally gone for good.
161 +* Removed a comment about a long-abandoned idea that does not make sense
162 + (550135, resolved as NOTABUG in 2009).
163 +
164 +Signed-off-by: Alexandre Rostovtsev <tetromino@×××××.com>
165 +---
166 + configure.in | 54 +++++++++++++++++++++++++++++++++-----
167 + segv_handler/Makefile.am | 28 +++++++++++++++----
168 + segv_handler/gnome-segvhanlder.c | 5 +---
169 + 3 files changed, 70 insertions(+), 17 deletions(-)
170 +
171 +diff --git a/configure.in b/configure.in
172 +index 46e1401..0d05707 100644
173 +--- a/configure.in
174 ++++ b/configure.in
175 +@@ -73,13 +73,51 @@ AC_CHECK_LIB(elf, elf_version)
176 + AC_CHECK_HEADERS([libelf.h],[],[AC_MSG_ERROR([libelf.h not found.])])
177 + AC_CHECK_HEADERS([gelf.h],[],[AC_MSG_ERROR([gelf.h not found.])])
178 +
179 +-GDK_REQUIRED="x11 gdk-x11-2.0 >= 2.9"
180 +-PKG_CHECK_MODULES(GNOME_SEGV_HANDLER,
181 +-[
182 +- $GDK_REQUIRED
183 +-])
184 +-AC_SUBST(GNOME_SEGV_HANDLER_CFLAGS)
185 +-AC_SUBST(GNOME_SEGV_HANDLER_LIBS)
186 ++AC_ARG_ENABLE([gtk2-segv-handler],
187 ++ [AC_HELP_STRING([--enable-gtk2-segv-handler],
188 ++ [Enable crash handler module for Gtk+ 2 [default=auto]])],
189 ++ enable_gtk2_segv_handler="$enableval", enable_gtk2_segv_handler=auto)
190 ++if test "x$enable_gtk2_segv_handler" != "xno" ; then
191 ++ GDK_REQUIRED="x11 gdk-x11-2.0 >= 2.9"
192 ++ PKG_CHECK_MODULES(GNOME2_SEGV_HANDLER, [$GDK_REQUIRED],
193 ++ [
194 ++ enable_gtk2_segv_handler=yes
195 ++ AC_SUBST(GNOME2_SEGV_HANDLER_CFLAGS)
196 ++ AC_SUBST(GNOME2_SEGV_HANDLER_LIBS)
197 ++ ],
198 ++ [
199 ++ if test "x$enable_gtk2_segv_handler" = "xyes" ; then
200 ++ AC_MSG_ERROR([Gtk+ 2 crash handler module requirements ($GDK_REQUIRED) not met:
201 ++
202 ++$GNOME2_SEGV_HANDLER_PKG_ERRORS])
203 ++ fi
204 ++ enable_gtk2_segv_handler=no
205 ++ ])
206 ++fi
207 ++AM_CONDITIONAL(GNOME2_SEGV_HANDLER, test "x$enable_gtk2_segv_handler" = "xyes")
208 ++
209 ++AC_ARG_ENABLE([gtk3-segv-handler],
210 ++ [AC_HELP_STRING([--enable-gtk3-segv-handler],
211 ++ [Enable crash handler module for Gtk+ 3 [default=auto]])],
212 ++ enable_gtk3_segv_handler="$enableval", enable_gtk3_segv_handler=auto)
213 ++if test "x$enable_gtk3_segv_handler" != "xno" ; then
214 ++ GDK_REQUIRED="x11 gdk-x11-3.0"
215 ++ PKG_CHECK_MODULES(GNOME3_SEGV_HANDLER, [$GDK_REQUIRED],
216 ++ [
217 ++ enable_gtk3_segv_handler=yes
218 ++ AC_SUBST(GNOME3_SEGV_HANDLER_CFLAGS)
219 ++ AC_SUBST(GNOME3_SEGV_HANDLER_LIBS)
220 ++ ],
221 ++ [
222 ++ if test "x$enable_gtk3_segv_handler" = "xyes" ; then
223 ++ AC_MSG_ERROR([Gtk+ 3 crash handler module requirements ($GDK_REQUIRED) not met:
224 ++
225 ++$GNOME3_SEGV_HANDLER_PKG_ERRORS])
226 ++ fi
227 ++ enable_gtk3_segv_handler=no
228 ++ ])
229 ++fi
230 ++AM_CONDITIONAL(GNOME3_SEGV_HANDLER, test "x$enable_gtk3_segv_handler" = "xyes")
231 +
232 +
233 + PKG_CHECK_MODULES(GNOME_CRASH, $GTK_REQUIRED)
234 +@@ -127,4 +165,6 @@ Configuration:
235 +
236 + LIBS: ${BUG_BUDDY_LIBS}
237 +
238 ++ Gtk+ 2 crash handler module: ${enable_gtk2_segv_handler}
239 ++ Gtk+ 3 crash handler module: ${enable_gtk3_segv_handler}
240 + "
241 +diff --git a/segv_handler/Makefile.am b/segv_handler/Makefile.am
242 +index 5e6c8cb..adf145b 100644
243 +--- a/segv_handler/Makefile.am
244 ++++ b/segv_handler/Makefile.am
245 +@@ -1,9 +1,25 @@
246 +-INCLUDES = -I. -DNDEBUG -D_REENTRANT $(GNOME_SEGV_HANDLER_CFLAGS)
247 ++if GNOME2_SEGV_HANDLER
248 +
249 +-module_LTLIBRARIES = libgnomesegvhandler.la
250 ++module2_LTLIBRARIES = gtk2/libgnomesegvhandler.la
251 +
252 +-moduledir = $(libdir)/gtk-2.0/modules
253 ++module2dir = $(libdir)/gtk-2.0/modules
254 +
255 +-libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
256 +-libgnomesegvhandler_la_LIBADD = $(GNOME_SEGV_HANDLER_LIBS)
257 +-libgnomesegvhandler_la_LDFLAGS = -rpath $(moduledir) -module -avoid-version @LDFLAGS@
258 ++gtk2_libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
259 ++gtk2_libgnomesegvhandler_la_CFLAGS = -I. -DNDEBUG -D_REENTRANT $(GNOME2_SEGV_HANDLER_CFLAGS)
260 ++gtk2_libgnomesegvhandler_la_LIBADD = $(GNOME2_SEGV_HANDLER_LIBS)
261 ++gtk2_libgnomesegvhandler_la_LDFLAGS = -rpath $(module2dir) -module -avoid-version @LDFLAGS@
262 ++
263 ++endif
264 ++
265 ++if GNOME3_SEGV_HANDLER
266 ++
267 ++module3_LTLIBRARIES = gtk3/libgnomesegvhandler.la
268 ++
269 ++module3dir = $(libdir)/gtk-3.0/modules
270 ++
271 ++gtk3_libgnomesegvhandler_la_SOURCES = gnome-segvhanlder.c
272 ++gtk3_libgnomesegvhandler_la_CFLAGS = -I. -DNDEBUG -D_REENTRANT $(GNOME3_SEGV_HANDLER_CFLAGS)
273 ++gtk3_libgnomesegvhandler_la_LIBADD = $(GNOME3_SEGV_HANDLER_LIBS)
274 ++gtk3_libgnomesegvhandler_la_LDFLAGS = -rpath $(module3dir) -module -avoid-version @LDFLAGS@
275 ++
276 ++endif
277 +diff --git a/segv_handler/gnome-segvhanlder.c b/segv_handler/gnome-segvhanlder.c
278 +index ae3196e..df3ee3d 100644
279 +--- a/segv_handler/gnome-segvhanlder.c
280 ++++ b/segv_handler/gnome-segvhanlder.c
281 +@@ -202,10 +202,7 @@ release_grabs (void)
282 + gdk_pointer_ungrab(GDK_CURRENT_TIME);
283 + gdk_keyboard_ungrab(GDK_CURRENT_TIME);
284 +
285 +- /* TODO: can we replace this with gdk_x11_ungrab_server ()?
286 +- * see http://bugzilla.gnome.org/show_bug.cgi?id=550135.
287 +- */
288 +- XUngrabServer (GDK_DISPLAY ());
289 ++ XUngrabServer (gdk_x11_get_default_xdisplay ());
290 +
291 + gdk_flush();
292 +
293 +--
294 +1.7.5.rc3
295 +
296
297 diff --git a/status/portage-configs/package.keywords.gnome3 b/status/portage-configs/package.keywords.gnome3
298 index 8dc7d35..d3477cf 100644
299 --- a/status/portage-configs/package.keywords.gnome3
300 +++ b/status/portage-configs/package.keywords.gnome3
301 @@ -54,6 +54,7 @@ gnome-base/gsettings-desktop-schemas
302 gnome-base/gvfs
303 gnome-base/libgnomekbd
304 gnome-extra/at-spi
305 +gnome-extra/bug-buddy
306 gnome-extra/evolution-data-server
307 gnome-extra/evolution-exchange
308 gnome-extra/evolution-mapi