[f-spot/rubenv-gsoc-2009: 4/86] Add C# bindings for libspotraw. Untested, off-course.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot/rubenv-gsoc-2009: 4/86] Add C# bindings for libspotraw. Untested, off-course.
- Date: Sun, 23 May 2010 12:32:17 +0000 (UTC)
commit e37789b5e77446b51d5308531aefc619901d8675
Author: Ruben Vermeersch <ruben savanne be>
Date: Sat Jul 18 11:28:26 2009 +0200
Add C# bindings for libspotraw. Untested, off-course.
configure.ac | 1 +
lib/libfspotraw-sharp/Makefile.am | 53 ++++++++++++++++++++
lib/libfspotraw-sharp/libfspotraw-sharp.dll.config | 9 +++
lib/libfspotraw-sharp/libfspotraw.sources | 9 +++
4 files changed, 72 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 967252f..8a2d833 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,7 @@ CSC_DEFINES=""
PKG_CHECK_MODULES(GNOME_SHARP, gnome-sharp-2.0 >= 2.8)
PKG_CHECK_MODULES(GLIBSHARP, glib-sharp-2.0 >= 2.12)
+PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED)
if pkg-config --atleast-version=1.2.5 mono-cairo; then
CSC_DEFINES="$CSC_DEFINES -d:CAIRO_1_2_5"
diff --git a/lib/libfspotraw-sharp/Makefile.am b/lib/libfspotraw-sharp/Makefile.am
index e69de29..5308e6e 100644
--- a/lib/libfspotraw-sharp/Makefile.am
+++ b/lib/libfspotraw-sharp/Makefile.am
@@ -0,0 +1,53 @@
+include $(top_srcdir)/Makefile.include
+
+UNSAFE = -unsafe
+DEBUG = -debug
+
+SRCS =
+
+CUSTOMS =
+
+ASSEMBLIES = \
+ -pkg:gtk-sharp-2.0
+
+all: libfspotraw-sharp.dll
+
+libfspotraw-api.raw: libfspotraw.sources
+ @echo -e "\n*** Extracting the API"
+ touch $@
+ gapi2-parser $<
+
+libfspotraw-api.xml: $(srcdir)/libfspotraw-api.raw $(srcdir)/libfspotraw.metadata
+ @echo -e "\n*** Massaging the raw api into $@"
+ cp $(srcdir)/libfspotraw-api.raw libfspotraw-api.xml
+ chmod +w libfspotraw-api.xml
+ gapi2-fixup --api=libfspotraw-api.xml --metadata=$(srcdir)/libfspotraw.metadata
+
+generated/LibrawLoader.cs: libfspotraw-api.xml $(CUSTOMS)
+ @echo -e "\n*** Generating C# code"
+ gapi2-codegen --outdir=generated --customdir=$(srcdir) --generate libfspotraw-api.xml $(GTKSHARP_CFLAGS)
+
+libfspotraw-sharp.dll: generated/LibrawLoader.cs $(SRCS)
+ @echo -e "\n*** Building $@"
+ $(CSC) -target:library -out:$@ $(UNSAFE) $(DEBUG) $(ASSEMBLIES) $(SRCS) generated/*.cs
+
+assemblydir = $(pkglibdir)
+assembly_DATA = \
+ libfspotraw-sharp.dll \
+ libfspotraw-sharp.dll.config
+
+CLEANFILES = \
+ libfspotraw-sharp.dll \
+ libfspotraw-sharp.dll.mdb \
+ libfspotraw-api.xml
+
+DISTCLEANFILES = \
+ libfspotraw-api.raw \
+ generated/*.cs
+
+EXTRA_DIST = \
+ $(SRCS) \
+ $(CUSTOMS) \
+ libfspotraw.metadata \
+ libfspotraw-sharp.dll.config \
+ libfspotraw-api.raw
diff --git a/lib/libfspotraw-sharp/libfspotraw-sharp.dll.config b/lib/libfspotraw-sharp/libfspotraw-sharp.dll.config
new file mode 100644
index 0000000..f9ccba9
--- /dev/null
+++ b/lib/libfspotraw-sharp/libfspotraw-sharp.dll.config
@@ -0,0 +1,9 @@
+<configuration>
+ <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.so.0"/>
+ <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/>
+ <dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0.so.0"/>
+ <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/>
+ <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/>
+ <dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so.0"/>
+ <dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so.0"/>
+</configuration>
diff --git a/lib/libfspotraw-sharp/libfspotraw.sources b/lib/libfspotraw-sharp/libfspotraw.sources
new file mode 100644
index 0000000..17d8476
--- /dev/null
+++ b/lib/libfspotraw-sharp/libfspotraw.sources
@@ -0,0 +1,9 @@
+<gapi-parser-input>
+ <api filename="libfspotraw-api.raw">
+ <library name="libfspotraw-sharp.dll">
+ <namespace name="FSpot">
+ <file>../libfspotraw/fspot-librawloader.h</file>
+ </namespace>
+ </library>
+ </api>
+</gapi-parser-input>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]