From 59d7d2f5ea1ae327d5e87ef7b46084e6eac2689d Mon Sep 17 00:00:00 2001 From: HanzZ Date: Wed, 16 Jan 2013 18:31:02 +0100 Subject: [PATCH 1/2] fix compilation issues with older libpurple --- backends/libpurple/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 5bed7a9a..b232f8bf 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -339,9 +339,12 @@ class SpectrumNetworkPlugin : public NetworkPlugin { // Enable account + privacy lists purple_account_set_enabled_wrapped(account, "spectrum", TRUE); + +#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7 if (CONFIG_BOOL(config, "service.enable_privacy_lists")) { purple_account_set_privacy_type_wrapped(account, PURPLE_PRIVACY_DENY_USERS); } +#endif // Set the status const PurpleStatusType *status_type = purple_account_get_status_type_with_primitive_wrapped(account, PURPLE_STATUS_AVAILABLE); @@ -483,7 +486,9 @@ class SpectrumNetworkPlugin : public NetworkPlugin { PurpleAccount *account = m_sessions[user]; if (account) { purple_account_set_alias_wrapped(account, nickname.c_str()); +#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7 purple_account_set_public_alias_wrapped(account, nickname.c_str(), NULL, NULL); +#endif gssize size = image.size(); // this will be freed by libpurple guchar *photo = (guchar *) g_malloc(size * sizeof(guchar)); @@ -1115,9 +1120,11 @@ static void *notify_user_info(PurpleConnection *gc, const char *who, PurpleNotif if (ownInfo) { const gchar *displayname = purple_connection_get_display_name_wrapped(gc); +#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 7 if (!displayname) { displayname = purple_account_get_name_for_display_wrapped(account); } +#endif if (displayname && nickname.empty()) { nickname = displayname; From d1a34a73332035d848a6eb892ac898e647676e5e Mon Sep 17 00:00:00 2001 From: HanzZ Date: Wed, 16 Jan 2013 22:03:56 +0100 Subject: [PATCH 2/2] use bundled libyahoo2 --- CMakeLists.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aea57c9c..7a3f7021 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,10 +214,10 @@ set(dbus_DIR "${CMAKE_SOURCE_DIR}/cmake_modules") find_package(dbus) endif() -if(ENABLE_YAHOO2) - set(yahoo2_DIR "${CMAKE_SOURCE_DIR}/cmake_modules") - find_package(yahoo2) -endif() +#if(ENABLE_YAHOO2) +# set(yahoo2_DIR "${CMAKE_SOURCE_DIR}/cmake_modules") +# find_package(yahoo2) +#endif() ####### Miscallanous ###### @@ -390,16 +390,17 @@ if (PROTOBUF_FOUND) message("Skype plugin : no (does not run on Win32)") endif() - if(YAHOO2_FOUND) - message("Libyahoo2 plugin : yes") - include_directories(${YAHOO2_INCLUDE_DIR}) - else() +# if(YAHOO2_FOUND) +# message("Libyahoo2 plugin : yes") +# include_directories(${YAHOO2_INCLUDE_DIR}) +# else() if(ENABLE_YAHOO2) - message("Libyahoo2 plugin : no (install libyahoo2-devel)") + set(YAHOO2_FOUND 1) + message("Libyahoo2 plugin : yes") else(ENABLE_YAHOO2) message("Libyahoo2 plugin : no (user disabled)") endif() - endif() +# endif() if(ENABLE_SWIFTEN) message("Swiften plugin : yes")