[folks] build: Generate backends’ GIR files using valac rather than g-ir-scanner



commit f707b604734f787692cf94a7daffb4edf349a476
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Aug 7 14:54:56 2013 +0200

    build: Generate backends’ GIR files using valac rather than g-ir-scanner
    
    Vala knows more about the types used in the code, and doesn’t emit any
    GIR annotations; so g-ir-scanner is left guessing about (transfer)
    annotations (amongst others).
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=705608

 NEWS                                  |    2 +
 backends/eds/lib/Makefile.am          |   44 ++++++--------------------
 backends/libsocialweb/lib/Makefile.am |   40 +++++------------------
 backends/telepathy/lib/Makefile.am    |   55 +++++---------------------------
 backends/tracker/lib/Makefile.am      |   40 +++++------------------
 5 files changed, 39 insertions(+), 142 deletions(-)
---
diff --git a/NEWS b/NEWS
index ff51a9a..d2668af 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Bugs fixed:
 • Bug 706683 — fails to build with Vala 0.20
 • Bug 706826 — build fails due to missing IT_PROG_INTLTOOL macro
 • Made docs buildable again (work around bgo#706857)
+• Bug 705608 — FolksTelepathy: tpf_persona_get_contact: return value: Missing
+  (transfer) annotation
 
 API changes:
 
diff --git a/backends/eds/lib/Makefile.am b/backends/eds/lib/Makefile.am
index e37a7cc..536cb38 100644
--- a/backends/eds/lib/Makefile.am
+++ b/backends/eds/lib/Makefile.am
@@ -49,6 +49,8 @@ libfolks_eds_la_VALAFLAGS = \
        --pkg libedataserver-1.2 \
        --pkg libxml-2.0 \
        --includedir folks \
+       --gir FolksEds-$(API_VERSION_DOT).gir \
+       --library folks-eds \
        --vapi folks-eds.vapi \
        -H folks/folks-eds.h \
        $(NULL)
@@ -125,46 +127,20 @@ INTROSPECTION_COMPILER_ARGS = \
         --includedir=$(abs_top_builddir)/folks \
         $(NULL)
 
-EDSF_GIR = FolksEds-$(API_VERSION_DOT).gir
-$(EDSF_GIR): libfolks-eds.la
-
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_CFLAGS = \
-        $(EBOOK_CFLAGS) \
-        $(EDATASERVER_CFLAGS) \
-        $(NULL)
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_INCLUDES = \
-        Gee-0.8 \
-        Gio-2.0 \
-        Folks-$(API_VERSION_DOT) \
-        EBook-1.2 \
-        EBookContacts-1.2 \
-        EDataServer-1.2 \
-        $(NULL)
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS = \
-       libfolks-eds.la \
-       $(top_builddir)/folks/libfolks.la \
-       $(NULL)
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_FILES = \
-$(libfolks_eds_la_SOURCES) \
-        folks/folks-eds.h \
-        $(NULL)
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_NAMESPACE = FolksEds
-FolksEds_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_SCANNERFLAGS = --identifier-prefix=Edsf
-INTROSPECTION_GIRS = $(EDSF_GIR)
-
-libfolks_eds_la_VALAFLAGS += \
-        --gir $(EDSF_GIR) \
-        --girdir=$(abs_builddir) \
-        $(NULL)
+if HAVE_INTROSPECTION
+FolksEds-$(API_VERSION_DOT).gir: libfolks-eds.la
+GIRS = FolksEds-$(API_VERSION_DOT).gir
 
 girdir = $(datadir)/gir-1.0
-dist_gir_DATA = $(INTROSPECTION_GIRS)
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
 
 typelibdir = $(libdir)/girepository-1.0
-nodist_typelib_DATA = $(dist_gir_DATA:.gir=.typelib)
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
 
 CLEANFILES += $(nodist_typelib_DATA)
-MAINTAINERCLEANFILES += $(dist_gir_DATA)
+endif
 
 ##################################################################
 # Common
diff --git a/backends/libsocialweb/lib/Makefile.am b/backends/libsocialweb/lib/Makefile.am
index bf9fffd..edeea09 100644
--- a/backends/libsocialweb/lib/Makefile.am
+++ b/backends/libsocialweb/lib/Makefile.am
@@ -44,6 +44,7 @@ libfolks_libsocialweb_la_VALAFLAGS = \
        --pkg gee-0.8 \
        --pkg libsocialweb-client \
        --includedir folks \
+       --gir FolksLibsocialweb-$(API_VERSION_DOT).gir \
        --library folks-libsocialweb \
        --vapi folks-libsocialweb.vapi \
        -H folks/folks-libsocialweb.h \
@@ -112,43 +113,20 @@ INTROSPECTION_COMPILER_ARGS = \
         --includedir=$(abs_top_builddir)/folks \
         $(NULL)
 
-SWF_GIR = FolksLibsocialweb-$(API_VERSION_DOT).gir
-$(SWF_GIR): libfolks-libsocialweb.la
-
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_CFLAGS = \
-        $(SW_CLIENT_CFLAGS) \
-        $(NULL)
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_INCLUDES = \
-        Gee-0.8 \
-        Gio-2.0 \
-        Folks-$(API_VERSION_DOT) \
-        SocialWebClient-0.25 \
-        $(NULL)
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS = \
-       libfolks-libsocialweb.la \
-       $(top_builddir)/folks/libfolks.la \
-       $(NULL)
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_FILES = \
-$(libfolks_libsocialweb_la_SOURCES) \
-        folks/folks-libsocialweb.h \
-        $(NULL)
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_NAMESPACE = FolksLibsocialweb
-FolksLibsocialweb_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_SCANNERFLAGS = --identifier-prefix=Swf
-INTROSPECTION_GIRS = $(SWF_GIR)
-
-libfolks_libsocialweb_la_VALAFLAGS += \
-        --gir $(SWF_GIR) \
-        --girdir=$(abs_builddir) \
-        $(NULL)
+if HAVE_INTROSPECTION
+FolksLibsocialweb-$(API_VERSION_DOT).gir: libfolks-libsocialweb.la
+GIRS = FolksLibsocialweb-$(API_VERSION_DOT).gir
 
 girdir = $(datadir)/gir-1.0
-dist_gir_DATA = $(INTROSPECTION_GIRS)
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
 
 typelibdir = $(libdir)/girepository-1.0
-nodist_typelib_DATA = $(dist_gir_DATA:.gir=.typelib)
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
 
 CLEANFILES += $(nodist_typelib_DATA)
-MAINTAINERCLEANFILES += $(dist_gir_DATA)
+endif
 
 ##################################################################
 # Common
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
index 15def22..0d32f81 100644
--- a/backends/telepathy/lib/Makefile.am
+++ b/backends/telepathy/lib/Makefile.am
@@ -213,6 +213,7 @@ libfolks_telepathy_la_SOURCES = \
 libfolks_telepathy_la_VALAFLAGS = \
        $(AM_VALAFLAGS) \
        $(ERROR_VALAFLAGS) \
+       --gir=FolksTelepathy-$(API_VERSION_DOT).gir \
        --library=folks-telepathy \
        --vapidir=$(abs_srcdir) \
        --vapidir=$(abs_builddir) \
@@ -347,59 +348,21 @@ TpLowlevel-$(API_VERSION_DOT).gir: libtp-lowlevel.la
 #------------------------------------
 # Folks Telepathy
 #------------------------------------
-TPF_GIR = FolksTelepathy-$(API_VERSION_DOT).gir
-$(TPF_GIR): libfolks-telepathy.la
-
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_CFLAGS = $(TP_GLIB_CFLAGS)
-# Note that we don't actually include TpLowlevel*.gir because we don't want to
-# make it a public dependency
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_INCLUDES = \
-        Gee-0.8 \
-        Gio-2.0 \
-        Folks-$(API_VERSION_DOT) \
-        TelepathyGLib-0.12 \
-        $(NULL)
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS = \
-       libfolks-telepathy.la \
-        $(top_builddir)/folks/libfolks.la \
-        $(NULL)
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_FILES = \
-        $(libfolks_telepathy_la_SOURCES) \
-        folks/folks-telepathy.h \
-        $(NULL)
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_NAMESPACE = FolksTelepathy
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_SCANNERFLAGS = --identifier-prefix=Tpf
-INTROSPECTION_GIRS += $(TPF_GIR)
 
-if ENABLE_ZEITGEIST
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS += libtp-zeitgeist.la
-else
-FolksTelepathy_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS += libtp-zeitgeist-dummy.la
-endif
-
-libfolks_telepathy_la_VALAFLAGS += \
-        --gir=$(TPF_GIR) \
-        --girdir=$(abs_builddir) \
-        $(NULL)
+if HAVE_INTROSPECTION
+FolksTelepathy-$(API_VERSION_DOT).gir: libfolks-telepathy.la
+GIRS = FolksTelepathy-$(API_VERSION_DOT).gir
 
-#------------------------------------
-# General
-#------------------------------------
 girdir = $(datadir)/gir-1.0
-dist_noinst_DATA += \
-       TpLowlevel-$(API_VERSION_DOT).gir \
-       TpLowlevel-$(API_VERSION_DOT).typelib \
-       $(NULL)
-dist_gir_DATA = $(filter-out TpLowlevel-$(API_VERSION_DOT).gir,$(INTROSPECTION_GIRS))
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
 
 typelibdir = $(libdir)/girepository-1.0
-nodist_typelib_DATA = $(dist_gir_DATA:.gir=.typelib)
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
 
 CLEANFILES += $(nodist_typelib_DATA)
-MAINTAINERCLEANFILES += \
-       $(dist_gir_DATA) \
-       $(gir_dist_noinst_DATA) \
-       $(NULL)
+endif
 
 ##################################################################
 # Common
diff --git a/backends/tracker/lib/Makefile.am b/backends/tracker/lib/Makefile.am
index d7ec293..064c06d 100644
--- a/backends/tracker/lib/Makefile.am
+++ b/backends/tracker/lib/Makefile.am
@@ -27,6 +27,7 @@ libfolks_tracker_la_VALAFLAGS = \
        --pkg gee-0.8 \
        --pkg tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
        --includedir folks \
+       --gir FolksTracker-$(API_VERSION_DOT).gir \
        --library folks-tracker \
        --vapi folks-tracker.vapi \
        -H folks/folks-tracker.h \
@@ -108,43 +109,20 @@ INTROSPECTION_COMPILER_ARGS = \
         --includedir=$(abs_top_builddir)/folks \
         $(NULL)
 
-TRF_GIR = FolksTracker-$(API_VERSION_DOT).gir
-$(TRF_GIR): libfolks-tracker.la
-
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_CFLAGS = \
-        $(SW_CLIENT_CFLAGS) \
-        $(NULL)
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_INCLUDES = \
-        Gee-0.8 \
-        Gio-2.0 \
-        Folks-$(API_VERSION_DOT) \
-        Tracker-$(TRACKER_SPARQL_MAJOR) \
-        $(NULL)
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_LIBS = \
-       libfolks-tracker.la \
-        $(top_builddir)/folks/libfolks.la \
-        $(NULL)
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_FILES = \
-$(libfolks_tracker_la_SOURCES) \
-        folks/folks-tracker.h \
-        $(NULL)
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_NAMESPACE = FolksTracker
-FolksTracker_ API_VERSION_MAJOR@_ API_VERSION_MINOR@_gir_SCANNERFLAGS = --identifier-prefix=Trf
-INTROSPECTION_GIRS = $(TRF_GIR)
-
-libfolks_tracker_la_VALAFLAGS += \
-        --gir $(TRF_GIR) \
-        --girdir=$(abs_builddir) \
-        $(NULL)
+if HAVE_INTROSPECTION
+FolksTracker-$(API_VERSION_DOT).gir: libfolks-tracker.la
+GIRS = FolksTracker-$(API_VERSION_DOT).gir
 
 girdir = $(datadir)/gir-1.0
-dist_gir_DATA = $(INTROSPECTION_GIRS)
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
 
 typelibdir = $(libdir)/girepository-1.0
-nodist_typelib_DATA = $(dist_gir_DATA:.gir=.typelib)
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
 
 CLEANFILES += $(nodist_typelib_DATA)
-MAINTAINERCLEANFILES += $(dist_gir_DATA)
+endif
 
 ##################################################################
 # Common


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