[tracker/introspection] libtracker-sparql: Use valac to generate the .gir file. Fix Namespace.



commit eb7b1308de1de84fbd328f1a230cb9082f1ea63e
Author: Ivan Frade <ivan frade nokia com>
Date:   Wed Mar 23 16:16:14 2011 +0200

    libtracker-sparql: Use valac to generate the .gir file. Fix Namespace.
    
    Use valac --gir instead of g-ir-scanner to generate the .gir file.
    Nested namespaces are not supported: use Tracker instead of TrackerSparql for this.
    Set introspection="0" to a function using va_list. This is a workaround for a bug
    in vala. Remove in the next vala upgrade.

 src/libtracker-sparql/Makefile.am |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)
---
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index d430d59..19308c5 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -5,8 +5,8 @@ modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/sparql-modules
 lib_LTLIBRARIES = libtracker-sparql- TRACKER_API_VERSION@.la
 
 AM_VALAFLAGS =                                         \
-	--gir=TrackerSparql-$(TRACKER_API_VERSION).gir \
-	--library TrackerSparql-$(TRACKER_API_VERSION) \
+	--gir=Tracker-$(TRACKER_API_VERSION).gir \
+	--library Tracker-$(TRACKER_API_VERSION) \
 	--includedir=libtracker-sparql                 \
 	--header tracker-sparql.h                      \
 	--vapi tracker-sparql-$(TRACKER_API_VERSION).vapi \
@@ -68,29 +68,20 @@ EXTRA_DIST =                                           \
 
 # Introspection foo
 -include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS =
-INTROSPECTION_COMPILER_ARGS =
 
 if HAVE_INTROSPECTION
-INTROSPECTION_CFLAGS += $(AM_CPPFLAGS)
-introspection_sources = \
-	$(libtracker_sparql_ TRACKER_API_VERSION@_la_SOURCES) \
-	$(libtracker_sparqlinclude_HEADERS)
+#  set introspectable=0 to the function that uses va_list. This is not needed with a modern vala ( > 23/03/2011)
+Tracker- TRACKER_API_VERSION@.gir: $(lib_LTLIBRARIES)
+	sed -i $@ -e "s/c\:identifier\=\"tracker_sparql_escape_uri_vprintf\"/c\:identifier\=\"tracker_sparql_escape_uri_vprintf\"\ introspectable=\"0\"/g"
 
-TrackerSparql-0.10.gir: $(lib_LTLIBRARIES)
-TrackerSparql_0_10_gir_INCLUDES = GObject-2.0 Gio-2.0 GModule-2.0
-TrackerSparql_0_10_gir_CFLAGS = $(INCLUDES)
-TrackerSparql_0_10_gir_LIBS = $(lib_LTLIBRARIES)
-TrackerSparql_0_10_gir_FILES = $(introspection_sources)
-
-INTROSPECTION_GIRS += TrackerSparql-0.10.gir
+Tracker- TRACKER_API_VERSION@.typelib: Tracker-$(TRACKER_API_VERSION).gir
+	@INTROSPECTION_COMPILER@ --shared-library=libtracker-sparql- TRACKER_API_VERSION@.so -o $@ $^
 
 girdir = $(datadir)/gir-1.0
-gir_DATA = $(INTROSPECTION_GIRS)
+dist_gir_DATA = Tracker-$(TRACKER_API_VERSION).gir
 
-typelibsdir = $(libdir)/girepository-1.0
-typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = Tracker-$(TRACKER_API_VERSION).typelib
 
-CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+CLEANFILES = $(dist_gir_DATA) $(typelibs_DATA)
 endif
\ No newline at end of file



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