Make NetworkManager support optional; this is a cleaner approach than

what we previously had in tree.

ok aja@
This commit is contained in:
jasper 2012-08-29 11:56:27 +00:00
parent b76190b8fb
commit 7b771fd145
11 changed files with 188 additions and 137 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.7 2012/07/13 16:35:26 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.8 2012/08/29 11:56:27 jasper Exp $
COMMENT= next generation GNOME shell
GNOME_PROJECT= gnome-shell
GNOME_VERSION= 3.4.1
REVISION= 4
REVISION= 5
HOMEPAGE= http://live.gnome.org/GnomeShell
@ -61,10 +61,26 @@ MODGNOME_DESKTOP_FILE= Yes
LIBTOOL_FLAGS= --tag=disable-static
AUTOCONF_VERSION= 2.68
CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS= --disable-static \
--with-ca-certificates=/etc/ssl/cert.pem \
--without-systemd
AUTOCONF_VERSION= 2.68
AUTOMAKE_VERSION= 1.11
BUILD_DEPENDS += devel/autoconf/${AUTOCONF_VERSION} \
devel/automake/${AUTOMAKE_VERSION} \
devel/libtool \
x11/gnome/common
pre-configure:
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} aclocal -I m4
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoconf
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoheader
cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} automake
.include <bsd.port.mk>

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-configure_ac,v 1.3 2012/07/13 08:03:53 ajacoutot Exp $
$OpenBSD: patch-configure_ac,v 1.4 2012/08/29 11:56:27 jasper Exp $
Remove network-related functionality, as this requires NetworkManager.
(XXX make a patch committable upstream)
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- configure.ac.orig Tue Apr 17 19:20:06 2012
+++ configure.ac Fri Jul 13 09:42:16 2012
+++ configure.ac Sat Jul 14 11:25:47 2012
@@ -94,7 +94,6 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MI
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
@ -13,3 +13,26 @@ Remove network-related functionality, as this requires NetworkManager.
gcr-3 >= $GCR_MIN_VERSION)
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
@@ -138,6 +137,22 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
[AC_DEFINE([HAVE_BLUETOOTH],[0])
AC_SUBST([HAVE_BLUETOOTH],[0])
AC_MSG_RESULT([no])])
+
+network_manager=false
+AC_MSG_CHECKING([for Network Manager support])
+PKG_CHECK_EXISTS([libnm-glib libnm-util],
+ [ NM_LIBS=`$PKG_CONFIG --libs libnm-glib libnm-util`
+ AC_SUBST([NM_LIBS],["$NM_LIBS"])
+ AC_DEFINE([HAVE_NETWORK_MANAGER],[1],[Define to 1 if you have Network Manager])
+ AC_SUBST([HAVE_NETWORK_MANAGER],[1])
+ AC_MSG_RESULT([yes])
+ $network_manager=true],
+ [AC_DEFINE([HAVE_NETWORK_MANAGER],[0])
+ AC_SUBST([HAVE_NETWORK_MANAGER],[0])
+ AC_MSG_RESULT([no])])
+
+AM_CONDITIONAL(NETWORK_MANAGER, $network_manager)
+GNOME_SHELL=$GNOME_SHELL $NM_LIBS
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-data_Makefile_am,v 1.1 2012/08/29 11:56:27 jasper Exp $
From 3d95e7bb111ca72d59e6ab81c007d3ccb2cf838d Mon Sep 17 00:00:00 2001
From: Owen W. Taylor <otaylor@fishsoup.net>
Date: Fri, 20 Apr 2012 14:51:32 +0000
Subject: Mirror Evolution calendar settings into our own schema
--- data/Makefile.am.orig Sat Jul 14 10:46:42 2012
+++ data/Makefile.am Sat Jul 14 10:46:52 2012
@@ -53,7 +53,7 @@ dist_theme_DATA = \
theme/ws-switch-arrow-up.svg \
theme/ws-switch-arrow-down.svg
-gsettings_SCHEMAS = org.gnome.shell.gschema.xml
+gsettings_SCHEMAS = org.gnome.shell.gschema.xml org.gnome.shell.evolution.calendar.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-data_Makefile_in,v 1.1 2012/07/09 18:01:16 ajacoutot Exp $
From 3d95e7bb111ca72d59e6ab81c007d3ccb2cf838d Mon Sep 17 00:00:00 2001
From: Owen W. Taylor <otaylor@fishsoup.net>
Date: Fri, 20 Apr 2012 14:51:32 +0000
Subject: Mirror Evolution calendar settings into our own schema
--- data/Makefile.in.orig Mon Jul 9 19:47:23 2012
+++ data/Makefile.in Mon Jul 9 19:47:47 2012
@@ -349,7 +349,7 @@ dist_theme_DATA = \
theme/ws-switch-arrow-up.svg \
theme/ws-switch-arrow-down.svg
-gsettings_SCHEMAS = org.gnome.shell.gschema.xml
+gsettings_SCHEMAS = org.gnome.shell.gschema.xml org.gnome.shell.evolution.calendar.gschema.xml
convertdir = $(datadir)/GConf/gsettings
convert_DATA = gnome-shell-overrides.convert
shadersdir = $(pkgdatadir)/shaders
@@ -363,7 +363,8 @@ EXTRA_DIST = \
$(menu_DATA) \
$(shaders_DATA) \
$(convert_DATA) \
- org.gnome.shell.gschema.xml.in
+ org.gnome.shell.gschema.xml.in \
+ org.gnome.shell.evolution.calendar.gschema.xml
CLEANFILES = \
gnome-shell.desktop.in \

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-js_Makefile_am,v 1.1 2012/08/29 11:56:27 jasper Exp $
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- js/Makefile.am.orig Sat Jul 14 10:24:10 2012
+++ js/Makefile.am Sat Jul 14 10:24:33 2012
@@ -8,6 +8,7 @@ misc/config.js: misc/config.js.in Makefile
-e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
-e "s|[@]GJS_VERSION@|$(GJS_VERSION)|g" \
-e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
+ -e "s|[@]HAVE_NETWORK_MANAGER@|$(HAVE_NETWORK_MANAGER)|g" \
-e "s|[@]SHELL_SYSTEM_CA_FILE@|$(SHELL_SYSTEM_CA_FILE)|g" \
-e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
-e "s|[@]datadir@|$(datadir)|g" \

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-js_misc_config_js_in,v 1.1 2012/08/29 11:56:27 jasper Exp $
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- js/misc/config.js.in.orig Sat Jul 14 10:22:10 2012
+++ js/misc/config.js.in Sat Jul 14 10:22:40 2012
@@ -8,6 +8,8 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
const GJS_VERSION = '@GJS_VERSION@';
/* 1 if gnome-bluetooth is available, 0 otherwise */
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
+/* 1 if Network Manager is available, 0 otherwise */
+const HAVE_NETWORK_MANAGER = @HAVE_NETWORK_MANAGER@;
/* The system TLS CA list */
const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
/* gettext package */

