Commit a832876c authored by Matthias Clasen's avatar Matthias Clasen

Make zeitgeist optional again

This commit makes folks build without zeitgeist again.
parent 4b7db869
......@@ -117,6 +117,7 @@ libfolks_telepathy_la_SOURCES = \
libfolks_telepathy_la_VALAFLAGS = \
$(AM_VALAFLAGS) \
$(ERROR_VALAFLAGS) \
$(ZEITGEIST_VALAFLAGS) \
--vapidir=. \
--vapidir=$(top_srcdir)/folks \
--pkg folks \
......@@ -126,7 +127,7 @@ libfolks_telepathy_la_VALAFLAGS = \
--pkg gio-2.0 \
--pkg gee-1.0 \
--pkg telepathy-glib \
--pkg zeitgeist-1.0 \
$(ZEITGEIST_PKG) \
--includedir folks \
--vapi folks-telepathy.vapi \
-H folks/folks-telepathy.h \
......
......@@ -24,7 +24,10 @@ using GLib;
using Gee;
using TelepathyGLib;
using Folks;
#if HAVE_ZEITGEIST
using Zeitgeist;
#endif
extern const string G_LOG_DOMAIN;
extern const string BACKEND_NAME;
......@@ -97,8 +100,10 @@ public class Tpf.PersonaStore : Folks.PersonaStore
private Account _account;
#if HAVE_ZEITGEIST
private Zeitgeist.Log? _log= null;
private Zeitgeist.Monitor? _monitor = null;
#endif
/**
* The Telepathy account this store is based upon.
......@@ -1176,7 +1181,9 @@ public class Tpf.PersonaStore : Folks.PersonaStore
new GLib.GenericArray<TelepathyGLib.Contact> ());
this._got_initial_members = true;
#if HAVE_ZEITGEIST
this._populate_counters.begin ();
#endif
this._notify_if_is_quiescent ();
}
......@@ -1686,6 +1693,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
return store;
}
#if HAVE_ZEITGEIST
private string? _get_iid_from_event_metadata (string? uri)
{
/* Format a proper id represting a persona in the store.
......@@ -1796,4 +1804,5 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this._notify_if_is_quiescent ();
}
#endif
}
......@@ -22,7 +22,9 @@ using Gee;
using GLib;
using TelepathyGLib;
using Folks;
#if HAVE_ZEITGEIST
using Zeitgeist;
#endif
/**
* A persona subclass which represents a single instant messaging contact from
......@@ -1374,6 +1376,7 @@ public class Tpf.Persona : Folks.Persona,
return store._ensure_persona_for_contact (contact);
}
#if HAVE_ZEITGEIST
internal void _increase_counter (string id, string interaction_type, Event event)
{
var timestamp = (uint) (event.get_timestamp () / 1000);
......@@ -1420,4 +1423,5 @@ public class Tpf.Persona : Folks.Persona,
this._last_call_interaction_datetime = null;
this._last_im_interaction_datetime = null;
}
#endif
}
......@@ -206,7 +206,13 @@ Gee 0.6.x)])
TP_GLIB_REQUIRED=0.19.0
AS_IF([test x$enable_telepathy_backend = xyes], [
PKG_CHECK_MODULES([TP_GLIB], [telepathy-glib >= $TP_GLIB_REQUIRED])
PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED])
PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-1.0 >= $ZEITGEIST_REQUIRED],
have_zeitgeist="yes",have_zeitgeist="no")])
AS_IF([test "x$have_zeitgeist" == "xyes"], [
ZEITGEIST_VALAFLAGS="-DHAVE_ZEITGEIST"
AC_SUBST([ZEITGEIST_VALAFLAGS])
ZEITGEIST_PKG="-pkg zeitgeist"
AC_SUBST([ZEITGEIST_PKG])
])
# Ignore post 0.20 deprecations
......@@ -305,7 +311,10 @@ AS_IF([test "x$enable_vala" = "xyes"], [
gee-1.0])
AS_IF([test x$enable_telepathy_backend = xyes], [
VALA_CHECK_PACKAGES([telepathy-glib zeitgeist-1.0])
VALA_CHECK_PACKAGES([telepathy-glib])
AS_IF([test "x$have_zeitgeist" == "xyes"], [
VALA_CHECK_PACKAGES([zeitgeist-1.0])
])
])
AS_IF([test x$enable_tracker_backend = xyes], [
......@@ -682,5 +691,6 @@ Configure summary:
Libsocialweb backend........: ${have_libsocialweb_backend}
E-D-S backend...............: ${enable_eds_backend}
Ofono backend...............: ${enable_ofono_backend}
Zeitgeist support...........: ${have_zeitgeist}
Build tests.................: ${enable_tests}
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment