From 5ab2da4018b3709f48f6688dcbda728f096ffc18 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 6 Mar 2012 19:14:42 -0600 Subject: generate app-indicator.sources.xml (for mono bindings) and appindicator.override (for python bindings) at configure time so that they can take into account top_builddir vs top_srcdir differences. --- bindings/python/Makefile.am | 9 ++--- bindings/python/appindicator.override | 65 -------------------------------- bindings/python/appindicator.override.in | 65 ++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 70 deletions(-) delete mode 100644 bindings/python/appindicator.override create mode 100644 bindings/python/appindicator.override.in (limited to 'bindings/python') diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index 7febc11..fe95c02 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -25,16 +25,15 @@ _appindicator_la_SOURCES = appindicatormodule.c nodist__appindicator_la_SOURCES = appindicator.c CLEANFILES = appindicator.c -EXTRA_DIST = appindicator.override appindicator-arg-types.py $(defs_DATA) +EXTRA_DIST = appindicator.override.in appindicator-arg-types.py $(defs_DATA) appindicator.c: $(defs_DATA) appindicator.override %.c: %.defs - (cd $(srcdir) \ - && $(PYGTK_CODEGEN) \ + ($(PYGTK_CODEGEN) \ --register $(PYGTK_DEFSDIR)/gtk-types.defs \ --register $(PYGTK_DEFSDIR)/gdk-types.defs \ - --load-types appindicator-arg-types.py \ + --load-types $(srcdir)/appindicator-arg-types.py \ --override $*.override \ - --prefix py$* $*.defs) > gen-$*.c \ + --prefix py$* $(srcdir)/$*.defs) > gen-$*.c \ && cp gen-$*.c $*.c \ && rm -f gen-$*.c diff --git a/bindings/python/appindicator.override b/bindings/python/appindicator.override deleted file mode 100644 index b252994..0000000 --- a/bindings/python/appindicator.override +++ /dev/null @@ -1,65 +0,0 @@ -/* -Python bindings for libappindicator. - -Copyright 2009 Canonical Ltd. - -Authors: - Eitan Isaacson (original) - Neil Jagdish Patel - -This program is free software: you can redistribute it and/or modify it -under the terms of either or both of the following licenses: - -1) the GNU Lesser General Public License version 3, as published by the -Free Software Foundation; and/or -2) the GNU Lesser General Public License version 2.1, as published by -the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR -PURPOSE. See the applicable version of the GNU Lesser General Public -License for more details. - -You should have received a copy of both the GNU Lesser General Public -License version 3 and version 2.1 along with this program. If not, see - -*/ -%% -headers -#include -#include "../src/app-indicator.h" -#include "../src/app-indicator-enum-types.h" -#include -#include "pygobject.h" -#include "pyglib.h" -#include - -typedef PyObject* (*to_pyobject_func) (gpointer data); - -#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE - -void -_appindicator_add_constants(PyObject *module, const gchar *strip_prefix) -{ -#ifdef VERSION - PyModule_AddStringConstant(module, "__version__", VERSION); -#endif - pyg_enum_add(module, - "IndicatorCategory", - strip_prefix, - APP_INDICATOR_TYPE_INDICATOR_CATEGORY); - - pyg_enum_add(module, - "IndicatorStatus", - strip_prefix, - APP_INDICATOR_TYPE_INDICATOR_STATUS); - - if (PyErr_Occurred()) - PyErr_Print(); -} -%% -modulename appindicator -%% -import gobject.GObject as PyGObject_Type -import gtk.Menu as PyGtkMenu_Type diff --git a/bindings/python/appindicator.override.in b/bindings/python/appindicator.override.in new file mode 100644 index 0000000..84d3159 --- /dev/null +++ b/bindings/python/appindicator.override.in @@ -0,0 +1,65 @@ +/* +Python bindings for libappindicator. + +Copyright 2009 Canonical Ltd. + +Authors: + Eitan Isaacson (original) + Neil Jagdish Patel + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ +%% +headers +#include +#include "@top_srcdir@/src/app-indicator.h" +#include "@top_builddir@/src/app-indicator-enum-types.h" +#include +#include "pygobject.h" +#include "pyglib.h" +#include + +typedef PyObject* (*to_pyobject_func) (gpointer data); + +#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE + +void +_appindicator_add_constants(PyObject *module, const gchar *strip_prefix) +{ +#ifdef VERSION + PyModule_AddStringConstant(module, "__version__", VERSION); +#endif + pyg_enum_add(module, + "IndicatorCategory", + strip_prefix, + APP_INDICATOR_TYPE_INDICATOR_CATEGORY); + + pyg_enum_add(module, + "IndicatorStatus", + strip_prefix, + APP_INDICATOR_TYPE_INDICATOR_STATUS); + + if (PyErr_Occurred()) + PyErr_Print(); +} +%% +modulename appindicator +%% +import gobject.GObject as PyGObject_Type +import gtk.Menu as PyGtkMenu_Type -- cgit v1.2.3