vcpkg/ports/libtorrent/portfile.cmake

90 lines
3.2 KiB
CMake
Raw Normal View History

if(VCPKG_TARGET_IS_WINDOWS)
# Building python bindings is currently broken on Windows
if("python" IN_LIST FEATURES)
message(FATAL_ERROR "The python feature is currently broken on Windows")
endif()
if(VCPKG_CRT_LINKAGE STREQUAL "static")
set(_static_runtime ON)
endif()
endif()
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
deprfun deprecated-functions
examples build_examples
iconv iconv
python python-bindings
test build_tests
tools build_tools
)
if("python" IN_LIST FEATURES)
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY)
vcpkg_add_to_path(${PYTHON3_PATH})
file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/*boost_python*")
string(REGEX REPLACE ".*(python)([0-9])([0-9]+).*" "\\1\\2\\3" _boost-python-module-name "${BOOST_PYTHON_LIB}")
endif()
2017-07-07 22:32:34 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO arvidn/libtorrent
2023-05-24 03:58:40 +08:00
REF "v${VERSION}"
[libtorrent] update to 2.0.10 (#36913) <!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> Fixes https://github.com/microsoft/vcpkg/issues/36877 All features passed with following triplets: x86-windows x64-windows x64-windows-static <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [ ] ~~Any patches that are no longer applied are deleted from the port's directory.~~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. <!-- If this PR adds a new port, please uncomment and fill out this checklist: - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [ ] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [ ] The versioning scheme in `vcpkg.json` matches what upstream says. - [ ] The license declaration in `vcpkg.json` matches what upstream says. - [ ] The installed as the "copyright" file matches what upstream says. - [ ] The source code of the component installed comes from an authoritative source. - [ ] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [ ] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [ ] Only one version is in the new port's versions file. - [ ] Only one version is added to each modified port's versions file. END OF NEW PORT CHECKLIST (delete this line) -->
2024-02-23 02:22:20 +08:00
SHA512 fb55b04b57a6a1f39b81a4aff2ca899f9ac30b435c278c80181bdd3fef4775a3f91b2345c49b493503ae79ef89841e9a965af9974abe9022be3050922a4057f0
HEAD_REF RC_2_0
)
vcpkg_from_github(
OUT_SOURCE_PATH TRYSIGNAL_SOURCE_PATH
REPO arvidn/try_signal
REF 105cce59972f925a33aa6b1c3109e4cd3caf583d #2022-10-27
SHA512 4a0090755831e0e4a1930817345fa5934144421d9a9d710fe8ed3712233fa2fa037fc0e0d4f88b7cc8fb1bc05fe2d55372af1ff47d6fbf5208e03f45f2a424e4
HEAD_REF master
)
vcpkg_from_github(
OUT_SOURCE_PATH ASIO_GNUTLS_SOURCE_PATH
REPO paullouisageneau/boost-asio-gnutls
REF a57d4d36923c5fafa9698e14be16b8bc2913700a
SHA512 1e093dd4e999cce9c6d74f1d4c2d20f73512258b83505c307c7d53b8c7ed15626a8e90c8e6a6280827aafa069bc233c0c6f4c9276f1c332e4b141c7c350c47c0
HEAD_REF master
2017-07-07 22:32:34 +08:00
)
vcpkg_from_github(
OUT_SOURCE_PATH LIB_SIMULATOR_SOURCE_PATH
REPO arvidn/libsimulator
REF 39144efe83fcd38778cf76fc609e3475694642ca #2022-10-27
SHA512 a021f769d52d127355ecaceaf912bf3e86aaa256d4768d270fbe6066793b6159eddecd0262f3f2158602f883d49b3aac39eb79be5399212cdd7711f921ffa15a
HEAD_REF master
)
file(COPY ${TRYSIGNAL_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/deps/try_signal)
file(COPY ${ASIO_GNUTLS_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/deps/asio-gnutls)
file(COPY ${LIB_SIMULATOR_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/simulation/libsimulator)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-07-07 22:32:34 +08:00
OPTIONS
${FEATURE_OPTIONS}
-Dboost-python-module-name=${_boost-python-module-name}
-Dstatic_runtime=${_static_runtime}
-DPython3_USE_STATIC_LIBS=ON
2017-07-07 22:32:34 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME LibtorrentRasterbar CONFIG_PATH lib/cmake/LibtorrentRasterbar)
2017-07-07 22:32:34 +08:00
# Handle copyright
2023-05-24 03:58:40 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
2017-07-07 22:32:34 +08:00
# Do not duplicate include files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/cmake")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
vcpkg_fixup_pkgconfig()