/[gentoo-x86]/gnome-base/gnome-control-center/files/gnome-control-center-3.10.2-optional.patch
Gentoo

Contents of /gnome-base/gnome-control-center/files/gnome-control-center-3.10.2-optional.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Dec 24 17:55:10 2013 UTC (7 months, 4 weeks ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Version bump for Gnome 3.10

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 From 079e6b87816d96d73adaa5eeb2f8a1b620a0ae70 Mon Sep 17 00:00:00 2001
2 From: Alexandre Rostovtsev <tetromino@gentoo.org>
3 Date: Mon, 9 Dec 2013 23:23:13 +0100
4 Subject: [PATCH 1/2] Make bluetooth/colord/goa/kerberos/wacom optional
5
6 Upstream is not interested in any part of this patch:
7
8 https://bugzilla.gnome.org/show_bug.cgi?id=686840
9 https://bugzilla.gnome.org/show_bug.cgi?id=697478
10 https://bugzilla.gnome.org/show_bug.cgi?id=700145
11
12 Dropped mm from this revision of the patch since it appears more
13 complicated than ever to split it from the network panel.
14
15 Signed-Off: Gilles Dartiguelongue <eva@gentoo.org>
16 ---
17 configure.ac | 140 ++++++++++++++++++++++++++------
18 panels/Makefile.am | 10 ++-
19 panels/user-accounts/um-realm-manager.c | 9 ++
20 shell/Makefile.am | 10 ++-
21 shell/cc-panel-loader.c | 8 ++
22 5 files changed, 149 insertions(+), 28 deletions(-)
23
24 diff --git a/configure.ac b/configure.ac
25 index 19bebaf..8b4177a 100644
26 --- a/configure.ac
27 +++ b/configure.ac
28 @@ -136,14 +136,58 @@ PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
29 gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
30 PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES gmodule-2.0)
31 PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0)
32 -PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
33 +
34 +build_online_accounts=false
35 +AC_ARG_ENABLE(goa,
36 + AC_HELP_STRING([--disable-goa],
37 + [disable online accounts management panel]),
38 + [case "${enableval}" in
39 + yes) WANT_ONLINE_ACCOUNTS=yes ;;
40 + no) WANT_ONLINE_ACCOUNTS=no ;;
41 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-goa) ;;
42 + esac],
43 + [WANT_ONLINE_ACCOUNTS=yes]) dnl Default value
44 +
45 +if test x$WANT_ONLINE_ACCOUNTS = xyes; then
46 + PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
47 + build_online_accounts=true
48 +fi
49 +if test "x$build_online_accounts" = xtrue ; then
50 + AC_DEFINE(BUILD_ONLINE_ACCOUNTS, 1, [Define to 1 to build the Online Accounts panel])
51 +fi
52 +AM_CONDITIONAL(BUILD_ONLINE_ACCOUNTS, test "x$build_online_accounts" = "xtrue")
53 +AC_SUBST(ONLINE_ACCOUNTS_PANEL_CFLAGS)
54 +AC_SUBST(ONLINE_ACCOUNTS_PANEL_LIBS)
55 +
56 PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
57 gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
58 -PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
59 - colord >= $COLORD_REQUIRED_VERSION
60 - colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
61 - libsoup-2.4
62 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
63 +
64 +build_color=false
65 +AC_ARG_ENABLE(color,
66 + AC_HELP_STRING([--disable-color],
67 + [disable color management panel]),
68 + [case "${enableval}" in
69 + yes) WANT_COLOR=yes ;;
70 + no) WANT_COLOR=no ;;
71 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-color) ;;
72 + esac],
73 + [WANT_COLOR=yes]) dnl Default value
74 +
75 +if test x$WANT_COLOR = xyes; then
76 + PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
77 + colord >= $COLORD_REQUIRED_VERSION
78 + colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
79 + libsoup-2.4
80 + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
81 + build_color=true
82 +fi
83 +if test "x$build_color" = xtrue ; then
84 + AC_DEFINE(BUILD_COLOR, 1, [Define to 1 to build the Color panel])
85 +fi
86 +AM_CONDITIONAL(BUILD_COLOR, test "x$build_color" = "xtrue")
87 +AC_SUBST(COLOR_PANEL_CFLAGS)
88 +AC_SUBST(COLOR_PANEL_LIBS)
89 +
90 PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
91 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
92 PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES)
93 @@ -196,8 +240,24 @@ if test x${have_networkmanager} = xyes; then
94 fi
95
96 # Check for gnome-bluetooth
97 -PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.9.3,
98 - [have_bluetooth=yes], have_bluetooth=no)
99 +have_bluetooth=no
100 +AC_ARG_ENABLE(bluetooth,
101 + AC_HELP_STRING([--disable-bluetooth],
102 + [disable bluetooth management panel]),
103 + [case "${enableval}" in
104 + yes) WANT_BLUETOOTH=yes ;;
105 + no) WANT_BLUETOOTH=no ;;
106 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-bluetooth) ;;
107 + esac],
108 + [WANT_BLUETOOTH=yes]) dnl Default value
109 +
110 +if test x$WANT_BLUETOOTH = xyes; then
111 + # Check for gnome-bluetooth
112 + PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.9.3,
113 + [have_bluetooth=yes], have_bluetooth=no)
114 + have_bluetooth=yes
115 +fi
116 +
117 if test "x$have_bluetooth" = xyes ; then
118 AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Bluetooth panel])
119 fi
120 @@ -282,15 +342,26 @@ case $host_os in
121 if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
122 have_wacom=no
123 else
124 - PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
125 - gnome-settings-daemon >= $GSD_REQUIRED_VERSION
126 - xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
127 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
128 - clutter-gtk-1.0
129 - clutter-1.0 >= $CLUTTER_REQUIRED_VERSION, [have_wacom=yes], [have_wacom=no])
130 - if test x${have_wacom} = xyes; then
131 + AC_ARG_ENABLE(wacom,
132 + AC_HELP_STRING([--disable-wacom],
133 + [disable wacom management panel]),
134 + [case "${enableval}" in
135 + yes) WANT_WACOM=yes ;;
136 + no) WANT_WACOM=no ;;
137 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-wacom) ;;
138 + esac],
139 + [WANT_WACOM=yes]) dnl Default value
140 +
141 + if test x$WANT_WACOM = xyes; then
142 + PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
143 + gnome-settings-daemon >= $GSD_REQUIRED_VERSION
144 + xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
145 + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
146 + clutter-gtk-1.0
147 + clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
148 AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
149 AC_DEFINE(HAVE_WACOM, 1, [Define to 1 is Wacom is supportted])
150 + have_wacom=yes
151 fi
152 fi
153 ;;
154 @@ -301,16 +372,22 @@ esac
155 AM_CONDITIONAL(BUILD_WACOM, [test x${have_wacom} = xyes])
156
157 # Kerberos kerberos support
158 -AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
159 -if test "$KRB5_CONFIG" = "no"; then
160 - AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
161 -fi
162 -
163 -AC_MSG_CHECKING(for krb5 libraries and flags)
164 -KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
165 -KRB5_LIBS="`$KRB5_CONFIG --libs`"
166 -AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
167 +AC_ARG_ENABLE([kerberos],
168 + AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
169 + [enable_kerberos=yes])
170 +
171 +if test x"$enable_kerberos" != x"no" ; then
172 + AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
173 + if test "$KRB5_CONFIG" = "no"; then
174 + AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
175 + fi
176
177 + AC_MSG_CHECKING(for krb5 libraries and flags)
178 + KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
179 + KRB5_LIBS="`$KRB5_CONFIG --libs`"
180 + AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
181 + AC_DEFINE(HAVE_KERBEROS, 1, [defined if krb5 is available])
182 +fi
183 AC_SUBST(KRB5_CFLAGS)
184 AC_SUBST(KRB5_LIBS)
185
186 @@ -547,6 +624,11 @@ if test "x$have_bluetooth" = "xyes"; then
187 else
188 AC_MSG_NOTICE([ Bluetooth panel disabled])
189 fi
190 +if test "x$build_color" = "xtrue"; then
191 + AC_MSG_NOTICE([** colord (Color panel)])
192 +else
193 + AC_MSG_NOTICE([ Color panel disabled])
194 +fi
195 if test "x$enable_cups" = "xyes"; then
196 AC_MSG_NOTICE([** CUPS (Printers panel)])
197 else
198 @@ -557,11 +639,21 @@ if test "x$have_cheese" = "xyes"; then
199 else
200 AC_MSG_NOTICE([ Users panel webcam support disabled])
201 fi
202 +if test "x$build_online_accounts" = "xtrue"; then
203 + AC_MSG_NOTICE([** gnome-online-accounts (Online Accounts panel)])
204 +else
205 + AC_MSG_NOTICE([ Online Accounts panel disabled])
206 +fi
207 if test "x$with_libsocialweb" = "xyes"; then
208 AC_MSG_NOTICE([** libsocialweb (Background panel Flickr support)])
209 else
210 AC_MSG_NOTICE([ Background panel Flickr support disabled])
211 fi
212 +if test "x$build_wacom" = "xtrue"; then
213 + AC_MSG_NOTICE([** libwacom (Wacom Graphics Tablet panel)])
214 +else
215 + AC_MSG_NOTICE([ Wacom Graphics Tablet panel disabled])
216 +fi
217 if test "x$have_wacom" = "xyes"; then
218 AC_MSG_NOTICE([** wacom (Wacom tablet panel)])
219 else
220 diff --git a/panels/Makefile.am b/panels/Makefile.am
221 index 9961c25..0c54622 100644
222 --- a/panels/Makefile.am
223 +++ b/panels/Makefile.am
224 @@ -2,11 +2,9 @@ SUBDIRS= \
225 common \
226 background \
227 power \
228 - color \
229 display \
230 mouse \
231 notifications \
232 - online-accounts \
233 region \
234 info \
235 sound \
236 @@ -18,6 +16,10 @@ SUBDIRS= \
237 privacy \
238 sharing
239
240 +if BUILD_COLOR
241 +SUBDIRS += color
242 +endif
243 +
244 if BUILD_WACOM
245 SUBDIRS += wacom
246 endif
247 @@ -34,4 +36,8 @@ if BUILD_BLUETOOTH
248 SUBDIRS += bluetooth
249 endif
250
251 +if BUILD_ONLINE_ACCOUNTS
252 +SUBDIRS += online-accounts
253 +endif
254 +
255 -include $(top_srcdir)/git.mk
256 diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
257 index 1fd41ad..ce0988e 100644
258 --- a/panels/user-accounts/um-realm-manager.c
259 +++ b/panels/user-accounts/um-realm-manager.c
260 @@ -23,7 +23,9 @@
261
262 #include "um-realm-manager.h"
263
264 +#ifdef HAVE_KERBEROS
265 #include <krb5/krb5.h>
266 +#endif
267
268 #include <glib.h>
269 #include <glib/gi18n.h>
270 @@ -697,6 +699,7 @@ login_closure_free (gpointer data)
271 g_slice_free (LoginClosure, login);
272 }
273
274 +#ifdef HAVE_KERBEROS
275 static krb5_error_code
276 login_perform_kinit (krb5_context k5,
277 const gchar *realm,
278 @@ -760,12 +763,14 @@ login_perform_kinit (krb5_context k5,
279
280 return code;
281 }
282 +#endif /* HAVE_KERBEROS */
283
284 static void
285 kinit_thread_func (GSimpleAsyncResult *async,
286 GObject *object,
287 GCancellable *cancellable)
288 {
289 +#ifdef HAVE_KERBEROS
290 LoginClosure *login = g_simple_async_result_get_op_res_gpointer (async);
291 krb5_context k5 = NULL;
292 krb5_error_code code;
293 @@ -843,6 +848,10 @@ kinit_thread_func (GSimpleAsyncResult *async,
294
295 if (k5)
296 krb5_free_context (k5);
297 +#else /* HAVE_KERBEROS */
298 + g_simple_async_result_set_error (async, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
299 + _("gnome-control-center was built without kerberos support"));
300 +#endif
301 }
302
303 void
304 diff --git a/shell/Makefile.am b/shell/Makefile.am
305 index ad7a68f..cc968ac 100644
306 --- a/shell/Makefile.am
307 +++ b/shell/Makefile.am
308 @@ -52,14 +52,12 @@ gnome_control_center_LDADD = \
309 $(top_builddir)/libgd/libgd.la \
310 $(top_builddir)/panels/common/liblanguage.la \
311 $(top_builddir)/panels/background/libbackground.la \
312 - $(top_builddir)/panels/color/libcolor.la \
313 $(top_builddir)/panels/datetime/libdate_time.la \
314 $(top_builddir)/panels/display/libdisplay.la \
315 $(top_builddir)/panels/info/libinfo.la \
316 $(top_builddir)/panels/keyboard/libkeyboard.la \
317 $(top_builddir)/panels/mouse/libmouse-properties.la \
318 $(top_builddir)/panels/notifications/libnotifications.la \
319 - $(top_builddir)/panels/online-accounts/libonline-accounts.la \
320 $(top_builddir)/panels/power/libpower.la \
321 $(top_builddir)/panels/privacy/libprivacy.la \
322 $(top_builddir)/panels/region/libregion.la \
323 @@ -85,6 +83,14 @@ if BUILD_BLUETOOTH
324 gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
325 endif
326
327 +if BUILD_COLOR
328 +gnome_control_center_LDADD += $(top_builddir)/panels/color/libcolor.la
329 +endif
330 +
331 +if BUILD_ONLINE_ACCOUNTS
332 +gnome_control_center_LDADD += $(top_builddir)/panels/online-accounts/libonline-accounts.la
333 +endif
334 +
335 AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
336
337 # Dbus service file
338 diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
339 index 26576dc..8a92f95 100644
340 --- a/shell/cc-panel-loader.c
341 +++ b/shell/cc-panel-loader.c
342 @@ -33,7 +33,9 @@ extern GType cc_background_panel_get_type (void);
343 #ifdef BUILD_BLUETOOTH
344 extern GType cc_bluetooth_panel_get_type (void);
345 #endif /* BUILD_BLUETOOTH */
346 +#ifdef BUILD_COLOR
347 extern GType cc_color_panel_get_type (void);
348 +#endif /* BUILD_COLOR */
349 extern GType cc_date_time_panel_get_type (void);
350 extern GType cc_display_panel_get_type (void);
351 extern GType cc_info_panel_get_type (void);
352 @@ -43,7 +45,9 @@ extern GType cc_mouse_panel_get_type (void);
353 extern GType cc_network_panel_get_type (void);
354 #endif /* BUILD_NETWORK */
355 extern GType cc_notifications_panel_get_type (void);
356 +#ifdef BUILD_ONLINE_ACCOUNTS
357 extern GType cc_goa_panel_get_type (void);
358 +#endif /* BUILD_ONLINE_ACCOUNTS */
359 extern GType cc_power_panel_get_type (void);
360 #ifdef BUILD_PRINTERS
361 extern GType cc_printers_panel_get_type (void);
362 @@ -77,7 +81,9 @@ static struct {
363 #ifdef BUILD_BLUETOOTH
364 PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type ),
365 #endif
366 +#ifdef BUILD_COLOR
367 PANEL_TYPE("color", cc_color_panel_get_type ),
368 +#endif
369 PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
370 PANEL_TYPE("display", cc_display_panel_get_type ),
371 PANEL_TYPE("info", cc_info_panel_get_type ),
372 @@ -87,7 +93,9 @@ static struct {
373 PANEL_TYPE("network", cc_network_panel_get_type ),
374 #endif
375 PANEL_TYPE("notifications", cc_notifications_panel_get_type),
376 +#ifdef BUILD_ONLINE_ACCOUNTS
377 PANEL_TYPE("online-accounts", cc_goa_panel_get_type ),
378 +#endif
379 PANEL_TYPE("power", cc_power_panel_get_type ),
380 #ifdef BUILD_PRINTERS
381 PANEL_TYPE("printers", cc_printers_panel_get_type ),
382 --
383 1.8.3.2

  ViewVC Help
Powered by ViewVC 1.1.20