[rygel] all: Add gobject-introspection support



commit 227efa02262a2e7e58ad40cfe823dd19cc9c03c9
Author: Jens Georg <mail jensge org>
Date:   Sat Jul 12 12:48:28 2014 +0200

    all: Add gobject-introspection support
    
    Signed-off-by: Jens Georg <mail jensge org>

 .gitignore                                |    2 ++
 configure.ac                              |    2 ++
 src/librygel-core/Makefile.am             |   20 ++++++++++++++++++--
 src/librygel-renderer/Makefile.am         |   26 ++++++++++++++++++++++++--
 src/librygel-server/Makefile.am           |   25 +++++++++++++++++++++++--
 src/librygel-server/rygel-serializer.vala |    2 +-
 6 files changed, 70 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8880b6b..d8b6a29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,8 @@ stamp-*
 *.LOCAL.*
 *.BASE.*
 *.REMOTE.*
+*.gir
+*.typelib
 core
 *.log
 .intltool-merge-cache
diff --git a/configure.ac b/configure.ac
index 236f3c1..36b1434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ LT_INIT([dlopen disable-static])
 
 AC_SYS_LARGEFILE
 
+GOBJECT_INTROSPECTION_REQUIRE([1.33.4])
+
 dnl Required versions of library packages
 dnl Not all of these are actually used, depending on the configure options.
 GLIB_REQUIRED=2.34.0
diff --git a/src/librygel-core/Makefile.am b/src/librygel-core/Makefile.am
index e5e1f36..75acf73 100644
--- a/src/librygel-core/Makefile.am
+++ b/src/librygel-core/Makefile.am
@@ -13,6 +13,7 @@ librygel_core_2_4_la_SOURCES = \
 
 librygel_core_2_4_la_VALAFLAGS = \
        -H rygel-core.h -C --library=rygel-core-2.4 \
+       --gir=Rygel-2.4.gir \
        --vapidir=$(srcdir) \
        --pkg uuid \
        --pkg posix \
@@ -46,7 +47,21 @@ DEPS_FILES = rygel-core-2.4.deps
 
 vapidir = $(VAPIDIR)
 vapi_DATA = $(VAPI_FILES) $(DEPS_FILES)
