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

(-)net-p2p/qbittorrent/Makefile (-11 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	qbittorrent
4
PORTNAME=	qbittorrent
5
PORTVERSION=	3.3.10
5
PORTVERSION=	3.3.11
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
Lines 58-72 Link Here
58
57
59
CONFIGURE_ARGS+=	CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
58
CONFIGURE_ARGS+=	CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
60
59
61
post-patch:
62
.if ${PORT_OPTIONS:MQT4}
63
	${REINPLACE_CMD} 's,^\$$QT_QMAKE,${LOCALBASE}/bin/qmake-qt4,' \
64
		${WRKSRC}/${CONFIGURE_SCRIPT}
65
.else
66
	${REINPLACE_CMD} 's,^\$$QT_QMAKE,${LOCALBASE}/lib/qt5/bin/qmake,' \
67
		${WRKSRC}/${CONFIGURE_SCRIPT}
68
.endif
69
70
post-install:
60
post-install:
71
.if ${WITH_GUI} == "yes"
61
.if ${WITH_GUI} == "yes"
72
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent
62
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent
(-)net-p2p/qbittorrent/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1482707995
1
TIMESTAMP = 1488638509
2
SHA256 (qbittorrent-3.3.10.tar.xz) = 2c657ceacdc84033da044a0a9ecba7e0fdb35858324dc097546f989166f1a8d2
2
SHA256 (qbittorrent-3.3.11.tar.xz) = 4892ac5ed4bde2ed325fb67456698e703bb933b9eb1d146598259f4e2154a760
3
SIZE (qbittorrent-3.3.10.tar.xz) = 2959380
3
SIZE (qbittorrent-3.3.11.tar.xz) = 2986312
(-)net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp (-64 lines)
Lines 1-64 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_http_server.cpp (+25 lines)
Line 0 Link Here
1
# Missing header; upstream patch shuffles them a bit
2
#
3
--- src/base/http/server.cpp.orig	2017-03-03 23:20:21 UTC
4
+++ src/base/http/server.cpp
5
@@ -28,14 +28,18 @@
6
  * exception statement from your version.
7
  */
8
 
9
+#include "server.h"
10
+
11
+#include <QNetworkProxy>
12
+#include <QStringList>
13
+
14
 #ifndef QT_NO_OPENSSL
15
 #include <QSslSocket>
16
 #else
17
 #include <QTcpSocket>
18
 #endif
19
-#include <QNetworkProxy>
20
+
21
 #include "connection.h"
22
-#include "server.h"
23
 
24
 using namespace Http;
25
 
(-)net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp (-3 / +30 lines)
Lines 1-6 Link Here
1
Avoid use of thread local storage on versions prior to which it was supported.
1
# Avoid use of thread local storage on versions prior to which it was supported.
2
2
#
3
--- src/base/utils/string.cpp.orig	2016-12-17 18:02:06 UTC
3
# Qt::escape is part of QtGui, upstream patch replaces it for webui
4
#
5
--- src/base/utils/string.cpp.orig	2017-03-03 23:20:21 UTC
4
+++ src/base/utils/string.cpp
6
+++ src/base/utils/string.cpp
5
@@ -37,7 +37,7 @@
7
@@ -37,7 +37,7 @@
6
 #ifdef QBT_USES_QT5
8
 #ifdef QBT_USES_QT5
Lines 31-33 Link Here
31
     static QThreadStorage<NaturalCompare> nCmp;
33
     static QThreadStorage<NaturalCompare> nCmp;
32
     if (!nCmp.hasLocalData()) nCmp.setLocalData(NaturalCompare(false));
34
     if (!nCmp.hasLocalData()) nCmp.setLocalData(NaturalCompare(false));
33
     return (nCmp.localData())(left, right);
35
     return (nCmp.localData())(left, right);
36
@@ -217,6 +219,23 @@ QString Utils::String::toHtmlEscaped(con
37
 #ifdef QBT_USES_QT5
38
     return str.toHtmlEscaped();
39
 #else
40
-    return Qt::escape(str);
41
+    // code from Qt
42
+    QString rich;
43
+    const int len = str.length();
44
+    rich.reserve(int(len * 1.1));
45
+    for (int i = 0; i < len; ++i) {
46
+        if (str.at(i) == QLatin1Char('<'))
47
+            rich += QLatin1String("&lt;");
48
+        else if (str.at(i) == QLatin1Char('>'))
49
+            rich += QLatin1String("&gt;");
50
+        else if (str.at(i) == QLatin1Char('&'))
51
+            rich += QLatin1String("&amp;");
52
+        else if (str.at(i) == QLatin1Char('"'))
53
+            rich += QLatin1String("&quot;");
54
+        else
55
+            rich += str.at(i);
56
+    }
57
+    rich.squeeze();
58
+    return rich;
59
 #endif
60
 }
(-)net-p2p/qbittorrent/pkg-plist (-1 / +12 lines)
Lines 1-16 Link Here
1
bin/qbittorrent
1
bin/qbittorrent
2
man/man1/qbittorrent.1.gz
2
man/man1/qbittorrent.1.gz
3
share/appdata/qBittorrent.appdata.xml
3
share/applications/qBittorrent.desktop
4
share/applications/qBittorrent.desktop
4
share/icons/hicolor/128x128/apps/qbittorrent.png
5
share/icons/hicolor/128x128/apps/qbittorrent.png
6
share/icons/hicolor/128x128/status/qbittorrent-tray.png
5
share/icons/hicolor/16x16/apps/qbittorrent.png
7
share/icons/hicolor/16x16/apps/qbittorrent.png
8
share/icons/hicolor/16x16/status/qbittorrent-tray.png
6
share/icons/hicolor/192x192/apps/qbittorrent.png
9
share/icons/hicolor/192x192/apps/qbittorrent.png
10
share/icons/hicolor/192x192/status/qbittorrent-tray.png
7
share/icons/hicolor/22x22/apps/qbittorrent.png
11
share/icons/hicolor/22x22/apps/qbittorrent.png
12
share/icons/hicolor/22x22/status/qbittorrent-tray.png
8
share/icons/hicolor/24x24/apps/qbittorrent.png
13
share/icons/hicolor/24x24/apps/qbittorrent.png
14
share/icons/hicolor/24x24/status/qbittorrent-tray.png
9
share/icons/hicolor/32x32/apps/qbittorrent.png
15
share/icons/hicolor/32x32/apps/qbittorrent.png
16
share/icons/hicolor/32x32/status/qbittorrent-tray.png
10
share/icons/hicolor/36x36/apps/qbittorrent.png
17
share/icons/hicolor/36x36/apps/qbittorrent.png
18
share/icons/hicolor/36x36/status/qbittorrent-tray.png
11
share/icons/hicolor/48x48/apps/qbittorrent.png
19
share/icons/hicolor/48x48/apps/qbittorrent.png
20
share/icons/hicolor/48x48/status/qbittorrent-tray.png
12
share/icons/hicolor/64x64/apps/qbittorrent.png
21
share/icons/hicolor/64x64/apps/qbittorrent.png
22
share/icons/hicolor/64x64/status/qbittorrent-tray.png
13
share/icons/hicolor/72x72/apps/qbittorrent.png
23
share/icons/hicolor/72x72/apps/qbittorrent.png
24
share/icons/hicolor/72x72/status/qbittorrent-tray.png
14
share/icons/hicolor/96x96/apps/qbittorrent.png
25
share/icons/hicolor/96x96/apps/qbittorrent.png
26
share/icons/hicolor/96x96/status/qbittorrent-tray.png
15
share/pixmaps/qbittorrent.png
27
share/pixmaps/qbittorrent.png
16
share/appdata/qBittorrent.appdata.xml

Return to bug 217550