Accepting request 520877 from KDE:Distro:Factory

1

OBS-URL: https://build.opensuse.org/request/show/520877
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libktorrent?expand=0&rev=39
This commit is contained in:
Dominique Leuenberger 2017-09-08 18:43:44 +00:00 committed by Git OBS Bridge
parent fd12da6417
commit edac77531e
6 changed files with 115 additions and 50 deletions

View File

@ -1,26 +0,0 @@
From: Martin T. H. Sandsmark <martin.sandsmark@kde.org>
Date: Thu, 06 Oct 2016 21:43:46 +0000
Subject: Fix logging framework spamming
X-Git-Url: http://quickgit.kde.org/?p=libktorrent.git&a=commitdiff&h=a65d69e68ad860601c23bc7d4dadbded10a81072
---
Fix logging framework spamming
3945a53ba65125b430e1f681deb2558d01ab052a forced the logging framework to
always print all log information (including debug logs) to standard out,
this makes it respect the to_stdout again.
BUG: 362195
---
--- a/src/util/log.cpp
+++ b/src/util/log.cpp
@@ -276,7 +276,7 @@
void InitLog(const QString & file,bool rotate,bool handle_qt_messages,bool to_stdout)
{
global_log->setOutputFile(file,rotate,handle_qt_messages);
- global_log->setOutputToConsole(true);
+ global_log->setOutputToConsole(to_stdout);
}
void AddLogMonitor(LogMonitorInterface* m)

View File

