Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: gnome-base/gnome/, status/portage-configs/, x11-wm/metacity/, ...
Date: Sat, 02 Apr 2011 18:00:46
Message-Id: 1c6ea6cdc45199ba98de05788af98125395771fe.nirbheek@gentoo
1 commit: 1c6ea6cdc45199ba98de05788af98125395771fe
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 18:00:06 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 18:00:08 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=1c6ea6cd
7
8 Use Adwaita as metacity theme in fallback mode
9
10 * Clearlooks was provided by gnome-themes, which is now obsolete
11 * Make Adwaita the default so that metacity doesn't fall back to 'Simple'
12 * Make the metas pull in metacity-2.30.3-r1, and add it to package.keywords
13
14 ---
15 gnome-base/gnome-light/gnome-light-2.91.90.ebuild | 2 +-
16 gnome-base/gnome/gnome-2.91.90.ebuild | 2 +-
17 status/portage-configs/package.keywords.gnome3 | 3 +
18 ...city-2.28.0-restartstylehint-when-replace.patch | 139 ++++++++++++++++++++
19 .../files/metacity-2.28.0-sys-wait-header.patch | 19 +++
20 .../files/metacity-2.28.1-wif_macros.patch | 16 +++
21 x11-wm/metacity/metacity-2.30.3-r1.ebuild | 88 ++++++++++++
22 7 files changed, 267 insertions(+), 2 deletions(-)
23
24 diff --git a/gnome-base/gnome-light/gnome-light-2.91.90.ebuild b/gnome-base/gnome-light/gnome-light-2.91.90.ebuild
25 index 82af57a..afb927b 100644
26 --- a/gnome-base/gnome-light/gnome-light-2.91.90.ebuild
27 +++ b/gnome-base/gnome-light/gnome-light-2.91.90.ebuild
28 @@ -44,7 +44,7 @@ RDEPEND="!gnome-base/gnome
29 >=x11-wm/mutter-${PV}
30 >=gnome-base/gnome-shell-${PV}
31
32 - >=x11-wm/metacity-2.30.3
33 + >=x11-wm/metacity-2.30.3-r1
34 >=gnome-base/gnome-panel-${PV}
35
36 >=x11-themes/gnome-icon-theme-${PV}
37
38 diff --git a/gnome-base/gnome/gnome-2.91.90.ebuild b/gnome-base/gnome/gnome-2.91.90.ebuild
39 index 8a6949e..887b092 100644
40 --- a/gnome-base/gnome/gnome-2.91.90.ebuild
41 +++ b/gnome-base/gnome/gnome-2.91.90.ebuild
42 @@ -44,7 +44,7 @@ RDEPEND="
43 >=x11-wm/mutter-${PV}
44 >=gnome-base/gnome-shell-${PV}
45
46 - >=x11-wm/metacity-2.30.3
47 + >=x11-wm/metacity-2.30.3-r1
48 >=gnome-base/gnome-panel-${PV}
49 >=gnome-base/gnome-menus-${PV}
50
51
52 diff --git a/status/portage-configs/package.keywords.gnome3 b/status/portage-configs/package.keywords.gnome3
53 index 2d75146..acd2038 100644
54 --- a/status/portage-configs/package.keywords.gnome3
55 +++ b/status/portage-configs/package.keywords.gnome3
56 @@ -166,6 +166,9 @@ gnome-base/gnome-shell
57 net-im/telepathy-logger
58 >=net-libs/telepathy-glib-0.13.12
59
60 +# GNOME Fallback
61 +>=x11-wm/metacity-2.30.3-r1
62 +
63 # GNOME Games
64 ~dev-scheme/guile-1.8.7
65 gnome-extra/gnome-games
66
67 diff --git a/x11-wm/metacity/files/metacity-2.28.0-restartstylehint-when-replace.patch b/x11-wm/metacity/files/metacity-2.28.0-restartstylehint-when-replace.patch
68 new file mode 100644
69 index 0000000..54dd79e
70 --- /dev/null
71 +++ b/x11-wm/metacity/files/metacity-2.28.0-restartstylehint-when-replace.patch
72 @@ -0,0 +1,139 @@
73 +From a3de65d5d1861f755ced7cad291fbbd4f1b8ef51 Mon Sep 17 00:00:00 2001
74 +From: Owen W. Taylor <otaylor@××××××××.net>
75 +Date: Sat, 22 Aug 2009 15:00:57 -0400
76 +Subject: [PATCH] Should set RestartStyleHint to RestartIfRunning when replaced
77 +
78 +This reverts most of commit abbd057eb967e6ab462ffe305f41b2b04d417b25;
79 +
80 + - It's fine to call meta_session_shutdown() after the display
81 + is closed, since it's talking over the ICE connection
82 + - We should not call warn_about_lame_clients_and_finish_interact()
83 + unless we are interacting with the window manager in a session
84 + save.
85 +
86 +However, the part of abbd057 that fixed accessing freed memory was
87 +fixing a real problem; this patches does the same thing in a simpler
88 +way by fixing an obvious type in meta_display_close() where it was
89 +NULL'ing out the local variable 'display' rather than the global
90 +variable 'the_display' and adding keeping the check in meta_finalize()
91 +that was added in abbd057.
92 +
93 +The order of calling meta_session_shutdown() and
94 +calling meta_display_close() is reverted back to the old order to
95 +make it clear that it's OK if the display way already closed previously.
96 +
97 +http://bugzilla.gnome.org/show_bug.cgi?id=588119
98 +---
99 + src/core/display-private.h | 2 +-
100 + src/core/display.c | 16 ++++------------
101 + src/core/main.c | 5 ++---
102 + src/core/session.c | 8 --------
103 + 4 files changed, 7 insertions(+), 24 deletions(-)
104 +
105 +diff --git a/src/core/display-private.h b/src/core/display-private.h
106 +index 19287f3..9c8ebc6 100644
107 +--- a/src/core/display-private.h
108 ++++ b/src/core/display-private.h
109 +@@ -329,7 +329,7 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
110 + void meta_display_grab (MetaDisplay *display);
111 + void meta_display_ungrab (MetaDisplay *display);
112 +
113 +-void meta_display_unmanage_screen (MetaDisplay **display,
114 ++void meta_display_unmanage_screen (MetaDisplay *display,
115 + MetaScreen *screen,
116 + guint32 timestamp);
117 +
118 +diff --git a/src/core/display.c b/src/core/display.c
119 +index 55c374a..8e35a35 100644
120 +--- a/src/core/display.c
121 ++++ b/src/core/display.c
122 +@@ -926,7 +926,7 @@ meta_display_close (MetaDisplay *display,
123 + meta_compositor_destroy (display->compositor);
124 +
125 + g_free (display);
126 +- display = NULL;
127 ++ the_display = NULL;
128 +
129 + meta_quit (META_EXIT_SUCCESS);
130 + }
131 +@@ -4762,13 +4762,10 @@ process_selection_clear (MetaDisplay *display,
132 + meta_verbose ("Got selection clear for screen %d on display %s\n",
133 + screen->number, display->name);
134 +
135 +- meta_display_unmanage_screen (&display,
136 ++ meta_display_unmanage_screen (display,
137 + screen,
138 + event->xselectionclear.time);
139 +
140 +- if (!display)
141 +- the_display = NULL;
142 +-
143 + /* display and screen may both be invalid memory... */
144 +
145 + return;
146 +@@ -4790,12 +4787,10 @@ process_selection_clear (MetaDisplay *display,
147 + }
148 +
149 + void
150 +-meta_display_unmanage_screen (MetaDisplay **displayp,
151 ++meta_display_unmanage_screen (MetaDisplay *display,
152 + MetaScreen *screen,
153 + guint32 timestamp)
154 + {
155 +- MetaDisplay *display = *displayp;
156 +-
157 + meta_verbose ("Unmanaging screen %d on display %s\n",
158 + screen->number, display->name);
159 +
160 +@@ -4805,10 +4800,7 @@ meta_display_unmanage_screen (MetaDisplay **displayp,
161 + display->screens = g_slist_remove (display->screens, screen);
162 +
163 + if (display->screens == NULL)
164 +- {
165 +- meta_display_close (display, timestamp);
166 +- *displayp = NULL;
167 +- }
168 ++ meta_display_close (display, timestamp);
169 + }
170 +
171 + void
172 +diff --git a/src/core/main.c b/src/core/main.c
173 +index a36a396..44d317e 100644
174 +--- a/src/core/main.c
175 ++++ b/src/core/main.c
176 +@@ -361,12 +361,11 @@ static void
177 + meta_finalize (void)
178 + {
179 + MetaDisplay *display = meta_get_display();
180 +-
181 +- meta_session_shutdown ();
182 +-
183 + if (display)
184 + meta_display_close (display,
185 + CurrentTime); /* I doubt correct timestamps matter here */
186 ++
187 ++ meta_session_shutdown ();
188 + }
189 +
190 + static void
191 +diff --git a/src/core/session.c b/src/core/session.c
192 +index 7e3b389..0d69350 100644
193 +--- a/src/core/session.c
194 ++++ b/src/core/session.c
195 +@@ -376,14 +376,6 @@ meta_session_shutdown (void)
196 + SmProp *props[1];
197 + char hint = SmRestartIfRunning;
198 +
199 +- if (!meta_get_display ())
200 +- {
201 +- meta_verbose ("Cannot close session because there is no display");
202 +- return;
203 +- }
204 +-
205 +- warn_about_lame_clients_and_finish_interact (FALSE);
206 +-
207 + if (session_connection == NULL)
208 + return;
209 +
210 +--
211 +1.6.4
212 \ No newline at end of file
213
214 diff --git a/x11-wm/metacity/files/metacity-2.28.0-sys-wait-header.patch b/x11-wm/metacity/files/metacity-2.28.0-sys-wait-header.patch
215 new file mode 100644
216 index 0000000..5d7f4a1
217 --- /dev/null
218 +++ b/x11-wm/metacity/files/metacity-2.28.0-sys-wait-header.patch
219 @@ -0,0 +1,19 @@
220 +From: Alexis Ballier <aballier@g.o>
221 +Date: Thu, 5 Nov 2009 19:48:41 +0100
222 +Subject: Include sys/wait.h instead of only wait.h as described in POSIX specs. Fixes build on FreeBSD.
223 +
224 +---
225 + src/core/main.c | 2 +-
226 + 1 files changed, 1 insertions(+), 1 deletions(-)
227 +
228 +--- a/src/core/main.c
229 ++++ b/src/core/main.c
230 +@@ -58,7 +58,7 @@
231 +
232 + #include <stdlib.h>
233 + #include <sys/types.h>
234 +-#include <wait.h>
235 ++#include <sys/wait.h>
236 + #include <stdio.h>
237 + #include <string.h>
238 + #include <signal.h>
239
240 diff --git a/x11-wm/metacity/files/metacity-2.28.1-wif_macros.patch b/x11-wm/metacity/files/metacity-2.28.1-wif_macros.patch
241 new file mode 100644
242 index 0000000..4ce382e
243 --- /dev/null
244 +++ b/x11-wm/metacity/files/metacity-2.28.1-wif_macros.patch
245 @@ -0,0 +1,16 @@
246 +WIFEXITED and friends are defined in sys/wait.h
247 +Fixes a build failure on BSD.
248 +
249 +https://bugs.gentoo.org/show_bug.cgi?id=309443
250 +https://bugzilla.gnome.org/show_bug.cgi?id=605460
251 +
252 +--- metacity-2.28.1/src/core/delete.c.old 2010-03-15 07:46:52.000000000 +0100
253 ++++ metacity-2.28.1/src/core/delete.c 2010-03-15 07:47:12.000000000 +0100
254 +@@ -32,6 +32,7 @@
255 + #include "workspace.h"
256 +
257 + #include <sys/types.h>
258 ++#include <sys/wait.h> /* WIF* macros */
259 + #include <signal.h>
260 + #include <unistd.h>
261 + #include <errno.h>
262
263 diff --git a/x11-wm/metacity/metacity-2.30.3-r1.ebuild b/x11-wm/metacity/metacity-2.30.3-r1.ebuild
264 new file mode 100644
265 index 0000000..d404649
266 --- /dev/null
267 +++ b/x11-wm/metacity/metacity-2.30.3-r1.ebuild
268 @@ -0,0 +1,88 @@
269 +# Copyright 1999-2011 Gentoo Foundation
270 +# Distributed under the terms of the GNU General Public License v2
271 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/metacity/metacity-2.30.3.ebuild,v 1.7 2011/03/27 13:04:59 nirbheek Exp $
272 +
273 +EAPI="3"
274 +GNOME2_LA_PUNT="yes"
275 +# debug only changes CFLAGS
276 +GCONF_DEBUG="no"
277 +
278 +inherit eutils gnome2
279 +
280 +DESCRIPTION="GNOME default window manager"
281 +HOMEPAGE="http://blogs.gnome.org/metacity/"
282 +
283 +LICENSE="GPL-2"
284 +SLOT="0"
285 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
286 +IUSE="test xinerama"
287 +
288 +# XXX: libgtop is automagic, hard-enabled instead
289 +RDEPEND=">=x11-libs/gtk+-2.20:2
290 + >=x11-libs/pango-1.2[X]
291 + >=gnome-base/gconf-2:2
292 + >=dev-libs/glib-2.6:2
293 + >=x11-libs/startup-notification-0.7
294 + >=x11-libs/libXcomposite-0.2
295 + x11-libs/libXfixes
296 + x11-libs/libXrender
297 + x11-libs/libXdamage
298 + x11-libs/libXcursor
299 + x11-libs/libX11
300 + xinerama? ( x11-libs/libXinerama )
301 + x11-libs/libXext
302 + x11-libs/libXrandr
303 + x11-libs/libSM
304 + x11-libs/libICE
305 + media-libs/libcanberra[gtk]
306 + gnome-base/libgtop
307 + gnome-extra/zenity
308 + !x11-misc/expocity"
309 +DEPEND="${RDEPEND}
310 + >=app-text/gnome-doc-utils-0.8
311 + sys-devel/gettext
312 + >=dev-util/pkgconfig-0.9
313 + >=dev-util/intltool-0.35
314 + test? ( app-text/docbook-xml-dtd:4.5 )
315 + xinerama? ( x11-proto/xineramaproto )
316 + x11-proto/xextproto
317 + x11-proto/xproto"
318 +
319 +DOCS="AUTHORS ChangeLog HACKING NEWS README *.txt doc/*.txt"
320 +
321 +pkg_setup() {
322 + G2CONF="${G2CONF}
323 + --disable-static
324 + --enable-compositor
325 + --enable-gconf
326 + --enable-render
327 + --enable-shape
328 + --enable-sm
329 + --enable-startup-notification
330 + --enable-xsync
331 + --with-gtk=2.0
332 + $(use_enable xinerama)"
333 +}
334 +
335 +src_prepare() {
336 + gnome2_src_prepare
337 +
338 + # Should set RestartStyleHint to RestartIfRunning when replaced,
339 + # this fix a strange issue with gnome-session (100% of the CPU,
340 + # and try to restart metacity infinitively when compiz is started)
341 + # patch import from upstream bug #588119.
342 + epatch "${FILESDIR}/${PN}-2.28.0-restartstylehint-when-replace.patch"
343 +
344 + # Use sys/wait.h header instead of wait.h as described in posix specs,
345 + # bug 292009
346 + epatch "${FILESDIR}/${PN}-2.28.0-sys-wait-header.patch"
347 +
348 + # WIFEXITED and friends are defined in sys/wait.h
349 + # Fixes a build failure on BSD.
350 + # https://bugs.gentoo.org/show_bug.cgi?id=309443
351 + # https://bugzilla.gnome.org/show_bug.cgi?id=605460
352 + epatch "${FILESDIR}/${PN}-2.28.1-wif_macros.patch"
353 +
354 + # Use Adwaita as the default theme instead of clearlooks
355 + sed -e 's/Clearlooks/Adwaita/g' -i src/metacity.schemas* || die
356 +}