[arch-commits] Commit in kdegraphics/trunk (PKGBUILD fix-libkipi-crash.patch)

Tobias Powalowski tpowa at archlinux.org
Wed Nov 24 11:58:57 UTC 2010


    Date: Wednesday, November 24, 2010 @ 06:58:57
  Author: tpowa
Revision: 100588

upgpkg: kdegraphics 4.5.3-2
fix digikam crash in libkipi

Added:
  kdegraphics/trunk/fix-libkipi-crash.patch
Modified:
  kdegraphics/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   11 +++--
 fix-libkipi-crash.patch |  101 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-11-24 10:30:57 UTC (rev 100587)
+++ PKGBUILD	2010-11-24 11:58:57 UTC (rev 100588)
@@ -13,7 +13,7 @@
          'kdegraphics-libs'
          'kdegraphics-okular')
 pkgver=4.5.3
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url='http://www.kde.org'
 license=('GPL' 'LGPL' 'FDL')
@@ -21,10 +21,13 @@
 makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-runtime' 'poppler-qt'
 	'libspectre' 'sane' 'chmlib' 'djvulibre' 'lcms' 'qimageblitz' 'ebook-tools'
 	'libxxf86vm' 'docbook-xsl')
-source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
-sha1sums=('94b0fd60dd5018d97861810acdc1b4614b218dfa')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+        "fix-libkipi-crash.patch")
 
 build() {
+        # fix #21603
+        cd ${srcdir}/${pkgbase}-${pkgver}
+        patch -Np4 -i ../fix-libkipi-crash.patch
 	cd ${srcdir}
 	mkdir build
 	cd build
@@ -141,3 +144,5 @@
 	install -D -m644 $srcdir/${pkgbase}-${pkgver}/cmake/modules/FindOkular.cmake \
 		$pkgdir/usr/share/apps/cmake/modules/FindOkular.cmake
 }
+md5sums=('b5542bfaf9fb43775c48e2950ae05a9c'
+         '63b44e09604e2e095f2d81eb3dcb7a56')

Added: fix-libkipi-crash.patch
===================================================================
--- fix-libkipi-crash.patch	                        (rev 0)
+++ fix-libkipi-crash.patch	2010-11-24 11:58:57 UTC (rev 100588)
@@ -0,0 +1,101 @@
+--- branches/KDE/4.5/kdegraphics/libs/libkipi/libkipi/pluginloader.cpp	2010/06/27 18:59:06	1143427
++++ branches/KDE/4.5/kdegraphics/libs/libkipi/libkipi/pluginloader.cpp	2010/11/09 08:30:14	1194513
+@@ -168,9 +168,16 @@
+ QIcon PluginLoader::Info::icon() const
+ {
+     if(d->m_service->icon().isEmpty() && d->m_plugin)
+-        return QIcon(d->m_plugin->actions()[0]->icon());
++    {
++        if (d->m_plugin->actions()[0])
++            return d->m_plugin->actions()[0]->icon();
++        else
++            return QIcon();
++    }
+     else
++    {
+         return KIcon(d->m_service->icon());
++    }
+ }
+ 
+ Plugin* PluginLoader::Info::plugin() const
+@@ -178,7 +185,7 @@
+     if ( !d->m_plugin && shouldLoad() )
+     {
+         QString error;
+-        Plugin *plugin = d->m_service->createInstance<Plugin>(PluginLoader::instance()->interface(), QVariantList(), &error);
++        Plugin* plugin = d->m_service->createInstance<Plugin>(PluginLoader::instance()->interface(), QVariantList(), &error);
+         if (plugin)
+         {
+             kDebug( 51001 ) << "KIPI::PluginLoader: Loaded plugin " << plugin->objectName() << endl;
+@@ -191,25 +198,25 @@
+                               << " with error: "
+                               << error;
+         }
+-        d->m_plugin=plugin;
+-        
++        d->m_plugin = plugin;
++
+         if ( d->m_plugin ) // Do not emit if we had trouble loading the plugin.
+             emit PluginLoader::instance()->plug( const_cast<Info*>(this) );
+     }
+-    
++
+     return d->m_plugin;
+ }
+ 
+ void PluginLoader::Info::reload()
+ {
+     delete d->m_plugin;
+-    d->m_plugin=0;
++    d->m_plugin = 0;
+ }
+ 
+ void PluginLoader::Info::setPlugin(Plugin* plugin)
+ {
+     delete d->m_plugin;
+-    d->m_plugin=plugin;
++    d->m_plugin = plugin;
+ }
+ 
+ bool PluginLoader::Info::shouldLoad() const
+@@ -219,7 +226,7 @@
+ 
+ void PluginLoader::Info::setShouldLoad(bool value)
+ {
+-    d->m_shouldLoad=value;
++    d->m_shouldLoad = value;
+ }
+ 
+ //---------------------------------------------------------------------
+@@ -254,6 +261,7 @@
+ void PluginLoader::construct( const QStringList& ignores, Interface* interface, const QString& constraint )
+ {
+     Q_ASSERT( s_instance == 0 );
++
+     s_instance                  = this;
+     d->m_interface              = interface;
+     const KService::List offers = KServiceTypeTrader::self()->query("KIPI/Plugin", constraint);
+@@ -338,7 +346,6 @@
+     return d->m_interface;
+ }
+ 
+-
+ //---------------------------------------------------------------------
+ 
+ ConfigWidget* PluginLoader::configWidget(QWidget* parent)
+@@ -358,6 +365,7 @@
+         setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
+         setCheckState(info->shouldLoad() ? Qt::Checked : Qt::Unchecked);
+     }
++
+     PluginLoader::Info* info;
+ };
+ 
+@@ -412,6 +420,7 @@
+                 emit PluginLoader::instance()->unplug( (*it)->info); 
+         }
+     }
++
+     emit PluginLoader::instance()->replug();
+ }
+ 




More information about the arch-commits mailing list