[kdenetwork] drop libktorrent_stable patch only for > f14

nucleo nucleo at fedoraproject.org
Fri Dec 31 16:01:09 UTC 2010


commit e9ce39df3e761844a6d04c2228302a70ccfa1635
Author: nucleo <nucleo at fedoraproject.org>
Date:   Fri Dec 31 18:00:52 2010 +0200

    drop libktorrent_stable patch only for > f14

 kdenetwork-4.5.90-libktorrent_stable.patch |   23 +++++++++++++++++++++++
 kdenetwork.spec                            |   17 +++++++++++++++--
 2 files changed, 38 insertions(+), 2 deletions(-)
---
diff --git a/kdenetwork-4.5.90-libktorrent_stable.patch b/kdenetwork-4.5.90-libktorrent_stable.patch
new file mode 100644
index 0000000..1debdcb
--- /dev/null
+++ b/kdenetwork-4.5.90-libktorrent_stable.patch
@@ -0,0 +1,23 @@
+diff -up kdenetwork-4.5.90/kget/transfer-plugins/bittorrent/bttransferfactory.cpp.libktorrent-stable kdenetwork-4.5.90/kget/transfer-plugins/bittorrent/bttransferfactory.cpp
+--- kdenetwork-4.5.90/kget/transfer-plugins/bittorrent/bttransferfactory.cpp.libktorrent-stable	2010-12-10 09:18:46.000000000 -0600
++++ kdenetwork-4.5.90/kget/transfer-plugins/bittorrent/bttransferfactory.cpp	2010-12-22 13:28:59.147503625 -0600
+@@ -19,7 +19,6 @@
+ #include "advanceddetails/btadvanceddetailswidget.h"
+ 
+ #include <kdebug.h>
+-#include <util/functions.h>
+ #include <version.h>
+ #include <torrent/job.h>
+ 
+@@ -28,11 +27,6 @@ KGET_EXPORT_PLUGIN(BTTransferFactory)
+ BTTransferFactory::BTTransferFactory(QObject *parent, const QVariantList &args)
+   : TransferFactory(parent, args)
+ {
+-    if (!bt::InitLibKTorrent())
+-    {
+-        kError(5001) << "Failed to initialize libktorrent";
+-        KGet::showNotification(0, "error", i18n("Cannot initialize libktorrent. Torrent support might not work."));
+-    }
+ #if LIBKTORRENT_VERSION >= 0x010100
+     bt::Job::setJobTracker(new BTJobTracker(this));
+ #endif
diff --git a/kdenetwork.spec b/kdenetwork.spec
index 1fca7c0..6060e18 100644
--- a/kdenetwork.spec
+++ b/kdenetwork.spec
@@ -2,7 +2,7 @@ Summary: KDE Network Applications
 Name:    kdenetwork
 Epoch:   7
 Version: 4.5.90
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv2
 Group: Applications/Internet
@@ -19,6 +19,12 @@ Patch1: kdenetwork-4.2.98-kdrc-icon.patch
 # rhbz#540433 - KPPP is unable to add DNS entries to /etc/resolv.conf
 Patch2: kdenetwork-4.3.3-resolv-conf-path.patch
 
+# fix build against libktorrent-1.0.4
+# FIXME/TODO: Drop this if we upgrade libktorrent to >= 1.1!
+# not upstreamable in its current state since libktorrent trunk needs the
+# initialization this patch unconditionally removes
+Patch3: kdenetwork-4.5.90-libktorrent_stable.patch
+
 ## upstream patches
 
 ## security patches
@@ -39,7 +45,7 @@ BuildRequires: gmp-devel
 BuildRequires: gpgme-devel
 BuildRequires: kdepimlibs-devel >= %{version}
 BuildRequires: libidn-devel
-BuildRequires: libktorrent-devel >= 1.1
+BuildRequires: libktorrent-devel
 BuildRequires: libmsn-devel >= 4.1
 ## TODO
 #BuildRequires: libnxcl-devel
@@ -111,6 +117,10 @@ Requires: kdelibs4-devel
 %patch1 -p1 -b .icon
 %patch2 -p1 -b .resolv-conf-path
 
+# drop patch for > f14
+%if 0%{?fedora} < 15
+%patch3 -p1 -b .libktorrent-stable
+%endif
 
 %build
 mkdir -p %{_target_platform}
@@ -215,6 +225,9 @@ fi
 
 
 %changelog
+* Fri Dec 31 2010 Alexey Kurov <nucleo at fedoraproject.org> 7:4.5.90-3
+- drop libktorrent_stable patch only for > f14
+
 * Thu Dec 30 2010 Alexey Kurov <nucleo at fedoraproject.org> 7:4.5.90-2
 - rebuild for libktorrent-1.1beta1
 - drop libktorrent_stable patch


More information about the scm-commits mailing list