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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Apr 27 16:50:40 2014 UTC (7 months, 4 weeks ago) by eva
Branch: MAIN
Version bump for Gnome 3.12.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key C6085806)

1 From a485992913ec84a4c558cad535dd8a2ab14b0c19 Mon Sep 17 00:00:00 2001
2 From: Alexandre Rostovtsev <tetromino@gentoo.org>
3 Date: Fri, 25 Apr 2014 22:17:24 +0200
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 | 146 ++++++++++++++++++++++++++------
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, 153 insertions(+), 30 deletions(-)
23
24 diff --git a/configure.ac b/configure.ac
25 index 511f78d..f82108e 100644
26 --- a/configure.ac
27 +++ b/configure.ac
28 @@ -139,14 +139,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.99.0
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 @@ -206,8 +250,25 @@ fi
94 AM_CONDITIONAL(HAVE_NM_UNSTABLE, [test x$nm_unstable = xyes])
95
96 # Check for gnome-bluetooth
97 -PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.11.1,
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.11.1,
113 + [have_bluetooth=yes], have_bluetooth=no)
114 + have_bluetooth=yes
115 +fi
116 +
117 +
118 if test "x$have_bluetooth" = xyes ; then
119 AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Bluetooth panel])
120 fi
121 @@ -292,15 +353,27 @@ case $host_os in
122 if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
123 have_wacom=no
124 else
125 - PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
126 - gnome-settings-daemon >= $GSD_REQUIRED_VERSION
127 - xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
128 - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
129 - clutter-gtk-1.0
130 - clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
131 - have_wacom=yes
132 - AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
133 - AC_DEFINE(HAVE_WACOM, 1, [Define to 1 is Wacom is supportted])
134 + AC_ARG_ENABLE(wacom,
135 + AC_HELP_STRING([--disable-wacom],
136 + [disable wacom management panel]),
137 + [case "${enableval}" in
138 + yes) WANT_WACOM=yes ;;
139 + no) WANT_WACOM=no ;;
140 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-wacom) ;;
141 + esac],
142 + [WANT_WACOM=yes]) dnl Default value
143 +
144 + if test x$WANT_WACOM = xyes; then
145 + PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
146 + gnome-settings-daemon >= $GSD_REQUIRED_VERSION
147 + xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
148 + gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
149 + clutter-gtk-1.0
150 + clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
151 + have_wacom=yes
152 + AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
153 + AC_DEFINE(HAVE_WACOM, 1, [Define to 1 is Wacom is supportted])
154 + fi
155 fi
156 ;;
157 *)
158 @@ -310,16 +383,22 @@ esac
159 AM_CONDITIONAL(BUILD_WACOM, [test x${have_wacom} = xyes])
160
161 # Kerberos kerberos support
162 -AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
163 -if test "$KRB5_CONFIG" = "no"; then
164 - AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
165 -fi
166 -
167 -AC_MSG_CHECKING(for krb5 libraries and flags)
168 -KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
169 -KRB5_LIBS="`$KRB5_CONFIG --libs`"
170 -AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
171 +AC_ARG_ENABLE([kerberos],
172 + AS_HELP_STRING([--disable-kerberos], [disable kerberos support (default: enabled)]),,
173 + [enable_kerberos=yes])
174 +
175 +if test x"$enable_kerberos" != x"no" ; then
176 + AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
177 + if test "$KRB5_CONFIG" = "no"; then
178 + AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
179 + fi
180
181 + AC_MSG_CHECKING(for krb5 libraries and flags)
182 + KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
183 + KRB5_LIBS="`$KRB5_CONFIG --libs`"
184 + AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)
185 + AC_DEFINE(HAVE_KERBEROS, 1, [defined if krb5 is available])
186 +fi
187 AC_SUBST(KRB5_CFLAGS)
188 AC_SUBST(KRB5_LIBS)
189
190 @@ -538,6 +617,11 @@ if test "x$have_bluetooth" = "xyes"; then
191 else
192 AC_MSG_NOTICE([ Bluetooth panel disabled])
193 fi
194 +if test "x$build_color" = "xtrue"; then
195 + AC_MSG_NOTICE([** colord (Color panel)])
196 +else
197 + AC_MSG_NOTICE([ Color panel disabled])
198 +fi
199 if test "x$enable_cups" = "xyes"; then
200 AC_MSG_NOTICE([** CUPS (Printers panel)])
201 else
202 @@ -548,6 +632,16 @@ if test "x$have_cheese" = "xyes"; then
203 else
204 AC_MSG_NOTICE([ Users panel webcam support disabled])
205 fi
206 +if test "x$build_online_accounts" = "xtrue"; then
207 + AC_MSG_NOTICE([** gnome-online-accounts (Online Accounts panel)])
208 +else
209 + AC_MSG_NOTICE([ Online Accounts panel disabled])
210 +fi
211 +if test "x$build_wacom" = "xtrue"; then
212 + AC_MSG_NOTICE([** libwacom (Wacom Graphics Tablet panel)])
213 +else
214 + AC_MSG_NOTICE([ Wacom Graphics Tablet panel disabled])
215 +fi
216 if test "x$have_wacom" = "xyes"; then
217 AC_MSG_NOTICE([** wacom (Wacom tablet panel)])
218 else
219 diff --git a/panels/Makefile.am b/panels/Makefile.am
220 index 9961c25..0c54622 100644
221 --- a/panels/Makefile.am
222 +++ b/panels/Makefile.am
223 @@ -2,11 +2,9 @@ SUBDIRS= \
224 common \
225 background \
226 power \
227 - color \
228 display \
229 mouse \
230 notifications \
231 - online-accounts \
232 region \
233 info \
234 sound \
235 @@ -18,6 +16,10 @@ SUBDIRS= \
236 privacy \
237 sharing
238
239 +if BUILD_COLOR
240 +SUBDIRS += color
241 +endif
242 +
243 if BUILD_WACOM
244 SUBDIRS += wacom
245 endif
246 @@ -34,4 +36,8 @@ if BUILD_BLUETOOTH
247 SUBDIRS += bluetooth
248 endif
249
250 +if BUILD_ONLINE_ACCOUNTS
251 +SUBDIRS += online-accounts
252 +endif
253 +
254 -include $(top_srcdir)/git.mk
255 diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
256 index 0849160..58d50a6 100644
257 --- a/panels/user-accounts/um-realm-manager.c
258 +++ b/panels/user-accounts/um-realm-manager.c
259 @@ -22,7 +22,9 @@
260
261 #include "um-realm-manager.h"
262
263 +#ifdef HAVE_KERBEROS
264 #include <krb5/krb5.h>
265 +#endif
266
267 #include <glib.h>
268 #include <glib/gi18n.h>
269 @@ -696,6 +698,7 @@ login_closure_free (gpointer data)
270 g_slice_free (LoginClosure, login);
271 }
272
273 +#ifdef HAVE_KERBEROS
274 static krb5_error_code
275 login_perform_kinit (krb5_context k5,
276 const gchar *realm,
277 @@ -759,12 +762,14 @@ login_perform_kinit (krb5_context k5,
278
279 return code;
280 }
281 +#endif /* HAVE_KERBEROS */
282
283 static void
284 kinit_thread_func (GSimpleAsyncResult *async,
285 GObject *object,
286 GCancellable *cancellable)
287 {
288 +#ifdef HAVE_KERBEROS
289 LoginClosure *login = g_simple_async_result_get_op_res_gpointer (async);
290 krb5_context k5 = NULL;
291 krb5_error_code code;
292 @@ -842,6 +847,10 @@ kinit_thread_func (GSimpleAsyncResult *async,
293
294 if (k5)
295 krb5_free_context (k5);
296 +#else /* HAVE_KERBEROS */
297 + g_simple_async_result_set_error (async, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
298 + _("gnome-control-center was built without kerberos support"));
299 +#endif
300 }
301
302 void
303 diff --git a/shell/Makefile.am b/shell/Makefile.am
304 index ad7a68f..cc968ac 100644
305 --- a/shell/Makefile.am
306 +++ b/shell/Makefile.am
307 @@ -52,14 +52,12 @@ gnome_control_center_LDADD = \
308 $(top_builddir)/libgd/libgd.la \
309 $(top_builddir)/panels/common/liblanguage.la \
310 $(top_builddir)/panels/background/libbackground.la \
311 - $(top_builddir)/panels/color/libcolor.la \
312 $(top_builddir)/panels/datetime/libdate_time.la \
313 $(top_builddir)/panels/display/libdisplay.la \
314 $(top_builddir)/panels/info/libinfo.la \
315 $(top_builddir)/panels/keyboard/libkeyboard.la \
316 $(top_builddir)/panels/mouse/libmouse-properties.la \
317 $(top_builddir)/panels/notifications/libnotifications.la \
318 - $(top_builddir)/panels/online-accounts/libonline-accounts.la \
319 $(top_builddir)/panels/power/libpower.la \
320 $(top_builddir)/panels/privacy/libprivacy.la \
321 $(top_builddir)/panels/region/libregion.la \
322 @@ -85,6 +83,14 @@ if BUILD_BLUETOOTH
323 gnome_control_center_LDADD += $(top_builddir)/panels/bluetooth/libbluetooth.la
324 endif
325
326 +if BUILD_COLOR
327 +gnome_control_center_LDADD += $(top_builddir)/panels/color/libcolor.la
328 +endif
329 +
330 +if BUILD_ONLINE_ACCOUNTS
331 +gnome_control_center_LDADD += $(top_builddir)/panels/online-accounts/libonline-accounts.la
332 +endif
333 +
334 AM_CPPFLAGS = -DGNOMELOCALEDIR="\"$(datadir)/locale\""
335
336 # Dbus service file
337 diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
338 index 26576dc..8a92f95 100644
339 --- a/shell/cc-panel-loader.c
340 +++ b/shell/cc-panel-loader.c
341 @@ -33,7 +33,9 @@ extern GType cc_background_panel_get_type (void);
342 #ifdef BUILD_BLUETOOTH
343 extern GType cc_bluetooth_panel_get_type (void);
344 #endif /* BUILD_BLUETOOTH */
345 +#ifdef BUILD_COLOR
346 extern GType cc_color_panel_get_type (void);
347 +#endif /* BUILD_COLOR */
348 extern GType cc_date_time_panel_get_type (void);
349 extern GType cc_display_panel_get_type (void);
350 extern GType cc_info_panel_get_type (void);
351 @@ -43,7 +45,9 @@ extern GType cc_mouse_panel_get_type (void);
352 extern GType cc_network_panel_get_type (void);
353 #endif /* BUILD_NETWORK */
354 extern GType cc_notifications_panel_get_type (void);
355 +#ifdef BUILD_ONLINE_ACCOUNTS
356 extern GType cc_goa_panel_get_type (void);
357 +#endif /* BUILD_ONLINE_ACCOUNTS */
358 extern GType cc_power_panel_get_type (void);
359 #ifdef BUILD_PRINTERS
360 extern GType cc_printers_panel_get_type (void);
361 @@ -77,7 +81,9 @@ static struct {
362 #ifdef BUILD_BLUETOOTH
363 PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type ),
364 #endif
365 +#ifdef BUILD_COLOR
366 PANEL_TYPE("color", cc_color_panel_get_type ),
367 +#endif
368 PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
369 PANEL_TYPE("display", cc_display_panel_get_type ),
370 PANEL_TYPE("info", cc_info_panel_get_type ),
371 @@ -87,7 +93,9 @@ static struct {
372 PANEL_TYPE("network", cc_network_panel_get_type ),
373 #endif
374 PANEL_TYPE("notifications", cc_notifications_panel_get_type),
375 +#ifdef BUILD_ONLINE_ACCOUNTS
376 PANEL_TYPE("online-accounts", cc_goa_panel_get_type ),
377 +#endif
378 PANEL_TYPE("power", cc_power_panel_get_type ),
379 #ifdef BUILD_PRINTERS
380 PANEL_TYPE("printers", cc_printers_panel_get_type ),
381 --
382 1.9.0

  ViewVC Help
Powered by ViewVC 1.1.20