View File

@ -1,11 +1,19 @@
$OpenBSD: patch-js_ui_main_js,v 1.2 2012/07/08 15:39:11 ajacoutot Exp $
$OpenBSD: patch-js_ui_main_js,v 1.3 2012/08/29 11:56:27 jasper Exp $
Remove network-related functionality, as this requires NetworkManager.
(XXX make a patch committable upstream)
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- js/ui/main.js.orig Sun Jul 8 15:24:59 2012
+++ js/ui/main.js Sun Jul 8 15:25:24 2012
@@ -26,7 +26,6 @@ const PlaceDisplay = imports.ui.placeDisplay;
--- js/ui/main.js.orig Mon Apr 16 18:41:48 2012
+++ js/ui/main.js Sat Jul 14 11:56:05 2012
@@ -12,6 +12,7 @@ const St = imports.gi.St;
const AutomountManager = imports.ui.automountManager;
const AutorunManager = imports.ui.autorunManager;
+const Config = imports.misc.config;
const CtrlAltTab = imports.ui.ctrlAltTab;
const EndSessionDialog = imports.ui.endSessionDialog;
const PolkitAuthenticationAgent = imports.ui.polkitAuthenticationAgent;
@@ -26,7 +27,6 @@ const PlaceDisplay = imports.ui.placeDisplay;
const RunDialog = imports.ui.runDialog;
const Layout = imports.ui.layout;
const LookingGlass = imports.ui.lookingGlass;
@ -13,11 +21,24 @@ Remove network-related functionality, as this requires NetworkManager.
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const Scripting = imports.ui.scripting;
@@ -85,7 +84,6 @@ function _createUserSession() {
@@ -38,6 +38,9 @@ const XdndHandler = imports.ui.xdndHandler;
const StatusIconDispatcher = imports.ui.statusIconDispatcher;
const Util = imports.misc.util;
+if (Config.HAVE_NETWORK_MANAGER)
+ const NetworkAgent = imports.ui.networkAgent;
+
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
const DEFAULT_BACKGROUND_COLOR = new Clutter.Color();
DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff);
@@ -85,7 +88,9 @@ function _createUserSession() {
telepathyClient = new TelepathyClient.Client();
automountManager = new AutomountManager.AutomountManager();
autorunManager = new AutorunManager.AutorunManager();
- networkAgent = new NetworkAgent.NetworkAgent();
+
+ if (Config.HAVE_NETWORK_MANAGER)
+ networkAgent = new NetworkAgent.NetworkAgent();
}
function _createGDMSession() {

View File

@ -1,20 +1,11 @@
$OpenBSD: patch-js_ui_panel_js,v 1.2 2012/07/08 15:39:11 ajacoutot Exp $
$OpenBSD: patch-js_ui_panel_js,v 1.3 2012/08/29 11:56:27 jasper Exp $
Remove network-related functionality, as this requires NetworkManager.
(XXX make a patch committable upstream)
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- js/ui/panel.js.orig Sun Jul 8 15:40:27 2012
+++ js/ui/panel.js Sun Jul 8 15:40:35 2012
@@ -32,7 +32,7 @@ const BUTTON_DND_ACTIVATION_TIMEOUT = 250;
const ANIMATED_ICON_UPDATE_TIMEOUT = 100;
const SPINNER_ANIMATION_TIME = 0.2;
-const STANDARD_STATUS_AREA_ORDER = ['a11y', 'keyboard', 'volume', 'bluetooth', 'network', 'battery', 'userMenu'];
+const STANDARD_STATUS_AREA_ORDER = ['a11y', 'keyboard', 'volume', 'bluetooth', 'battery', 'userMenu'];
const STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION = {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
@@ -44,11 +44,11 @@ const STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION = {
--- js/ui/panel.js.orig Sat Jul 14 11:20:43 2012
+++ js/ui/panel.js Sat Jul 14 11:21:06 2012
@@ -44,10 +44,12 @@ const STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION = {
if (Config.HAVE_BLUETOOTH)
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
@ -22,12 +13,12 @@ Remove network-related functionality, as this requires NetworkManager.
- STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
-} catch(e) {
- log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
-}
+//try {
+// STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
+//} catch(e) {
+// log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
+//}
+if (Config.HAVE_NETWORK_MANAGER) {
+ try {
+ STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
+ } catch(e) {
+ log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
+ }
}
const GDM_STATUS_AREA_ORDER = ['a11y', 'display', 'keyboard', 'volume', 'battery', 'powerMenu'];
const GDM_STATUS_AREA_SHELL_IMPLEMENTATION = {

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-js_ui_statusIconDispatcher_js,v 1.2 2012/07/08 15:39:11 ajacoutot Exp $
Remove network-related functionality, as this requires NetworkManager.
(XXX make a patch committable upstream)
--- js/ui/statusIconDispatcher.js.orig Sun Jul 8 15:26:54 2012
+++ js/ui/statusIconDispatcher.js Sun Jul 8 15:26:59 2012
@@ -13,7 +13,6 @@ const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
// when moved to control center
'gnome-sound-applet': 'volume',
- 'nm-applet': 'network',
'gnome-power-manager': 'battery',
'keyboard': 'keyboard',
'a11y-keyboard': 'a11y',

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-src_Makefile_am,v 1.1 2012/08/29 11:56:27 jasper Exp $
Make Network Manager support optional.
https://bugzilla.gnome.org/show_bug.cgi?id=679871
--- src/Makefile.am.orig Mon Apr 16 19:47:21 2012
+++ src/Makefile.am Sat Jul 14 11:27:35 2012
@@ -112,7 +112,6 @@ shell_public_headers_h = \
shell-idle-monitor.h \
shell-mobile-providers.h \
shell-mount-operation.h \
- shell-network-agent.h \
shell-perf-log.h \
shell-screenshot.h \
shell-screen-grabber.h \
@@ -161,7 +160,6 @@ libgnome_shell_la_SOURCES = \
shell-keyring-prompt.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 \
@@ -241,6 +239,16 @@ endif BUILD_RECORDER
########################################
+if NETWORK_MANAGER
+
+shell_public_headers_h += shell-network-agent.h
+
+libgnome_shell_la_SOURCES += shell-network-agent.c
+
+endif NETWORK_MANAGER
+
+########################################
+
libexec_PROGRAMS += gnome-shell-perf-helper
gnome_shell_perf_helper_SOURCES = shell-perf-helper.c
@@ -296,7 +304,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 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)

View File

@ -1,58 +0,0 @@
$OpenBSD: patch-src_Makefile_in,v 1.2 2012/07/08 15:39:11 ajacoutot Exp $
Remove network-related functionality, as this requires NetworkManager.
(XXX make a patch committable upstream)
--- src/Makefile.in.orig Sun Jul 8 14:22:03 2012
+++ src/Makefile.in Sun Jul 8 14:22:58 2012
@@ -141,7 +141,7 @@ am__libgnome_shell_la_SOURCES_DIST = shell-enum-types.
shell-generic-container.c shell-gtk-embed.c shell-global.c \
shell-idle-monitor.c shell-keyring-prompt.h \
shell-keyring-prompt.c shell-mobile-providers.c \
- shell-mount-operation.c shell-network-agent.c shell-perf-log.c \
+ shell-mount-operation.c shell-perf-log.c \
shell-polkit-authentication-agent.h \
shell-polkit-authentication-agent.c shell-screenshot.c \
shell-screen-grabber.c shell-secure-text-buffer.c \
@@ -173,7 +173,6 @@ am_libgnome_shell_la_OBJECTS = $(am__objects_2) $(am__
libgnome_shell_la-shell-keyring-prompt.lo \
libgnome_shell_la-shell-mobile-providers.lo \
libgnome_shell_la-shell-mount-operation.lo \
- libgnome_shell_la-shell-network-agent.lo \
libgnome_shell_la-shell-perf-log.lo \
libgnome_shell_la-shell-polkit-authentication-agent.lo \
libgnome_shell_la-shell-screenshot.lo \
@@ -850,7 +849,6 @@ shell_public_headers_h = \
shell-idle-monitor.h \
shell-mobile-providers.h \
shell-mount-operation.h \
- shell-network-agent.h \
shell-perf-log.h \
shell-screenshot.h \
shell-screen-grabber.h \
@@ -878,7 +876,7 @@ libgnome_shell_la_SOURCES = $(shell_built_sources) \
shell-generic-container.c shell-gtk-embed.c shell-global.c \
shell-idle-monitor.c shell-keyring-prompt.h \
shell-keyring-prompt.c shell-mobile-providers.c \
- shell-mount-operation.c shell-network-agent.c shell-perf-log.c \
+ shell-mount-operation.c shell-perf-log.c \
shell-polkit-authentication-agent.h \
shell-polkit-authentication-agent.c shell-screenshot.c \
shell-screen-grabber.c shell-secure-text-buffer.c \
@@ -952,7 +950,7 @@ libgnome_shell_la_LIBADD = \
$(NULL)
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
-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
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)
@@ -1234,7 +1232,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-keyring-prompt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-mobile-providers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-mount-operation.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-network-agent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-perf-log.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-polkit-authentication-agent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgnome_shell_la-shell-recorder-src.Plo@am__quote@