On Fr, 2010-12-31 at 02:48 +0000, Ng Oon-Ee wrote: > Hi all, > > Simply put, when I try to compile 1.1.1 (Arch Linux 64-bit) I can't > without disable-dbus-service. Error seems to be in syncevo-dbus-server.
The change which detects the new libnotify API fails on libnotify versions which back-ported the version check macro, like 0.5.2. I (incorrectly) thought that the macro had been introduced in 0.7.0 and used that to simplify the check. The attached patch solves the problem. Looking at the code I wonder what the hell the libnotify developers were thinking when implementing this API change :-/ I'll release a 1.1.1a source archive soon. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
>From 68c5faf666d962bc02dd75a0a5c4dffa2db3e882 Mon Sep 17 00:00:00 2001 From: Patrick Ohly <[email protected]> Date: Sat, 1 Jan 2011 17:51:32 +0100 Subject: [PATCH] syncevo-dbus-server: deal with libnotify 0.5.x compile error (BMC #10453) The version check for the 0.7.0 API change incorrectly switched to the new API with libnotify 0.5.2 and thus fails to compile, because 0.5.2 only has NOTIFY_CHECK_VERSION(), but not the new API. A more complex version check is part of this patch. --- src/syncevo-dbus-server.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/syncevo-dbus-server.cpp b/src/syncevo-dbus-server.cpp index 67dbaa3..f3e8d38 100644 --- a/src/syncevo-dbus-server.cpp +++ b/src/syncevo-dbus-server.cpp @@ -6110,9 +6110,12 @@ void AutoSyncManager::Notification::send(const char *summary, notify_notification_clear_actions(m_notification); notify_notification_close(m_notification, NULL); } -#if !defined(NOTIFY_CHECK_VERSION) +#ifndef NOTIFY_CHECK_VERSION +# define NOTIFY_CHECK_VERSION(_x,_y,_z) 0 +#endif +#if !NOTIFY_CHECK_VERSION(0,7,0) m_notification = notify_notification_new(summary, body, NULL, NULL); -#else // NOTIFY_CHECK_VERSION(0,7,0) is redundant, because 0.7.0 introduced NOTIFY_CHECK_VERSION +#else m_notification = notify_notification_new(summary, body, NULL); #endif //if actions are not supported, don't add actions -- 1.7.2.3
_______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
