View | Details | Raw Unified | Return to bug 215575
Collapse All | Expand All

(-)net-p2p/qbittorrent/Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	qbittorrent
4
PORTNAME=	qbittorrent
5
PORTVERSION=	3.3.7
5
PORTVERSION=	3.3.10
6
PORTREVISION=	1
7
CATEGORIES=	net-p2p ipv6
6
CATEGORIES=	net-p2p ipv6
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
7
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
9
8
(-)net-p2p/qbittorrent/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1473733537
1
TIMESTAMP = 1482707995
2
SHA256 (qbittorrent-3.3.7.tar.xz) = 72dc824a90fadc0825e6be6f1c215e38f976262c7f83b625061d542b2b664c40
2
SHA256 (qbittorrent-3.3.10.tar.xz) = 2c657ceacdc84033da044a0a9ecba7e0fdb35858324dc097546f989166f1a8d2
3
SIZE (qbittorrent-3.3.7.tar.xz) = 2884792
3
SIZE (qbittorrent-3.3.10.tar.xz) = 2959380
(-)net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp (+64 lines)
Line 0 Link Here
1
Revert the following commit until libtorrent 1.1.2 is released:
2
3
From 729c80f9104a3d01ec724351bd6910b4b8d14c6c Mon Sep 17 00:00:00 2001
4
From: sledgehammer999 <hammered999@gmail.com>
5
Date: Mon, 31 Oct 2016 02:31:56 +0200
6
Subject: [PATCH] Use new libtorrent 1.1.2+ utility function to generate client
7
 ID instead.
8
9
--- src/base/bittorrent/session.cpp.orig	2016-12-17 18:02:06 UTC
10
+++ src/base/bittorrent/session.cpp
11
@@ -45,6 +45,7 @@
12
 #include <QTimer>
13
 
14
 #include <cstdlib>
15
+#include <sstream>
16
 #include <queue>
17
 #include <vector>
18
 
19
@@ -194,6 +195,36 @@ namespace
20
 
21
     template <typename T>
22
     LowerLimited<T> lowerLimited(T limit, T ret) { return LowerLimited<T>(limit, ret); }
23
+
24
+#if LIBTORRENT_VERSION_NUM >= 10100
25
+    std::string makeFingerprint(const char* peerId, int major, int minor, int revision, int tag)
26
+    {
27
+        Q_ASSERT(peerId);
28
+        Q_ASSERT(major >= 0);
29
+        Q_ASSERT(minor >= 0);
30
+        Q_ASSERT(revision >= 0);
31
+        Q_ASSERT(tag >= 0);
32
+        Q_ASSERT(std::strlen(peerId) == 2);
33
+
34
+        auto versionToChar = [](int v) -> char
35
+        {
36
+            if (v >= 0 && v < 10) return static_cast<char>('0' + v);
37
+            if (v >= 10) return static_cast<char>('A' + (v - 10));
38
+            Q_ASSERT(false);
39
+            return '0';
40
+        };
41
+
42
+        std::ostringstream buf;
43
+        buf << '-'
44
+            << peerId
45
+            << versionToChar(major)
46
+            << versionToChar(minor)
47
+            << versionToChar(revision)
48
+            << versionToChar(tag)
49
+            << '-';
50
+        return buf.str();
51
+    }
52
+#endif
53
 }
54
 
55
 // Session
56
@@ -334,7 +365,7 @@ Session::Session(QObject *parent)
57
         dispatchAlerts(alertPtr.release());
58
     });
59
 #else
60
-    std::string peerId = libt::generate_fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD);
61
+    std::string peerId = makeFingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD);
62
     libt::settings_pack pack;
63
     pack.set_int(libt::settings_pack::alert_mask, alertMask);
64
     pack.set_str(libt::settings_pack::peer_fingerprint, peerId);
(-)net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp (-1 / +3 lines)
Lines 1-4 Link Here
1
--- src/base/utils/string.cpp.orig	2016-09-23 15:05:18 UTC
1
Avoid use of thread local storage on versions prior to which it was supported.
2
3
--- src/base/utils/string.cpp.orig	2016-12-17 18:02:06 UTC
2
+++ src/base/utils/string.cpp
4
+++ src/base/utils/string.cpp
3
@@ -37,7 +37,7 @@
5
@@ -37,7 +37,7 @@
4
 #ifdef QBT_USES_QT5
6
 #ifdef QBT_USES_QT5

Return to bug 215575