Skip to content

Commit 5ee8b8f

Browse files
committed
Merge branch 'develop'
2 parents 3a76113 + 556444d commit 5ee8b8f

File tree

306 files changed

+40905
-39918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+40905
-39918
lines changed

3rd/libtorrent-rasterbar/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ set(libtorrent_extensions_include_files
192192

193193
set(libtorrent_aux_include_files
194194
alert_manager.hpp
195-
aligned_storage.hpp
196195
aligned_union.hpp
197196
alloca.hpp
198197
allocating_handler.hpp
@@ -620,7 +619,7 @@ if (WIN32)
620619
debug dbghelp crypt32
621620
)
622621

623-
add_definitions(-D_WIN32_WINNT=0x0601) # target Windows 7 or later
622+
add_definitions(-D_WIN32_WINNT=0x0A00) # target Windows 10 or later
624623

625624
target_compile_definitions(torrent-rasterbar
626625
PUBLIC WIN32_LEAN_AND_MEAN # prevent winsock1 to be included

3rd/libtorrent-rasterbar/ChangeLog

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
2+
2.0.11 released
3+
4+
* validate add_torrent_params::save_path at run-time
5+
* use stricter rules for what filenames are valid on Android
6+
* fix applying IP filter to DHT traffic (HanabishiRecca)
7+
* fix race condition when cancelling requests after becoming a seed
8+
* fix performance bug in the file pool, evicting MRU instead of LRU (HanabishiRecca)
9+
* fix bug where file_progress could sometimes be reported as >100%
10+
* don't hint FADV_RANDOM on posix systems. May improve seeding performance
11+
* allow boost connect while checking resume data if no_verify_files flag is set
12+
* fix BEP-40 peer priority for IPv6
13+
* limit piece size in torrent creator
14+
* fix file pre-allocation when changing file priority (HanabishiRecca)
15+
* fix uTP issue where closing the connection could corrupt the payload
16+
* apply DSCP/TOS to sockets before initiating the TCP connection
17+
* assume copy_file_range() exists on linux (unless old glibc)
18+
* fix issue where set_piece_deadline() did not correctly post read_piece_alert
19+
* fix integer overflow in piece picker
20+
* torrent_status::num_pieces counts pieces passed hash check, as documented
21+
* check settings_pack::max_out_request_queue before performance alert
22+
* add announce_port setting to override the port announced to trackers
23+
124
2.0.10 released
225

326
* allow on_unknown_torrent method in the absence of active torrents (new plugin feature added)
@@ -159,7 +182,7 @@
159182
2.0 released
160183

161184
* dropped dependency on iconv
162-
* deprecate set_file_hash() in torrent creator, as it's superceded by v2 torrents
185+
* deprecate set_file_hash() in torrent creator, as it's superseded by v2 torrents
163186
* deprecate mutable access to info_section in torrent_info
164187
* removed deprecated lazy_entry/lazy_bdecode
165188
* stats_alert deprecated

3rd/libtorrent-rasterbar/Jamfile

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import cast ;
1212

1313
# we need version numbers in the form X.Y.Z in order to trigger the built-in
1414
# support for generating symlinks to the installed library
15-
VERSION = 2.0.10 ;
15+
VERSION = 2.0.11 ;
1616

1717
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
1818
CXXFLAGS = [ modules.peek : CXXFLAGS ] ;
@@ -43,11 +43,7 @@ else
4343
<include>/opt/homebrew/include
4444
;
4545

46-
# the names are decorated in MacPorts.
47-
lib boost_system : : <target-os>darwin <name>boost_system-mt $(boost-lib-search-path)
48-
: : $(boost-include-path) ;
49-
50-
lib boost_system : : <name>boost_system ;
46+
lib boost_system : : <name>boost_system $(boost-lib-search-path) : : $(boost-include-path) ;
5147
}
5248

5349
use-project /try_signal : ./deps/try_signal ;
@@ -68,6 +64,17 @@ rule linking ( properties * )
6864
result += <library>dbghelp ;
6965
}
7066

