[gucharmap] vala: Add gucharmap VAPI
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] vala: Add gucharmap VAPI
- Date: Tue, 24 Apr 2012 18:25:30 +0000 (UTC)
commit 64f391f6b8716b7052273ed7122d3210a2a903bc
Author: Christian Persch <chpe gnome org>
Date: Tue Apr 24 20:22:16 2012 +0200
vala: Add gucharmap VAPI
configure.ac | 40 ++++++++++++++++++++++++---------
gucharmap/Gucharmap-2.90.metadata | 3 ++
gucharmap/Makefile.am | 44 ++++++++++++++++++++++++++++--------
3 files changed, 66 insertions(+), 21 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a95c4e9..74e8d0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,17 +177,6 @@ AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gucharmap gettext domain])
AM_GLIB_GNU_GETTEXT
-# *************
-# Introspection
-# *************
-
-# No automagic please!
-if test -z "$enable_introspection"; then
- enable_introspection=no
-fi
-
-GOBJECT_INTROSPECTION_CHECK([0.9.0])
-
##########################################################
# Check for -Bsymbolic-functions linker flag used to avoid
# intra-library PLT jumps, if available.
@@ -229,6 +218,35 @@ CC_CHECK_CFLAGS_APPEND([ \
-Wno-missing-field-initializers -Wno-unused-parameter \
-fno-common -Wno-switch-enum])
+# ********
+# Bindings
+# ********
+
+# No automagic please!
+if test -z "$enable_introspection"; then
+ enable_introspection=yes
+fi
+
+GOBJECT_INTROSPECTION_CHECK([0.9.0])
+
+# No automagic please!
+if test -z "$enable_vala"; then
+ enable_vala=no
+fi
+# FIXMEchpe this looks bogus
+VAPIGEN_CHECK([0.16],[0.18])
+
+case "$with_gtk" in
+ 3.0) GUCHARMAP_GIR_VERSION=$GUCHARMAP_API_VERSION
+ GUCHARMAP_VAPI_VERSION=$GUCHARMAP_API_VERSION
+ ;;
+esac
+
+AC_SUBST([GUCHARMAP_GIR_VERSION])
+AC_SUBST([GUCHARMAP_GIR_VERSION_U],[AS_TR_SH([$GUCHARMAP_GIR_VERSION])])
+AC_SUBST([GUCHARMAP_VAPI_VERSION])
+AC_SUBST([GUCHARMAP_VAPI_VERSION_U],[AS_TR_SH([$GUCHARMAP_VAPI_VERSION])])
+
# ***************
# API & User Docs
# ***************
diff --git a/gucharmap/Gucharmap-2.90.metadata b/gucharmap/Gucharmap-2.90.metadata
new file mode 100644
index 0000000..826bebd
--- /dev/null
+++ b/gucharmap/Gucharmap-2.90.metadata
@@ -0,0 +1,3 @@
+// skip this because vapigen chokes on GUnicharType
+unichar_type skip
+
diff --git a/gucharmap/Makefile.am b/gucharmap/Makefile.am
index 8d891dd..9755e04 100644
--- a/gucharmap/Makefile.am
+++ b/gucharmap/Makefile.am
@@ -217,27 +217,51 @@ CLEANFILES = \
# introspection
if HAVE_INTROSPECTION
--include $(INTROSPECTION_MAKEFILE)
+include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
-Gucharmap- GUCHARMAP_API_VERSION@.gir: libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
-Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
-Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_CFLAGS = $(GTK_CFLAGS) -DGUCHARMAP_COMPILATION -I$(top_srcdir)
-Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_LIBS = libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
-Gucharmap_ GUCHARMAP_API_VERSION_U@_gir_FILES = $(filter-out unicode-%.h,$(libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@_la_SOURCES))
+INTROSPECTION_GIRS = Gucharmap-$(GUCHARMAP_GIR_VERSION).gir
-INTROSPECTION_GIRS = Gucharmap-$(GUCHARMAP_API_VERSION).gir
+Gucharmap- GUCHARMAP_GIR_VERSION@.gir: libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
+Gucharmap_ GUCHARMAP_GIR_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
+Gucharmap_ GUCHARMAP_GIR_VERSION_U@_gir_CFLAGS = $(GTK_CFLAGS) -DGUCHARMAP_COMPILATION -I$(top_srcdir)
+Gucharmap_ GUCHARMAP_GIR_VERSION_U@_gir_LIBS = libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@.la
+Gucharmap_ GUCHARMAP_GIR_VERSION_U@_gir_FILES = $(filter-out unicode-%.h,$(libgucharmap GUCHARMAP_LIBRARY_SUFFIX_U@_la_SOURCES))
-girdir = $(INTROSPECTION_GIRDIR)
+girdir = $(datadir)/gir-1.0
nodist_gir_DATA = $(INTROSPECTION_GIRS)
-typelibdir = $(INTROSPECTION_TYPELIBDIR)
+typelibdir = $(libdir)/girepository-1.0
nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
-endif
+
+if ENABLE_VAPIGEN
+include $(VAPIGEN_MAKEFILE)
+
+VAPIGEN_VAPIS = Gucharmap-$(GUCHARMAP_VAPI_VERSION).vapi
+
+Gucharmap_ GUCHARMAP_VAPI_VERSION_U@_vapi_DEPS = \
+ glib-2.0 \
+ pango \
+ gdk-$(GTK_API_VERSION) \
+ gtk+-$(GTK_API_VERSION) \
+ $(NULL)
+Gucharmap_ GUCHARMAP_VAPI_VERSION_U@_vapi_METADATADIRS = $(srcdir)
+Gucharmap_ GUCHARMAP_VAPI_VERSION_U@_vapi_VAPIDIRS = $(datadir)/vala-0.18/vapi
+Gucharmap_ GUCHARMAP_VAPI_VERSION_U@_vapi_FILES = Gucharmap-$(GUCHARMAP_GIR_VERSION).gir
+
+#vapidir = $(datadir)/vala/vapi
+vapidir = $(VAPIGEN_VAPIDIR)
+nodist_vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
+
+CLEANFILES += $(nodist_vapi_DATA)
+
+endif # ENABLE_VAPIGEN
+
+endif # HAVE_INTROSPECTION
if ENABLE_CHARMAP
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]