bluetooth: Remove GnomeBluetoothApplet hacks

https://bugzilla.gnome.org/show_bug.cgi?id=719341
This commit is contained in:
Bastien Nocera 2013-11-26 15:08:18 +01:00
parent 85f2d94253
commit ebc15e60a8
7 changed files with 10 additions and 46 deletions

View File

@ -140,19 +140,11 @@ AS_IF([test x$enable_browser_plugin = xyes], [
])
AM_CONDITIONAL(BUILD_BROWSER_PLUGIN, test x$enable_browser_plugin = xyes)
AC_MSG_CHECKING([for bluetooth support])
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.9.0],
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"])
AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
AC_SUBST([HAVE_BLUETOOTH],[1])
AC_MSG_RESULT([yes])],
PKG_CHECK_MODULES(BLUETOOTH, gnome-bluetooth-1.0 >= 3.9.0,
[AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
AC_SUBST([HAVE_BLUETOOTH],[1])],
[AC_DEFINE([HAVE_BLUETOOTH],[0])
AC_SUBST([HAVE_BLUETOOTH],[0])
AC_MSG_RESULT([no])])
AC_SUBST([HAVE_BLUETOOTH],[0])])
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)

View File

@ -112,7 +112,7 @@ expand_content_files=
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=$(GNOME_SHELL_CFLAGS)
GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(BLUETOOTH_LIBS) $(top_builddir)/src/libgnome-shell-menu.la $(top_builddir)/src/libgnome-shell-base.la $(top_builddir)/src/libgnome-shell.la
GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(top_builddir)/src/libgnome-shell-menu.la $(top_builddir)/src/libgnome-shell-base.la $(top_builddir)/src/libgnome-shell.la
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

View File

@ -3,7 +3,6 @@
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const GnomeBluetoothApplet = imports.gi.GnomeBluetoothApplet;
const GnomeBluetooth = imports.gi.GnomeBluetooth;
const Lang = imports.lang;
const St = imports.gi.St;

View File

@ -191,7 +191,7 @@ gnome_shell_CPPFLAGS = \
# Here, and after, we repeat mutter and bluetooth libraries just for the rpath
# The dependency is already pulled in by libtool
gnome_shell_LDADD = libgnome-shell.la libgnome-shell-js.la $(GNOME_SHELL_LIBS) $(MUTTER_LIBS) $(BLUETOOTH_LIBS)
gnome_shell_LDADD = libgnome-shell.la libgnome-shell-js.la $(GNOME_SHELL_LIBS) $(MUTTER_LIBS)
gnome_shell_DEPENDENCIES = libgnome-shell.la
if HAVE_MUTTER_WAYLAND
@ -205,7 +205,7 @@ gnome_shell_wayland_CPPFLAGS = \
$(MUTTER_WAYLAND_CFLAGS) \
$(gnome_shell_cflags)
gnome_shell_wayland_LDADD = libgnome-shell-wayland.la libgnome-shell-js.la $(GNOME_SHELL_LIBS) $(MUTTER_WAYLAND_LIBS) $(BLUETOOTH_LIBS)
gnome_shell_wayland_LDADD = libgnome-shell-wayland.la libgnome-shell-js.la $(GNOME_SHELL_LIBS) $(MUTTER_WAYLAND_LIBS)
gnome_shell_wayland_DEPENDENCIES = libgnome-shell-wayland.la
endif HAVE_MUTTER_WAYLAND
@ -259,7 +259,7 @@ gnome_shell_perf_helper_LDADD = $(SHELL_PERF_HELPER_LIBS)
noinst_PROGRAMS += run-js-test
run_js_test_CPPFLAGS = $(MUTTER_CFLAGS) $(gnome_shell_cflags)
run_js_test_LDADD = libgnome-shell.la $(GNOME_SHELL_JS_LIBS) $(MUTTER_LIBS) $(BLUETOOTH_LIBS)
run_js_test_LDADD = libgnome-shell.la $(GNOME_SHELL_JS_LIBS) $(MUTTER_LIBS)
run_js_test_LDFLAGS = -export-dynamic
run_js_test_SOURCES = \
@ -331,8 +331,7 @@ ShellMenu_0_1_gir_FILES = \
gtkmenutrackeritem.h \
$(NULL)
ShellMenu_0_1_gir_SCANNERFLAGS = \
--namespace=ShellMenu --identifier-prefix=Gtk \
$(if $(BLUETOOTH_DIR),-L $(BLUETOOTH_DIR),)
--namespace=ShellMenu --identifier-prefix=Gtk
INTROSPECTION_GIRS += ShellMenu-0.1.gir
CLEANFILES += ShellMenu-0.1.gir
@ -348,7 +347,7 @@ Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
Shell_0_1_gir_SCANNERFLAGS = \
--include-uninstalled=$(builddir)/St-1.0.gir \
--include-uninstalled=$(builddir)/ShellMenu-0.1.gir \
--add-include-path=$(MUTTER_GIR_DIR) $(if $(BLUETOOTH_DIR),-L $(BLUETOOTH_DIR),)
--add-include-path=$(MUTTER_GIR_DIR)
INTROSPECTION_GIRS += Shell-0.1.gir
CLEANFILES += Shell-0.1.gir

View File

@ -384,17 +384,3 @@ MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin)
return &info;
}
#if HAVE_BLUETOOTH
/* HACK:
Add a non-static function that calls into libgnome-bluetooth-applet.so,
to avoid the linker being too smart and removing the dependency.
This function is never actually called.
*/
extern GType bluetooth_applet_get_type(void);
void _shell_link_to_bluetooth(void);
void _shell_link_to_bluetooth(void) {
bluetooth_applet_get_type();
}
#endif

View File

@ -173,10 +173,6 @@ shell_introspection_init (void)
g_irepository_prepend_search_path (MUTTER_TYPELIB_DIR);
g_irepository_prepend_search_path (GNOME_SHELL_PKGLIBDIR);
#if HAVE_BLUETOOTH
g_irepository_prepend_search_path (BLUETOOTH_DIR);
#endif
}
static void

View File

@ -126,14 +126,6 @@ main(int argc, char **argv)
g_set_prgname (title);
g_free (title);
#if HAVE_BLUETOOTH
/* The module imports are all so intertwined that if the test
* imports anything in js/ui, it will probably eventually end up
* pulling in ui/status/bluetooth.js. So we need this.
*/
g_irepository_prepend_search_path (BLUETOOTH_DIR);
#endif
/* evaluate the script */
error = NULL;
if (!gjs_context_eval (js_context, script, len,