Merge lp:~charlesk/libappindicator/lp-931764 into lp:libappindicator/0.5

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 231
Merged at revision: 231
Proposed branch: lp:~charlesk/libappindicator/lp-931764
Merge into: lp:libappindicator/0.5
Diff against target: 243 lines (+86/-85)
7 files modified
bindings/mono/Makefile.am (+3/-3)
bindings/mono/app-indicator.sources.xml (+0/-12)
bindings/mono/app-indicator.sources.xml.in (+12/-0)
bindings/python/Makefile.am (+4/-5)
bindings/python/appindicator.override (+0/-65)
bindings/python/appindicator.override.in (+65/-0)
configure.ac (+2/-0)
To merge this branch: bzr merge lp:~charlesk/libappindicator/lp-931764
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+96277@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

Okay well this was a fun ride. In short, the problem is that the mono and python bindings' automake process was not written for cases where the srcdir and builddir are different.

When building the language bindings for mono and python, both have input files that refer to other files in the build by path. These paths break when you change the srcdir, so I've replaced the input files with template files (ie, foo.sources.xml was replaced with foo.sources.xml.in). That way, input files containing the correct paths can be generated from the templates when the configure script is run.

There were a couple of places in the python and mono directories' Makefile.am files that made similar assumptions about builddir and srcdir. These were also tweaked.

Revision history for this message
Charles Kerr (charlesk) wrote :

Also very important, I need to give credit to Allan. He and I worked tag-team on bug 931764 and bug 931759 for about 7 hours today because once we would figure out & fix one build error, a new one would show up to take its place further down the build path. :)

Revision history for this message
Ted Gould (ted) wrote :

Hmm, have no clue why make distcheck passed then. But, I don't care, these changes look good.

Only thing is that when I merge them I'm going to change the layout a bit. It should be done using bzr mv instead of deleting the files and adding new ones. Since Bazaar has strong file IDs this means that if other people had branches modifying these files in some other way Bazaar could resolve the conflicts. If there's no shared history it can't do that.

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

> It should be done using bzr mv instead of deleting the files and adding new ones.

