diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2017-03-20 18:17:36 +0000 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2017-03-20 18:17:36 +0000 |
commit | c0c21db5397625c0c23620399a2314e05174bd15 (patch) | |
tree | 08088d28840eb2a5680ee4eac1e1a739b427ca90 | |
parent | f1344af987cb6c9fb05dbf56891f5327284def65 (diff) | |
download | FreeBSD-ports-c0c21db5397625c0c23620399a2314e05174bd15.zip FreeBSD-ports-c0c21db5397625c0c23620399a2314e05174bd15.tar.gz |
- Update to 3.3.11
- While here, fix LICENSE and add LICENSE_FILE
PR: 217550
Submitted by: rezny@freebsd.org
Approved by: maintainer timeout (yuri@rawbw.com, 2 weeks)
-rw-r--r-- | net-p2p/qbittorrent/Makefile | 15 | ||||
-rw-r--r-- | net-p2p/qbittorrent/distinfo | 6 | ||||
-rw-r--r-- | net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp | 64 | ||||
-rw-r--r-- | net-p2p/qbittorrent/files/patch-src_base_http_server.cpp | 25 | ||||
-rw-r--r-- | net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp | 33 | ||||
-rw-r--r-- | net-p2p/qbittorrent/pkg-plist | 13 |
6 files changed, 73 insertions, 83 deletions
diff --git a/net-p2p/qbittorrent/Makefile b/net-p2p/qbittorrent/Makefile index fcf2d6b..2834705 100644 --- a/net-p2p/qbittorrent/Makefile +++ b/net-p2p/qbittorrent/Makefile @@ -2,15 +2,15 @@ # $FreeBSD$ PORTNAME= qbittorrent -PORTVERSION= 3.3.10 -PORTREVISION= 1 +PORTVERSION= 3.3.11 CATEGORIES= net-p2p ipv6 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= yuri@rawbw.com COMMENT?= Bittorrent client using Qt4/5 and libtorrent-rasterbar -LICENSE= GPLv2 +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libtorrent-rasterbar.so:net-p2p/libtorrent-rasterbar \ libboost_system.so:devel/boost-libs @@ -58,15 +58,6 @@ USE_${OPTION_QT}+= dbus CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -post-patch: -.if ${PORT_OPTIONS:MQT4} - ${REINPLACE_CMD} 's,^\$$QT_QMAKE,${LOCALBASE}/bin/qmake-qt4,' \ - ${WRKSRC}/${CONFIGURE_SCRIPT} -.else - ${REINPLACE_CMD} 's,^\$$QT_QMAKE,${LOCALBASE}/lib/qt5/bin/qmake,' \ - ${WRKSRC}/${CONFIGURE_SCRIPT} -.endif - post-install: .if ${WITH_GUI} == "yes" @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent diff --git a/net-p2p/qbittorrent/distinfo b/net-p2p/qbittorrent/distinfo index 8984a39..ef6eec5 100644 --- a/net-p2p/qbittorrent/distinfo +++ b/net-p2p/qbittorrent/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1482707995 -SHA256 (qbittorrent-3.3.10.tar.xz) = 2c657ceacdc84033da044a0a9ecba7e0fdb35858324dc097546f989166f1a8d2 -SIZE (qbittorrent-3.3.10.tar.xz) = 2959380 +TIMESTAMP = 1488638509 +SHA256 (qbittorrent-3.3.11.tar.xz) = 4892ac5ed4bde2ed325fb67456698e703bb933b9eb1d146598259f4e2154a760 +SIZE (qbittorrent-3.3.11.tar.xz) = 2986312 diff --git a/net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp b/net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp deleted file mode 100644 index 91ef012..0000000 --- a/net-p2p/qbittorrent/files/patch-src_base_bittorrent_session.cpp +++ /dev/null @@ -1,64 +0,0 @@ -Revert the following commit until libtorrent 1.1.2 is released: - -From 729c80f9104a3d01ec724351bd6910b4b8d14c6c Mon Sep 17 00:00:00 2001 -From: sledgehammer999 <hammered999@gmail.com> -Date: Mon, 31 Oct 2016 02:31:56 +0200 -Subject: [PATCH] Use new libtorrent 1.1.2+ utility function to generate client - ID instead. - ---- src/base/bittorrent/session.cpp.orig 2016-12-17 18:02:06 UTC -+++ src/base/bittorrent/session.cpp -@@ -45,6 +45,7 @@ - #include <QTimer> - - #include <cstdlib> -+#include <sstream> - #include <queue> - #include <vector> - -@@ -194,6 +195,36 @@ namespace - - template <typename T> - LowerLimited<T> lowerLimited(T limit, T ret) { return LowerLimited<T>(limit, ret); } -+ -+#if LIBTORRENT_VERSION_NUM >= 10100 -+ std::string makeFingerprint(const char* peerId, int major, int minor, int revision, int tag) -+ { -+ Q_ASSERT(peerId); -+ Q_ASSERT(major >= 0); -+ Q_ASSERT(minor >= 0); -+ Q_ASSERT(revision >= 0); -+ Q_ASSERT(tag >= 0); -+ Q_ASSERT(std::strlen(peerId) == 2); -+ -+ auto versionToChar = [](int v) -> char -+ { -+ if (v >= 0 && v < 10) return static_cast<char>('0' + v); -+ if (v >= 10) return static_cast<char>('A' + (v - 10)); -+ Q_ASSERT(false); -+ return '0'; -+ }; -+ -+ std::ostringstream buf; -+ buf << '-' -+ << peerId -+ << versionToChar(major) -+ << versionToChar(minor) -+ << versionToChar(revision) -+ << versionToChar(tag) -+ << '-'; -+ return buf.str(); -+ } -+#endif - } - - // Session -@@ -334,7 +365,7 @@ Session::Session(QObject *parent) - dispatchAlerts(alertPtr.release()); - }); - #else -- std::string peerId = libt::generate_fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD); -+ std::string peerId = makeFingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD); - libt::settings_pack pack; - pack.set_int(libt::settings_pack::alert_mask, alertMask); - pack.set_str(libt::settings_pack::peer_fingerprint, peerId); diff --git a/net-p2p/qbittorrent/files/patch-src_base_http_server.cpp b/net-p2p/qbittorrent/files/patch-src_base_http_server.cpp new file mode 100644 index 0000000..287e8b4 --- /dev/null +++ b/net-p2p/qbittorrent/files/patch-src_base_http_server.cpp @@ -0,0 +1,25 @@ +# Missing header; upstream patch shuffles them a bit +# +--- src/base/http/server.cpp.orig 2017-03-03 23:20:21 UTC ++++ src/base/http/server.cpp +@@ -28,14 +28,18 @@ + * exception statement from your version. + */ + ++#include "server.h" ++ ++#include <QNetworkProxy> ++#include <QStringList> ++ + #ifndef QT_NO_OPENSSL + #include <QSslSocket> + #else + #include <QTcpSocket> + #endif +-#include <QNetworkProxy> ++ + #include "connection.h" +-#include "server.h" + + using namespace Http; + diff --git a/net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp b/net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp index f03a2a6..f401c5b 100644 --- a/net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp +++ b/net-p2p/qbittorrent/files/patch-src_base_utils_string.cpp @@ -1,6 +1,8 @@ -Avoid use of thread local storage on versions prior to which it was supported. - ---- src/base/utils/string.cpp.orig 2016-12-17 18:02:06 UTC +# Avoid use of thread local storage on versions prior to which it was supported. +# +# Qt::escape is part of QtGui, upstream patch replaces it for webui +# +--- src/base/utils/string.cpp.orig 2017-03-03 23:20:21 UTC +++ src/base/utils/string.cpp @@ -37,7 +37,7 @@ #ifdef QBT_USES_QT5 @@ -31,3 +33,28 @@ Avoid use of thread local storage on versions prior to which it was supported. static QThreadStorage<NaturalCompare> nCmp; if (!nCmp.hasLocalData()) nCmp.setLocalData(NaturalCompare(false)); return (nCmp.localData())(left, right); +@@ -217,6 +219,23 @@ QString Utils::String::toHtmlEscaped(con + #ifdef QBT_USES_QT5 + return str.toHtmlEscaped(); + #else +- return Qt::escape(str); ++ // code from Qt ++ QString rich; ++ const int len = str.length(); ++ rich.reserve(int(len * 1.1)); ++ for (int i = 0; i < len; ++i) { ++ if (str.at(i) == QLatin1Char('<')) ++ rich += QLatin1String("<"); ++ else if (str.at(i) == QLatin1Char('>')) ++ rich += QLatin1String(">"); ++ else if (str.at(i) == QLatin1Char('&')) ++ rich += QLatin1String("&"); ++ else if (str.at(i) == QLatin1Char('"')) ++ rich += QLatin1String("""); ++ else ++ rich += str.at(i); ++ } ++ rich.squeeze(); ++ return rich; + #endif + } diff --git a/net-p2p/qbittorrent/pkg-plist b/net-p2p/qbittorrent/pkg-plist index 999ad1d..db2a236 100644 --- a/net-p2p/qbittorrent/pkg-plist +++ b/net-p2p/qbittorrent/pkg-plist @@ -1,16 +1,27 @@ bin/qbittorrent man/man1/qbittorrent.1.gz +share/appdata/qBittorrent.appdata.xml share/applications/qBittorrent.desktop share/icons/hicolor/128x128/apps/qbittorrent.png +share/icons/hicolor/128x128/status/qbittorrent-tray.png share/icons/hicolor/16x16/apps/qbittorrent.png +share/icons/hicolor/16x16/status/qbittorrent-tray.png share/icons/hicolor/192x192/apps/qbittorrent.png +share/icons/hicolor/192x192/status/qbittorrent-tray.png share/icons/hicolor/22x22/apps/qbittorrent.png +share/icons/hicolor/22x22/status/qbittorrent-tray.png share/icons/hicolor/24x24/apps/qbittorrent.png +share/icons/hicolor/24x24/status/qbittorrent-tray.png share/icons/hicolor/32x32/apps/qbittorrent.png +share/icons/hicolor/32x32/status/qbittorrent-tray.png share/icons/hicolor/36x36/apps/qbittorrent.png +share/icons/hicolor/36x36/status/qbittorrent-tray.png share/icons/hicolor/48x48/apps/qbittorrent.png +share/icons/hicolor/48x48/status/qbittorrent-tray.png share/icons/hicolor/64x64/apps/qbittorrent.png +share/icons/hicolor/64x64/status/qbittorrent-tray.png share/icons/hicolor/72x72/apps/qbittorrent.png +share/icons/hicolor/72x72/status/qbittorrent-tray.png share/icons/hicolor/96x96/apps/qbittorrent.png +share/icons/hicolor/96x96/status/qbittorrent-tray.png share/pixmaps/qbittorrent.png -share/appdata/qBittorrent.appdata.xml |