@ -0,0 +1,83 @@
From bcb17b62ff492a7bc7d65c59a5b0a3513199c65d Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wbauer@tmo.at>
Date: Thu, 31 Aug 2017 18:52:26 +0200
Subject: Fix build with Qt 5.6 or lower
qAsConst() is only available since Qt 5.7.0, but the specified minimum
Qt version is 5.2.0.
This partially reverts commit d671f62febfe2bedeae9c427c58a02675dabd9cb
in case of building with a lower Qt version to avoid the usage of
qAsConst() and make it compile.
Differential Revision: https://phabricator.kde.org/D7634
---
src/upnp/upnprouter.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/upnp/upnprouter.cpp b/src/upnp/upnprouter.cpp
index f51ebcd..5ae95b0 100644
--- a/src/upnp/upnprouter.cpp
+++ b/src/upnp/upnprouter.cpp
@@ -155,7 +155,11 @@ namespace bt
void UPnPRouter::addService(const UPnPService& s)
{
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+ foreach(const UPnPService& os, d->services)
+#else
for (const UPnPService& os : qAsConst(d->services))
+#endif
{
if(s.servicetype == os.servicetype)
return;
@@ -205,7 +209,11 @@ namespace bt
bool found = false;
Out(SYS_PNP | LOG_NOTICE) << "Forwarding port " << port.number << " (" << (port.proto == UDP ? "UDP" : "TCP") << ")" << endl;
// first find the right service
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+ foreach(const UPnPService& s, d->services)
+#else
for (const UPnPService& s : qAsConst(d->services))
+#endif
{
if(s.servicetype.contains("WANIPConnection") || s.servicetype.contains("WANPPPConnection"))
{
@@ -375,7 +383,11 @@ namespace bt
void UPnPRouter::visit(UPnPRouter::Visitor* visitor) const
{
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+ foreach(const Forwarding& fwd, d->fwds)
+#else
for (const Forwarding& fwd : qAsConst(d->fwds))
+#endif
{
visitor->forwarding(fwd.port, fwd.pending_req != 0, fwd.service);
}
@@ -391,7 +403,11 @@ namespace bt
UPnPRouter::UPnPRouterPrivate::~UPnPRouterPrivate()
{
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+ foreach(HTTPRequest* r, active_reqs)
+#else
for (HTTPRequest* r : qAsConst(active_reqs))
+#endif
{
r->deleteLater();
}
@@ -515,7 +531,11 @@ namespace bt
void UPnPRouter::UPnPRouterPrivate::getExternalIP()
{
+#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
+ foreach(const UPnPService& s, services)
+#else
for (const UPnPService& s : qAsConst(services))
+#endif
{
if(s.servicetype.contains("WANIPConnection") || s.servicetype.contains("WANPPPConnection"))
{
--
cgit v0.11.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c70d9ee11a1ac95145284e2ab9aec689df21b7462f389389b8d54f892a273f42
size 676304

3
libktorrent-2.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3eefdcceec73410c558e82d7be22eb2ed18679e9ab64f34cc100b54e186fe26f
size 355476

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sat Sep 2 09:20:11 UTC 2017 - wbauer@tmo.at
- Update to version 2.1.0
- Update build requirements
- Add fix-build-with-qt5.6.patch to fix build with Qt 5.6 or lower
- Drop Fix-logging-framework-spamming.patch, merged upstream
-------------------------------------------------------------------
Sat Feb 11 23:00:32 UTC 2017 - jengelh@inai.de

View File

@ -16,10 +16,10 @@
#
%define ktor_ver 5.0
%define ktor_ver 5.1
Name: libktorrent
Version: 2.0.1
Version: 2.1
Release: 0
%define sonum 6
Summary: Torrent Downloading Library
@ -29,8 +29,8 @@ Url: http://ktorrent.org/
Source0: http://download.kde.org/stable/ktorrent/%{ktor_ver}/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE require-lower-LibGMP.patch
Patch0: require-lower-LibGMP.patch
# PATCH-FIX-UPSTREAM Fix-logging-framework-spamming.patch
Patch1: Fix-logging-framework-spamming.patch
# PATCH-FIX-UPSTREAM fix-build-with-qt5.6.patch
Patch1: fix-build-with-qt5.6.patch
%if 0%{?suse_version} > 1325
BuildRequires: libboost_headers-devel
%else
@ -40,16 +40,16 @@ BuildRequires: doxygen
BuildRequires: extra-cmake-modules
BuildRequires: gmp-devel >= 5.1.3
BuildRequires: karchive-devel
BuildRequires: kdelibs4support-devel
BuildRequires: kcrash-devel
BuildRequires: ki18n-devel
BuildRequires: kio-devel
BuildRequires: libgcrypt-devel
BuildRequires: libqca-qt5-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: solid-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -64,23 +64,23 @@ Requires: libboost_headers-devel
Requires: boost-devel
%endif
Requires: gmp-devel
Requires: libktorrent%{sonum} = %{version}
Requires: libKF5Torrent%{sonum} = %{version}
Requires: libqca-qt5-devel
%description devel
This package includes the necessary files for development using libktorrent.
%package -n libktorrent%{sonum}
%package -n libKF5Torrent%{sonum}
Summary: Torrent Downloading Library
Group: System/Libraries
Recommends: libktorrent%{sonum}-lang = %{version}
Recommends: %{name}-lang = %{version}
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libktorrent%{sonum}
%description -n libKF5Torrent%{sonum}
libktorrent is a torrent downloading library.
%lang_package -n libktorrent%{sonum}
%lang_package
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
@ -93,24 +93,24 @@ libktorrent is a torrent downloading library.
%install
%kf5_makeinstall -C build
%find_lang %{name}
%find_lang libktorrent5 %{name}.lang
%post -n libktorrent%{sonum} -p /sbin/ldconfig
%post -n libKF5Torrent%{sonum} -p /sbin/ldconfig
%postun -n libktorrent%{sonum} -p /sbin/ldconfig
%postun -n libKF5Torrent%{sonum} -p /sbin/ldconfig
%files devel
%defattr(-,root,root,-)
%{_includedir}/libktorrent/
%{_libdir}/libktorrent.so
%{_libdir}/cmake/LibKTorrent/
%{_kf5_includedir}/libktorrent/
%{_kf5_libdir}/libKF5Torrent.so
%{_kf5_cmakedir}/KF5Torrent/
%files -n libktorrent%{sonum}
%files -n libKF5Torrent%{sonum}
%defattr(-,root,root,-)
%doc COPYING ChangeLog RoadMap
%{_libdir}/libktorrent.so.%{sonum}*
%{_kf5_libdir}/libKF5Torrent.so.%{sonum}*
%files -n libktorrent%{sonum}-lang -f %{name}.lang
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%changelog