telepathy-farstream: Generate GObject Introspection data

Olivier Crête tester at kemper.freedesktop.org
Tue Sep 11 09:42:33 PDT 2012


Module: telepathy-farstream
Branch: master
Commit: eb43dad2a96b59aae80a988bb186176a70859a67
URL:    http://cgit.freedesktop.org/telepathy/telepathy-farstream/commit/?id=eb43dad2a96b59aae80a988bb186176a70859a67

Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Tue Aug 21 20:09:19 2012 -0700

Generate GObject Introspection data

---

 Makefile.am                     |    3 +-
 configure.ac                    |    1 +
 telepathy-farstream/Makefile.am |   44 ++++++++++++++++++++++++++++++++++----
 3 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 26f5d48..aa2ad75 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,13 @@
 ACLOCAL_AMFLAGS = -I m4
 
 
- 
 SUBDIRS= m4 \
           tools \
           telepathy-farstream \
           doc \
           examples
 
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
 
 EXTRA_DIST = \
     autogen.sh \
diff --git a/configure.ac b/configure.ac
index 18a5df3..30582a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,7 @@ PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1 >= 0.1.0])
 AC_SUBST(FARSTREAM_CFLAGS)
 AC_SUBST(FARSTREAM_LIBS)
 
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
 
 GTK_DOC_CHECK([1.17], [--flavour no-tmpl])
 
diff --git a/telepathy-farstream/Makefile.am b/telepathy-farstream/Makefile.am
index 784fe9e..413534b 100644
--- a/telepathy-farstream/Makefile.am
+++ b/telepathy-farstream/Makefile.am
@@ -4,14 +4,17 @@ tfinclude_HEADERS = \
 	channel.h \
 	content.h
 
+apisources = \
+	content.c \
+	channel.c
+
 libtelepathy_farstream_la_SOURCES = \
 	$(tfinclude_HEADERS) \
+	$(apisources) \
 	stream.c \
 	stream.h \
-	content.c \
 	content-priv.h \
 	session.c \
-	channel.c \
 	session-priv.h \
 	channel-priv.h \
 	media-signalling-channel.c \
@@ -34,17 +37,19 @@ lib_LTLIBRARIES = libtelepathy-farstream.la
 pkgconfigdir = ${libdir}/pkgconfig
 pkgconfig_DATA = telepathy-farstream.pc
 
-AM_CFLAGS = \
+INCLUDES = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
-	-DG_LOG_DOMAIN=\"tp-fs\" \
-	$(ERROR_CFLAGS) \
 	$(GLIB_CFLAGS) \
 	$(DBUS_CFLAGS) \
 	$(GST_CFLAGS) \
 	$(FARSTREAM_CFLAGS) \
 	$(TELEPATHY_CFLAGS)
 
+AM_CFLAGS = \
+	-DG_LOG_DOMAIN=\"tp-fs\" \
+	$(ERROR_CFLAGS)
+
 libtelepathy_farstream_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(DBUS_LIBS) \
@@ -55,3 +60,32 @@ libtelepathy_farstream_la_LIBADD = \
 libtelepathy_farstream_la_LDFLAGS =  -no-undefined \
 	-export-symbols-regex "^tf_(init|content_|channel_).*" \
 	-version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(tfinclude_HEADERS) $(apisources)
+
+TelepathyFarstream-0.6.gir: libtelepathy-farstream.la
+TelepathyFarstream_0_6_gir_INCLUDES = \
+	GObject-2.0 \
+	Gst-1.0 \
+	Farstream-0.1 \
+	TelepathyGLib-0.12
+TelepathyFarstream_0_6_gir_CFLAGS = $(INCLUDES) -DGST_USE_UNSTABLE_API
+TelepathyFarstream_0_6_gir_LIBS = libtelepathy-farstream.la
+TelepathyFarstream_0_6_gir_FILES = $(introspection_sources)
+TelepathyFarstream_0_6_gir_SCANNERFLAGS = --identifier-prefix=tf_ --identifier-prefix=Tf
+INTROSPECTION_GIRS += TelepathyFarstream-0.6.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
+endif



More information about the telepathy-commits mailing list