From ccb7c0d579bf124bd096f014732438a936d870e0 Mon Sep 17 00:00:00 2001 From: FranciscoPombal Date: Fri, 11 Jun 2021 17:24:13 +0100 Subject: [PATCH] Raise minimum libtorrent version to 1.2.14 (2.0.4) - Also update vcpkg to latest commit: includes libtorrent 1.2.14, Qt 5.15.2, and Qt 6.1.1 --- .github/workflows/ci.yaml | 4 ++-- CMakeLists.txt | 2 +- INSTALL | 2 +- configure | 19 +++++++++---------- configure.ac | 2 +- src/base/bittorrent/torrentimpl.h | 10 ---------- 6 files changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9d56daebc..60574f109 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,10 +7,10 @@ name: GitHub Actions CI on: [pull_request, push] env: - VCPKG_COMMIT: 8f03e2264da6b95fa5b01dd89cdd5b499458d428 + VCPKG_COMMIT: c5ac711fefa6cacbd6bb6335349e36a765babf87 VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg VCPKG_DEST_WIN: C:\qbt_tools\vcpkg - LIBTORRENT_VERSION_TAG: v1.2.13 + LIBTORRENT_VERSION_TAG: v1.2.14 jobs: diff --git a/CMakeLists.txt b/CMakeLists.txt index 588cade5e..f390c33f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) set(minBoostVersion 1.65) set(minQtVersion 5.14) set(minOpenSSLVersion 1.1.1) -set(minLibtorrentVersion 1.2.13) +set(minLibtorrentVersion 1.2.14) set(minZlibVersion 1.2.11) # features (some are platform-specific) diff --git a/INSTALL b/INSTALL index 13b07b763..6c6b7a3c1 100644 --- a/INSTALL +++ b/INSTALL @@ -5,7 +5,7 @@ qBittorrent - A BitTorrent client in C++ / Qt - Boost >= 1.65 - - libtorrent-rasterbar >= 1.2.13 (by Arvid Norberg) + - libtorrent-rasterbar >= 1.2.14 (by Arvid Norberg) * https://www.libtorrent.org/ * Be careful: another library (the one used by rTorrent) uses a similar name diff --git a/configure b/configure index f58b66aac..2d4980fcd 100755 --- a/configure +++ b/configure @@ -6039,12 +6039,12 @@ if test -n "$libtorrent_CFLAGS"; then pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.13\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.13") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.13" 2>/dev/null` + pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.14" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6056,12 +6056,12 @@ if test -n "$libtorrent_LIBS"; then pkg_cv_libtorrent_LIBS="$libtorrent_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.13\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.13") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.13" 2>/dev/null` + pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.14" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6082,14 +6082,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.13" 2>&1` + libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14" 2>&1` else - libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.13" 2>&1` + libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libtorrent_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.13) were not met: + as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.14) were not met: $libtorrent_PKG_ERRORS @@ -7845,4 +7845,3 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Good, the configure finished." >&5 printf "%s\n" "$as_me: Good, the configure finished." >&6;} printf "%s\n" - diff --git a/configure.ac b/configure.ac index 14eca7223..8f2064243 100644 --- a/configure.ac +++ b/configure.ac @@ -176,7 +176,7 @@ AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [], [QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"]) PKG_CHECK_MODULES(libtorrent, - [libtorrent-rasterbar >= 1.2.13], + [libtorrent-rasterbar >= 1.2.14], [CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"]) diff --git a/src/base/bittorrent/torrentimpl.h b/src/base/bittorrent/torrentimpl.h index 7fd3fad22..6299f2096 100644 --- a/src/base/bittorrent/torrentimpl.h +++ b/src/base/bittorrent/torrentimpl.h @@ -51,16 +51,6 @@ #include "torrent.h" #include "torrentinfo.h" -#if (LIBTORRENT_VERSION_NUM == 20003) -// file_prio_alert is missing to be forward declared in "libtorrent/fwd.hpp" -namespace libtorrent -{ - TORRENT_VERSION_NAMESPACE_3 - struct file_prio_alert; - TORRENT_VERSION_NAMESPACE_3_END -} -#endif - namespace BitTorrent { class Session;