From db464f25fec54ddfa7825a17b20fda025c296f8c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Apr 2011 04:58:41 +0000 Subject: Thu Apr 7 04:58:41 UTC 2011 --- extra/kdepim/PKGBUILD | 16 +++++-- extra/kdepim/asynchronous-start.patch | 87 +++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 extra/kdepim/asynchronous-start.patch (limited to 'extra/kdepim') diff --git a/extra/kdepim/PKGBUILD b/extra/kdepim/PKGBUILD index 7f70930ed..6fc1fd302 100644 --- a/extra/kdepim/PKGBUILD +++ b/extra/kdepim/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 107973 2011-01-28 08:28:57Z andrea $ +# $Id: PKGBUILD 118254 2011-04-06 08:33:32Z andrea $ # Maintainer: Andrea Scarpino # Contributor: Pierre Schmitz @@ -21,18 +21,23 @@ pkgname=('kdepim-akonadiconsole' 'kdepim-libkdepim' 'kdepim-wizards') pkgver=4.4.10 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url='http://www.kde.org' license=('GPL' 'LGPL' 'FDL') groups=('kde' 'kdepim') makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'kdepim-runtime' 'libxss' 'pilot-link' 'kde-agent' 'docbook-xsl') -source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2") -sha1sums=('b9c45e80dddc3bff201df6ddd76fdf4f1f18d5c3') +source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2" + 'asynchronous-start.patch') +sha1sums=('b9c45e80dddc3bff201df6ddd76fdf4f1f18d5c3' + '3816d618026b85500a21753395712cd91de6e31b') build() { - cd ${srcdir} + cd ${srcdir}/${pkgbase}-${pkgver} + patch -Np1 -i ${srcdir}/asynchronous-start.patch + + cd ${srcdir} mkdir build cd build cmake ../${pkgbase}-${pkgver} \ @@ -136,6 +141,7 @@ package_kdepim-kmail() { 'kdepim-mimelib' 'kdepim-plugins') replaces=('kdepim-kmailcvt' 'kdepim-ksendemail' 'kdepim-libksieve' 'kdepim-mimelib' 'kdepim-plugins') + optdepends=('cyrus-sasl-plugins: CRAM-MD5 authentication') for i in kmail doc/kmail mimelib libksieve plugins/kmail ksendemail \ kmailcvt ontologies kontact/plugins/kmail; do cd $srcdir/build/${i} diff --git a/extra/kdepim/asynchronous-start.patch b/extra/kdepim/asynchronous-start.patch new file mode 100644 index 000000000..bc014116c --- /dev/null +++ b/extra/kdepim/asynchronous-start.patch @@ -0,0 +1,87 @@ +commit cfa404b7188e4c26bddbc9579728f6d25f8cd214 +Author: Stephen Kelly +Date: Tue Apr 5 11:09:43 2011 +0200 + + Start kdepim 4.4 asynchronously if built against 4.6. + + The synchronous mechanism doesn't have enough time to start + before it reports failure. + +diff --git a/kaddressbook/main.cpp b/kaddressbook/main.cpp +index 4c8ca42..200f8ec 100644 +--- a/kaddressbook/main.cpp ++++ b/kaddressbook/main.cpp +@@ -49,11 +49,13 @@ int main( int argc, char **argv ) + MainWindow *window = new MainWindow; + window->show(); + ++#if !KDE_IS_VERSION(4,6,0) + if ( !Akonadi::Control::start( window ) ) { + //TODO: add message box after string freeze + kWarning() << "Unable to start Akonadi server, exit application"; + return 1; + } ++#endif + + return app.exec(); + } +diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp +index a31973a..10b14e4 100644 +--- a/kmail/kmmainwidget.cpp ++++ b/kmail/kmmainwidget.cpp +@@ -165,6 +165,9 @@ using KMail::TemplateParser; + + #include // ugh + ++#include ++#include ++ + #include "kmmainwidget.moc" + + K_GLOBAL_STATIC( KMMainWidget::PtrList, theMainWidgetList ) +@@ -186,6 +189,10 @@ KMMainWidget::KMMainWidget( QWidget *parent, KXMLGUIClient *aGUIClient, + mVacationIndicatorActive( false ), + mGoToFirstUnreadMessageInSelectedFolder( false ) + { ++#if KDE_IS_VERSION(4,6,0) ++ Akonadi::Control::widgetNeedsAkonadi(this); ++ Akonadi::ServerManager::start(); ++#endif + // must be the first line of the constructor: + mStartupDone = false; + mWasEverShown = false; +diff --git a/kmail/main.cpp b/kmail/main.cpp +index f39ca5f..c2dd1c3 100644 +--- a/kmail/main.cpp ++++ b/kmail/main.cpp +@@ -145,12 +145,14 @@ int main(int argc, char *argv[]) + app.setEventLoopReached(); + app.delayedInstanceCreation(); + ++#if !KDE_IS_VERSION(4,6,0) + // Start Akonadi + if ( !Akonadi::Control::start( kmkernel->getKMMainWidget() ) ) { + //TODO: add message box after string freeze + kWarning() << "Unable to start Akonadi server, exit application"; + return 1; + } ++#endif + + // Go! + int ret = qApp->exec(); +diff --git a/kontact/src/main.cpp b/kontact/src/main.cpp +index 356aa57..cb4a235 100644 +--- a/kontact/src/main.cpp ++++ b/kontact/src/main.cpp +@@ -199,9 +199,11 @@ int main( int argc, char **argv ) + + KontactApp app; + ++#if !KDE_IS_VERSION(4,6,0) + // KDE 4.4: do akonadi startup before creating any window, since creating + // the window loads kmail. In 4.5 we'll do this startup async instead. + Akonadi::Control::start( 0 ); ++#endif + + // Qt doesn't treat the system tray as a window, and therefore Qt would quit + // the event loop when an error message is clicked away while Kontact is in the -- cgit v1.2.3-54-g00ecf