On 18.12.2011 04:01, Michael Biebl wrote: > > As a port of NetworkManager is unlikely, the only remaining option I > see, is that we try to make the NM integration in gnome-shell optional. > > But this needs someone running gnome-shell on kfreebsd and who would be > willing to help with testing and fixing the issues that will come up.
Attached is a untested patch which should make it possible to compile and run gnome-shell without network-manager. It needs an autoreconf, and mixing intltool and gettext doesn't work that well. That's what 11-no-gettext.patch is for. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
From ce3bc8b64bc1aeaf8917ed5dd5f8437ca87fd906 Mon Sep 17 00:00:00 2001 From: Michael Biebl <bi...@debian.org> Date: Thu, 22 Dec 2011 22:04:12 +0100 Subject: [PATCH] Make NM optional --- configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- js/Makefile.am | 5 ++++- js/ui/main.js | 12 ++++++++++-- src/Makefile.am | 16 +++++++++++++--- 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 1c64122..13cd42b 100644 --- a/configure.ac +++ b/configure.ac @@ -95,8 +95,41 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION libcanberra telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION - polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes - libnm-glib libnm-util gnome-keyring-1) + polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes) + +########################## +# Check for NetworkManager +########################## +NM_MIN_VERSION=0.9 +AC_ARG_ENABLE(network-manager, + AS_HELP_STRING([--disable-network-manager], + [disable NetworkManager support @<:@default=auto@:>@]),, + [enable_network_manager=auto]) + +if test "x$enable_network_manager" != "xno"; then + PKG_CHECK_MODULES(NETWORK_MANAGER, + [libnm-glib libnm-util gnome-keyring-1], + [have_network_manager=yes], + [have_network_manager=no]) + + GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORK_MANAGER_CFLAGS" + GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORK_MANAGER_LIBS" + + if test "x$have_network_manager" = "xyes"; then + AC_DEFINE(HAVE_NETWORK_MANAGER, [], [Define if we have NetworkManager]) + fi +else + have_network_manager="no (disabled)" +fi + +if test "x$enable_network_manager" = "xyes"; then + if test "x$have_network_manager" != "xyes"; then + AC_MSG_ERROR([Couldn't find NetworkManager.]) + fi +fi + +AM_CONDITIONAL(HAVE_NETWORK_MANAGER, test "$have_network_manager" = "yes") + PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0) @@ -250,3 +283,15 @@ AC_CONFIG_FILES([ man/Makefile ]) AC_OUTPUT + +echo " +Build configuration: + + Prefix: ${prefix} + Source code location: ${srcdir} + Compiler: ${CC} + Compiler Warnings: $enable_compile_warnings + + Support for NetworkManager: $have_network_manager + Support for GStreamer recording: $build_recorder +" diff --git a/js/Makefile.am b/js/Makefile.am index 58e0489..3d1418d 100644 --- a/js/Makefile.am +++ b/js/Makefile.am @@ -45,7 +45,6 @@ nobase_dist_js_DATA = \ ui/main.js \ ui/messageTray.js \ ui/modalDialog.js \ - ui/networkAgent.js \ ui/shellEntry.js \ ui/shellMountOperation.js \ ui/notificationDaemon.js \ @@ -78,3 +77,7 @@ nobase_dist_js_DATA = \ ui/workspacesView.js \ ui/workspaceSwitcherPopup.js \ ui/xdndHandler.js + +if HAVE_NETWORK_MANAGER +nobase_dist_js_DATA += ui/networkAgent.js +endif diff --git a/js/ui/main.js b/js/ui/main.js index 4c97440..4574a7d 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -27,7 +27,6 @@ const PlaceDisplay = imports.ui.placeDisplay; const RunDialog = imports.ui.runDialog; const Layout = imports.ui.layout; const LookingGlass = imports.ui.lookingGlass; -const NetworkAgent = imports.ui.networkAgent; const NotificationDaemon = imports.ui.notificationDaemon; const WindowAttentionHandler = imports.ui.windowAttentionHandler; const Scripting = imports.ui.scripting; @@ -39,6 +38,12 @@ const XdndHandler = imports.ui.xdndHandler; const StatusIconDispatcher = imports.ui.statusIconDispatcher; const Util = imports.misc.util; +try { + const NetworkAgent = imports.ui.networkAgent; +} catch (e) { + NetworkAgent = null; +} + const DEFAULT_BACKGROUND_COLOR = new Clutter.Color(); DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff); @@ -84,7 +89,10 @@ function _createUserSession() { telepathyClient = new TelepathyClient.Client(); automountManager = new AutomountManager.AutomountManager(); autorunManager = new AutorunManager.AutorunManager(); - networkAgent = new NetworkAgent.NetworkAgent(); + if (NetworkAgent != null) { + networkAgent = new NetworkAgent.NetworkAgent(); + } + } function _createGDMSession() { diff --git a/src/Makefile.am b/src/Makefile.am index d19f0fe..d6a1c86 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,7 +110,6 @@ shell_public_headers_h = \ shell-global.h \ shell-mobile-providers.h \ shell-mount-operation.h \ - shell-network-agent.h \ shell-perf-log.h \ shell-slicer.h \ shell-stack.h \ @@ -122,6 +121,11 @@ shell_public_headers_h = \ shell-wm.h \ shell-xfixes-cursor.h +if HAVE_NETWORK_MANAGER +shell_public_headers_h += shell-network-agent.h +endif + + libgnome_shell_la_SOURCES = \ $(shell_built_sources) \ $(shell_public_headers_h) \ @@ -147,7 +151,6 @@ libgnome_shell_la_SOURCES = \ shell-global.c \ shell-mobile-providers.c \ shell-mount-operation.c \ - shell-network-agent.c \ shell-perf-log.c \ shell-polkit-authentication-agent.h \ shell-polkit-authentication-agent.c \ @@ -161,6 +164,10 @@ libgnome_shell_la_SOURCES = \ shell-wm.c \ shell-xfixes-cursor.c +if HAVE_NETWORK_MANAGER +libgnome_shell_la_SOURCES += shell-network-agent.c +endif + libgnome_shell_la_gir_sources = \ $(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES)) @@ -272,7 +279,10 @@ libgnome_shell_la_LIBADD = \ libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags) Shell-0.1.gir: libgnome-shell.la St-1.0.gir -Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0 Folks-0.6 +Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 Folks-0.6 +if HAVE_NETWORK_MANAGER +Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0 +endif Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir) Shell_0_1_gir_LIBS = libgnome-shell.la Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources) -- 1.7.7.3
diff --git a/configure.ac b/configure.ac index 13cd42b..cd579e2 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,6 @@ LT_INIT([disable-static]) # i18n IT_PROG_INTLTOOL([0.40]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.17]) - GETTEXT_PACKAGE=gnome-shell AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
signature.asc
Description: OpenPGP digital signature