[evolution-data-server/gnome-3-0] Bug 649762 - Add support for Vala bindings



commit 53932aa8df0af7b5292352676add923e5880a8c8
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date:   Thu May 12 21:41:57 2011 -0400

    Bug 649762 - Add support for Vala bindings
    
    (cherry picked from commit 383c2a26444cfc00dab4f72a03ae2a243572c0f5)

 Makefile.am            |    6 ++++++
 configure.ac           |   34 ++++++++++++++++++++++++++++++++++
 vala/Makefile.am       |   37 +++++++++++++++++++++++++++++++++++++
 vala/libebook-1.2.deps |    1 +
 4 files changed, 78 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4c0278f..d1cc93c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,6 +9,12 @@ endif
 SUBDIRS = libedataserver libebackend servers camel addressbook $(CALENDAR_DIR) libedataserverui docs art po
 DIST_SUBDIRS = libedataserver libebackend servers camel addressbook calendar libedataserverui docs art po
 
+if HAVE_INTROSPECTION
+if HAVE_VALA
+SUBDIRS += vala
+endif
+endif
+
 %-$(API_VERSION).pc: %.pc
 	 cp $< $@
 
diff --git a/configure.ac b/configure.ac
index eb7ab46..7feec3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1410,6 +1410,39 @@ fi
 GOBJECT_INTROSPECTION_CHECK([0.9.12])
 
 dnl ******************************
+dnl Vala binding
+dnl ******************************
+AC_ARG_ENABLE(vala-bindings,
+        AC_HELP_STRING([--enable-vala-bindings],
+        [build the EXPERIMENTAL Vala bindings]),
+        enable_vala_bindings=$enableval,
+        enable_vala_bindings=no)
+
+if test x$enable_vala_bindings = xyes; then
+  if test "x$INTROSPECTION_SCANNER" = x; then
+    AC_MSG_ERROR([GObject-Introspection must be enabled for Vala bindings])
+  fi
+
+  AM_PROG_VALAC([0.12.0])
+  have_vala=yes
+
+  AC_PATH_PROG(VALAC, valac, valac)
+  AC_SUBST(VALAC)
+  AC_SUBST(VALAFLAGS)
+
+  AC_PATH_PROG([VAPIGEN], [vapigen], [false])
+
+  if test "x$VAPIGEN" = "xfalse"; then
+    AC_MSG_ERROR([vapigen not found. Was vala compiled with --enable-vapigen?])
+  fi
+
+  AC_SUBST(VAPIGEN)
+fi
+
+AM_CONDITIONAL([HAVE_VALA], [test "x$have_vala" = "xyes"])
+AC_SUBST(HAVE_VALA)
+
+dnl ******************************
 dnl Makefiles
 dnl ******************************
 export privlibdir
@@ -1494,6 +1527,7 @@ docs/reference/libedataserver/Makefile
 docs/reference/libedataserverui/Makefile
 docs/reference/libebackend/Makefile
 po/Makefile.in
+vala/Makefile
 ])
 AC_OUTPUT
 
diff --git a/vala/Makefile.am b/vala/Makefile.am
new file mode 100644
index 0000000..4ff18eb
--- /dev/null
+++ b/vala/Makefile.am
@@ -0,0 +1,37 @@
+vapidir = $(datarootdir)/vala/vapi
+vapi_DATA = \
+	libedataserver-1.2.vapi \
+	libebook-1.2.vapi \
+	$(NULL)
+dist_vapi_DATA = \
+	libebook-1.2.deps \
+	$(NULL)
+
+BUILT_SOURCES = \
+	$(vapi_DATA) \
+	$(NULL)
+
+pkgconfigdir = ${libdir}/pkgconfig
+
+libedataserver-1.2.vapi: $(top_builddir)/libedataserver/EDataServer-1.2.gir
+	$(VAPIGEN_V)$(VAPIGEN) \
+		--library libedataserver-1.2 \
+		$< \
+		$(NULL)
+
+libebook-1.2.vapi: $(top_builddir)/addressbook/libebook/EBook-1.2.gir libedataserver-1.2.vapi
+	$(VAPIGEN_V)$(VAPIGEN) \
+		--vapidir=. \
+		--pkg libedataserver-1.2 \
+		--library libebook-1.2 \
+		$< \
+		$(NULL)
+
+CLEANFILES = \
+	$(BUILT_SOURCES) \
+	$(NULL)
+
+# set up the verbosity rules to avoid some build noise
+VAPIGEN_V = $(VAPIGEN_V_$(V))
+VAPIGEN_V_ = $(VAPIGEN_V_$(AM_DEFAULT_VERBOSITY))
+VAPIGEN_V_0 = @echo "  VAPIG " $^;
diff --git a/vala/libebook-1.2.deps b/vala/libebook-1.2.deps
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/vala/libebook-1.2.deps
@@ -0,0 +1 @@
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]