[gupnp-dlna/wip/gst-1.0: 6/6] Generate VAPI from GIR
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-dlna/wip/gst-1.0: 6/6] Generate VAPI from GIR
- Date: Mon, 5 Nov 2012 13:08:04 +0000 (UTC)
commit e0f3120f23717bac9157c698ce6528368782aff2
Author: Jens Georg <mail jensge org>
Date: Sat Nov 3 14:46:34 2012 +0100
Generate VAPI from GIR
configure.ac | 10 ++++++++
libgupnp-dlna/gupnp-dlna-discoverer.c | 2 +-
libgupnp-dlna/gupnp-dlna-profiles.c | 3 ++
m4/vapigen.m4 | 41 +++++++++++++++++++++++++++++++++
vala/GUPnPDLNA-1.1.metadata | 3 ++
vala/Makefile.am | 24 +++++++++++++++++++
vala/gupnp-dlna-1.1-custom.vala | 2 +
vala/gupnp-dlna-1.1.deps | 3 ++
8 files changed, 87 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7f8d312..785a6d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,15 @@ fi
GOBJECT_INTROSPECTION_CHECK([0.6.4])
+# vapigen
+AS_IF([test "x$found_introspection" = "xyes"],
+ [
+ dnl we need 0.18 for included GStreamer 1.0 vapis
+ VALA_PROG_VAPIGEN([0.18])
+ ]
+)
+AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x"])
+
GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
AC_CONFIG_FILES([
@@ -77,6 +86,7 @@ tests/test-discoverer.sh
doc/Makefile
doc/version.xml
data/Makefile
+vala/Makefile
gupnp-dlna-1.1.pc
gupnp-dlna-1.1-uninstalled.pc
])
diff --git a/libgupnp-dlna/gupnp-dlna-discoverer.c b/libgupnp-dlna/gupnp-dlna-discoverer.c
index 4c0770f..44d0f68 100644
--- a/libgupnp-dlna/gupnp-dlna-discoverer.c
+++ b/libgupnp-dlna/gupnp-dlna-discoverer.c
@@ -396,7 +396,7 @@ gupnp_dlna_discoverer_get_profile (GUPnPDLNADiscoverer *self,
*
* Retuns a list of the all the DLNA profiles supported by @self.
*
- * Returns: (transfer none) (element-type GUPnPDLNAProfile*): a #GList of
+ * Returns: (transfer none) (element-type GUPnPDLNAProfile): a #GList of
* #GUPnPDLNAProfile on success, NULL otherwise.
**/
const GList *
diff --git a/libgupnp-dlna/gupnp-dlna-profiles.c b/libgupnp-dlna/gupnp-dlna-profiles.c
index aa7f52c..46fd48c 100644
--- a/libgupnp-dlna/gupnp-dlna-profiles.c
+++ b/libgupnp-dlna/gupnp-dlna-profiles.c
@@ -509,6 +509,9 @@ guess_image_profile (GstDiscovererStreamInfo *info,
gst_caps_unref (caps);
}
+/**
+ * gupnp_dlna_information_new_from_discoverer_info: (skip)
+ **/
GUPnPDLNAInformation *
gupnp_dlna_information_new_from_discoverer_info (GstDiscovererInfo *info,
GList *profiles)
diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
new file mode 100644
index 0000000..df6395d
--- /dev/null
+++ b/m4/vapigen.m4
@@ -0,0 +1,41 @@
+
+dnl vala.m4
+dnl
+dnl Copyright 2010 Marc-Andre Lureau
+dnl Copyright 2011 Rodney Dawes <dobey pwns gmail com>
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+dnl dropped everything but VALA_PROG_VAPIGEN - Jens Georg <mail jensge org>
+
+# Check whether the Vala API Generator exists in `PATH'. If it is found,
+# the variable VAPIGEN is set. Optionally a minimum release number of the
+# generator can be requested.
+#
+# VALA_PROG_VAPIGEN([MINIMUM-VERSION])
+# ------------------------------------
+AC_DEFUN([VALA_PROG_VAPIGEN],
+[AC_PATH_PROG([VAPIGEN], [vapigen], [])
+ AS_IF([test -z "$VAPIGEN"],
+ [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])],
+ [AS_IF([test -n "$1"],
+ [AC_MSG_CHECKING([$VAPIGEN is at least version $1])
+ am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator *//'`
+ AS_VERSION_COMPARE([$1], ["$am__vapigen_version"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_WARN([Vala API Generator $1 not found.])])])])
+])
diff --git a/vala/GUPnPDLNA-1.1.metadata b/vala/GUPnPDLNA-1.1.metadata
new file mode 100644
index 0000000..eee8ee3
--- /dev/null
+++ b/vala/GUPnPDLNA-1.1.metadata
@@ -0,0 +1,3 @@
+Discoverer cheader_filename="libgupnp-dlna/gupnp-dlna-discoverer.h"
+Information cheader_filename="libgupnp-dlna/gupnp-dlna-information.h"
+Profile cheader_filename="libgupnp-dlna/gupnp-dlna-profile.h"
diff --git a/vala/Makefile.am b/vala/Makefile.am
new file mode 100644
index 0000000..26dfa5c
--- /dev/null
+++ b/vala/Makefile.am
@@ -0,0 +1,24 @@
+if HAVE_INTROSPECTION
+if HAVE_VAPIGEN
+gupnp-dlna-1.1.vapi: gupnp-dlna-1.1.stamp
+ @true
+
+gupnp-dlna-1.1.stamp: $(builddir)/../libgupnp-dlna/GUPnPDLNA-1.1.gir \
+ $(srcdir)/GUPnPDLNA-1.1.metadata \
+ $(srcdir)/gupnp-dlna-1.1-custom.vala
+ $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(srcdir) \
+ --library=gupnp-dlna-1.1 \
+ --pkg gstreamer-1.0 \
+ --pkg gstreamer-pbutils-1.0 \
+ --pkg gstreamer-base-1.0 \
+ --pkg gstreamer-video-1.0 \
+ $(builddir)/../libgupnp-dlna/GUPnPDLNA-1.1.gir \
+ $(srcdir)/gupnp-dlna-1.1-custom.vala && \
+ echo timestmap > $(@F)
+
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = gupnp-dlna-1.1.vapi $(srcdir)/gupnp-dlna-1.1.deps
+CLEANFILES = gupnp-dlna-1.1.vapi gupnp-dlna-1.1.stamp
+EXTRA_DIST = gupnp-dlna-1.1.deps GUPnPDLNA-1.1.metadata gupnp-dlna-1.1-custom.vala
+endif
+endif
diff --git a/vala/gupnp-dlna-1.1-custom.vala b/vala/gupnp-dlna-1.1-custom.vala
new file mode 100644
index 0000000..e527483
--- /dev/null
+++ b/vala/gupnp-dlna-1.1-custom.vala
@@ -0,0 +1,2 @@
+namespace GUPnP.DLNA {
+}
diff --git a/vala/gupnp-dlna-1.1.deps b/vala/gupnp-dlna-1.1.deps
new file mode 100644
index 0000000..84088aa
--- /dev/null
+++ b/vala/gupnp-dlna-1.1.deps
@@ -0,0 +1,3 @@
+gupnp-1.0
+libxml-2.0
+gst-pbutils-1.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]