From 9358fd4ff1b9152d2d7649e3fc3dd101f6857b10 Mon Sep 17 00:00:00 2001 From: Willie Walker Date: Thu, 1 Oct 2009 15:39:09 -0400 Subject: [PATCH] Rename bridge to atk-bridge and allow relocation of pyatspi and GTK module (bfo#24108) --- atk-adaptor/Makefile.am | 28 +++++++++++++++++++--------- atk-adaptor/atk-bridge.desktop.in | 8 ++++++++ configure.ac | 16 ++++++++++++++++ pyatspi/Makefile.am | 14 ++++++++++++++ tests/cspi/Makefile.am | 2 +- 5 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 atk-adaptor/atk-bridge.desktop.in diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am index 23438b3..91f11b8 100644 --- a/atk-adaptor/Makefile.am +++ b/atk-adaptor/Makefile.am @@ -1,25 +1,25 @@ gtkmoduledir = $(libdir)/$(GTK_MODULE_DIR) -gtkmodule_LTLIBRARIES = libspiatk.la +gtkmodule_LTLIBRARIES = libatk-bridge.la -libspiatk_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ - $(ATK_CFLAGS) \ - $(DBIND_CFLAGS) \ - $(DROUTE_CFLAGS) \ - -I$(top_srcdir) \ +libatk_bridge_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ + $(ATK_CFLAGS) \ + $(DBIND_CFLAGS) \ + $(DROUTE_CFLAGS) \ + -I$(top_srcdir) \ -DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\" -libspiatk_la_LDFLAGS = -no-undefined \ +libatk_bridge_la_LDFLAGS = -no-undefined \ -module \ -avoid-version \ -rpath $(gtkmoduledir) -libspiatk_la_LIBADD = $(DBUS_GLIB_LIBS) \ +libatk_bridge_la_LIBADD = $(DBUS_GLIB_LIBS) \ $(ATK_LIBS) \ $(DBIND_LIBS) \ $(DROUTE_LIBS) \ $(top_builddir)/common/libspicommon.la -libspiatk_la_SOURCES = \ +libatk_bridge_la_SOURCES = \ accessible-adaptor.c \ accessible-marshaller.c \ accessible-marshaller.h \ @@ -45,3 +45,13 @@ libspiatk_la_SOURCES = \ tree-adaptor.c \ tree-adaptor.h \ value-adaptor.c + +gtkpathdir = $(gtkmoduledir)/.. +gnomeautostartdir = $(datadir)/gnome/autostart +gnomeautostart_DATA = atk-bridge.desktop +EXTRA_DIST = atk-bridge.desktop.in +CLEANFILES = $(gnome_autostart_DATA) + +%.desktop: %.desktop.in Makefile.am + sed -e "s,\@gtkpathdir\@,$(gtkpathdir)," \ + < $< > $@ diff --git a/atk-adaptor/atk-bridge.desktop.in b/atk-adaptor/atk-bridge.desktop.in new file mode 100644 index 0000000..016a2d3 --- /dev/null +++ b/atk-adaptor/atk-bridge.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=GNOME D-Bus atk-bridge locator +Comment=Sets GTK_PATH for gnome-session to pick up D-Bus atk-bridge module +Exec=dbus-send --session --dest="org.gnome.SessionManager" /org/gnome/SessionManager org.gnome.SessionManager.Setenv string:"GTK_PATH" string:"@gtkpathdir@" +OnlyShowIn=GNOME; +AutostartCondition=GNOME /desktop/gnome/interface/atspi-dbus +X-GNOME-Autostart-Phase=Initialization diff --git a/configure.ac b/configure.ac index 4656a11..a37915c 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,21 @@ fi LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^cspi]].*"' AC_SUBST(LIBTOOL_EXPORT_OPTIONS) +# Extra libraries for sockets added by Willie Walker +# based upon how SunStudio libraries work. +# +if test "$GCC" = yes; then + EXTRA_SOCKET_LIBS="" +else + EXTRA_SOCKET_LIBS="-lsocket -lnsl" +fi +AC_SUBST(EXTRA_SOCKET_LIBS) + +AC_ARG_VAR([PYATSPI_SUBDIR], + [Optional subdirectory for installing pyatspi]) +AC_SUBST(PYATSPI_SUBDIR) +AM_CONDITIONAL(RELOCATE_PYATSPI, test x"$PYATSPI_SUBDIR" != x) + AC_CONFIG_FILES([Makefile pkgconfig/cspi-1.0.pc pkgconfig/cspi-1.0-uninstalled.pc @@ -104,6 +119,7 @@ AC_CONFIG_FILES([Makefile tests/cspi/Makefile cspi/Makefile pyatspi/Makefile + pyatspi/pyatspi-dbus.pth ]) AC_OUTPUT diff --git a/pyatspi/Makefile.am b/pyatspi/Makefile.am index cd4e6f8..26d8e9b 100644 --- a/pyatspi/Makefile.am +++ b/pyatspi/Makefile.am @@ -1,4 +1,9 @@ +if RELOCATE_PYATSPI +pyatspidir = $(pythondir)/$(PYATSPI_SUBDIR)/pyatspi +else pyatspidir = $(pythondir)/pyatspi +endif + pyatspi_PYTHON = \ Accessibility.py \ accessible.py \ @@ -32,4 +37,13 @@ pyatspi_PYTHON = \ utils.py \ value.py +if RELOCATE_PYATSPI +install-exec-local: Makefile + @$(MKDIR_P) $(DESTDIR)$(pyexecdir) + cp pyatspi-dbus.pth $(DESTDIR)$(pyexecdir) + +uninstall-local: + @rm $(DESTDIR)$(pyexecdir)/pyatspi-dbus.pth +endif + CLEANFILES = *.pyc diff --git a/tests/cspi/Makefile.am b/tests/cspi/Makefile.am index 316cbe4..d3de7a5 100644 --- a/tests/cspi/Makefile.am +++ b/tests/cspi/Makefile.am @@ -16,4 +16,4 @@ INCLUDES = -I$(top_srcdir) \ LDADD = $(top_builddir)/common/libspicommon.la \ $(top_builddir)/cspi/libcspi.la \ - $(TESTS_LIBS) $(X_LIBS) $(XINPUT_LIBS) $(ATK_LIBS) $(GTK_LIBS) $(DBIND_LIBS) + $(TESTS_LIBS) $(X_LIBS) $(XINPUT_LIBS) $(ATK_LIBS) $(GTK_LIBS) $(DBIND_LIBS) @EXTRA_SOCKET_LIBS@ -- 1.5.6.5