Merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone
- mono-bindings
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Rodrigo Moya |
Approved revision: | no longer in the revision history of the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~directhex/libubuntuone/mono-bindings |
Merge into: | lp:libubuntuone |
Diff against target: |
182 lines (+89/-2) 9 files modified
.bzrignore (+6/-0) Makefile.am (+1/-1) bindings/Makefile.am (+1/-1) bindings/mono/Makefile.am (+24/-0) bindings/mono/ubuntuone-api.metadata (+4/-0) bindings/mono/ubuntuone-sharp.dll.config.in (+4/-0) bindings/mono/ubuntuone.sources (+9/-0) configure.ac (+28/-0) ubuntuone-sharp.pc.in (+12/-0) |
To merge this branch: | bzr merge lp:~directhex/libubuntuone/mono-bindings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rodrigo Moya (community) | Approve | ||
Review via email: mp+20633@code.launchpad.net |
Commit message
Add Mono bindings
Description of the change
This change includes auto-generated Mono bindings, including integration with the build system and a pkg-config file.
Rodrigo Moya (rodrigo-moya) wrote : | # |
Inclusion of Mono bindings has been accepted for Lucid, so merging this. We'll fix the issues in other branches
Rodrigo Moya (rodrigo-moya) wrote : | # |
The attempt to merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone failed.Below is the output from the failed tests.
/usr/bin/
[1mchecking for autoconf >= 2.53...
[m(B testing autoconf2.50... not found.
testing autoconf... found 2.64
[1mchecking for automake >= 1.6...
[m(B testing automake-1.11... found 1.11
[1mchecking for libtool >= 1.5...
[m(B testing libtoolize... found 2.2.6
[1mchecking for glib-gettext >= 2.2.0...
[m(B testing glib-gettextize... found 2.22.3
[1mchecking for intltool >= 0.30...
[m(B testing intltoolize... found 0.41.0
[1mchecking for pkg-config >= 0.14.0...
[m(B testing pkg-config... found 0.22
[1mchecking for gtk-doc >= 1.0...
[m(B testing gtkdocize... found 1.11
[1mChecking for required M4 macros...
[m(B[1mChecking for forbidden M4 macros...
[m(B
[m(B[1mRunning libtoolize...
[m(Blibtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
[1mRunning glib-gettextize... Ignore non-fatal messages.
[m(BCopying file mkinstalldirs
Copying file po/Makefile.in.in
Please add the files
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
progtest.m4
from the /aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.
[1mRunning intltoolize...
[m(B[1mRunning gtkdocize...
[m(B[1mRunning aclocal-1.11...
[m(B[1mRunning autoconf...
[m(B[1mRunning autoheader...
[m(B[1mRunning automake-1.11...
[m(B[1mRunning ./configure --prefix=/usr ...
[m(Bchecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for ...
Rodrigo Moya (rodrigo-moya) wrote : | # |
Attempt to merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone failed due to merge conflicts:
duplicate in bindings/mono.moved
Rodrigo Moya (rodrigo-moya) wrote : | # |
The attempt to merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone failed.Below is the output from the failed tests.
/usr/bin/
[1mchecking for autoconf >= 2.53...
[m(B testing autoconf2.50... not found.
testing autoconf... found 2.64
[1mchecking for automake >= 1.6...
[m(B testing automake-1.11... found 1.11
[1mchecking for libtool >= 1.5...
[m(B testing libtoolize... found 2.2.6
[1mchecking for glib-gettext >= 2.2.0...
[m(B testing glib-gettextize... found 2.22.3
[1mchecking for intltool >= 0.30...
[m(B testing intltoolize... found 0.41.0
[1mchecking for pkg-config >= 0.14.0...
[m(B testing pkg-config... found 0.22
[1mchecking for gtk-doc >= 1.0...
[m(B testing gtkdocize... found 1.11
[1mChecking for required M4 macros...
[m(B[1mChecking for forbidden M4 macros...
[m(B
[m(B[1mRunning libtoolize...
[m(Blibtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
[1mRunning glib-gettextize... Ignore non-fatal messages.
[m(BCopying file mkinstalldirs
Copying file po/Makefile.in.in
Please add the files
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
progtest.m4
from the /aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.
[1mRunning intltoolize...
[m(B[1mRunning gtkdocize...
[m(B[1mRunning aclocal-1.11...
[m(B[1mRunning autoconf...
[m(B[1mRunning autoheader...
[m(B[1mRunning automake-1.11...
[m(B[1mRunning ./configure --prefix=/usr ...
[m(Bchecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for ...
Rodrigo Moya (rodrigo-moya) wrote : | # |
Attempt to merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone failed due to merge conflicts:
duplicate in bindings/mono.moved
duplicate in bindings/
Rodrigo Moya (rodrigo-moya) wrote : | # |
The attempt to merge lp:~directhex/libubuntuone/mono-bindings into lp:libubuntuone failed.Below is the output from the failed tests.
/usr/bin/
[1mchecking for autoconf >= 2.53...
[m(B testing autoconf2.50... not found.
testing autoconf... found 2.64
[1mchecking for automake >= 1.6...
[m(B testing automake-1.11... found 1.11
[1mchecking for libtool >= 1.5...
[m(B testing libtoolize... found 2.2.6
[1mchecking for glib-gettext >= 2.2.0...
[m(B testing glib-gettextize... found 2.22.3
[1mchecking for intltool >= 0.30...
[m(B testing intltoolize... found 0.41.0
[1mchecking for pkg-config >= 0.14.0...
[m(B testing pkg-config... found 0.22
[1mchecking for gtk-doc >= 1.0...
[m(B testing gtkdocize... found 1.11
[1mChecking for required M4 macros...
[m(B[1mChecking for forbidden M4 macros...
[m(B
[m(B[1mRunning libtoolize...
[m(Blibtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
[1mRunning glib-gettextize... Ignore non-fatal messages.
[m(BCopying file mkinstalldirs
Copying file po/Makefile.in.in
Please add the files
codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
progtest.m4
from the /aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.
[1mRunning intltoolize...
[m(B[1mRunning gtkdocize...
[m(B[1mRunning aclocal-1.11...
[m(B[1mRunning autoconf...
[m(B[1mRunning autoheader...
[m(B[1mRunning automake-1.11...
[m(B[1mRunning ./configure --prefix=/usr ...
[m(Bchecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for ...
Rodrigo Moya (rodrigo-moya) wrote : | # |
hmm, can't merge it, don't know what that is, it seems it's missing something in the autogenerated code?
Jo Shields (directhex) wrote : | # |
That merge storm looked painful, but the 22:17 merge worked.
Looks like the latest additions to the master branch cause FTBFS though. I'll look - probably just a 1-line change needed to handle the new event... I may need a smarter way to ignore the OAuth stuff without needing a manual list of the other source files.
Rodrigo Moya (rodrigo-moya) wrote : | # |
ah, ok, that's probably it, so please merge from trunk and push again
Jo Shields (directhex) wrote : | # |
Fixed and future-proofed. Ish. CLEANFILES isn't future-proof, but the binding sure is. No more messy hard-coding in the build. Hooray for all!
Jo Shields (directhex) wrote : | # |
Making all in mono
make[3]: Entering directory `/home/
/usr/bin/
<dir ../../libubuntu
// liboauth version #define LIBOAUTH_VERSION "0.5.3"
structs: 3 enums: 1 callbacks:
funcs: 11 types: 0 classes: 1
props: childprops: signals: 4
/usr/bin/
/usr/bin/
Generation Summary:
Enums: 0 Structs: 0 Boxed: 0 Opaques: 0 Interfaces: 0 Objects: 1 Callbacks: 0
Properties: 0 Signals: 4 Methods: 1 Constructors: 1 Throttled: 0
Total Nodes: 7
/usr/bin/gmcs -target:library -pkg:gtk-sharp-2.0 -out:ubuntuone-
U1MusicStore.
U1MusicStore.
U1MusicStore.
U1MusicStore.
Compilation succeeded - 4 warning(s)
make[3]: Leaving directory `/home/
- 52. By Jo Shields <directhex@desire>
-
Add Mono bindings
Preview Diff
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2010-02-12 15:48:04 +0000 |
3 | +++ .bzrignore 2010-03-04 22:41:30 +0000 |
4 | @@ -18,6 +18,7 @@ |
5 | libtool |
6 | libubuntuone-1.0.pc |
7 | libubuntuone.pc |
8 | +ubuntuone-sharp.pc |
9 | ltmain.sh |
10 | missing |
11 | mkinstalldirs |
12 | @@ -31,6 +32,11 @@ |
13 | bindings/python/Makefile |
14 | bindings/python/Makefile.in |
15 | bindings/python/ubuntuone.c |
16 | +bindings/mono/Makefile.in |
17 | +bindings/mono/*.cs |
18 | +bindings/mono/ubuntuone-api.xml |
19 | +bindings/mono/ubuntuone-sharp.dll |
20 | +bindings/mono/ubuntuone-sharp.dll.config |
21 | data/Makefile |
22 | data/Makefile.in |
23 | libubuntuone/.deps/ |
24 | |
25 | === modified file 'Makefile.am' |
26 | --- Makefile.am 2010-02-16 23:12:12 +0000 |
27 | +++ Makefile.am 2010-03-04 22:41:30 +0000 |
28 | @@ -2,7 +2,7 @@ |
29 | |
30 | EXTRA_DIST = COPYING.GPL |
31 | |
32 | -pcfiles = libubuntuone-1.0.pc |
33 | +pcfiles = libubuntuone-1.0.pc ubuntuone-sharp.pc |
34 | |
35 | libubuntuone-1.0.pc: libubuntuone.pc |
36 | @cp -f $< $@ |
37 | |
38 | === modified file 'bindings/Makefile.am' |
39 | --- bindings/Makefile.am 2009-12-21 16:45:31 +0000 |
40 | +++ bindings/Makefile.am 2010-03-04 22:41:30 +0000 |
41 | @@ -1,1 +1,1 @@ |
42 | -SUBDIRS = python |
43 | \ No newline at end of file |
44 | +SUBDIRS = python mono |
45 | |
46 | === added directory 'bindings/mono' |
47 | === added file 'bindings/mono/Makefile.am' |
48 | --- bindings/mono/Makefile.am 1970-01-01 00:00:00 +0000 |
49 | +++ bindings/mono/Makefile.am 2010-03-04 22:41:30 +0000 |
50 | @@ -0,0 +1,24 @@ |
51 | +CLEANFILES = U1MusicStore.cs \ |
52 | + OAuthMethod.cs \ |
53 | + ObjectManager.cs \ |
54 | + PlayLibraryHandler.cs \ |
55 | + PreviewMp3Handler.cs \ |
56 | + DownloadFinishedHandler.cs \ |
57 | + ubuntuone-sharp.dll \ |
58 | + ubuntuone-api.xml \ |
59 | + ubuntuone-sharp.dll.config |
60 | + |
61 | +EXTRA_DIST = ubuntuone.sources |
62 | + |
63 | +ubuntuonesharpdir = $(libdir)/ubuntuone-sharp |
64 | +ubuntuonesharp_DATA = ubuntuone-sharp.dll ubuntuone-sharp.dll.config |
65 | + |
66 | +ubuntuone-sharp.dll: U1MusicStore.cs |
67 | + $(MONO_CSC) -target:library -pkg:gtk-sharp-2.0 -out:ubuntuone-sharp.dll *.cs |
68 | + |
69 | +U1MusicStore.cs: ubuntuone-api.xml |
70 | + $(MONO_GAPI_CODEGEN) --outdir=. $(GTKSHARP_CFLAGS) --generate $< |
71 | + |
72 | +ubuntuone-api.xml: ubuntuone.sources |
73 | + $(MONO_GAPI_PARSER) $< |
74 | + $(MONO_GAPI_FIXUP) --api=ubuntuone-api.xml --metadata=ubuntuone-api.metadata |
75 | |
76 | === added file 'bindings/mono/ubuntuone-api.metadata' |
77 | --- bindings/mono/ubuntuone-api.metadata 1970-01-01 00:00:00 +0000 |
78 | +++ bindings/mono/ubuntuone-api.metadata 2010-03-04 22:41:30 +0000 |
79 | @@ -0,0 +1,4 @@ |
80 | +<?xml version="1.0"?> |
81 | + <metadata> |
82 | + <remove-node path="/api/namespace/enum[@cname='OAuthMethod']" /> |
83 | + </metadata> |
84 | |
85 | === added file 'bindings/mono/ubuntuone-sharp.dll.config.in' |
86 | --- bindings/mono/ubuntuone-sharp.dll.config.in 1970-01-01 00:00:00 +0000 |
87 | +++ bindings/mono/ubuntuone-sharp.dll.config.in 2010-03-04 22:41:30 +0000 |
88 | @@ -0,0 +1,4 @@ |
89 | +<configuration> |
90 | + <dllmap dll="ubuntuone-sharp.dll" target="libubuntuone-1.0.so.@LIBUBUNTUONE_CURRENT@"/> |
91 | +</configuration> |
92 | + |
93 | |
94 | === added file 'bindings/mono/ubuntuone.sources' |
95 | --- bindings/mono/ubuntuone.sources 1970-01-01 00:00:00 +0000 |
96 | +++ bindings/mono/ubuntuone.sources 2010-03-04 22:41:30 +0000 |
97 | @@ -0,0 +1,9 @@ |
98 | +<gapi-parser-input> |
99 | + <api filename="ubuntuone-api.xml"> |
100 | + <library name="ubuntuone-sharp.dll"> |
101 | + <namespace name="UbuntuOne"> |
102 | + <dir>../../libubuntuone/</dir> |
103 | + </namespace> |
104 | + </library> |
105 | + </api> |
106 | + </gapi-parser-input> |
107 | |
108 | === modified file 'configure.ac' |
109 | --- configure.ac 2010-03-03 14:38:13 +0000 |
110 | +++ configure.ac 2010-03-04 22:41:30 +0000 |
111 | @@ -68,6 +68,28 @@ |
112 | DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc" |
113 | AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) |
114 | |
115 | +dnl Checks for Mono bindings |
116 | +AC_PATH_PROG(MONO_GAPI_PARSER, gapi2-parser, no) |
117 | +if test "x$MONO_GAPI_PARSER" = "xno"; then |
118 | + AC_MSG_ERROR(could not find gapi2-parser) |
119 | +fi |
120 | + |
121 | +AC_PATH_PROG(MONO_GAPI_CODEGEN, gapi2-codegen, no) |
122 | +if test "x$MONO_GAPI_CODEGEN" = "xno"; then |
123 | + AC_MSG_ERROR(could not find gapi2-codegen) |
124 | +fi |
125 | + |
126 | +AC_PATH_PROG(MONO_GAPI_FIXUP, gapi2-fixup, no) |
127 | +if test "x$MONO_GAPI_FIXUP" = "xno"; then |
128 | + AC_MSG_ERROR(could not find gapi2-fixup) |
129 | +fi |
130 | + |
131 | +AC_PATH_PROG(MONO_CSC, gmcs, no) |
132 | +if test "x$MONO_CSC" = "xno"; then |
133 | + AC_MSG_ERROR(could not find gmcs compiler) |
134 | +fi |
135 | + |
136 | + |
137 | dnl Checks for Python bindings |
138 | AM_PATH_PYTHON(2.5) |
139 | AC_PATH_PROG(PYTHON_CONFIG, python-config, no) |
140 | @@ -81,8 +103,11 @@ |
141 | fi |
142 | |
143 | PKG_CHECK_MODULES(PYGTK, pygtk-2.0) |
144 | +PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0) |
145 | AC_SUBST(PYGTK_CFLAGS) |
146 | AC_SUBST(PYGTK_LIBS) |
147 | +AC_SUBST(GTKSHARP_CFLAGS) |
148 | +AC_SUBST(GTKSHARP_LIBS) |
149 | |
150 | dnl Check for .defs pygtk dir |
151 | AC_MSG_CHECKING(for pygtk defs) |
152 | @@ -113,10 +138,13 @@ |
153 | Makefile |
154 | data/Makefile |
155 | libubuntuone.pc |
156 | +ubuntuone-sharp.pc |
157 | libubuntuone/Makefile |
158 | tests/Makefile |
159 | bindings/Makefile |
160 | bindings/python/Makefile |
161 | +bindings/mono/Makefile |
162 | +bindings/mono/ubuntuone-sharp.dll.config |
163 | po/Makefile.in |
164 | ]) |
165 | |
166 | |
167 | === added file 'ubuntuone-sharp.pc.in' |
168 | --- ubuntuone-sharp.pc.in 1970-01-01 00:00:00 +0000 |
169 | +++ ubuntuone-sharp.pc.in 2010-03-04 22:41:30 +0000 |
170 | @@ -0,0 +1,12 @@ |
171 | +prefix=${pcfiledir}/../.. |
172 | +exec_prefix=${prefix} |
173 | +libdir=${exec_prefix}/lib |
174 | +assemblies_dir=${libdir}/ubuntuone-sharp |
175 | +Libraries=${assemblies_dir}/ubuntuone-sharp.dll |
176 | + |
177 | + |
178 | +Name: UbuntuOne# |
179 | +Description: UbuntuOne# - Ubuntu One .NET Binding |
180 | +Version: @VERSION@ |
181 | +Libs: -r:${Libraries} |
182 | + |
Looks good, except for one thing, which is that I'd like the mono bindings to be optional, that is:
108 +dnl Checks for Mono bindings PROG(MONO_ GAPI_PARSER, gapi2-parser, no) GAPI_PARSER" = "xno"; then PROG(MONO_ GAPI_CODEGEN, gapi2-codegen, no) GAPI_CODEGEN" = "xno"; then PROG(MONO_ CSC, gmcs, no)
109 +AC_PATH_
110 +if test "x$MONO_
111 + AC_MSG_ERROR(could not find gapi2-parser)
112 +fi
113 +
114 +AC_PATH_
115 +if test "x$MONO_
116 + AC_MSG_ERROR(could not find gapi2-codegen)
117 +fi
118 +
119 +AC_PATH_
120 +if test "x$MONO_CSC" = "xno"; then
121 + AC_MSG_ERROR(could not find gmcs compiler)
122 +fi
123 +
124 +
and
132 +PKG_CHECK_ MODULES( GTKSHARP, gtk-sharp-2.0) PYGTK_CFLAGS) PYGTK_LIBS) GTKSHARP_ CFLAGS) GTKSHARP_ LIBS)
133 AC_SUBST(
134 AC_SUBST(
135 +AC_SUBST(
136 +AC_SUBST(
it should check for the existence of the modules needed for the Mono bindings, but not fail, so that libu1 can be built even if those are not found, thus leaving the mono bindings unbuilt. This needs to be done also for the Python bindings though