From 8afb5028469fc0c3c2b40be1f1cb94a608efe0e4 Mon Sep 17 00:00:00 2001 From: Willie Walker Date: Wed, 23 Sep 2009 09:09:49 -0400 Subject: [PATCH] Allow at-spi2-atk files to co-exist with AT-SPI/CORBA (bfo#24108) --- atk-adaptor/Makefile.am | 12 ++++++------ common/Makefile.am | 14 +++++++------- configure.ac | 1 + cspi/Makefile.am | 16 ++++++++-------- pyatspi/Makefile.am | 9 ++++++++- pyatspi/pyatspi2.pth.in | 1 + tests/cspi/Makefile.am | 6 +++--- 7 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 pyatspi/pyatspi2.pth.in diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am index 23438b3..a8f880f 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 = libspi2atk.la -libspiatk_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ +libspi2atk_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 \ +libspi2atk_la_LDFLAGS = -no-undefined \ -module \ -avoid-version \ -rpath $(gtkmoduledir) -libspiatk_la_LIBADD = $(DBUS_GLIB_LIBS) \ +libspi2atk_la_LIBADD = $(DBUS_GLIB_LIBS) \ $(ATK_LIBS) \ $(DBIND_LIBS) \ $(DROUTE_LIBS) \ - $(top_builddir)/common/libspicommon.la + $(top_builddir)/common/libspi2common.la -libspiatk_la_SOURCES = \ +libspi2atk_la_SOURCES = \ accessible-adaptor.c \ accessible-marshaller.c \ accessible-marshaller.h \ diff --git a/common/Makefile.am b/common/Makefile.am index 283b8dc..49a69b4 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,16 +1,16 @@ -noinst_LTLIBRARIES = libspicommon.la +noinst_LTLIBRARIES = libspi2common.la -libspicommon_la_CFLAGS = $(DBUS_GLIB_CFLAGS)\ +libspi2common_la_CFLAGS = $(DBUS_GLIB_CFLAGS)\ $(ATK_CFLAGS) \ -DATSPI_INTROSPECTION_PATH=\"$(DEFAULT_ATSPI_INTROSPECTION_PATH)\"\ -I$(top_builddir)\ -I$(top_srcdir) -libspicommon_la_LIBADD = $(DBUS_GLIB_LIBS) +libspi2common_la_LIBADD = $(DBUS_GLIB_LIBS) -spicommonincludedir = $(includedir)/at-spi-1.0/libspi +spi2commonincludedir = $(includedir)/at-spi-1.0/libspi2 -spicommoninclude_HEADERS = \ +spi2commoninclude_HEADERS = \ bitarray.h \ event-types.h \ generated-types.h \ @@ -22,9 +22,9 @@ spicommoninclude_HEADERS = \ #BUILT_SOURCES = generated-types.h #CLEANFILES = generated-types.h -nodist_libspicommon_la_SOURCES = generated-types.h +nodist_libspi2common_la_SOURCES = generated-types.h -libspicommon_la_SOURCES = \ +libspi2common_la_SOURCES = \ bitarray.h \ event-types.h \ spi-types.h \ diff --git a/configure.ac b/configure.ac index 4656a11..8392551 100644 --- a/configure.ac +++ b/configure.ac @@ -104,6 +104,7 @@ AC_CONFIG_FILES([Makefile tests/cspi/Makefile cspi/Makefile pyatspi/Makefile + pyatspi/pyatspi2.pth ]) AC_OUTPUT diff --git a/cspi/Makefile.am b/cspi/Makefile.am index 2ce79ef..162d528 100644 --- a/cspi/Makefile.am +++ b/cspi/Makefile.am @@ -1,23 +1,23 @@ -lib_LTLIBRARIES = libcspi.la +lib_LTLIBRARIES = libcspi2.la -libcspi_la_LDFLAGS = @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ -no-undefined +libcspi2_la_LDFLAGS = @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ -no-undefined -libcspi_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ +libcspi2_la_CFLAGS = $(DBUS_GLIB_CFLAGS) \ $(ATK_CFLAGS) \ $(DBIND_CFLAGS) \ $(DROUTE_CFLAGS) \ -I$(top_srcdir) -libcspidir = $(includedir)/at-spi-1.0/cspi -libcspi_HEADERS = \ +libcspi2dir = $(includedir)/at-spi-1.0/cspi2 +libcspi2_HEADERS = \ spi.h \ spi-impl.h \ spi-listener.h \ spi-roletypes.h \ spi-statetypes.h -libcspi_la_SOURCES = \ +libcspi2_la_SOURCES = \ cspi-lowlevel.h \ spi-accessible.c \ spi-action.c \ @@ -38,10 +38,10 @@ libcspi_la_SOURCES = \ spi-value.c \ spi-private.h -libcspi_la_LIBADD = \ +libcspi2_la_LIBADD = \ $(LIBCSPI_LIBS) \ $(DBIND_LIBS) \ $(X_LIBS) \ $(DBUS_GLIB_LIBS) \ $(ATK_LIBS) \ - $(top_builddir)/common/libspicommon.la + $(top_builddir)/common/libspi2common.la diff --git a/pyatspi/Makefile.am b/pyatspi/Makefile.am index cd4e6f8..4a2947b 100644 --- a/pyatspi/Makefile.am +++ b/pyatspi/Makefile.am @@ -1,4 +1,4 @@ -pyatspidir = $(pythondir)/pyatspi +pyatspidir = $(pythondir)/pyatspi2/pyatspi pyatspi_PYTHON = \ Accessibility.py \ accessible.py \ @@ -32,4 +32,11 @@ pyatspi_PYTHON = \ utils.py \ value.py +install-exec-local: Makefile + @$(MKDIR_P) $(DESTDIR)$(pyexecdir) + cp pyatspi2.pth $(DESTDIR)$(pyexecdir) + +uninstall-local: + @rm $(DESTDIR)$(pyexecdir)/pyatspi2.pth + CLEANFILES = *.pyc diff --git a/pyatspi/pyatspi2.pth.in b/pyatspi/pyatspi2.pth.in new file mode 100644 index 0000000..46be624 --- /dev/null +++ b/pyatspi/pyatspi2.pth.in @@ -0,0 +1 @@ +import commands, sys; a = commands.getoutput('gconftool-2 --get /desktop/gnome/interface/accessibility2'); (a == 'true') and sys.path.insert(0, '@prefix@/lib/python@PYTHON_VERSION@/site-packages/pyatspi2') diff --git a/tests/cspi/Makefile.am b/tests/cspi/Makefile.am index 316cbe4..f8cdcb1 100644 --- a/tests/cspi/Makefile.am +++ b/tests/cspi/Makefile.am @@ -14,6 +14,6 @@ INCLUDES = -I$(top_srcdir) \ $(DBIND_CFLAGS) \ $(DEBUG_CFLAGS) -LDADD = $(top_builddir)/common/libspicommon.la \ - $(top_builddir)/cspi/libcspi.la \ - $(TESTS_LIBS) $(X_LIBS) $(XINPUT_LIBS) $(ATK_LIBS) $(GTK_LIBS) $(DBIND_LIBS) +LDADD = $(top_builddir)/common/libspi2common.la \ + $(top_builddir)/cspi/libcspi2.la \ + $(TESTS_LIBS) $(X_LIBS) $(XINPUT_LIBS) $(ATK_LIBS) $(GTK_LIBS) $(DBIND_LIBS) -lsocket -lnsl -- 1.5.6.5