forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(conan-io#15415) libtorrent: add version 2.0.8, support conan v2, upd…
…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>
- Loading branch information
1 parent
66e9578
commit 95e5353
Showing
10 changed files
with
134 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
sources: | ||
"2.0.8": | ||
url: "https://github.com/arvidn/libtorrent/releases/download/v2.0.8/libtorrent-rasterbar-2.0.8.tar.gz" | ||
sha256: "09dd399b4477638cf140183f5f85d376abffb9c192bc2910002988e27d69e13e" | ||
"2.0.1": | ||
url: "https://github.com/arvidn/libtorrent/releases/download/v2.0.1/libtorrent-rasterbar-2.0.1.tar.gz" | ||
sha256: "7b39599bf602bf2f208f8f05bf2327576356a3c192175b3a4603262ede42ffd7" | ||
"1.2.3": | ||
url: "https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_3/libtorrent-rasterbar-1.2.3.tar.gz" | ||
sha256: "1582fdbbd0449bcfe4ffae2ccb9e5bf0577459a32bb25604e01accb847da1a2d" | ||
patches: | ||
"2.0.1": | ||
- patch_file: "patches/2.0.1-0001-cmake-fix-conan-boost-openssl.patch" | ||
base_path: "source_subfolder" | ||
"1.2.3": | ||
- patch_file: "patches/1.2.3-0001-cmake-fix-conan-boost-openssl.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/1.2.3-0002-boost-system-header-only-1.69+.patch" | ||
base_path: "source_subfolder" | ||
patch_description: "use find_package with component only boost >= 1.69" | ||
patch_type: "portability" | ||
- patch_file: "patches/1.2.3-0003-include-cstddef.patch" | ||
base_path: "source_subfolder" | ||
patch_description: "include cstddef instead stddef.h" | ||
patch_type: "portability" | ||
- patch_file: "patches/1.2.3-0004-increase-handle-storage-sizes.patch" | ||
base_path: "source_subfolder" | ||
patch_description: "increase handle storage size" | ||
patch_type: "portability" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
recipes/libtorrent/all/patches/1.2.3-0001-cmake-fix-conan-boost-openssl.patch
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
recipes/libtorrent/all/patches/2.0.1-0001-cmake-fix-conan-boost-openssl.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import cmake_layout, CMake | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") | ||
# from https://en.wikipedia.org/wiki/Magnet_URI_scheme | ||
magnet_url = "magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a" | ||
self.run("{} {}".format(bin_path, magnet_url), run_environment=True) | ||
self.run(f"{bin_path} {magnet_url}", env="conanrun") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from conans import ConanFile, CMake | ||
from conan.tools.build import cross_building | ||
import os | ||
|
||
|
||
class TestPackageV1Conan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
# from https://en.wikipedia.org/wiki/Magnet_URI_scheme | ||
magnet_url = "magnet:?xt=urn:btih:c12fe1c06bba254a9dc9f519b335aa7c1367a88a" | ||
self.run("{} {}".format(bin_path, magnet_url), run_environment=True) |
Oops, something went wrong.