-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libtorrent: add version 2.0.8, support conan v2, update dependencies #15415
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit ef6dfc0libtorrent/1.2.3
libtorrent/2.0.1
libtorrent/2.0.8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
def requirements(self): | ||
if tools.Version(self.version) < "2.0.0": | ||
self.requires("boost/1.79.0") | ||
# libtorrent 2.0.x [x<=6] have issue for recent boost https://github.com/arvidn/libtorrent/discussions/6757 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for detailing it!
recipes/libtorrent/all/conanfile.py
Outdated
"find_public_dependency(Iconv)", | ||
replace) | ||
if self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libstdc++": | ||
# https://github.com/arvidn/libtorrent/issues/3557 | ||
tools.replace_in_file(os.path.join(self._source_subfolder, "include", "libtorrent", "file_storage.hpp"), | ||
replace_in_file(self, os.path.join(self.source_folder, "include", "libtorrent", "file_storage.hpp"), | ||
"file_entry& operator=(file_entry&&) & noexcept = default;", | ||
"file_entry& operator=(file_entry&&) & = default;") | ||
|
||
def build(self): | ||
self._validate_dependency_graph() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to move to validate() now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SpaceIm
I combine _validate_dependency_graph()
to validate()
.
Thanks.
recipes/libtorrent/all/conanfile.py
Outdated
from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag | ||
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file | ||
from conan.tools.build import check_min_cppstd | ||
from conan.tools.scm import Version | ||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout | ||
from conan.tools.env import VirtualBuildEnv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many unused imports according to linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
recipes/libtorrent/all/conanfile.py
Outdated
|
||
def generate(self): | ||
tc = CMakeToolchain(self) | ||
tc.variables["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tc.variables["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared | |
tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
recipes/libtorrent/all/conanfile.py
Outdated
tc.variables["python-bindings"] = False | ||
tc.variables["python-bindings"] = False | ||
if is_msvc(self): | ||
tc.variables["static_runtime"] = "MT" in msvc_runtime_flag(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tc.variables["static_runtime"] = "MT" in msvc_runtime_flag(self) | |
tc.variables["static_runtime"] = is_msvc_static_runtime(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Thanks for your review a lot!
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Conan v1 pipeline ✔️All green in build 4 (
Conan v2 pipeline (informative, not required for merge) ❌
The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future. See details:Failure in build 4 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Hooks produced the following warnings for commit 607c732libtorrent/2.0.1
libtorrent/1.2.3
libtorrent/2.0.8
|
…ate dependencies * libtorrent: add version 2.0.8, support conan v2, update dependencies * drop support gcc5, update cmake version * use dependencies instead of options Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> * remove unused imports, add layout, refine validate(), use is_msvc_static_runtime --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Specify library name and version: libtorrent/*
notice: libtorrent 2.0.{0..6} can't use recent boost