Good catch; thanks :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bindings/mono/Makefile.am'
2--- bindings/mono/Makefile.am 2012-02-03 19:40:14 +0000
3+++ bindings/mono/Makefile.am 2012-03-07 01:34:18 +0000
4@@ -66,7 +66,7 @@
5 $(METADATA) \
6 appindicator-sharp-0.1.pc.in \
7 appindicator-sharp.dll.config.in \
8- app-indicator.sources.xml \
9+ app-indicator.sources.xml.in \
10 $(ASSEMBLY_NAME).snk \
11 $(POLICY).config.in \
12 $(POLICY1).config.in \
13@@ -85,13 +85,13 @@
14 endif
15
16 $(RAW_API): app-indicator.sources.xml $(WRAPPER_FREE_BINDING)
17- $(GAPI_PARSER) $(srcdir)/app-indicator.sources.xml
18+ $(GAPI_PARSER) app-indicator.sources.xml
19
20 $(WRAPPER_FREE_BINDING): $(WRAPPER_FREE_BINDING_SRC)
21 sed '/signals\[X_NEW_LABEL\] /,+6d' $(WRAPPER_FREE_BINDING_SRC) > $(WRAPPER_FREE_BINDING)
22
23 $(MIDDLE_API): $(METADATA) $(RAW_API)
24- cp $(srcdir)/$(RAW_API) $(MIDDLE_API)
25+ cp $(RAW_API) $(MIDDLE_API)
26 chmod u+w $(MIDDLE_API)
27 @if test -n '$(METADATA)'; then \
28 echo "$(GAPI_FIXUP) --api=$(MIDDLE_API) --metadata=$(srcdir)/$(METADATA)"; \
29
30=== removed file 'bindings/mono/app-indicator.sources.xml'
31--- bindings/mono/app-indicator.sources.xml 2010-09-19 19:47:07 +0000
32+++ bindings/mono/app-indicator.sources.xml 1970-01-01 00:00:00 +0000
33@@ -1,12 +0,0 @@
34-<gapi-parser-input>
35- <api filename="libappindicator-api.raw">
36- <library name="appindicator.dll">
37- <namespace name="AppIndicator">
38- <file>app-indicator.c</file>
39- <file>../../src/app-indicator-enum-types.c</file>
40- <file>../../src/app-indicator-enum-types.h</file>
41- <file>../../src/app-indicator.h</file>
42- </namespace>
43- </library>
44- </api>
45-</gapi-parser-input>
46
47=== added file 'bindings/mono/app-indicator.sources.xml.in'
48--- bindings/mono/app-indicator.sources.xml.in 1970-01-01 00:00:00 +0000
49+++ bindings/mono/app-indicator.sources.xml.in 2012-03-07 01:34:18 +0000
50@@ -0,0 +1,12 @@
51+<gapi-parser-input>
52+ <api filename="libappindicator-api.raw">
53+ <library name="appindicator.dll">
54+ <namespace name="AppIndicator">
55+ <file>@top_builddir@/bindings/mono/app-indicator.c</file>
56+ <file>@top_builddir@/src/app-indicator-enum-types.c</file>
57+ <file>@top_builddir@/src/app-indicator-enum-types.h</file>
58+ <file>@top_srcdir@/src/app-indicator.h</file>
59+ </namespace>
60+ </library>
61+ </api>
62+</gapi-parser-input>
63
64=== modified file 'bindings/python/Makefile.am'
65--- bindings/python/Makefile.am 2012-01-27 22:03:16 +0000
66+++ bindings/python/Makefile.am 2012-03-07 01:34:18 +0000
67@@ -25,16 +25,15 @@
68 nodist__appindicator_la_SOURCES = appindicator.c
69
70 CLEANFILES = appindicator.c
71-EXTRA_DIST = appindicator.override appindicator-arg-types.py $(defs_DATA)
72+EXTRA_DIST = appindicator.override.in appindicator-arg-types.py $(defs_DATA)
73 appindicator.c: $(defs_DATA) appindicator.override
74
75 %.c: %.defs
76- (cd $(srcdir) \
77- && $(PYGTK_CODEGEN) \
78+ ($(PYGTK_CODEGEN) \
79 --register $(PYGTK_DEFSDIR)/gtk-types.defs \
80 --register $(PYGTK_DEFSDIR)/gdk-types.defs \
81- --load-types appindicator-arg-types.py \
82+ --load-types $(srcdir)/appindicator-arg-types.py \
83 --override $*.override \
84- --prefix py$* $*.defs) > gen-$*.c \
85+ --prefix py$* $(srcdir)/$*.defs) > gen-$*.c \
86 && cp gen-$*.c $*.c \
87 && rm -f gen-$*.c
88
89=== removed file 'bindings/python/appindicator.override'
90--- bindings/python/appindicator.override 2010-04-29 16:31:36 +0000
91+++ bindings/python/appindicator.override 1970-01-01 00:00:00 +0000
92@@ -1,65 +0,0 @@
93-/*
94-Python bindings for libappindicator.
95-
96-Copyright 2009 Canonical Ltd.
97-
98-Authors:
99- Eitan Isaacson <eitan@ascender.com> (original)
100- Neil Jagdish Patel <neil.patel@canonical.com>
101-
102-This program is free software: you can redistribute it and/or modify it
103-under the terms of either or both of the following licenses:
104-
105-1) the GNU Lesser General Public License version 3, as published by the
106-Free Software Foundation; and/or
107-2) the GNU Lesser General Public License version 2.1, as published by
108-the Free Software Foundation.
109-
110-This program is distributed in the hope that it will be useful, but
111-WITHOUT ANY WARRANTY; without even the implied warranties of
112-MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
113-PURPOSE. See the applicable version of the GNU Lesser General Public
114-License for more details.
115-
116-You should have received a copy of both the GNU Lesser General Public
117-License version 3 and version 2.1 along with this program. If not, see
118-<http://www.gnu.org/licenses/>
119-*/
120-%%
121-headers
122-#include <Python.h>
123-#include "../src/app-indicator.h"
124-#include "../src/app-indicator-enum-types.h"
125-#include <glib.h>
126-#include "pygobject.h"
127-#include "pyglib.h"
128-#include <pygtk/pygtk.h>
129-
130-typedef PyObject* (*to_pyobject_func) (gpointer data);
131-
132-#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE
133-
134-void
135-_appindicator_add_constants(PyObject *module, const gchar *strip_prefix)
136-{
137-#ifdef VERSION
138- PyModule_AddStringConstant(module, "__version__", VERSION);
139-#endif
140- pyg_enum_add(module,
141- "IndicatorCategory",
142- strip_prefix,
143- APP_INDICATOR_TYPE_INDICATOR_CATEGORY);
144-
145- pyg_enum_add(module,
146- "IndicatorStatus",
147- strip_prefix,
148- APP_INDICATOR_TYPE_INDICATOR_STATUS);
149-
150- if (PyErr_Occurred())
151- PyErr_Print();
152-}
153-%%
154-modulename appindicator
155-%%
156-import gobject.GObject as PyGObject_Type
157-import gtk.Menu as PyGtkMenu_Type
158
159=== added file 'bindings/python/appindicator.override.in'
160--- bindings/python/appindicator.override.in 1970-01-01 00:00:00 +0000
161+++ bindings/python/appindicator.override.in 2012-03-07 01:34:18 +0000
162@@ -0,0 +1,65 @@
163+/*
164+Python bindings for libappindicator.
165+
166+Copyright 2009 Canonical Ltd.
167+
168+Authors:
169+ Eitan Isaacson <eitan@ascender.com> (original)
170+ Neil Jagdish Patel <neil.patel@canonical.com>
171+
172+This program is free software: you can redistribute it and/or modify it
173+under the terms of either or both of the following licenses:
174+
175+1) the GNU Lesser General Public License version 3, as published by the
176+Free Software Foundation; and/or
177+2) the GNU Lesser General Public License version 2.1, as published by
178+the Free Software Foundation.
179+
180+This program is distributed in the hope that it will be useful, but
181+WITHOUT ANY WARRANTY; without even the implied warranties of
182+MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
183+PURPOSE. See the applicable version of the GNU Lesser General Public
184+License for more details.
185+
186+You should have received a copy of both the GNU Lesser General Public
187+License version 3 and version 2.1 along with this program. If not, see
188+<http://www.gnu.org/licenses/>
189+*/
190+%%
191+headers
192+#include <Python.h>
193+#include "@top_srcdir@/src/app-indicator.h"
194+#include "@top_builddir@/src/app-indicator-enum-types.h"
195+#include <glib.h>
196+#include "pygobject.h"
197+#include "pyglib.h"
198+#include <pygtk/pygtk.h>
199+
200+typedef PyObject* (*to_pyobject_func) (gpointer data);
201+
202+#define APP_TYPE_INDICATOR APP_INDICATOR_TYPE
203+
204+void
205+_appindicator_add_constants(PyObject *module, const gchar *strip_prefix)
206+{
207+#ifdef VERSION
208+ PyModule_AddStringConstant(module, "__version__", VERSION);
209+#endif
210+ pyg_enum_add(module,
211+ "IndicatorCategory",
212+ strip_prefix,
213+ APP_INDICATOR_TYPE_INDICATOR_CATEGORY);
214+
215+ pyg_enum_add(module,
216+ "IndicatorStatus",
217+ strip_prefix,
218+ APP_INDICATOR_TYPE_INDICATOR_STATUS);
219+
220+ if (PyErr_Occurred())
221+ PyErr_Print();
222+}
223+%%
224+modulename appindicator
225+%%
226+import gobject.GObject as PyGObject_Type
227+import gtk.Menu as PyGtkMenu_Type
228
229=== modified file 'configure.ac'
230--- configure.ac 2012-02-03 19:31:38 +0000
231+++ configure.ac 2012-03-07 01:34:18 +0000
232@@ -228,9 +228,11 @@
233 bindings/mono/Makefile
234 bindings/mono/appindicator-sharp.dll.config
235 bindings/mono/appindicator-sharp-0.1.pc
236+bindings/mono/app-indicator.sources.xml
237 bindings/mono/examples/Makefile
238 bindings/mono/examples/indicator-example
239 bindings/python/Makefile
240+bindings/python/appindicator.override
241 bindings/vala/Makefile
242 bindings/vala/examples/Makefile
243 tests/Makefile

Subscribers

People subscribed via source and target branches