Skip to content

Commit

Permalink
Raise minimum libtorrent version to 1.2.14 (2.0.4)
Browse files Browse the repository at this point in the history
- Also update vcpkg to latest commit: includes libtorrent 1.2.14,
Qt 5.15.2, and Qt 6.1.1
  • Loading branch information
FranciscoPombal committed Jun 28, 2021
1 parent fd9941e commit ccb7c0d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 9 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down
10 changes: 0 additions & 10 deletions src/base/bittorrent/torrentimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ccb7c0d

Please sign in to comment.