From ca7e6ca89067cdf62169478fecc035ed9c51baaf Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Sun, 10 Feb 2019 00:19:24 +0100 Subject: nonprism/kopete: updated to 18.12.2 --- nonprism/kopete/PKGBUILD | 94 +- nonprism/kopete/kopete-glibc-2.28.patch | 12 + nonprism/kopete/kopete-mediastreamer2.14.patch | 266 ++++- nonprism/kopete/kopete-no-kdepimlibs.patch | 1280 ------------------------ nonprism/kopete/kopete-openssl-1.1.patch | 307 ++++++ nonprism/kopete/kopete-pthread-link.patch | 12 - nonprism/kopete/kopete-srtp2.patch | 154 +++ nonprism/kopete/libre-nonprism.patch | 29 +- 8 files changed, 759 insertions(+), 1395 deletions(-) create mode 100644 nonprism/kopete/kopete-glibc-2.28.patch delete mode 100644 nonprism/kopete/kopete-no-kdepimlibs.patch create mode 100644 nonprism/kopete/kopete-openssl-1.1.patch delete mode 100644 nonprism/kopete/kopete-pthread-link.patch create mode 100644 nonprism/kopete/kopete-srtp2.patch (limited to 'nonprism') diff --git a/nonprism/kopete/PKGBUILD b/nonprism/kopete/PKGBUILD index 696781bb3..72c9bb98e 100644 --- a/nonprism/kopete/PKGBUILD +++ b/nonprism/kopete/PKGBUILD @@ -1,43 +1,52 @@ -# $Id: PKGBUILD 290221 2017-03-09 16:12:45Z arojas $ # Maintainer (Arch): Felix Yan # Maintainer (Arch): Antonio Rojas # Contributor (Arch): Andrea Scarpino -# Maintainer: André Silva +# Contributor: André Silva -pkgname=kopete - -pkgver=17.08.3 -pkgrel=1.parabola2.nonprism1 -arch=(i686 x86_64 armv7h) +# rationale for inclusion in nonprism: +# removed support for possible privacy critical protocals -pkgdesc="Instant Messenger, without nonfree Skype support and support for unsafe and dangerous for privacy protocols" -url="https://kde.org/applications/internet/kopete/" +pkgname=kopete +pkgver=18.12.2 +pkgrel=1 +pkgrel+=.parabola1.nonprism1 +url='https://kde.org/applications/internet/kopete/' +arch=(x86_64) +arch+=(i686 armv7h) license=(GPL LGPL FDL) - -makedepends=(cmake automoc4 boost mediastreamer libgadu jsoncpp openssl-1.0) -depends=(kdebase-runtime libotr qimageblitz qca-qt4 qjson) -optdepends=('mediastreamer: jingle support') +groups=(kde-applications kdenetwork) +depends=(knotifyconfig kcmutils ktexteditor kcontacts kidentitymanagement libkleo qca kdelibs4support khtml + libidn libotr) +depends+=(kio) +makedepends=(extra-cmake-modules mediastreamer libgadu jsoncpp kdoctools kdesignerplugin kdnssd libkleo ktexteditor) +optdepends=('mediastreamer: jingle support' 'libgadu: Gadu-Gadu protocol' 'kdnssd: bonjour protocol') conflicts=(kdenetwork-kopete) replaces=(kdenetwork-kopete) - -source=("https://download.kde.org/stable/applications/${pkgver}/src/kopete-${pkgver}.tar.xz"{,.sig} - kopete-mediastreamer2.14.patch - kopete-pthread-link.patch - kopete-no-kdepimlibs.patch - libre-nonprism.patch) -sha256sums=('f86ccc1ca809c723d1baf2eed745f158337059263555f6fafa23ea200aacafec' +source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig} + kopete-mediastreamer2.14.patch kopete-srtp2.patch kopete-openssl-1.1.patch kopete-glibc-2.28.patch) +source+=(libre-nonprism.patch) +sha256sums=('48dad416ead50ac69afe822932abccca82cabc2d512c93ca3b7d5d653e38f363' 'SKIP' - 'c34a268aaa058e563174581dbe37c15fed91e82326ec704d2a872463139865e0' - 'a7ebdd8dd4336b7ec085ef254bf18040f473b73379a8cd84569b28441a6c71df' - 'b9e7f0029dabe6a738114b11a093eb7d24aaf1e71b26d089901246e56cbeacf5' - 'c1824f31afbe37089508a7bc3ac29e5a5835e0aac6fd53d8097085cde1e3cf23') + '8b8e7a5d9f17fafdddb402fab22b0b8d9963039ea8ea9fa749cad67aeeb879ac' + 'ceed663f7007654d186d918cf7a0742972ed5bd319879021e9ba80e395177700' + 'a12ea422e5162ef11274a98fd53658d6e780cafbe2e0fac70c8bc7d3291fef8b' + 'ba1b830bbd74c3dde8de99d887bd20205b4bbb1e466a41aa2b230404f1959c83' + '32553b785ef603c3e8160f0f1ef423095a0c9b8bbdc6c01e4d2c81740adb9db3') validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck prepare() { mkdir -p build - cd kopete-$pkgver + cd $pkgname-$pkgver +# fix build with mediastreamer 2.14 https://phabricator.kde.org/D15956 + patch -p1 -i ../kopete-mediastreamer2.14.patch +# fix build with OpenSSL 1.1 (Fedora patch) + patch -p1 -i ../kopete-openssl-1.1.patch +# support SRTP2 + patch -p1 -i ../kopete-srtp2.patch +# fix build with glibc 2.28 + patch -p1 -i ../kopete-glibc-2.28.patch # based on https://devel.trisquel.info/trisquel/package-helpers/blob/belenos/helpers/make-kopete sed -i 's/Skype protocol" ON/Skype protocol" OFF/g' protocols/CMakeLists.txt @@ -45,31 +54,22 @@ prepare() { sed 's/, Skype//' -i ./doc/index.docbook # Remove unsafe/dangerous services - rm -rv protocols/oscar - rm -rv protocols/yahoo - rm -rv protocols/qq - rm -rv protocols/groupwise - rm -rv protocols/gadu - rm -rv protocols/wlm - rm -rv protocols/meanwhile + rm -rfv protocols/oscar + rm -rfv protocols/yahoo + rm -rfv protocols/qq + rm -rfv protocols/groupwise + rm -rfv protocols/gadu + rm -rfv protocols/wlm + rm -rfv protocols/meanwhile patch -p1 -i "${srcdir}"/libre-nonprism.patch - - # Fix build with mediastreamer 2.14 - patch -p1 -i ../kopete-mediastreamer2.14.patch - # Fix linking to pthread in libjingle-call - patch -p1 -i ../kopete-pthread-link.patch - # Remove kdepimlibs usage - patch -p1 -i ../kopete-no-kdepimlibs.patch } build() { cd build - - cmake ../kopete-$pkgver \ - -DCMAKE_BUILD_TYPE=Release \ - -DKDE4_BUILD_TESTS=OFF \ + cmake ../$pkgname-$pkgver \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_TESTING=OFF \ -DWITH_Libmsn=OFF \ -DWITH_Libgadu=OFF \ -DWITH_skype=OFF \ @@ -81,15 +81,11 @@ build() { -DWITH_GOOGLETALK=OFF \ -DWITH_wlm=OFF \ -DWITH_WLM_MEDIASTREAMER=OFF \ - -DWITH_meanwhile=OFF \ - -DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 \ - -DOPENSSL_SSL_LIBRARY=/usr/lib/openssl-1.0/libssl.so \ - -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.0/libcrypto.so + -DWITH_meanwhile=OFF make } package() { cd build - make DESTDIR="$pkgdir" install } diff --git a/nonprism/kopete/kopete-glibc-2.28.patch b/nonprism/kopete/kopete-glibc-2.28.patch new file mode 100644 index 000000000..f676533e7 --- /dev/null +++ b/nonprism/kopete/kopete-glibc-2.28.patch @@ -0,0 +1,12 @@ +diff --git a/protocols/jabber/libjingle/talk/session/phone/v4llookup.cc b/protocols/jabber/libjingle/talk/session/phone/v4llookup.cc +index 0057946cc..d5559fa63 100644 +--- a/protocols/jabber/libjingle/talk/session/phone/v4llookup.cc ++++ b/protocols/jabber/libjingle/talk/session/phone/v4llookup.cc +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + + #include diff --git a/nonprism/kopete/kopete-mediastreamer2.14.patch b/nonprism/kopete/kopete-mediastreamer2.14.patch index f4ee1a096..5d106400b 100644 --- a/nonprism/kopete/kopete-mediastreamer2.14.patch +++ b/nonprism/kopete/kopete-mediastreamer2.14.patch @@ -1,83 +1,281 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,6 +34,7 @@ + + find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED) + find_package(KF5IdentityManagement ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED) ++find_package(Threads) + + include(KDEInstallDirs) + include(KDECompilerSettings NO_POLICY_SCOPE) +diff --git a/cmake/modules/FindLiboRTP.cmake b/cmake/modules/FindLiboRTP.cmake +--- a/cmake/modules/FindLiboRTP.cmake ++++ b/cmake/modules/FindLiboRTP.cmake +@@ -11,7 +11,7 @@ + + SET( LIBORTP_FOUND FALSE ) + +-pkg_check_modules(ortp ortp) ++pkg_check_modules(ORTP ortp) + + FIND_PATH( LIBORTP_INCLUDE_DIR + ortp/ortp.h +@@ -40,7 +40,13 @@ + if ( run_result EQUAL 0 ) + # Version OK + SET( LIBORTP_FOUND TRUE ) +- MESSAGE( STATUS "Found libortp: ${LIBORTP_LIBRARY}" ) ++ MESSAGE( STATUS "Found libortp: ${LIBORTP_LIBRARY} ${ORTP_VERSION}" ) ++ IF (ORTP_VERSION VERSION_LESS 1.0.1) ++ SET(ORTP_LESS_1_0_1 TRUE) ++ ELSE (ORTP_VERSION VERSION_LESS 1.0.1) ++ SET(ORTP_LESS_1_0_1 FALSE) ++ ENDIF (ORTP_VERSION VERSION_LESS 1.0.1) ++ + endif ( run_result EQUAL 0 ) + endif( compile_result ) + ENDIF( LIBORTP_INCLUDE_DIR AND LIBORTP_LIBRARY ) diff --git a/cmake/modules/FindMediastreamer.cmake b/cmake/modules/FindMediastreamer.cmake -index 47fe5c3..31802f0 100644 --- a/cmake/modules/FindMediastreamer.cmake +++ b/cmake/modules/FindMediastreamer.cmake -@@ -24,12 +24,19 @@ IF (MEDIASTREAMER_FOUND) +@@ -20,17 +20,25 @@ + + IF (MEDIASTREAMER_FOUND) + IF (NOT MEDIASTREAMER_FIND_QUIETLY) ++ + MESSAGE(STATUS "Found Mediastreamer: ${MEDIASTREAMER_LIBRARIES} (version: ${MEDIASTREAMER_VERSION})") ++ ++ SET(MEDIASTREAMER_LESS_2_9 FALSE) ++ SET(MEDIASTREAMER_LESS_2_11 FALSE) ++ SET(MEDIASTREAMER_LESS_2_14 FALSE) ++ IF (MEDIASTREAMER_VERSION VERSION_LESS 2.9) SET(MEDIASTREAMER_LESS_2_9 TRUE) - SET(MEDIASTREAMER_LESS_2_11 TRUE) -+ SET(MEDIASTREAMER_LESS_2_14 TRUE) - ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11) - SET(MEDIASTREAMER_LESS_2_9 FALSE) - SET(MEDIASTREAMER_LESS_2_11 TRUE) -+ SET(MEDIASTREAMER_LESS_2_14 TRUE) -+ ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.14) -+ SET(MEDIASTREAMER_LESS_2_9 FALSE) -+ SET(MEDIASTREAMER_LESS_2_11 FALSE) -+ SET(MEDIASTREAMER_LESS_2_14 TRUE) - ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9) - SET(MEDIASTREAMER_LESS_2_9 FALSE) - SET(MEDIASTREAMER_LESS_2_11 FALSE) -+ SET(MEDIASTREAMER_LESS_2_14 FALSE) +- SET(MEDIASTREAMER_LESS_2_11 TRUE) +- ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11) +- SET(MEDIASTREAMER_LESS_2_9 FALSE) +- SET(MEDIASTREAMER_LESS_2_11 TRUE) +- ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9) +- SET(MEDIASTREAMER_LESS_2_9 FALSE) +- SET(MEDIASTREAMER_LESS_2_11 FALSE) ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.9) ++ ++ IF (MEDIASTREAMER_VERSION VERSION_LESS 2.11) ++ SET(MEDIASTREAMER_LESS_2_11 TRUE) ++ ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11) ++ ++ IF (MEDIASTREAMER_VERSION VERSION_LESS 2.14) ++ SET(MEDIASTREAMER_LESS_2_14 TRUE) ++ ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.14) ++ ENDIF (NOT MEDIASTREAMER_FIND_QUIETLY) ELSE (MEDIASTREAMER_FOUND) + IF (MEDIASTREAMER_FIND_REQUIRED) +diff --git a/protocols/jabber/libjingle/CMakeLists.txt b/protocols/jabber/libjingle/CMakeLists.txt +--- a/protocols/jabber/libjingle/CMakeLists.txt ++++ b/protocols/jabber/libjingle/CMakeLists.txt +@@ -51,6 +51,10 @@ + add_definitions ( -DMEDIASTREAMER_LESS_2_11 ) + endif ( MEDIASTREAMER_LESS_2_11 ) + ++if ( MEDIASTREAMER_LESS_2_14 ) ++ add_definitions ( -DMEDIASTREAMER_LESS_2_14 ) ++endif ( MEDIASTREAMER_LESS_2_14 ) ++ + if ( CMAKE_BUILD_TYPE STREQUAL "Debug" ) + add_definitions ( -D_DEBUG ) + endif ( CMAKE_BUILD_TYPE STREQUAL "Debug" ) +@@ -284,6 +288,7 @@ + ${EXPAT_LIBRARY} + ${MEDIASTREAMER_LIBRARIES} + ${LIBORTP_LIBRARY} ++ ${CMAKE_THREAD_LIBS_INIT} + ${CMAKE_DL_LIBS} + ) + +diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h +--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h ++++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h +@@ -53,7 +53,11 @@ + class LinphoneMediaEngine : public MediaEngineInterface { + public: + LinphoneMediaEngine(const std::string& ringWav, const std::string& callWav); ++#ifdef MEDIASTREAMER_LESS_2_14 + virtual ~LinphoneMediaEngine() {} ++#else ++ ~LinphoneMediaEngine(); ++#endif + + // Implement pure virtual methods of MediaEngine. + virtual bool Init() { return true; } +@@ -97,6 +101,10 @@ + bool have_speex; + bool have_gsm; + ++#ifndef MEDIASTREAMER_LESS_2_14 ++ MSFactory *factory; ++#endif ++ + private: + std::vector voice_codecs_; + std::vector video_codecs_; +@@ -110,7 +118,11 @@ + class LinphoneVoiceChannel : public VoiceMediaChannel { + public: + LinphoneVoiceChannel(LinphoneMediaEngine *eng); ++#ifdef MEDIASTREAMER_LESS_2_14 + virtual ~LinphoneVoiceChannel(); ++#else ++ ~LinphoneVoiceChannel(); ++#endif + + // Implement pure virtual methods of VoiceMediaChannel. + virtual bool SetRecvCodecs(const std::vector& codecs); diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc -index bd3de2b..9379226 100644 --- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc +++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc -@@ -151,15 +151,25 @@ LinphoneVoiceChannel::LinphoneVoiceChannel(LinphoneMediaEngine*eng) +@@ -60,18 +60,34 @@ + /////////////////////////////////////////////////////////////////////////// + LinphoneMediaEngine::LinphoneMediaEngine(const std::string& ringWav, const std::string& callWav) : ring_wav_(ringWav), call_wav_(callWav) { + ortp_init(); ++#ifdef MEDIASTREAMER_LESS_2_14 + ms_init(); ++#else ++ factory = ms_factory_new(); ++ ms_factory_init_voip(factory); ++ ms_factory_init_plugins(factory); ++#endif + + #ifndef WIN32 + char * path = strdup(MSILBC_LIBRARY); + char * dirc = dirname(path); ++#ifdef MEDIASTREAMER_LESS_2_14 + ms_load_plugins(dirc); ++#else ++ ms_factory_load_plugins(factory, dirc); ++#endif + free(path); + #endif + ++#ifdef MEDIASTREAMER_LESS_2_14 + have_ilbc = ms_filter_codec_supported("iLBC"); + have_speex = ms_filter_codec_supported("speex"); + have_gsm = ms_filter_codec_supported("gsm"); ++#else ++ have_ilbc = ms_factory_codec_supported(factory, "iLBC"); ++ have_speex = ms_factory_codec_supported(factory, "speex"); ++ have_gsm = ms_factory_codec_supported(factory, "gsm"); ++#endif + + if (have_speex) { + voice_codecs_.push_back(AudioCodec(110, payload_type_speex_wb.mime_type, payload_type_speex_wb.clock_rate, 0, 1, 8)); +@@ -88,6 +104,14 @@ + voice_codecs_.push_back(AudioCodec(101, payload_type_telephone_event.mime_type, payload_type_telephone_event.clock_rate, 0, 1, 1)); + } + ++#ifndef MEDIASTREAMER_LESS_2_14 ++LinphoneMediaEngine::~LinphoneMediaEngine() { ++ ms_factory_uninit_plugins(factory); ++ ms_factory_uninit_voip(factory); ++ ms_factory_destroy(factory); ++} ++#endif ++ + void LinphoneMediaEngine::Terminate() { + fflush(stdout); + } +@@ -149,15 +173,25 @@ playport2 = PORT_UNUSED; #ifdef _DEBUG +#ifdef MEDIASTREAMER_LESS_2_14 ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); #else -+ ortp_set_log_level_mask(NULL, ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); ++ ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); +#endif +#else +#ifdef MEDIASTREAMER_LESS_2_14 ortp_set_log_level_mask(ORTP_FATAL); +#else -+ ortp_set_log_level_mask(NULL, ORTP_FATAL); - #endif -- ++ ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_FATAL); +#endif -+ + #endif + #ifdef MEDIASTREAMER_LESS_2_9 audio_stream_ = audio_stream_new(-1, 0); /* -1 means that function will choose some free port */ -#else -+#elseif MEDIASTREAMER_LESS_2_14 ++#elif MEDIASTREAMER_LESS_2_14 audio_stream_ = audio_stream_new(-1, -1, 0); /* -1 means that function will choose some free port */ +#else -+ audio_stream_ = audio_stream_new(NULL, -1, -1, 0); /* -1 means that function will choose some free port */ ++ audio_stream_ = audio_stream_new(engine_->factory, -1, -1, 0); /* -1 means that function will choose some free port */ #endif } -@@ -344,16 +354,24 @@ void LinphoneVoiceChannel::StartRing(bool bIncomingCall) +@@ -272,11 +306,22 @@ + { + StopRing(); + ++#ifdef MEDIASTREAMER_LESS_2_14 ++ MSSndCardManager *snd_manager = ms_snd_card_manager_get(); + MSSndCard *playcard = ms_snd_card_manager_get_default_playback_card(ms_snd_card_manager_get()); ++#else ++ MSSndCardManager *snd_manager = ms_factory_get_snd_card_manager(engine_->factory); ++ MSSndCard *playcard = ms_snd_card_manager_get_default_playback_card(snd_manager); ++#endif ++ + if (!playcard) + return false; + ++#ifdef MEDIASTREAMER_LESS_2_14 + MSSndCard *captcard = ms_snd_card_manager_get_default_capture_card(ms_snd_card_manager_get()); ++#else ++ MSSndCard *captcard = ms_snd_card_manager_get_default_capture_card(snd_manager); ++#endif + if (!captcard) + return false; + +@@ -333,8 +378,18 @@ + + void LinphoneVoiceChannel::StartRing(bool bIncomingCall) + { ++#ifdef MEDIASTREAMER_LESS_2_14 ++ MSSndCardManager *snd_manager = ms_snd_card_manager_get(); ++#else ++ MSSndCardManager *snd_manager = ms_factory_get_snd_card_manager(engine_->factory); ++#endif ++ + MSSndCard *sndcard = NULL; ++#ifdef MEDIASTREAMER_LESS_2_14 + sndcard=ms_snd_card_manager_get_default_card(ms_snd_card_manager_get()); ++#else ++ sndcard=ms_snd_card_manager_get_default_card(snd_manager); ++#endif + if (sndcard) + { + if (bIncomingCall) +@@ -342,7 +397,11 @@ if (engine_->GetRingWav().size() > 0) { LOG(LS_VERBOSE) << "incoming ring. sound file: " << engine_->GetRingWav().c_str() << "\n"; +#ifdef MEDIASTREAMER_LESS_2_14 ring_stream_ = ring_start (engine_->GetRingWav().c_str(), 1, sndcard); -- } +#else -+ ring_stream_ = ring_start (NULL, engine_->GetRingWav().c_str(), 1, sndcard); ++ ring_stream_ = ring_start (engine_->factory, engine_->GetRingWav().c_str(), 1, sndcard); +#endif -+ } + } } else - { +@@ -350,7 +409,11 @@ if (engine_->GetCallWav().size() > 0) { LOG(LS_VERBOSE) << "outgoing ring. sound file: " << engine_->GetCallWav().c_str() << "\n"; +#ifdef MEDIASTREAMER_LESS_2_14 ring_stream_ = ring_start (engine_->GetCallWav().c_str(), 1, sndcard); -- } +#else -+ ring_stream_ = ring_start (NULL, engine_->GetCallWav().c_str(), 1, sndcard); ++ ring_stream_ = ring_start (engine_->factory, engine_->GetCallWav().c_str(), 1, sndcard); +#endif -+ } + } } } - } + diff --git a/nonprism/kopete/kopete-no-kdepimlibs.patch b/nonprism/kopete/kopete-no-kdepimlibs.patch deleted file mode 100644 index e4d3609f8..000000000 --- a/nonprism/kopete/kopete-no-kdepimlibs.patch +++ /dev/null @@ -1,1280 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5216807ab..78c7ab500 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4,7 +4,6 @@ project(kopete) - find_package(KDE4 REQUIRED) - include(KDE4Defaults) - include(MacroLibrary) --find_package(KdepimLibs REQUIRED) - find_package(QImageBlitz REQUIRED) - - set(KOPETE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -diff --git a/kopete/contactlist/CMakeLists.txt b/kopete/contactlist/CMakeLists.txt -index 2219addf9..ea5623a75 100644 ---- a/kopete/contactlist/CMakeLists.txt -+++ b/kopete/contactlist/CMakeLists.txt -@@ -12,10 +12,8 @@ set(kopetecontactlist_SRCS - #kopetegroupviewitem.cpp - kopetecontactlistview.cpp - kopetelviprops.cpp --kopeteaddrbookexport.cpp - customnotificationprops.cpp - kopetegrouplistaction.cpp --kabcexport.cpp - contactlistmodel.cpp - contactlisttreemodel.cpp - contactlistplainmodel.cpp -@@ -28,9 +26,6 @@ contactlistlayoutitemconfig.cpp - kde4_add_ui_files(kopetecontactlist_SRCS - kopetegvipropswidget.ui - kopetemetalvipropswidget.ui --kopeteaddrbookexportui.ui --kabcexport_page1.ui --kabcexport_page2.ui - ) - - kde4_add_library( kopetecontactlist SHARED ${kopetecontactlist_SRCS} ) -diff --git a/kopete/contactlist/contactlistproxymodel.cpp b/kopete/contactlist/contactlistproxymodel.cpp -index d0ada7892..cb636dfca 100644 ---- a/kopete/contactlist/contactlistproxymodel.cpp -+++ b/kopete/contactlist/contactlistproxymodel.cpp -@@ -27,7 +27,6 @@ - #include "kopetecontact.h" - #include "kopeteappearancesettings.h" - #include "kopeteitembase.h" --#include - - namespace Kopete { - -@@ -272,15 +271,6 @@ bool ContactListProxyModel::searchContactInfo(Kopete::MetaContact *mc, QRegExp s - return true; - - // Check the address book -- KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( mc->kabcId() ); -- if ( !addressee.isEmpty() ) -- { -- QString emailAddr = addressee.fullEmail(); -- -- if ( emailAddr.contains( searchPattern ) ) -- return true; -- } -- - // Check alternative names - foreach( Kopete::Contact* c , mc->contacts() ) - { -diff --git a/kopete/contactlist/kopetecontactlistview.cpp b/kopete/contactlist/kopetecontactlistview.cpp -index b32a500cf..9b403d123 100644 ---- a/kopete/contactlist/kopetecontactlistview.cpp -+++ b/kopete/contactlist/kopetecontactlistview.cpp -@@ -39,7 +39,6 @@ - #include - #include - #include --#include - - #include "kopeteuiglobal.h" - #include "kopetecontactlistelement.h" -@@ -529,24 +528,6 @@ void KopeteContactListView::sendMessage() - void KopeteContactListView::sendEmail() - { - Kopete::MetaContact* metaContact = metaContactFromIndex( currentIndex() ); -- if ( metaContact ) -- { -- KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( metaContact->kabcId() ); -- if ( !addressee.isEmpty() ) -- { -- QString emailAddr = addressee.fullEmail(); -- -- kDebug( 14000 ) << "Email: " << emailAddr << "!"; -- if ( !emailAddr.isEmpty() ) -- KToolInvocation::invokeMailer( emailAddr, QString() ); -- else -- KMessageBox::queuedMessageBox( this, KMessageBox::Sorry, i18n( "There is no email address set for this contact in the KDE address book." ), i18n( "No Email Address in Address Book" ) ); -- } -- else -- { -- KMessageBox::queuedMessageBox( this, KMessageBox::Sorry, i18n( "This contact was not found in the KDE address book. Check that a contact is selected in the properties dialog." ), i18n( "Not Found in Address Book" ) ); -- } -- } - } - - void KopeteContactListView::rename() -diff --git a/kopete/contactlist/kopetelviprops.cpp b/kopete/contactlist/kopetelviprops.cpp -index 04ff289a1..84a4c95f8 100644 ---- a/kopete/contactlist/kopetelviprops.cpp -+++ b/kopete/contactlist/kopetelviprops.cpp -@@ -43,18 +43,12 @@ - #include - #include - #include --#include --#include --#include - #include - --#include "kabcpersistence.h" --#include "kopeteaddrbookexport.h" - #include "kopetecontact.h" - #include "kopetegroup.h" - #include "kopeteaccount.h" - #include "kopeteprotocol.h" --#include "addressbooklinkwidget.h" - #include "avatardialog.h" - - #include "customnotificationprops.h" -@@ -186,9 +180,6 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(Kopete::MetaContact *metaContact, QWidget - hb->setMargin( -1 ); - hb->setObjectName( "soundFromKABClayout" ); - -- mFromKABC = new QPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget() ); -- mFromKABC->setObjectName( QLatin1String("getSoundFromKABC") ); -- hb->addWidget( mFromKABC ); // [ [Button] <-xxxxx-> ] - hb->addStretch(); - vb->addStretch(); // vert spacer keeps the rest snug - -@@ -199,10 +190,8 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(Kopete::MetaContact *metaContact, QWidget - ui_mainWidget->tabWidget->addTab( npMainWidget, i18n( "Custom &Notifications" ) ); - setMainWidget( mainWidget ); - -- connect( ui_mainWidget->radioNameKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( ui_mainWidget->radioNameContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( ui_mainWidget->radioNameCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); -- connect( ui_mainWidget->radioPhotoKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( ui_mainWidget->radioPhotoContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( ui_mainWidget->radioPhotoCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( ui_mainWidget->cmbAccountPhoto, SIGNAL(activated(int)), SLOT(slotEnableAndDisableWidgets())); -@@ -210,7 +199,6 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(Kopete::MetaContact *metaContact, QWidget - - ui_mainWidget->btnClearPhoto->setIcon( KIcon( (QApplication::layoutDirection() == Qt::RightToLeft) ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" ) ); - connect( ui_mainWidget->btnClearPhoto, SIGNAL(clicked()), this, SLOT(slotClearPhotoClicked()) ); -- connect( ui_mainWidget->widAddresseeLink, SIGNAL(addresseeChanged(KABC::Addressee)), SLOT(slotAddresseeChanged(KABC::Addressee)) ); - connect( ui_mainWidget->btnChoosePhoto, SIGNAL(clicked()), this, SLOT(slotSelectPhoto())); - ui_mainWidget->chkUseCustomIcons->setChecked( mMetaContact->useCustomIcon() ); - -@@ -235,41 +223,14 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(Kopete::MetaContact *metaContact, QWidget - // ui_mainWidget->icnbAway->setIcon( awayName ); - // ui_mainWidget->icnbUnknown->setIcon( unknownName ); - -- ui_mainWidget->widAddresseeLink->setMetaContact( mMetaContact ); -- -- mAddressBookUid = mMetaContact->kabcId(); -- - mExport = 0L; - -- if ( !mAddressBookUid.isEmpty() ) -- { -- KABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook(); -- KABC::Addressee a = ab->findByUid( mAddressBookUid ); -- ui_mainWidget->widAddresseeLink->setAddressee( a ); -- -- if ( !a.isEmpty() ) -- { -- ui_mainWidget->btnImportKABC->setEnabled( true ); -- ui_mainWidget->btnExportKABC->setEnabled( true ); -- mExport = new KopeteAddressBookExport( this, mMetaContact ); -- -- mSound = a.sound(); -- mFromKABC->setEnabled( !( mSound.isIntern() || mSound.url().isEmpty() ) ); -- } -- } -- - slotLoadNameSources(); - slotLoadPhotoSources(); - - connect( this, SIGNAL(okClicked()), this, SLOT(slotOkClicked()) ); - connect( ui_mainWidget->chkUseCustomIcons, SIGNAL(toggled(bool)), - this, SLOT(slotUseCustomIconsToggled(bool)) ); -- connect( ui_mainWidget->btnImportKABC, SIGNAL(clicked()), -- this, SLOT(slotImportClicked()) ); -- connect( ui_mainWidget->btnExportKABC, SIGNAL(clicked()), -- this, SLOT(slotExportClicked()) ); -- connect( mFromKABC, SIGNAL(clicked()), -- this, SLOT(slotFromKABCClicked()) ); - - slotUseCustomIconsToggled( ui_mainWidget->chkUseCustomIcons->isChecked() ); - slotEnableAndDisableWidgets(); -@@ -325,7 +286,6 @@ void KopeteMetaLVIProps::slotLoadNameSources() - Kopete::MetaContact::PropertySource nameSource = mMetaContact->displayNameSource(); - - ui_mainWidget->radioNameContact->setChecked(nameSource == Kopete::MetaContact::SourceContact); -- ui_mainWidget->radioNameKABC->setChecked(nameSource == Kopete::MetaContact::SourceKABC); - ui_mainWidget->radioNameCustom->setChecked(nameSource == Kopete::MetaContact::SourceCustom); - - } -@@ -361,10 +321,7 @@ void KopeteMetaLVIProps::slotLoadPhotoSources() - Kopete::MetaContact::PropertySource photoSource = mMetaContact->photoSource(); - - ui_mainWidget->radioPhotoContact->setChecked(photoSource == Kopete::MetaContact::SourceContact); -- ui_mainWidget->radioPhotoKABC->setChecked(photoSource == Kopete::MetaContact::SourceKABC); - ui_mainWidget->radioPhotoCustom->setChecked(photoSource == Kopete::MetaContact::SourceCustom); -- -- ui_mainWidget->chkSyncPhoto->setChecked(mMetaContact->isPhotoSyncedWithKABC()); - } - - void KopeteMetaLVIProps::slotSelectPhoto() -@@ -379,24 +336,6 @@ void KopeteMetaLVIProps::slotSelectPhoto() - - void KopeteMetaLVIProps::slotEnableAndDisableWidgets() - { -- KABC::AddressBook *ab = Kopete::KABCPersistence::self()->addressBook(); -- KABC::Addressee a = ab->findByUid( mAddressBookUid ); -- bool validLink = ! a.isEmpty(); -- // kabc source requires a kabc link -- ui_mainWidget->radioNameKABC->setEnabled(validLink); -- // kabc source requires a kabc link -- ui_mainWidget->radioPhotoKABC->setEnabled(validLink); -- // sync with kabc has no sense if we use kabc as source (sync kabc with kabc? uh?) -- // it has also no sense if they are no kabc link -- if( selectedPhotoSource() == Kopete::MetaContact::SourceKABC || !validLink ) -- { -- ui_mainWidget->chkSyncPhoto->setEnabled(false); -- } -- else -- { -- ui_mainWidget->chkSyncPhoto->setEnabled(true); -- } -- - ui_mainWidget->radioNameContact->setEnabled(mMetaContact->contacts().count()); - ui_mainWidget->radioPhotoContact->setEnabled(!m_withPhotoContacts.isEmpty()); - -@@ -416,9 +355,6 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() - QImage photo; - switch ( selectedPhotoSource() ) - { -- case Kopete::MetaContact::SourceKABC: -- photo = Kopete::photoFromKABC(mAddressBookUid); -- break; - case Kopete::MetaContact::SourceContact: - photo = Kopete::photoFromContact(selectedPhotoSourceContact()); - break; -@@ -434,8 +370,6 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() - - Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() const - { -- if ( ui_mainWidget->radioNameKABC->isChecked() ) -- return Kopete::MetaContact::SourceKABC; - if ( ui_mainWidget->radioNameContact->isChecked() ) - return Kopete::MetaContact::SourceContact; - if ( ui_mainWidget->radioNameCustom->isChecked() ) -@@ -446,8 +380,6 @@ Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() con - - Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedPhotoSource() const - { -- if ( ui_mainWidget->radioPhotoKABC->isChecked() ) -- return Kopete::MetaContact::SourceKABC; - if ( ui_mainWidget->radioPhotoContact->isChecked() ) - return Kopete::MetaContact::SourceContact; - if ( ui_mainWidget->radioPhotoCustom->isChecked() ) -@@ -490,10 +422,6 @@ Kopete::Contact* KopeteMetaLVIProps::selectedPhotoSourceContact() const - - void KopeteMetaLVIProps::slotOkClicked() - { -- // update meta contact's UID -- mMetaContact->setKabcId( mAddressBookUid ); -- //this has to be done first, in the case something is synced with KABC (see bug 109494) -- - // set custom display name - if( ui_mainWidget->edtDisplayName->text() != mMetaContact->customDisplayName() ) - mMetaContact->setDisplayName( ui_mainWidget->edtDisplayName->text() ); -@@ -508,7 +436,6 @@ void KopeteMetaLVIProps::slotOkClicked() - mMetaContact->setPhotoSourceContact( selectedPhotoSourceContact() ); - if ( !m_photoPath.isEmpty()) - mMetaContact->setPhoto(KUrl(m_photoPath)); -- mMetaContact->setPhotoSyncedWithKABC( ui_mainWidget->chkSyncPhoto->isChecked() ); - - mMetaContact->setUseCustomIcon( - ui_mainWidget->chkUseCustomIcons->isChecked() ); -@@ -550,53 +477,6 @@ void KopeteMetaLVIProps::slotUseCustomIconsToggled(bool on) - ui_mainWidget->icnbUnknown->setEnabled( on ); - } - --void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a ) --{ -- if ( !a.isEmpty() ) -- { -- mSound = a.sound(); -- mFromKABC->setEnabled( !( mSound.isIntern() || mSound.url().isEmpty() ) ); -- ui_mainWidget->btnExportKABC->setEnabled( true ); -- ui_mainWidget->btnImportKABC->setEnabled( true ); -- // set/update the MC's addressee uin field -- mAddressBookUid = a.uid(); -- } -- else -- { -- ui_mainWidget->btnExportKABC->setEnabled( false ); -- ui_mainWidget->btnImportKABC->setEnabled( false ); -- mAddressBookUid.clear(); -- ui_mainWidget->radioNameContact->setChecked( true ); -- ui_mainWidget->radioPhotoContact->setChecked( true ); -- } -- slotEnableAndDisableWidgets(); --} -- --void KopeteMetaLVIProps::slotExportClicked() --{ -- mMetaContact->setKabcId( mAddressBookUid ); -- delete mExport; -- mExport = new KopeteAddressBookExport( this, mMetaContact ); -- if ( mExport->showDialog() == QDialog::Accepted ) -- mExport->exportData(); --} -- --void KopeteMetaLVIProps::slotImportClicked() --{ -- mMetaContact->setKabcId( mAddressBookUid ); -- if ( Kopete::KABCPersistence::self()->syncWithKABC( mMetaContact ) ) -- KMessageBox::queuedMessageBox( this, KMessageBox::Information, -- i18n( "No contacts were imported from the address book." ), -- i18n( "No Change" ) ); --} -- --void KopeteMetaLVIProps::slotFromKABCClicked() --{ --#if 0 -- mNotificationProps->widget()->customSound->setUrl( mSound.url() ); --#endif --} -- - void KopeteMetaLVIProps::slotOpenSoundDialog( KUrlRequester *requester ) - { - // taken from kdelibs/kio/kfile/knotifydialog.cpp -diff --git a/kopete/contactlist/kopetelviprops.h b/kopete/contactlist/kopetelviprops.h -index c4c65747c..cae803993 100644 ---- a/kopete/contactlist/kopetelviprops.h -+++ b/kopete/contactlist/kopetelviprops.h -@@ -21,19 +21,16 @@ - #define KOPETELVIPROPS_H - - #include --#include - - #include "kopetemetacontact.h" - - #include "ui_kopetemetalvipropswidget.h" - #include "ui_kopetegvipropswidget.h" - --class AddressBookLinkWidget; - class CustomNotificationProps; - class KopeteAddressBookExport; - class KUrlRequester; - --namespace KABC { class Addressee; } - namespace Kopete { - class Contact; - class Group; -@@ -74,10 +71,8 @@ class KopeteMetaLVIProps: public KDialog - QPushButton *mFromKABC; - QWidget* mainWidget; - Ui::KopeteMetaLVIPropsWidget *ui_mainWidget; -- AddressBookLinkWidget *linkWidget; - Kopete::MetaContact *mMetaContact; - KopeteAddressBookExport *mExport; -- KABC::Sound mSound; - int m_countPhotoCapable; - QMap m_withPhotoContacts; - QString mAddressBookUid; // the currently selected addressbook UID -@@ -93,10 +88,6 @@ class KopeteMetaLVIProps: public KDialog - void slotOkClicked(); - void slotUseCustomIconsToggled( bool on ); - void slotClearPhotoClicked(); -- void slotAddresseeChanged( const KABC::Addressee & ); -- void slotExportClicked(); -- void slotImportClicked(); -- void slotFromKABCClicked(); - void slotOpenSoundDialog( KUrlRequester *requester ); - void slotLoadNameSources(); - void slotLoadPhotoSources(); -diff --git a/kopete/contactlist/kopetemetalvipropswidget.ui b/kopete/contactlist/kopetemetalvipropswidget.ui -index c2265367f..d882676f4 100644 ---- a/kopete/contactlist/kopetemetalvipropswidget.ui -+++ b/kopete/contactlist/kopetemetalvipropswidget.ui -@@ -62,9 +62,6 @@ - - 11 - -- -- -- - - - -@@ -82,19 +79,6 @@ - - 0 - -- -- -- -- false -- -- -- Export contact's details to the KDE Address Book -- -- -- E&xport Details... -- -- -- - - - -@@ -111,19 +95,6 @@ - - - -- -- -- -- false -- -- -- Import contacts from the KDE Address Book -- -- -- &Import Contacts -- -- -- - - - -@@ -135,13 +106,6 @@ - Display Name Source - - -- -- -- -- Use address book &name (needs address book link) -- -- -- - - - -@@ -213,13 +177,6 @@ - Photo Source - - -- -- -- -- U&se address book photo (needs address book link) -- -- -- - - - -@@ -513,14 +470,10 @@ - - - tabWidget -- btnExportKABC -- btnImportKABC -- radioNameKABC - radioNameContact - cmbAccountName - radioNameCustom - edtDisplayName -- radioPhotoKABC - radioPhotoContact - cmbAccountPhoto - radioPhotoCustom -diff --git a/kopete/kopeteapplication.cpp b/kopete/kopeteapplication.cpp -index 601b33ae2..0cf1f7952 100644 ---- a/kopete/kopeteapplication.cpp -+++ b/kopete/kopeteapplication.cpp -@@ -32,7 +32,6 @@ - #include - - #include "addaccountwizard.h" --#include "kabcpersistence.h" - #include "kopeteaccount.h" - #include "kopeteaccountmanager.h" - #include "kopetestatusmanager.h" -@@ -131,11 +130,6 @@ KopeteApplication::~KopeteApplication() - - void KopeteApplication::slotLoadPlugins() - { -- // we have to load the address book early, because calling this enters the Qt event loop when there are remote resources. -- // The plugin manager is written with the assumption that Kopete will not reenter the event loop during plugin load, -- // otherwise lots of things break as plugins are loaded, then contacts are added to incompletely initialised MCLVIs -- Kopete::KABCPersistence::self()->addressBook(); -- - //Create the command handler (looks silly) - Kopete::CommandHandler::commandHandler(); - -diff --git a/kopete/kopetewindow.cpp b/kopete/kopetewindow.cpp -index c6ca7ec4d..564e2a0f5 100644 ---- a/kopete/kopetewindow.cpp -+++ b/kopete/kopetewindow.cpp -@@ -72,8 +72,6 @@ - - #include "addcontactpage.h" - #include "addressbooklinkwidget.h" --#include "ui_groupkabcselectorwidget.h" --#include "kabcexport.h" - #include "kopeteappearancesettings.h" - #include "kopeteapplication.h" - #include "kopeteaccount.h" -@@ -397,11 +395,6 @@ void KopeteWindow::initActions() - connect ( d->actionDisconnect, SIGNAL (triggered(bool)), this, SLOT (slotDisconnectAll()) ); - d->actionDisconnect->setEnabled ( false ); - -- d->actionExportContacts = new KAction ( i18n ( "&Export Contacts..." ), this ); -- d->actionExportContacts->setIcon ( KIcon ( "document-export" ) ); -- actionCollection()->addAction ( "ExportContacts", d->actionExportContacts ); -- connect ( d->actionExportContacts, SIGNAL (triggered(bool)), this, SLOT (showExportDialog()) ); -- - d->actionSetAway = new KAction ( KIcon ( "user-identity", 0, QStringList() << QString() << "user-away" ), i18n ( "&Away" ), this ); - actionCollection()->addAction ( "SetAwayAll", d->actionSetAway ); - connect ( d->actionSetAway, SIGNAL (triggered(bool)), this, SLOT (slotGlobalAway()) ); -@@ -1291,13 +1284,6 @@ void KopeteWindow::slotTrayAboutToShowMenu ( KMenu * popup ) - popup->addAction ( actionCollection->action ( KStandardAction::name ( KStandardAction::Quit ) ) ); - } - --void KopeteWindow::showExportDialog() --{ -- KabcExportWizard* wizard = new KabcExportWizard ( this ); -- wizard->setObjectName ( QLatin1String ( "export_contact_dialog" ) ); -- wizard->show(); --} -- - void KopeteWindow::leaveEvent ( QEvent * ) - { - startAutoHideTimer(); -@@ -1413,18 +1399,12 @@ void KopeteWindow::showAddContactDialog ( Kopete::Account * account ) - AddContactPage *addContactPage = - account->protocol()->createAddContactWidget ( mainWid, account ); - -- QWidget* groupKABC = new QWidget ( mainWid ); -- groupKABC->setObjectName ( "groupkabcwidget" ); -- Ui::GroupKABCSelectorWidget ui_groupKABC; -- ui_groupKABC.setupUi ( groupKABC ); -- - // Populate the groups list - Kopete::GroupList groups=Kopete::ContactList::self()->groups(); - QHash groupItems; - - // Add top level group - groupItems.insert ( Kopete::Group::topLevel()->displayName(), Kopete::Group::topLevel() ); -- ui_groupKABC.groupCombo->addItem ( Kopete::Group::topLevel()->displayName() ); - - foreach ( Kopete::Group *group, groups ) - { -@@ -1434,7 +1414,6 @@ void KopeteWindow::showAddContactDialog ( Kopete::Account * account ) - if ( !groupname.isEmpty() ) - { - groupItems.insert ( groupname, group ); -- ui_groupKABC.groupCombo->addItem ( groupname ); - } - } - -@@ -1451,8 +1430,6 @@ void KopeteWindow::showAddContactDialog ( Kopete::Account * account ) - if ( addContactPage->validateData() ) - { - Kopete::MetaContact * metacontact = new Kopete::MetaContact(); -- metacontact->addToGroup ( groupItems[ ui_groupKABC.groupCombo->currentText() ] ); -- metacontact->setKabcId ( ui_groupKABC.widAddresseeLink->uid() ); - if ( addContactPage->apply ( account, metacontact ) ) - { - Kopete::ContactList::self()->addMetaContact ( metacontact ); -diff --git a/kopete/kopetewindow.h b/kopete/kopetewindow.h -index 974b27572..d4cedb3b8 100644 ---- a/kopete/kopetewindow.h -+++ b/kopete/kopetewindow.h -@@ -171,11 +171,6 @@ private slots: - */ - void showAddContactDialog( Kopete::Account * ); - -- /** -- * Show the Export Contacts wizards -- */ -- void showExportDialog(); -- - /** - * Enable the Connect All and Disconnect All buttons here - * along with connecting the accountRegistered and accountUnregistered -diff --git a/libkopete/CMakeLists.txt b/libkopete/CMakeLists.txt -index c1df84378..f899810c8 100644 ---- a/libkopete/CMakeLists.txt -+++ b/libkopete/CMakeLists.txt -@@ -40,10 +40,6 @@ endif (Q_WS_WIN) - set(kopete_ui_SRCS - ui/accountselector.cpp - ui/addcontactpage.cpp -- ui/addressbooklinkwidget.cpp -- ui/addressbookselectordialog.cpp -- ui/addressbookselectorwidget.cpp -- ui/addresseeitem.cpp - ui/avatardialog.cpp - ui/avatarwebcamdialog.cpp - ui/avatarselectorwidget.cpp -@@ -79,7 +75,6 @@ set(kopete_LIB_SRCS - ${kopete_ui_SRCS} - ${kopete_contactlist_SRCS} - ${kopete_tasks_SRCS} -- kabcpersistence.cpp - kopeteaccount.cpp - kopeteaccountmanager.cpp - kopeteavatarmanager.cpp -diff --git a/libkopete/contactlist/xmlcontactstorage.cpp b/libkopete/contactlist/xmlcontactstorage.cpp -index 5164b3b69..7830a5102 100644 ---- a/libkopete/contactlist/xmlcontactstorage.cpp -+++ b/libkopete/contactlist/xmlcontactstorage.cpp -@@ -340,9 +340,6 @@ bool XmlContactStorage::parseMetaContact( Kopete::MetaContact *metaContact, cons - // custom photo, used for custom photo source - metaContact->setPhoto( KUrl(contactElement.text()) ); - -- bool photoSyncedWithKABC = (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("1")) || (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("true")); -- metaContact->setPhotoSyncedWithKABC( photoSyncedWithKABC ); -- - // retrieve deprecated data (now stored in property-sources) - // save temporarely, we will find a Contact* with this later - if ( contactElement.hasAttribute(PSCID_ELEM) && contactElement.hasAttribute(PSPID_ELEM) && contactElement.hasAttribute(PSAID_ELEM)) -@@ -450,7 +447,7 @@ bool XmlContactStorage::parseMetaContact( Kopete::MetaContact *metaContact, cons - { - // lets do the best conversion for the old name tracking - // if the custom display name is the same as kabc name, set the source to kabc -- if ( !metaContact->kabcId().isEmpty() && ( metaContact->customDisplayName() == nameFromKABC( metaContact->kabcId() )) ) -+ if ( !metaContact->kabcId().isEmpty() ) - metaContact->setDisplayNameSource( Kopete::MetaContact::SourceKABC ); - else - metaContact->setDisplayNameSource( Kopete::MetaContact::SourceCustom ); -@@ -466,7 +463,7 @@ bool XmlContactStorage::parseMetaContact( Kopete::MetaContact *metaContact, cons - } - else - { -- if ( !metaContact->kabcId().isEmpty() && !photoFromKABC( metaContact->kabcId() ).isNull() ) -+ if ( !metaContact->kabcId().isEmpty() ) - metaContact->setPhotoSource( Kopete::MetaContact::SourceKABC ); - else - metaContact->setPhotoSource( Kopete::MetaContact::SourceCustom ); -@@ -705,9 +702,6 @@ const QDomElement XmlContactStorage::storeMetaContact( Kopete::MetaContact *meta - // set the contact source for photo - _photoSource.setAttribute( QString::fromUtf8("source"), sourceToString( metaContact->photoSource() ) ); - -- if( !metaContact->kabcId().isEmpty() ) -- photo.setAttribute( QString::fromUtf8("syncWithKABC") , QString::fromUtf8( metaContact->isPhotoSyncedWithKABC() ? "true" : "false" ) ); -- - if( metaContact->photoSourceContact() ) - { - //kDebug(14010) << "serializing photo source " << nameFromContact(photoSourceContact()); -diff --git a/libkopete/kopeteaccount.cpp b/libkopete/kopeteaccount.cpp -index e6e7669a9..61f60d872 100644 ---- a/libkopete/kopeteaccount.cpp -+++ b/libkopete/kopeteaccount.cpp -@@ -42,7 +42,6 @@ - - #include "kopeteidentity.h" - #include "kopeteidentitymanager.h" --#include "kabcpersistence.h" - #include "kopetecontactlist.h" - #include "kopeteaccountmanager.h" - #include "kopetecontact.h" -@@ -392,11 +391,6 @@ Kopete::MetaContact* Account::addContact( const QString &contactId, const QStrin - if ( c ) - { - c->setMetaContact( parentContact ); -- if ( mode == ChangeKABC ) -- { -- kDebug( 14010 ) << " changing KABC"; -- KABCPersistence::self()->write( parentContact ); -- } - } - else - { -@@ -453,12 +447,6 @@ bool Account::addContact(const QString &contactId , MetaContact *parent, AddMode - - const bool success = createContact(contactId, parent); - -- if ( success && mode == ChangeKABC ) -- { -- kDebug( 14010 ) << " changing KABC"; -- KABCPersistence::self()->write( parent ); -- } -- - return success; - } - -diff --git a/libkopete/kopetecontact.cpp b/libkopete/kopetecontact.cpp -index 670fba008..7bb5e182b 100644 ---- a/libkopete/kopetecontact.cpp -+++ b/libkopete/kopetecontact.cpp -@@ -28,7 +28,6 @@ - #include - #include - --#include - #include - #include - #include -@@ -448,10 +447,6 @@ void Contact::setMetaContact( MetaContact *m ) - { - m->addContact( this ); - connect( m, SIGNAL(destroyed(QObject*)), this, SLOT(slotMetaContactDestroyed(QObject*)) ); -- // it is necessary to call this write here, because MetaContact::addContact() does not differentiate -- // between adding completely new contacts (which should be written to kabc) and restoring upon restart -- // (where no write is needed). -- KABCPersistence::self()->write( m ); - } - sync(); - } -diff --git a/libkopete/kopetecontactlist.cpp b/libkopete/kopetecontactlist.cpp -index fade2ea29..221d5ad56 100644 ---- a/libkopete/kopetecontactlist.cpp -+++ b/libkopete/kopetecontactlist.cpp -@@ -27,7 +27,6 @@ - #include - - // KDE includes --#include - #include - #include - #include -@@ -434,16 +433,6 @@ void ContactList::slotSaveLater() - d->saveTimer->start( 17100 /* 17,1 seconds */ ); - } - --void ContactList::slotKABCChanged() --{ -- // TODO: react to changes in KABC, replacing this function, post 3.4 (Will) -- // call syncWithKABC on each metacontact to check if its associated kabc entry has changed. --/* for ( MetaContact * mc = d->contacts.first(); mc; mc = d->contacts.next() ) -- -- mc->syncWithKABC();*/ --} -- -- - } //END namespace Kopete - - #include "kopetecontactlist.moc" -diff --git a/libkopete/kopetecontactlist.h b/libkopete/kopetecontactlist.h -index abfb8a15f..8313757ea 100644 ---- a/libkopete/kopetecontactlist.h -+++ b/libkopete/kopetecontactlist.h -@@ -266,10 +266,6 @@ private slots: - * Called when the contact list changes. Flags the list dirty and schedules a save for a little while later. - */ - void slotSaveLater(); -- /** -- * Called on contact list load or when KABC has changed, to check if we need to update our contact list from there. -- */ -- void slotKABCChanged(); - - private: - /** -diff --git a/libkopete/kopetemetacontact.cpp b/libkopete/kopetemetacontact.cpp -index da9b92bf5..ef181a4ef 100644 ---- a/libkopete/kopetemetacontact.cpp -+++ b/libkopete/kopetemetacontact.cpp -@@ -23,16 +23,12 @@ - - #include - --#include --#include -- - #include - #include - #include - #include - #include - --#include "kabcpersistence.h" - #include "kopetecontactlist.h" - #include "kopetecontact.h" - #include "kopeteaccountmanager.h" -@@ -62,10 +58,6 @@ MetaContact::MetaContact() - connect( this, SIGNAL(contactAdded(Kopete::Contact*)), SIGNAL(persistentDataChanged()) ); - connect( this, SIGNAL(contactRemoved(Kopete::Contact*)), SIGNAL(persistentDataChanged()) ); - -- // TODO: speed up: this slot is called when any kabc contact is changed and is called in *every* metacontact instance. also slot is slow because it finding kabc id -- // Update the KABC picture when the KDE Address book change. -- connect(KABCPersistence::self()->addressBook(), SIGNAL(addressBookChanged(AddressBook*)), this, SLOT(slotUpdateAddressBookPicture())); -- - // make sure MetaContact is at least in one group - addToGroup( Group::topLevel() ); - // I'm not sure this is correct -Olivier -@@ -242,7 +234,6 @@ void MetaContact::removeContact(Contact *c, bool deleted) - - kDebug( 14010 ) << "Contact disconnected"; - -- KABCPersistence::self()->write( this ); - } - - // Reparent the contact -@@ -668,14 +659,7 @@ QString MetaContact::customDisplayName() const - QString MetaContact::displayName() const - { - PropertySource source = displayNameSource(); -- if ( source == SourceKABC ) -- { -- // kabc source, try to get from addressbook -- // if the metacontact has a kabc association -- if ( !kabcId().isEmpty() ) -- return nameFromKABC(kabcId()); -- } -- else if ( source == SourceContact || d->displayName.isEmpty()) -+ if ( source == SourceContact || d->displayName.isEmpty()) - { - if ( d->displayNameSourceContact==0 ) - { -@@ -697,25 +681,6 @@ QString MetaContact::displayName() const - return d->displayName; - } - --QString nameFromKABC( const QString &id ) /*const*/ --{ -- KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); -- if ( ! id.isEmpty() && !id.contains(':') ) -- { -- KABC::Addressee theAddressee = ab->findByUid(id); -- if ( theAddressee.isEmpty() ) -- { -- kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book"; -- } -- else -- { -- return theAddressee.formattedName(); -- } -- } -- // no kabc association, return null image -- return QString(); --} -- - QString nameFromContact( Kopete::Contact *c) /*const*/ - { - if ( !c ) -@@ -787,36 +752,6 @@ QImage photoFromContact( Kopete::Contact *contact) /*const*/ - return img; - } - --QImage photoFromKABC( const QString &id ) /*const*/ --{ -- KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); -- if ( ! id.isEmpty() && !id.contains(':') ) -- { -- KABC::Addressee theAddressee = ab->findByUid(id); -- if ( theAddressee.isEmpty() ) -- { -- kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book"; -- } -- else -- { -- KABC::Picture pic = theAddressee.photo(); -- if ( pic.data().isNull() && pic.url().isEmpty() ) -- pic = theAddressee.logo(); -- -- if ( pic.isIntern()) -- { -- return pic.data(); -- } -- else -- { -- return QPixmap( pic.url() ).toImage(); -- } -- } -- } -- // no kabc association, return null image -- return QImage(); --} -- - Contact *MetaContact::displayNameSourceContact() const - { - return d->displayNameSourceContact; -@@ -926,9 +861,6 @@ void MetaContact::slotPropertyChanged( PropertyContainer* _subcontact, const QSt - } - else if(photoSourceContact() == subcontact) - { -- if(d->photoSyncedWithKABC) -- setPhotoSyncedWithKABC(true); -- - setPhotoSourceContact(subcontact); - } - } -@@ -1120,28 +1052,6 @@ void MetaContact::slotAllPluginsLoaded() - setPhotoSourceContact( findContact( d->photoSourcePID, d->photoSourceAID, d->photoSourceCID) ); - } - --void MetaContact::slotUpdateAddressBookPicture() --{ -- KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); -- QString id = kabcId(); -- if ( !id.isEmpty() && !id.contains(':') ) -- { -- KABC::Addressee theAddressee = ab->findByUid(id); -- if ( theAddressee.isEmpty() ) -- { -- kDebug( 14010 ) << "no KABC::Addressee found for ( " << id << " ) " << " in current address book"; -- } -- else -- { -- KABC::Picture pic = theAddressee.photo(); -- if ( pic.data().isNull() && pic.url().isEmpty() ) -- pic = theAddressee.logo(); -- -- d->kabcPicture.setPicture(pic); -- } -- } --} -- - bool MetaContact::isTemporary() const - { - return d->temporary; -@@ -1197,84 +1107,14 @@ void MetaContact::setKabcId( const QString& newKabcId ) - d->kabcId = newKabcId; - if ( loading() ) - { -- // TODO: speed up: this slot is called in *every* metacontact instance and is slow because it finding kabc id -- slotUpdateAddressBookPicture(); - } - else - { -- KABCPersistence::self()->write( this ); - emit onlineStatusChanged( this, d->onlineStatus ); - emit persistentDataChanged(); - } - } - --bool MetaContact::isPhotoSyncedWithKABC() const --{ -- return d->photoSyncedWithKABC; --} -- --void MetaContact::setPhotoSyncedWithKABC(bool b) --{ -- d->photoSyncedWithKABC=b; -- if( b && !loading() ) -- { -- QVariant newValue; -- -- switch( photoSource() ) -- { -- case SourceContact: -- { -- Contact *source = photoSourceContact(); -- if(source != 0L) -- newValue = source->property( Kopete::Global::Properties::self()->photo() ).value(); -- break; -- } -- case SourceCustom: -- { -- if( !d->customPicture.isNull() ) -- newValue = d->customPicture.path(); -- break; -- } -- // Don't sync the photo with KABC if the source is KABC ! -- default: -- return; -- } -- -- if ( !d->kabcId.isEmpty() && !newValue.isNull()) -- { -- KABC::Addressee theAddressee = KABCPersistence::self()->addressBook()->findByUid( kabcId() ); -- -- if ( !theAddressee.isEmpty() ) -- { -- QImage img; -- if(newValue.canConvert( QVariant::Image )) -- img=newValue.value(); -- else if(newValue.canConvert( QVariant::Pixmap )) -- img=newValue.value().toImage(); -- -- if(img.isNull()) -- { -- // Some protocols like MSN save the photo as a url in -- // contact properties, we should not use this url -- // to sync with kabc but try first to embed the -- // photo data in the kabc addressee, because it could -- // be remote resource and the local url makes no sense -- QImage fallBackImage = QImage(newValue.toString()); -- if(fallBackImage.isNull()) -- theAddressee.setPhoto(newValue.toString()); -- else -- theAddressee.setPhoto(fallBackImage); -- } -- else -- theAddressee.setPhoto(img); -- -- KABCPersistence::self()->addressBook()->insertAddressee(theAddressee); -- KABCPersistence::self()->writeAddressBook( theAddressee.resource() ); -- } -- -- } -- } --} - - QList MetaContact::contacts() const - { -diff --git a/libkopete/kopetemetacontact.h b/libkopete/kopetemetacontact.h -index 55b202d57..80613ec64 100644 ---- a/libkopete/kopetemetacontact.h -+++ b/libkopete/kopetemetacontact.h -@@ -64,7 +64,6 @@ class KOPETE_EXPORT MetaContact : public ContactListElement - Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) - //Q_PROPERTY( ulong idleTime READ idleTime ) - Q_PROPERTY( QUuid metaContactId READ metaContactId WRITE setMetaContactId ) -- Q_PROPERTY( bool photoSyncedWithKABC READ isPhotoSyncedWithKABC WRITE setPhotoSyncedWithKABC ) - - public: - typedef QList List; -@@ -275,19 +274,6 @@ public: - */ - void setPhotoSourceContact( Contact* contact ); - -- /** -- * @return true if when a subcontact change his photo, the photo will be set to the kabc contact. -- */ -- bool isPhotoSyncedWithKABC() const; -- -- /** -- * Set if the photo should be synced with the adressbook when the photosource change his photo -- * -- * If \p b is true, the photo will be synced immediately if possible -- */ -- void setPhotoSyncedWithKABC(bool b); -- -- - /** - * Temporary contacts will not be serialized. - * If they are added to the contact list, they appears in a special "Not in your contact list" group. -@@ -601,11 +587,6 @@ private slots: - */ - void slotContactDestroyed( Kopete::Contact* ); - -- /** -- * Update the KABC Picture when the addressbook is changed. -- */ -- void slotUpdateAddressBookPicture(); -- - protected: - //QImage photoFromContact( Kopete::Contact *c) const; - //QImage photoFromKABC( const QString &id ) const; -@@ -622,9 +603,7 @@ private: - - // util functions shared with metacontact property dialog - KOPETE_EXPORT QImage photoFromContact( Kopete::Contact *c) /*const*/; --KOPETE_EXPORT QImage photoFromKABC( const QString &id ) /*const*/; - KOPETE_EXPORT QString nameFromContact( Kopete::Contact *c) /*const*/; --KOPETE_EXPORT QString nameFromKABC( const QString &id ) /*const*/; - - } //END namespace Kopete - -diff --git a/libkopete/kopetepicture.cpp b/libkopete/kopetepicture.cpp -index c84ab34d2..c5c0e143b 100644 ---- a/libkopete/kopetepicture.cpp -+++ b/libkopete/kopetepicture.cpp -@@ -18,8 +18,6 @@ - - #include - --#include -- - #include - #include - #include -@@ -56,12 +54,6 @@ Picture::Picture(const QImage &image) - setPicture(image); - } - --Picture::Picture(const KABC::Picture &picture) -- : d(new Private) --{ -- setPicture(picture); --} -- - Picture::Picture(const Picture &other) - : d(other.d) - {} -@@ -172,19 +164,6 @@ void Picture::setPicture(const QString &path) - d->pictureBase64.clear(); - } - --void Picture::setPicture(const KABC::Picture &picture) --{ -- // No need to call detach() here because setPicture will do it. -- if ( picture.isIntern()) -- { -- setPicture( picture.data() ); -- } -- else -- { -- setPicture( picture.url() ); -- } --} -- - void Picture::detach() - { - // there is no detach in KSharedPtr. -diff --git a/libkopete/ui/addressbooklinkwidget.h b/libkopete/ui/addressbooklinkwidget.h -index ddb17156d..c33395f60 100644 ---- a/libkopete/ui/addressbooklinkwidget.h -+++ b/libkopete/ui/addressbooklinkwidget.h -@@ -24,7 +24,6 @@ - #ifndef ADDRESSBOOKLINKWIDGET_H - #define ADDRESSBOOKLINKWIDGET_H - --#include - #include - - #include "ui_addressbooklinkwidget_base.h" -@@ -47,10 +46,6 @@ Q_OBJECT - public: - explicit AddressBookLinkWidget( QWidget * parent = 0, const char * name = 0 ); - ~AddressBookLinkWidget() {} -- /** -- * Set the currently selected addressee -- */ -- void setAddressee( const KABC::Addressee& addr ); - /** - * Set the current metacontact so that the selector dialog may be preselected - */ -@@ -60,11 +55,7 @@ public: - */ - QString uid() const; - signals: -- /** -- * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. -- */ -- void addresseeChanged( const KABC::Addressee& addr ); -- -+ - /** - * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. - * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal -diff --git a/libkopete/ui/contactaddednotifydialog.cpp b/libkopete/ui/contactaddednotifydialog.cpp -index e5724c42e..d8432e8f8 100644 ---- a/libkopete/ui/contactaddednotifydialog.cpp -+++ b/libkopete/ui/contactaddednotifydialog.cpp -@@ -26,16 +26,12 @@ - #include - #include - --#include -- - #include "kopetegroup.h" - #include "kopeteaccount.h" - #include "kopeteuiglobal.h" - #include "kopeteprotocol.h" - #include "kopetecontactlist.h" - #include "kopetemetacontact.h" --#include "addressbooklinkwidget.h" --#include "addressbookselectordialog.h" - #include "ui_contactaddednotifywidget.h" - - namespace Kopete { -@@ -99,7 +95,6 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, - } - d->widget->m_groupList->setEditText(QString()); //default to top-level - -- connect( d->widget->widAddresseeLink, SIGNAL(addresseeChanged(KABC::Addressee)), this, SLOT(slotAddresseeSelected(KABC::Addressee)) ); - connect( d->widget->m_infoButton, SIGNAL(clicked()), this, SLOT(slotInfoClicked()) ); - - connect( this, SIGNAL(okClicked()) , this , SLOT(slotFinished())); -@@ -146,19 +141,9 @@ MetaContact *ContactAddedNotifyDialog::addContact() const - if(!metacontact) - return 0L; - -- metacontact->setKabcId(d->addressbookId); -- - return metacontact; - } - --void ContactAddedNotifyDialog::slotAddresseeSelected( const KABC::Addressee & addr ) --{ -- if ( !addr.isEmpty() ) -- { -- d->addressbookId = addr.uid(); -- } --} -- - void ContactAddedNotifyDialog::slotInfoClicked() - { - emit infoClicked(d->contactId); -diff --git a/libkopete/ui/contactaddednotifydialog.h b/libkopete/ui/contactaddednotifydialog.h -index d0077b160..5bd8c1b7c 100644 ---- a/libkopete/ui/contactaddednotifydialog.h -+++ b/libkopete/ui/contactaddednotifydialog.h -@@ -20,10 +20,6 @@ - #include - #include "kopete_export.h" - --namespace KABC { -- class Addressee; --} -- - namespace Kopete { - - class Group; -@@ -160,7 +156,6 @@ signals: - - - private slots: -- void slotAddresseeSelected( const KABC::Addressee &); - void slotInfoClicked(); - void slotFinished(); - -diff --git a/libkopete/ui/contactaddednotifywidget.ui b/libkopete/ui/contactaddednotifywidget.ui -index a754917e5..69496c437 100644 ---- a/libkopete/ui/contactaddednotifywidget.ui -+++ b/libkopete/ui/contactaddednotifywidget.ui -@@ -196,9 +196,6 @@ Leave it empty if you want to see the contact's nickname as their display name.< - - - -- -- -- - - - -@@ -236,13 +233,6 @@ Leave it empty if you want to see the contact's nickname as their display name.< -
klineedit.h
- 0 - -- -- -- Kopete::UI::AddressBookLinkWidget -- --
addressbooklinkwidget.h
-- 0 -- -
- - KPushButton -diff --git a/protocols/bonjour/bonjoureditaccountwidget.cpp b/protocols/bonjour/bonjoureditaccountwidget.cpp -index 53ee146b5..5b01c5f1e 100644 ---- a/protocols/bonjour/bonjoureditaccountwidget.cpp -+++ b/protocols/bonjour/bonjoureditaccountwidget.cpp -@@ -28,8 +28,6 @@ - #include "bonjourprotocol.h" - #include - #include --#include --#include - - BonjourEditAccountWidget::BonjourEditAccountWidget( QWidget* parent, Kopete::Account* account) - : QWidget( parent ), KopeteEditAccountWidget( account ) -@@ -63,19 +61,6 @@ BonjourEditAccountWidget::BonjourEditAccountWidget( QWidget* parent, Kopete::Acc - names = user.property(KUser::FullName).toString().split(' '); - } - -- // Next try via the default identity -- KPIMIdentities::IdentityManager manager(true); -- const KPIMIdentities::Identity & ident = manager.defaultIdentity(); -- -- if (! ident.isNull()) { -- // Get the full name from identity (only if not available via KUser) -- if ( names.isEmpty() ) -- names = ident.fullName().split(' '); -- -- // Get the email address -- emailAddress = ident.primaryEmailAddress(); -- } -- - // Split the names array into firstName and lastName - if (! names.isEmpty()) { - firstName = names.takeFirst(); diff --git a/nonprism/kopete/kopete-openssl-1.1.patch b/nonprism/kopete/kopete-openssl-1.1.patch new file mode 100644 index 000000000..1d34e0e5c --- /dev/null +++ b/nonprism/kopete/kopete-openssl-1.1.patch @@ -0,0 +1,307 @@ +diff -ur kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssladapter.cc kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssladapter.cc +--- kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssladapter.cc 2017-09-30 12:08:16.000000000 +0200 ++++ kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssladapter.cc 2018-01-05 22:49:27.805070408 +0100 +@@ -84,6 +84,7 @@ + static int socket_new(BIO* h); + static int socket_free(BIO* data); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + static BIO_METHOD methods_socket = { + BIO_TYPE_BIO, + "socket", +@@ -98,16 +99,40 @@ + }; + + BIO_METHOD* BIO_s_socket2() { return(&methods_socket); } ++#else ++static BIO_METHOD *methods_socket = NULL; ++ ++static const BIO_METHOD * BIO_s_socket2(void) { ++ if (methods_socket == NULL) { ++ methods_socket = BIO_meth_new (BIO_TYPE_BIO | BIO_get_new_index (), "socket"); ++ if (methods_socket == NULL || ++ BIO_meth_set_write (methods_socket, socket_write) || ++ BIO_meth_set_read (methods_socket, socket_read) || ++ BIO_meth_set_puts (methods_socket, socket_puts) || ++ BIO_meth_set_gets (methods_socket, 0) || ++ BIO_meth_set_ctrl (methods_socket, socket_ctrl) || ++ BIO_meth_set_create (methods_socket, socket_new) || ++ BIO_meth_set_destroy (methods_socket, socket_free)) ++ return NULL; ++ } ++ return methods_socket; ++} ++#endif + + BIO* BIO_new_socket(talk_base::AsyncSocket* socket) { ++ const BIO_METHOD *socket2 = BIO_s_socket2(); ++ if (socket2 == NULL) { ++ return NULL; ++ } +- BIO* ret = BIO_new(BIO_s_socket2()); ++ BIO* ret = BIO_new(socket2); + if (ret == NULL) { + return NULL; + } +- ret->ptr = socket; ++ BIO_set_data(ret, socket); + return ret; + } + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + static int socket_new(BIO* b) { + b->shutdown = 0; + b->init = 1; +@@ -115,6 +136,14 @@ + b->ptr = 0; + return 1; + } ++#else ++static int socket_new(BIO* b) { ++ BIO_set_shutdown(b, 0); ++ BIO_set_init(b, 1); ++ BIO_set_data(b, 0); ++ return 1; ++} ++#endif + + static int socket_free(BIO* b) { + if (b == NULL) +@@ -125,13 +154,11 @@ + static int socket_read(BIO* b, char* out, int outl) { + if (!out) + return -1; +- talk_base::AsyncSocket* socket = static_cast(b->ptr); ++ talk_base::AsyncSocket* socket = static_cast(BIO_get_data(b)); + BIO_clear_retry_flags(b); + int result = socket->Recv(out, outl); + if (result > 0) { + return result; +- } else if (result == 0) { +- b->num = 1; + } else if (socket->IsBlocking()) { + BIO_set_retry_read(b); + } +@@ -141,7 +168,7 @@ + static int socket_write(BIO* b, const char* in, int inl) { + if (!in) + return -1; +- talk_base::AsyncSocket* socket = static_cast(b->ptr); ++ talk_base::AsyncSocket* socket = static_cast(BIO_get_data(b)); + BIO_clear_retry_flags(b); + int result = socket->Send(in, inl); + if (result > 0) { +@@ -164,7 +191,6 @@ + case BIO_CTRL_RESET: + return 0; + case BIO_CTRL_EOF: +- return b->num; + case BIO_CTRL_WPENDING: + case BIO_CTRL_PENDING: + return 0; +@@ -696,7 +722,9 @@ + // We assign this to a local variable, instead of passing the address + // directly to ASN1_item_d2i. + // See http://readlist.com/lists/openssl.org/openssl-users/0/4761.html. +- unsigned char* ext_value_data = extension->value->data; ++ ASN1_OCTET_STRING *extension_data = X509_EXTENSION_get_data(extension); ++ unsigned char* ext_value_data = extension_data->data; ++ long length = extension_data->length; + + #if OPENSSL_VERSION_NUMBER >= 0x0090800fL + const unsigned char **ext_value_data_ptr = +@@ -707,10 +735,10 @@ + + if (meth->it) { + ext_str = ASN1_item_d2i(NULL, ext_value_data_ptr, +- extension->value->length, ++ length, + ASN1_ITEM_ptr(meth->it)); + } else { +- ext_str = meth->d2i(NULL, ext_value_data_ptr, extension->value->length); ++ ext_str = meth->d2i(NULL, ext_value_data_ptr, length); + } + + STACK_OF(CONF_VALUE)* value = meth->i2v(meth, ext_str, NULL); +diff -ur kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssldigest.cc kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssldigest.cc +--- kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssldigest.cc 2017-09-30 12:08:16.000000000 +0200 ++++ kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssldigest.cc 2018-01-05 22:49:27.869069361 +0100 +@@ -32,16 +32,16 @@ + namespace talk_base { + + OpenSSLDigest::OpenSSLDigest(const std::string& algorithm) { +- EVP_MD_CTX_init(&ctx_); ++ EVP_MD_CTX_init(ctx_); + if (GetDigestEVP(algorithm, &md_)) { +- EVP_DigestInit_ex(&ctx_, md_, NULL); ++ EVP_DigestInit_ex(ctx_, md_, NULL); + } else { + md_ = NULL; + } + } + + OpenSSLDigest::~OpenSSLDigest() { +- EVP_MD_CTX_cleanup(&ctx_); ++ EVP_MD_CTX_destroy(ctx_); + } + + size_t OpenSSLDigest::Size() const { +@@ -55,7 +55,7 @@ + if (!md_) { + return; + } +- EVP_DigestUpdate(&ctx_, buf, len); ++ EVP_DigestUpdate(ctx_, buf, len); + } + + size_t OpenSSLDigest::Finish(void* buf, size_t len) { +@@ -63,8 +63,8 @@ + return 0; + } + unsigned int md_len; +- EVP_DigestFinal_ex(&ctx_, static_cast(buf), &md_len); +- EVP_DigestInit_ex(&ctx_, md_, NULL); // prepare for future Update()s ++ EVP_DigestFinal_ex(ctx_, static_cast(buf), &md_len); ++ EVP_DigestInit_ex(ctx_, md_, NULL); // prepare for future Update()s + ASSERT(md_len == Size()); + return md_len; + } +diff -ur kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssldigest.h kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssldigest.h +--- kopete-17.08.3/protocols/jabber/libjingle/talk/base/openssldigest.h 2017-09-30 12:08:16.000000000 +0200 ++++ kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/openssldigest.h 2018-01-05 22:49:27.869069361 +0100 +@@ -55,7 +55,7 @@ + size_t* len); + + private: +- EVP_MD_CTX ctx_; ++ EVP_MD_CTX* ctx_ = EVP_MD_CTX_create(); + const EVP_MD* md_; + }; + +diff -ur kopete-17.08.3/protocols/jabber/libjingle/talk/base/opensslidentity.cc kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/opensslidentity.cc +--- kopete-17.08.3/protocols/jabber/libjingle/talk/base/opensslidentity.cc 2017-09-30 12:08:16.000000000 +0200 ++++ kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/opensslidentity.cc 2018-01-05 22:49:27.867069394 +0100 +@@ -169,7 +169,12 @@ + } + + void OpenSSLKeyPair::AddReference() { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + CRYPTO_add(&pkey_->references, 1, CRYPTO_LOCK_EVP_PKEY); ++#else ++ EVP_PKEY_up_ref(pkey_); ++#endif ++ + } + + #ifdef _DEBUG +@@ -275,7 +280,11 @@ + } + + void OpenSSLCertificate::AddReference() { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + CRYPTO_add(&x509_->references, 1, CRYPTO_LOCK_X509); ++#else ++ X509_up_ref(x509_); ++#endif + } + + OpenSSLIdentity* OpenSSLIdentity::Generate(const std::string& common_name) { +diff -ur kopete-17.08.3/protocols/jabber/libjingle/talk/base/opensslstreamadapter.cc kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/opensslstreamadapter.cc +--- kopete-17.08.3/protocols/jabber/libjingle/talk/base/opensslstreamadapter.cc 2017-09-30 12:08:16.000000000 +0200 ++++ kopete-17.08.3-openssl-1.1/protocols/jabber/libjingle/talk/base/opensslstreamadapter.cc 2018-01-05 22:49:27.868069378 +0100 +@@ -87,6 +87,7 @@ + static int stream_new(BIO* h); + static int stream_free(BIO* data); + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + static BIO_METHOD methods_stream = { + BIO_TYPE_BIO, + "stream", +@@ -101,17 +102,37 @@ + }; + + static BIO_METHOD* BIO_s_stream() { return(&methods_stream); } ++#else ++static BIO_METHOD *methods_stream = NULL; ++ ++static const BIO_METHOD * BIO_s_stream(void) { ++ if (methods_stream == NULL) { ++ methods_stream = BIO_meth_new (BIO_TYPE_BIO | BIO_get_new_index (), "stream"); ++ if (methods_stream == NULL || ++ BIO_meth_set_write (methods_stream, stream_write) || ++ BIO_meth_set_read (methods_stream, stream_read) || ++ BIO_meth_set_puts (methods_stream, stream_puts) || ++ BIO_meth_set_gets (methods_stream, 0) || ++ BIO_meth_set_ctrl (methods_stream, stream_ctrl) || ++ BIO_meth_set_create (methods_stream, stream_new) || ++ BIO_meth_set_destroy (methods_stream, stream_free)) ++ return NULL; ++ } ++ return methods_stream; ++} ++#endif + + static BIO* BIO_new_stream(StreamInterface* stream) { + BIO* ret = BIO_new(BIO_s_stream()); + if (ret == NULL) + return NULL; +- ret->ptr = stream; ++ BIO_set_data(ret, stream); + return ret; + } + + // bio methods return 1 (or at least non-zero) on success and 0 on failure. + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + static int stream_new(BIO* b) { + b->shutdown = 0; + b->init = 1; +@@ -119,6 +140,14 @@ + b->ptr = 0; + return 1; + } ++#else ++static int stream_new(BIO* b) { ++ BIO_set_shutdown(b, 0); ++ BIO_set_init(b, 1); ++ BIO_set_data(b, 0); ++ return 1; ++} ++#endif + + static int stream_free(BIO* b) { + if (b == NULL) +@@ -129,15 +158,13 @@ + static int stream_read(BIO* b, char* out, int outl) { + if (!out) + return -1; +- StreamInterface* stream = static_cast(b->ptr); ++ StreamInterface* stream = static_cast(BIO_get_data(b)); + BIO_clear_retry_flags(b); + size_t read; + int error; + StreamResult result = stream->Read(out, outl, &read, &error); + if (result == SR_SUCCESS) { + return read; +- } else if (result == SR_EOS) { +- b->num = 1; + } else if (result == SR_BLOCK) { + BIO_set_retry_read(b); + } +@@ -147,7 +174,7 @@ + static int stream_write(BIO* b, const char* in, int inl) { + if (!in) + return -1; +- StreamInterface* stream = static_cast(b->ptr); ++ StreamInterface* stream = static_cast(BIO_get_data(b)); + BIO_clear_retry_flags(b); + size_t written; + int error; +@@ -172,7 +199,6 @@ + case BIO_CTRL_RESET: + return 0; + case BIO_CTRL_EOF: +- return b->num; + case BIO_CTRL_WPENDING: + case BIO_CTRL_PENDING: + return 0; diff --git a/nonprism/kopete/kopete-pthread-link.patch b/nonprism/kopete/kopete-pthread-link.patch deleted file mode 100644 index d917fe65e..000000000 --- a/nonprism/kopete/kopete-pthread-link.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/protocols/jabber/libjingle/CMakeLists.txt b/protocols/jabber/libjingle/CMakeLists.txt -index 7ea8c3eb6..4b73085b8 100644 ---- a/protocols/jabber/libjingle/CMakeLists.txt -+++ b/protocols/jabber/libjingle/CMakeLists.txt -@@ -288,6 +288,7 @@ set ( call_LIBS - ${MEDIASTREAMER_LIBRARIES} - ${LIBORTP_LIBRARY} - ${CMAKE_DL_LIBS} -+ pthread - ) - - if ( NOT WIN32 ) diff --git a/nonprism/kopete/kopete-srtp2.patch b/nonprism/kopete/kopete-srtp2.patch new file mode 100644 index 000000000..710bb7306 --- /dev/null +++ b/nonprism/kopete/kopete-srtp2.patch @@ -0,0 +1,154 @@ +diff --git a/cmake/modules/FindSRTP.cmake b/cmake/modules/FindSRTP.cmake +index 4e8baa827..ce9033497 100644 +--- a/cmake/modules/FindSRTP.cmake ++++ b/cmake/modules/FindSRTP.cmake +@@ -11,8 +11,8 @@ include ( FindPackageHandleStandardArgs ) + if ( SRTP_INCLUDE_DIR AND SRTP_LIBRARY ) + set ( SRTP_FOUND true ) + else ( SRTP_INCLUDE_DIR AND SRTP_LIBRARY ) +- find_path ( SRTP_INCLUDE_DIR srtp.h PATH_SUFFIXES srtp ) +- find_library ( SRTP_LIBRARY NAMES srtp ) ++ find_path ( SRTP_INCLUDE_DIR srtp.h PATH_SUFFIXES srtp srtp2 ) ++ find_library ( SRTP_LIBRARY NAMES srtp srtp2 ) + + if ( SRTP_INCLUDE_DIR AND SRTP_LIBRARY ) + set ( SRTP_FOUND true ) +diff --git a/protocols/jabber/libjingle/talk/session/phone/srtpfilter.cc b/protocols/jabber/libjingle/talk/session/phone/srtpfilter.cc +index 7a1cb7866..f5363a36a 100644 +--- a/protocols/jabber/libjingle/talk/session/phone/srtpfilter.cc ++++ b/protocols/jabber/libjingle/talk/session/phone/srtpfilter.cc +@@ -416,7 +416,7 @@ bool SrtpSession::ProtectRtp(void* p, int in_len, int max_len, int* out_len) { + } + int seq_num; + GetRtpSeqNum(p, in_len, &seq_num); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_WARNING) << "Failed to protect SRTP packet, seqnum=" + << seq_num << ", err=" << err << ", last seqnum=" + << last_send_seq_num_; +@@ -442,7 +442,7 @@ bool SrtpSession::ProtectRtcp(void* p, int in_len, int max_len, int* out_len) { + *out_len = in_len; + int err = srtp_protect_rtcp(session_, p, out_len); + srtp_stat_->AddProtectRtcpResult(err); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_WARNING) << "Failed to protect SRTCP packet, err=" << err; + return false; + } +@@ -461,7 +461,7 @@ bool SrtpSession::UnprotectRtp(void* p, int in_len, int* out_len) { + if (GetRtpSsrc(p, in_len, &ssrc)) { + srtp_stat_->AddUnprotectRtpResult(ssrc, err); + } +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_WARNING) << "Failed to unprotect SRTP packet, err=" << err; + return false; + } +@@ -477,7 +477,7 @@ bool SrtpSession::UnprotectRtcp(void* p, int in_len, int* out_len) { + *out_len = in_len; + int err = srtp_unprotect_rtcp(session_, p, out_len); + srtp_stat_->AddUnprotectRtcpResult(err); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_WARNING) << "Failed to unprotect SRTCP packet, err=" << err; + return false; + } +@@ -504,11 +504,11 @@ bool SrtpSession::SetKey(int type, const std::string& cs, + memset(&policy, 0, sizeof(policy)); + + if (cs == CS_AES_CM_128_HMAC_SHA1_80) { +- crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtp); +- crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); ++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtp); ++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); + } else if (cs == CS_AES_CM_128_HMAC_SHA1_32) { +- crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy.rtp); // rtp is 32, +- crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); // rtcp still 80 ++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy.rtp); // rtp is 32, ++ srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80(&policy.rtcp); // rtcp still 80 + } else { + LOG(LS_WARNING) << "Failed to create SRTP session: unsupported" + << " cipher_suite " << cs.c_str(); +@@ -520,7 +520,7 @@ bool SrtpSession::SetKey(int type, const std::string& cs, + return false; + } + +- policy.ssrc.type = static_cast(type); ++ policy.ssrc.type = static_cast(type); + policy.ssrc.value = 0; + policy.key = const_cast(key); + // TODO parse window size from WSH session-param +@@ -529,7 +529,7 @@ bool SrtpSession::SetKey(int type, const std::string& cs, + policy.next = NULL; + + int err = srtp_create(&session_, &policy); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_ERROR) << "Failed to create SRTP session, err=" << err; + return false; + } +@@ -543,13 +543,13 @@ bool SrtpSession::Init() { + if (!inited_) { + int err; + err = srtp_init(); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_ERROR) << "Failed to init SRTP, err=" << err; + return false; + } + + err = srtp_install_event_handler(&SrtpSession::HandleEventThunk); +- if (err != err_status_ok) { ++ if (err != srtp_err_status_ok) { + LOG(LS_ERROR) << "Failed to install SRTP event handler, err=" << err; + return false; + } +@@ -652,10 +652,10 @@ void SrtpStat::AddProtectRtpResult(uint32 ssrc, int result) { + key.ssrc = ssrc; + key.mode = SrtpFilter::PROTECT; + switch (result) { +- case err_status_ok: ++ case srtp_err_status_ok: + key.error = SrtpFilter::ERROR_NONE; + break; +- case err_status_auth_fail: ++ case srtp_err_status_auth_fail: + key.error = SrtpFilter::ERROR_AUTH; + break; + default: +@@ -669,14 +669,14 @@ void SrtpStat::AddUnprotectRtpResult(uint32 ssrc, int result) { + key.ssrc = ssrc; + key.mode = SrtpFilter::UNPROTECT; + switch (result) { +- case err_status_ok: ++ case srtp_err_status_ok: + key.error = SrtpFilter::ERROR_NONE; + break; +- case err_status_auth_fail: ++ case srtp_err_status_auth_fail: + key.error = SrtpFilter::ERROR_AUTH; + break; +- case err_status_replay_fail: +- case err_status_replay_old: ++ case srtp_err_status_replay_fail: ++ case srtp_err_status_replay_old: + key.error = SrtpFilter::ERROR_REPLAY; + break; + default: +diff --git a/protocols/jabber/libjingle/talk/session/phone/srtpfilter.h b/protocols/jabber/libjingle/talk/session/phone/srtpfilter.h +index 991d4bf42..ff4e5070f 100644 +--- a/protocols/jabber/libjingle/talk/session/phone/srtpfilter.h ++++ b/protocols/jabber/libjingle/talk/session/phone/srtpfilter.h +@@ -39,11 +39,7 @@ + #include "talk/session/phone/cryptoparams.h" + #include "talk/p2p/base/sessiondescription.h" + +-// Forward declaration to avoid pulling in libsrtp headers here +-struct srtp_event_data_t; +-struct srtp_ctx_t; +-typedef srtp_ctx_t* srtp_t; +-struct srtp_policy_t; ++#include "srtp2/srtp.h" + + namespace cricket { + diff --git a/nonprism/kopete/libre-nonprism.patch b/nonprism/kopete/libre-nonprism.patch index 712220546..1655ac573 100644 --- a/nonprism/kopete/libre-nonprism.patch +++ b/nonprism/kopete/libre-nonprism.patch @@ -1,7 +1,7 @@ diff -Nur kopete-14.12.1.orig/doc/index.docbook kopete-14.12.1/doc/index.docbook --- kopete-14.12.1.orig/doc/index.docbook 2014-11-19 21:39:14.000000000 -0200 +++ kopete-14.12.1/doc/index.docbook 2015-01-25 16:44:09.213439141 -0200 -@@ -24,7 +24,6 @@ +@@ -18,7 +18,6 @@ @@ -9,14 +9,12 @@ diff -Nur kopete-14.12.1.orig/doc/index.docbook kopete-14.12.1/doc/index.docbook ]>