67+
if <target-os>windows in $(properties)
68+
{
69+
switch [ feature.get-values <windows-version> : $(properties) ]
70+
{
71+
case xp : result += <define>_WIN32_WINNT=0x0501 ;
72+
case vista : result += <define>_WIN32_WINNT=0x0600 ;
73+
case win7 : result += <define>_WIN32_WINNT=0x0601 ;
74+
case win10 : result += <define>_WIN32_WINNT=0x0A00 ;
75+
}
76+
}
77+
7178
# gcrypt libraries, if enabled
7279
if <crypto>gcrypt in $(properties)
7380
{
@@ -176,7 +183,7 @@ rule linking ( properties * )
176183
else if [ version.version-less $(jam-version) : 1990 0 ]
177184
{
178185
# the visibility feature was introduced in boost-1.69. This was close to
179-
# when the verisoning scheme changed from year to (low) version numbers.
186+
# when the versioning scheme changed from year to (low) version numbers.
180187
# in boost-1.70
181188
result += <visibility>hidden ;
182189
}
@@ -346,7 +353,6 @@ rule building ( properties * )
346353
}
347354
}
348355

349-
350356
if <toolset>gcc in $(properties) && <target-os>windows in $(properties)
351357
{
352358
# allow larger .obj files (with more sections)
@@ -578,11 +584,7 @@ feature.compose <asserts>on : <define>TORRENT_USE_ASSERTS=1 ;
578584
feature.compose <asserts>production : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_PRODUCTION_ASSERTS=1 ;
579585
feature.compose <asserts>system : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_USE_SYSTEM_ASSERTS=1 ;
580586

581-
feature windows-version : win7 win10 vista xp : composite propagated ;
582-
feature.compose <windows-version>vista : <define>_WIN32_WINNT=0x0600 ;
583-
feature.compose <windows-version>win7 : <define>_WIN32_WINNT=0x0601 ;
584-
feature.compose <windows-version>win10 : <define>_WIN32_WINNT=0x0A00 ;
585-
feature.compose <windows-version>xp : <define>_WIN32_WINNT=0x0501 ;
587+
feature windows-version : win10 vista xp win7 : composite propagated ;
586588

587589
feature extensions : on off : composite propagated link-incompatible ;
588590
feature.compose <extensions>off : <define>TORRENT_DISABLE_EXTENSIONS ;
@@ -679,6 +681,10 @@ feature export-extra : off on : composite propagated ;
679681
# symbol table reasonably small
680682
feature.compose <export-extra>on : <define>TORRENT_EXPORT_EXTRA ;
681683

684+
feature msvc-version-macro : off on : composite propagated link-incompatible ;
685+
# ask the compiler to correctly set __cplusplus version
686+
feature.compose <msvc-version-macro>on : <cxxflags>/Zc\:__cplusplus ;
687+
682688
lib advapi32 : : <name>advapi32 ;
683689
lib user32 : : <name>user32 ;
684690
lib shell32 : : <name>shell32 ;

3rd/libtorrent-rasterbar/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=2.0.10
1+
VERSION=2.0.11
22

33
BUILD_CONFIG=release link=shared crypto=openssl warnings=off address-model=64
44

@@ -569,7 +569,6 @@ HEADERS = \
569569
xml_parse.hpp \
570570
\
571571
aux_/alert_manager.hpp \
572-
aux_/aligned_storage.hpp \
573572
aux_/aligned_union.hpp \
574573
aux_/alloca.hpp \
575574
aux_/allocating_handler.hpp \

3rd/libtorrent-rasterbar/bindings/python/Jamfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ feature.compose <libtorrent-python-pic>on : <cxxflags>-fPIC ;
2828
feature python-install-path : : free path ;
2929

3030
# when not specifying a custom install path, this controls whether to install
31-
# the python module in the system directory or user-specifc directory
31+
# the python module in the system directory or user-specific directory
3232
feature python-install-scope : user system : ;
3333

3434
# copied from boost 1.63's boost python jamfile
@@ -79,6 +79,7 @@ else
7979

8080
local boost-include-path =
8181
<include>/opt/local/include
82+
<include>/opt/homebrew/include
8283
<include>/usr/local/include
8384
<include>/usr/sfw/include
8485
;

3rd/libtorrent-rasterbar/bindings/python/setup.py

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
#!/usr/bin/env python3
22

33
import contextlib
4-
from distutils import log
5-
import distutils.cmd
6-
import distutils.command.install_data as install_data_lib
7-
import distutils.debug
8-
import distutils.errors
9-
import distutils.sysconfig
104
import functools
115
import itertools
6+
import logging as log
127
import os
138
import pathlib
149
import re
@@ -75,11 +70,11 @@ def b2_version() -> Tuple[int, ...]:
7570
class B2Distribution(setuptools.Distribution):
7671
def reinitialize_command(
7772
self, command: str, reinit_subcommands: int = 0
78-
) -> distutils.cmd.Command:
73+
) -> setuptools.Command:
7974
if command == "build_ext":
80-
return cast(distutils.cmd.Command, self.get_command_obj("build_ext"))
75+
return cast(setuptools.Command, self.get_command_obj("build_ext"))
8176
return cast(
82-
distutils.cmd.Command,
77+
setuptools.Command,
8378
super().reinitialize_command(
8479
command, reinit_subcommands=reinit_subcommands
8580
),
@@ -102,7 +97,10 @@ def b2_escape(value: str) -> str:
10297

10398

10499
def write_b2_python_config(
105-
include_dirs: Sequence[str], library_dirs: Sequence[str], config: IO[str]
100+
include_dirs: Sequence[str],
101+
library_dirs: Sequence[str],
102+
ext_suffix: str,
103+
config: IO[str],
106104
) -> None:
107105
write = config.write
108106
# b2 keys python environments by X.Y version, breaking ties by matching
@@ -155,13 +153,8 @@ def write_b2_python_config(
155153
# other words we apply debian's override everywhere, and hope no other
156154
# overrides ever disagree with us.
157155

158-
# Note that sysconfig and distutils.sysconfig disagree here, especially on
159-
# windows.
160-
ext_suffix = distutils.sysconfig.get_config_var("EXT_SUFFIX")
161-
ext_suffix = str(ext_suffix or "")
162-
163156
# python.jam appends the platform-specific final suffix on its own. I can't
164-
# find a consistent value from sysconfig or distutils.sysconfig for this.
157+
# find a consistent value from sysconfig for this.
165158
for plat_suffix in (".pyd", ".dll", ".so", ".sl"):
166159
if ext_suffix.endswith(plat_suffix):
167160
ext_suffix = ext_suffix[: -len(plat_suffix)]
@@ -271,7 +264,7 @@ def finalize_options(self) -> None:
271264
super().finalize_options()
272265

273266
if self.config_mode not in self.CONFIG_MODES:
274-
raise distutils.errors.DistutilsOptionError(
267+
raise setuptools.errors.DistutilsOptionError(
275268
f"--config-mode must be one of {self.CONFIG_MODES}"
276269
)
277270

@@ -382,10 +375,10 @@ def _configure_b2_with_distutils(self) -> Iterator[None]:
382375
if os.name == "nt":
383376
self._maybe_add_arg("--abbreviate-paths")
384377

385-
if distutils.debug.DEBUG:
386-
self._maybe_add_arg("--debug-configuration")
387-
self._maybe_add_arg("--debug-building")
388-
self._maybe_add_arg("--debug-generators")
378+
# if distutils.debug.DEBUG:
379+
# self._maybe_add_arg("--debug-configuration")
380+
# self._maybe_add_arg("--debug-building")
381+
# self._maybe_add_arg("--debug-generators")
389382

390383
if sys.platform == "darwin":
391384
# boost.build defaults to toolset=clang on mac. However python.jam
@@ -411,7 +404,7 @@ def _configure_b2_with_distutils(self) -> Iterator[None]:
411404
# macOS uses multi-arch binaries. Attempt to match the
412405
# configuration of the running python by translating distutils
413406
# platform modes to b2 architecture modes
414-
machine = distutils.util.get_platform().split("-")[-1]
407+
machine = sysconfig.get_platform().split("-")[-1]
415408
if machine == "arm64":
416409
self._maybe_add_arg("architecture=arm")
417410
elif machine in ("ppc", "ppc64"):
@@ -435,7 +428,10 @@ def _configure_b2_with_distutils(self) -> Iterator[None]:
435428
if self._maybe_add_arg(f"python={sysconfig.get_python_version()}"):
436429
config_writers.append(
437430
functools.partial(
438-
write_b2_python_config, self.include_dirs, self.library_dirs
431+
write_b2_python_config,
432+
self.include_dirs,
433+
self.library_dirs,
434+
os.path.basename(self.get_ext_fullpath("")),
439435
)
440436
)
441437

@@ -500,21 +496,6 @@ def _find_project_config(self) -> Optional[pathlib.Path]:
500496
return None
501497

502498

503-
class InstallDataToLibDir(install_data_lib.install_data):
504-
def finalize_options(self) -> None:
505-
# install_data installs to the *base* directory, which is useless.
506-
# Nothing ever gets installed there, no tools search there. You could
507-
# only make use of it by manually picking the right install paths.
508-
# This instead defaults the "install_dir" option to be "install_lib",
509-
# which is "where packages are normally installed".
510-
self.set_undefined_options(
511-
"install",
512-
("install_lib", "install_dir"), # note "install_lib"
513-
("root", "root"),
514-
("force", "force"),
515-
)
516-
517-
518499
def find_all_files(path: str) -> Iterator[str]:
519500
for dirpath, _, filenames in os.walk(path):
520501
for filename in filenames:
@@ -532,7 +513,6 @@ def find_all_files(path: str) -> Iterator[str]:
532513
ext_modules=[StubExtension("libtorrent.__init__")],
533514
cmdclass={
534515
"build_ext": LibtorrentBuildExt,
535-
"install_data": InstallDataToLibDir,
536516
},
537517
distclass=B2Distribution,
538518
data_files=[

3rd/libtorrent-rasterbar/bindings/python/src/alert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ void bind_alert()
658658
;
659659

660660
#if TORRENT_ABI_VERSION == 1
661-
enum_<listen_succeeded_alert::socket_type_t>("listen_succeded_alert_socket_type_t")
661+
enum_<listen_succeeded_alert::socket_type_t>("listen_succeeded_alert_socket_type_t")
662662
.value("tcp", listen_succeeded_alert::socket_type_t::tcp)
663663
.value("tcp_ssl", listen_succeeded_alert::socket_type_t::tcp_ssl)
664664
.value("udp", listen_succeeded_alert::socket_type_t::udp)

3rd/libtorrent-rasterbar/bindings/python/src/torrent_handle.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ list file_priorities(torrent_handle& handle)
177177
return ret;
178178
}
179179

180-
download_priority_t file_prioritity0(torrent_handle& h, file_index_t index)
180+
download_priority_t file_priority0(torrent_handle& h, file_index_t index)
181181
{
182182
return h.file_priority(index);
183183
}
184184

185-
void file_prioritity1(torrent_handle& h, file_index_t index, download_priority_t prio)
185+
void file_priority1(torrent_handle& h, file_index_t index, download_priority_t prio)
186186
{
187187
return h.file_priority(index, prio);
188188
}
@@ -532,8 +532,8 @@ void bind_torrent_handle()
532532
.def("get_piece_priorities", &piece_priorities)
533533
.def("prioritize_files", &prioritize_files)
534534
.def("get_file_priorities", &file_priorities)
535-
.def("file_priority", &file_prioritity0)
536-
.def("file_priority", &file_prioritity1)
535+
.def("file_priority", &file_priority0)
536+
.def("file_priority", &file_priority1)
537537
.def("file_status", _(file_status0))
538538
.def("save_resume_data", _(&torrent_handle::save_resume_data), arg("flags") = 0)
539539
.def("need_save_resume_data", _(need_save_resume_data0))

3rd/libtorrent-rasterbar/cmake/Modules/GeneratePkgConfig.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ set(_GeneratePkGConfigDir "${CMAKE_CURRENT_LIST_DIR}/GeneratePkgConfig")
99

1010
include(GNUInstallDirs)
1111

12-
function(_get_target_property_merging_configs _var_name _target_name _propert_name)
13-
get_property(prop_set TARGET ${_target_name} PROPERTY ${_propert_name} SET)
12+
function(_get_target_property_merging_configs _var_name _target_name _property_name)
13+
get_property(prop_set TARGET ${_target_name} PROPERTY ${_property_name} SET)
1414
if (prop_set)
15-
get_property(vals TARGET ${_target_name} PROPERTY ${_propert_name})
15+
get_property(vals TARGET ${_target_name} PROPERTY ${_property_name})
1616
else()
1717
if (CMAKE_BUILD_TYPE)
1818
list(APPEND configs ${CMAKE_BUILD_TYPE})
@@ -27,9 +27,9 @@ function(_get_target_property_merging_configs _var_name _target_name _propert_na
2727
else()
2828
set(target_cfg "${UPPERCFG}")
2929
endif()
30-
get_property(prop_set TARGET ${_target_name} PROPERTY ${_propert_name}_${target_cfg} SET)
30+
get_property(prop_set TARGET ${_target_name} PROPERTY ${_property_name}_${target_cfg} SET)
3131
if (prop_set)
32-
get_property(val_for_cfg TARGET ${_target_name} PROPERTY ${_propert_name}_${target_cfg})
32+
get_property(val_for_cfg TARGET ${_target_name} PROPERTY ${_property_name}_${target_cfg})
3333
list(APPEND vals "$<$<CONFIG:${cfg}>:${val_for_cfg}>")
3434
break()
3535
endif()
@@ -38,7 +38,7 @@ function(_get_target_property_merging_configs _var_name _target_name _propert_na
3838
get_property(imported_cfgs TARGET ${_target_name} PROPERTY IMPORTED_CONFIGURATIONS)
3939
# CMake docs say we can use any of the imported configs
4040
list(GET imported_cfgs 0 imported_config)
41-
get_property(vals TARGET ${_target_name} PROPERTY ${_propert_name}_${imported_config})
41+
get_property(vals TARGET ${_target_name} PROPERTY ${_property_name}_${imported_config})
4242
# remove config generator expression. Only in this case! Notice we use such expression
4343
# ourselves in the loop above
4444
string(REPLACE "$<$<CONFIG:${imported_config}>:" "$<1:" vals "${vals}")

3rd/libtorrent-rasterbar/cmake/Modules/LibtorrentMacros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endmacro()
1515
# target_optional_compile_definitions(<target> [FEATURE]
1616
# NAME <name> DESCRIPTION <description> DEFAULT <default_value>
1717
# [ENABLED [enabled_compile_definitions...]]
18-
# [DISABLED [disabled_compile_defnitions...]]
18+
# [DISABLED [disabled_compile_definitions...]]
1919
# )
2020
# NAME, DESCRIPTION and DEFAULT are passed to option() call
2121
# if FEATURE is given, they are passed to add_feature_info()

0 commit comments

Comments
 (0)