diff options
author | Jens Georg <mail@jensge.org> | 2012-11-03 14:46:34 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2012-11-21 11:52:54 +0100 |
commit | 220831b65de6d6188184657d40a67fa99c0ac8ad (patch) | |
tree | 20ca0bdb31bf2b640b64938e0c380ab7df367164 | |
parent | 9a64cdac538d5ce7dca3b267bec18c30edffb80c (diff) | |
download | gupnp-dlna-220831b65de6d6188184657d40a67fa99c0ac8ad.tar.gz |
Generate VAPI from GIR
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | libgupnp-dlna/gupnp-dlna-discoverer.c | 2 | ||||
-rw-r--r-- | libgupnp-dlna/gupnp-dlna-profiles.c | 3 | ||||
-rw-r--r-- | m4/vapigen.m4 | 41 | ||||
-rw-r--r-- | vala/GUPnPDLNA-1.1.metadata | 3 | ||||
-rw-r--r-- | vala/Makefile.am | 24 | ||||
-rw-r--r-- | vala/gupnp-dlna-1.1-custom.vala | 2 | ||||
-rw-r--r-- | vala/gupnp-dlna-1.1.deps | 3 |
9 files changed, 88 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 18e77f9..9f707f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = libgupnp-dlna tools tests data doc +SUBDIRS = libgupnp-dlna tools tests data doc vala pkgconfig_DATA = gupnp-dlna-1.1.pc pkgconfigdir = $(libdir)/pkgconfig 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..05c3bf9 --- /dev/null +++ b/vala/gupnp-dlna-1.1.deps @@ -0,0 +1,3 @@ +gupnp-1.0 +libxml-2.0 +gstreamer-pbutils-1.0 |