-rygel-core-2.4.vapi rygel-core.h: librygel_core_2_4_la_vala.stamp
+rygel-core-2.4.vapi rygel-core.h Rygel-2.4.gir: librygel_core_2_4_la_vala.stamp
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS=
+INTROSPECTION_SCANNER_ARGS=
+INTROSPECTION_COMPILER_ARGS= -l librygel-core-2.4.so.2
+$(srcdir)/RygelCore-2.4.gir: $(srcdir)/Rygel-2.4.gir
+       $(AM_V_GEN)$(SED) -e 's,Rygel\.,RygelCore.,g' -e 's,namespace name="Rygel",namespace 
name="RygelCore",g' $< >$@
+GIRS = RygelCore-2.4.gir
+
+girdir=$(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
 
 MAINTAINERCLEANFILES += $(BUILT_SOURCES)
 
@@ -55,4 +70,5 @@ EXTRA_DIST = \
        $(VAPI_FILES) \
        $(DEPS_FILES) \
        uuid.vapi \
-       $(BUILT_SOURCES)
+       $(BUILT_SOURCES) \
+       RygelCore-2.4.gir
diff --git a/src/librygel-renderer/Makefile.am b/src/librygel-renderer/Makefile.am
index 1b4b912..7b88969 100644
--- a/src/librygel-renderer/Makefile.am
+++ b/src/librygel-renderer/Makefile.am
@@ -14,6 +14,7 @@ librygel_renderer_2_4_la_SOURCES = \
 
 librygel_renderer_2_4_la_VALAFLAGS = \
        -H rygel-renderer.h --library=rygel-renderer-2.4 \
+       --gir=Rygel-2.4.gir \
        $(LIBRYGEL_RENDERER_DEPS_VALAFLAGS) \
        $(RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS) \
        $(RYGEL_COMMON_VALAFLAGS)
@@ -30,6 +31,27 @@ librygel_renderer_2_4_la_LDFLAGS = \
 vapidir = $(VAPIDIR)
 vapi_DATA = rygel-renderer-2.4.vapi rygel-renderer-2.4.deps
 
-rygel-renderer.h rygel-renderer-2.4.vapi: librygel_renderer_2_4_la_vala.stamp
+rygel-renderer.h rygel-renderer-2.4.vapi Rygel-2.4.gir: librygel_renderer_2_4_la_vala.stamp
 
-EXTRA_DIST = rygel-renderer.h rygel-renderer-2.4.vapi rygel-renderer-2.4.deps
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS=
+INTROSPECTION_SCANNER_ARGS=
+INTROSPECTION_COMPILER_ARGS= -l librygel-renderer-2.4.so.2 --includedir=$(builddir)/../librygel-core
+$(srcdir)/RygelRenderer-2.4.gir: $(srcdir)/Rygel-2.4.gir
+       $(AM_V_GEN)$(SED) -e 's,Rygel\.,RygelRenderer.,g' \
+               -e 's,namespace name="Rygel",namespace name="RygelRenderer",g' \
+               -e 's,RygelRenderer\.Plugin,RygelCore.Plugin,g' \
+               -e 's,RygelRenderer\.MediaDevice,RygelCore.MediaDevice,g' \
+               -e 's,<package name="rygel-renderer-2.4"/>,<include name="RygelCore" 
version="2.4"/>\n<package name="rygel-renderer-2.4"/>,' \
+               $< >$@
+GIRS = RygelRenderer-2.4.gir
+
+girdir=$(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
+
+
+
+EXTRA_DIST = rygel-renderer.h rygel-renderer-2.4.vapi rygel-renderer-2.4.deps RygelRenderer-2.4.gir
diff --git a/src/librygel-server/Makefile.am b/src/librygel-server/Makefile.am
index 3ae773b..5f7aa26 100644
--- a/src/librygel-server/Makefile.am
+++ b/src/librygel-server/Makefile.am
@@ -14,6 +14,7 @@ librygel_server_2_4_la_SOURCES = \
 
 librygel_server_2_4_la_VALAFLAGS = \
        -H rygel-server.h --library=rygel-server-2.4 \
+       --gir=Rygel-2.4.gir \
        $(LIBRYGEL_SERVER_DEPS_VALAFLAGS) \
        $(RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS) \
        $(RYGEL_COMMON_VALAFLAGS)
@@ -34,6 +35,26 @@ librygel_server_2_4_la_LDFLAGS = \
 vapidir = $(VAPIDIR)
 vapi_DATA = rygel-server-2.4.vapi rygel-server-2.4.deps
 
-rygel-server.h rygel-server-2.4.vapi: librygel_server_2_4_la_vala.stamp
+rygel-server.h rygel-server-2.4.vapi Rygel-2.4.gir: librygel_server_2_4_la_vala.stamp
 
-EXTRA_DIST = rygel-server.h rygel-server-2.4.vapi rygel-server-2.4.deps
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS=
+INTROSPECTION_SCANNER_ARGS=
+INTROSPECTION_COMPILER_ARGS= -l librygel-server-2.4.so.2 --includedir=$(builddir)/../librygel-core
+$(srcdir)/RygelServer-2.4.gir: $(srcdir)/Rygel-2.4.gir
+       $(AM_V_GEN)$(SED) -e 's,Rygel\.,RygelServer.,g' \
+               -e 's,namespace name="Rygel",namespace name="RygelServer",g' \
+               -e 's,RygelServer\.Plugin,RygelCore.Plugin,g' \
+               -e 's,RygelServer\.MediaDevice,RygelCore.MediaDevice,g' \
+               -e 's,<package name="rygel-server-2.4"/>,<include name="RygelCore" version="2.4"/>\n<package 
name="rygel-server-2.4"/>,' \
+               $< >$@
+GIRS = RygelServer-2.4.gir
+
+girdir=$(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
+
+
+EXTRA_DIST = rygel-server.h rygel-server-2.4.vapi rygel-server-2.4.deps RygelServer-2.4.gir
diff --git a/src/librygel-server/rygel-serializer.vala b/src/librygel-server/rygel-serializer.vala
index 0532aca..85507bc 100644
--- a/src/librygel-server/rygel-serializer.vala
+++ b/src/librygel-server/rygel-serializer.vala
@@ -22,7 +22,7 @@
 
 using GUPnP;
 
-public enum SerializerType {
+public enum Rygel.SerializerType {
     /// Normal serialization of container/item using DIDL-Lite
     GENERIC_DIDL,
 


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