Merge lp:~robert-ancell/launchpad-integration/cli-bindings into lp:~ubuntu-core-dev/launchpad-integration/ubuntu

Proposed by Robert Ancell
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp:~robert-ancell/launchpad-integration/cli-bindings
Merge into: lp:~ubuntu-core-dev/launchpad-integration/ubuntu
Diff against target: 180 lines (+113/-3)
7 files modified
configure.ac (+25/-1)
debian/changelog (+6/-0)
debian/control (+22/-1)
debian/launchpad-integration1-cil.install (+1/-0)
lib/LaunchpadIntegration.cs (+41/-0)
lib/Makefile.am (+16/-0)
lib/launchpad-integration.c (+2/-1)
To merge this branch: bzr merge lp:~robert-ancell/launchpad-integration/cli-bindings
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Abandoning - lpi is dead

Unmerged revisions

119. By Robert Ancell

Add CLI bindings

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2008-06-13 19:28:24 +0000
3+++ configure.ac 2010-01-15 02:08:11 +0000
4@@ -1,4 +1,4 @@
5-AC_INIT([launchpad-integration], [0.1.20])
6+AC_INIT([launchpad-integration], [0.1.26])
7
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_MACRO_DIR([m4])
10@@ -43,6 +43,30 @@
11 AC_MSG_RESULT($PYGTK_DEFSDIR)
12
13
14+###########################
15+# Check for Mono support
16+###########################
17+MONO_REQUIRED_VERSION=1.0
18+PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
19+
20+AC_PATH_PROG(AL, al, no)
21+if test "x$AL" = "xno" ; then
22+ AC_MSG_ERROR([No al tool found. You need to install Mono.])
23+fi
24+
25+if test "x$has_mono" = "xtrue" ; then
26+ AC_PATH_PROG(CSC, gmcs, no)
27+fi
28+
29+if test "x$CSC" = "xno" ; then
30+ AC_MSG_ERROR([No Mono compiler found.])
31+fi
32+AC_SUBST(CSC)
33+GTK_SHARP_REQ_VERSION=2.12
34+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQ_VERSION)
35+AC_SUBST(GTK_SHARP_LIBS)
36+AC_SUBST(GTK_SHARP_CFLAGS)
37+
38 AC_CONFIG_FILES([
39 Makefile
40 lib/Makefile
41
42=== modified file 'debian/changelog'
43--- debian/changelog 2009-09-24 17:07:57 +0000
44+++ debian/changelog 2010-01-15 02:08:11 +0000
45@@ -1,3 +1,9 @@
46+launchpad-integration (0.1.26) lucid; urgency=low
47+
48+ * Add CLI bindings
49+
50+ -- Robert Ancell <robert.ancell@canonical.com> Fri, 15 Jan 2010 12:39:36 +1100
51+
52 launchpad-integration (0.1.25) karmic; urgency=low
53
54 * Update the url to use for launchpad translations
55
56=== modified file 'debian/control'
57--- debian/control 2008-10-16 11:45:19 +0000
58+++ debian/control 2010-01-15 02:08:11 +0000
59@@ -1,7 +1,17 @@
60 Source: launchpad-integration
61 Priority: optional
62 Maintainer: Sebastien Bacher <seb128@debian.org>
63-Build-Depends: debhelper (>= 5), cdbs, autotools-dev, libbonoboui2-dev (>= 2.10.1-0ubuntu2), libgtk2.0-dev (>= 2.8.2), python-gtk2-dev, python-gtk2-dbg, python-all-dev, python-all-dbg, python-central (>= 0.5)
64+Build-Depends: debhelper (>= 5),
65+ cdbs,
66+ autotools-dev,
67+ libbonoboui2-dev (>= 2.10.1-0ubuntu2),
68+ libgtk2.0-dev (>= 2.8.2),
69+ python-gtk2-dev,
70+ python-gtk2-dbg,
71+ python-all-dev,
72+ python-all-dbg,
73+ python-central (>= 0.5),
74+ mono-gmcs
75 XS-Python-Version: all
76 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/launchpad-integration/ubuntu
77 Standards-Version: 3.7.2
78@@ -98,3 +108,14 @@
79 .
80 This package contains the python bindings of the shared library, built
81 for the python debug interpreter.
82+
83+Package: launchpad-integration1-cil
84+Priority: optional
85+Section: cli-mono
86+Architecture: any
87+Depends: liblaunchpad-integration1
88+Description: CLI bindings for liblaunchpad-integration
89+ This package provides the launchpad-integration-sharp assembly that allows CLI (.NET)
90+ programs to provide Launchpad menu items.
91+ .
92+ This package contains assemblies to be used by applications.
93
94=== added file 'debian/launchpad-integration1-cil.install'
95--- debian/launchpad-integration1-cil.install 1970-01-01 00:00:00 +0000
96+++ debian/launchpad-integration1-cil.install 2010-01-15 02:08:11 +0000
97@@ -0,0 +1,1 @@
98+debian/tmp/usr/lib/mono/lpi-sharp
99
100=== added file 'lib/LaunchpadIntegration.cs'
101--- lib/LaunchpadIntegration.cs 1970-01-01 00:00:00 +0000
102+++ lib/LaunchpadIntegration.cs 2010-01-15 02:08:11 +0000
103@@ -0,0 +1,41 @@
104+namespace LaunchpadIntegration
105+{
106+ using Gtk;
107+ using System;
108+ using System.Runtime.InteropServices;
109+
110+ public static class LaunchpadIntegration
111+ {
112+ [DllImport("liblaunchpad-integration.so")]
113+ static extern void launchpad_integration_set_sourcepackagename(string name);
114+
115+ public static void SetSourcePackageName(string name)
116+ {
117+ launchpad_integration_set_sourcepackagename(name);
118+ }
119+
120+ [DllImport("liblaunchpad-integration.so")]
121+ static extern void launchpad_integration_add_ui(IntPtr ui, string path);
122+
123+ public static void AddUI(Gtk.UIManager ui, string path)
124+ {
125+ launchpad_integration_add_ui(ui.Handle, path);
126+ }
127+
128+ [DllImport("liblaunchpad-integration.so")]
129+ static extern void launchpad_integration_add_ui_with_separators(IntPtr ui, string path, bool separator_before, bool separator_after);
130+
131+ public static void AddUIWithSeparators(Gtk.UIManager ui, string path, bool separator_before, bool separator_after)
132+ {
133+ launchpad_integration_add_ui_with_separators(ui.Handle, path, separator_before, separator_after);
134+ }
135+
136+ [DllImport("liblaunchpad-integration.so")]
137+ static extern void launchpad_integration_add_items(IntPtr helpmenu, int position, bool separator_before, bool separator_after);
138+
139+ public static void AddItems(Gtk.Widget helpmenu, int position, bool separator_before, bool separator_after)
140+ {
141+ launchpad_integration_add_items(helpmenu.Handle, position, separator_before, separator_after);
142+ }
143+ }
144+}
145
146=== modified file 'lib/Makefile.am'
147--- lib/Makefile.am 2008-04-07 13:47:19 +0000
148+++ lib/Makefile.am 2010-01-15 02:08:11 +0000
149@@ -51,3 +51,19 @@
150 --prefix py$* $*.defs) > gen-$*.c \
151 && cp gen-$*.c $*.c \
152 && rm -f gen-$*.c
153+
154+# C# stuff
155+
156+lpisharpdir = $(libdir)/mono/lpi-sharp
157+lpisharp_CSSOURCES = $(srcdir)/LaunchpadIntegration.cs
158+lpisharp_DATA=$(ASSEMBLY)
159+
160+ASSEMBLY = $(ASSEMBLY_NAME).dll
161+ASSEMBLY_NAME = lpi-sharp
162+noinst_DATA = $(ASSEMBLY)
163+
164+EXTRA_DIST += $(lpisharp_CSSOURCES)
165+CLEANFILES += $(ASSEMBLY)
166+
167+$(ASSEMBLY): $(CSSOURCES)
168+ $(CSC) -target:library $(GTK_SHARP_LIBS) $(lpisharp_CSSOURCES) -out:$(ASSEMBLY)
169
170=== modified file 'lib/launchpad-integration.c'
171--- lib/launchpad-integration.c 2008-04-07 13:47:19 +0000
172+++ lib/launchpad-integration.c 2010-01-15 02:08:11 +0000
173@@ -16,7 +16,8 @@
174 void
175 launchpad_integration_set_sourcepackagename (const char *name)
176 {
177- sourcepackagename = name;
178+ g_free (sourcepackagename);
179+ sourcepackagename = g_strdup (name);
180 }
181
182

Subscribers

People subscribed via source and target branches

to all changes: