[vte/vte-next] vala: Add vte VAPI



commit 56b741c12b23a371de226b7d6c968476bfa48f88
Author: Christian Persch <chpe gnome org>
Date:   Tue Apr 24 20:53:26 2012 +0200

    vala: Add vte VAPI

 configure.in    |   26 ++++++++++++++++++++++----
 src/Makefile.am |   42 +++++++++++++++++++++++++++++++++---------
 2 files changed, 55 insertions(+), 13 deletions(-)
---
diff --git a/configure.in b/configure.in
index 020b997..53f0c6e 100644
--- a/configure.in
+++ b/configure.in
@@ -351,9 +351,9 @@ fi
   
 AM_CONDITIONAL([ENABLE_GLADE_CATALOGUE],[test "$enable_glade_catalogue" = "yes"])
 
-# *************
-# Introspection
-# *************
+# ********
+# Bindings
+# ********
 
 # No automagic please!
 if test -z "$enable_introspection"; then
@@ -362,6 +362,23 @@ fi
 
 GOBJECT_INTROSPECTION_CHECK([0.9.0])
 
+# No automagic please!
+if test -z "$enable_vala"; then
+  enable_vala=no
+fi
+m4_ifdef([VAPIGEN_CHECK],[VAPIGEN_CHECK([0.16],[0.18])],[AM_CONDITIONAL([ENABLE_VAPIGEN],[false])])
+
+case "$with_gtk" in
+  3.0) VTE_GIR_VERSION=$VTE_API_VERSION
+       VTE_VAPI_VERSION=$VTE_API_VERSION
+       ;;
+esac
+
+AC_SUBST([VTE_GIR_VERSION])
+AC_SUBST([VTE_GIR_VERSION_U],[AS_TR_SH([$VTE_GIR_VERSION])])
+AC_SUBST([VTE_VAPI_VERSION])
+AC_SUBST([VTE_VAPI_VERSION_U],[AS_TR_SH([$VTE_VAPI_VERSION])])
+
 ################################################################################
 
 GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
@@ -412,5 +429,6 @@ cat <<EOF | tee -a config.log
 Configuration for libvte-$VTE_API_VERSION $VERSION for gtk+-$GTK_API_VERSION
 	Installing Glade catalogue: $enable_glade_catalogue
 	Debugging: $enable_debug
-	Disallow deprecated features: $enable_deprecation
+	Introspection: $enable_introspection
+        Vala bindings: $enable_vala
 EOF
diff --git a/src/Makefile.am b/src/Makefile.am
index 17e44e6..3f8f149 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -171,15 +171,16 @@ INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
 
 if HAVE_INTROSPECTION
+include $(INTROSPECTION_MAKEFILE)
 
-Vte- VTE_API_VERSION@.gir: libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@.la
+Vte- VTE_GIR_VERSION@.gir: libvte- VTE_API_MAJOR_VERSION@  VTE_API_MINOR_VERSION@.la
 
-Vte_ VTE_API_VERSION_U@_gir_EXPORT_PACKAGES = vte-$(VTE_API_VERSION)
-Vte_ VTE_API_VERSION_U@_gir_SCANNERFLAGS = --c-include "vte/vte.h"
-Vte_ VTE_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
-Vte_ VTE_API_VERSION_U@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_srcdir) -I$(top_builddir)
-Vte_ VTE_API_VERSION_U@_gir_LIBS = libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@.la
-Vte_ VTE_API_VERSION_U@_gir_FILES = \
+Vte_ VTE_GIR_VERSION_U@_gir_EXPORT_PACKAGES = vte-$(VTE_API_VERSION)
+Vte_ VTE_GIR_VERSION_U@_gir_SCANNERFLAGS = --c-include "vte/vte.h"
+Vte_ VTE_GIR_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
+Vte_ VTE_GIR_VERSION_U@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_srcdir) -I$(top_builddir)
+Vte_ VTE_GIR_VERSION_U@_gir_LIBS = libvte- VTE_API_MAJOR_VERSION@  VTE_API_MINOR_VERSION@.la
+Vte_ VTE_GIR_VERSION_U@_gir_FILES = \
 	vte.c \
 	vte.h \
 	vtepty.h \
@@ -188,7 +189,7 @@ Vte_ VTE_API_VERSION_U@_gir_FILES = \
 	vtetypebuiltins.h \
 	$(NULL)
 
-INTROSPECTION_GIRS += Vte-$(VTE_API_VERSION).gir
+INTROSPECTION_GIRS += Vte-$(VTE_GIR_VERSION).gir
 
 girdir = $(datadir)/gir-1.0
 nodist_gir_DATA = $(INTROSPECTION_GIRS)
@@ -198,6 +199,30 @@ nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
 CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
 
+if ENABLE_VAPIGEN
+include $(VAPIGEN_MAKEFILE)
+
+VAPIGEN_VAPIS = Vte-$(VTE_VAPI_VERSION).vapi
+
+Vte- VTE_VAPI_VERSION@.vapi: Vte-$(VTE_GIR_VERSION).gir
+Vte_ VTE_VAPI_VERSION_U@_vapi_DEPS = \
+	glib-2.0 \
+	gio-2.0 \
+	pango \
+	gdk-$(GTK_API_VERSION) \
+	gtk+-$(GTK_API_VERSION) \
+	$(NULL)
+Vte_ VTE_VAPI_VERSION_U@_vapi_METADATADIRS = $(srcdir)
+Vte_ VTE_VAPI_VERSION_U@_vapi_FILES = Vte-$(VTE_GIR_VERSION).gir
+
+#vapidir = $(datadir)/vala/vapi
+vapidir = $(VAPIGEN_VAPIDIR)
+nodist_vapi_DATA = $(VAPIGEN_VAPIS)
+
+CLEANFILES += $(nodist_vapi_DATA)
+
+endif # ENABLE_VAPIGEN
+
 endif # HAVE_INTROSPECTION
 
 # Misc unit tests and utilities
@@ -337,4 +362,3 @@ xticker_SOURCES = xticker.c
 #
 
 -include $(top_srcdir)/git.mk
--include $(INTROSPECTION_MAKEFILE)



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