aboutsummaryrefslogtreecommitdiff
path: root/ports/libtorrent
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-12-05 13:01:50 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-12-19 10:26:27 -0800
commitb79395c4adf076dc57db2f7c1b0c38db4cc94f72 (patch)
tree0eb1549cf39f99b9e07b0f53187b5d3293cb6114 /ports/libtorrent
parent14358e8b257a27f86a58bf95aaca1625c1ec2a26 (diff)
downloadvcpkg-b79395c4adf076dc57db2f7c1b0c38db4cc94f72.tar.gz
vcpkg-b79395c4adf076dc57db2f7c1b0c38db4cc94f72.zip
Update downstream libraries to use modularized boost
Diffstat (limited to 'ports/libtorrent')
-rw-r--r--ports/libtorrent/CONTROL4
-rw-r--r--ports/libtorrent/portfile.cmake42
-rw-r--r--ports/libtorrent/vcpkg-boost-madness.patch13
3 files changed, 17 insertions, 42 deletions
diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL
index e139965df..46c096a68 100644
--- a/ports/libtorrent/CONTROL
+++ b/ports/libtorrent/CONTROL
@@ -1,4 +1,4 @@
Source: libtorrent
-Version: 1.1.5
+Version: 1.1.5-1
Description: An efficient feature complete C++ BitTorrent implementation
-Build-Depends: boost, openssl
+Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config
diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake
index 97658384e..45dd0aab3 100644
--- a/ports/libtorrent/portfile.cmake
+++ b/ports/libtorrent/portfile.cmake
@@ -1,37 +1,25 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_5)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_5.zip"
- FILENAME "libtorrent-1_1_5.zip"
- SHA512 ebb7c1b08a4b07b4db54050a099950dc61446e2e7fcceb82c5db8e0629c7718c3c8808ee59d5f361ad85c75f7034a33dfcb5ebd619ef0bb9b5ae0cfdd10d01b5
-)
-vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO arvidn/libtorrent
+ REF libtorrent-1_1_5
+ SHA512 edaff6347bf922af8b6d74e332e180fe122f64152a152fb905f4f2c3371dc29d668fc2b0ffcda3f56b50a1a51b25d1a3ae4284ed6e09f6a2eb7b34bcce8dd9c7
+ HEAD_REF master
+)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/vcpkg-boost-madness.patch
+ ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch
)
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- set(LIBTORRENT_SHARED ON)
-else()
- set(LIBTORRENT_SHARED OFF)
-endif()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTORRENT_SHARED)
+
+file(READ "${SOURCE_PATH}/include/libtorrent/export.hpp" _contents)
+string(REPLACE "<boost/config/select_compiler_config.hpp>" "<boost/config/detail/select_compiler_config.hpp>" _contents "${_contents}")
+string(REPLACE "<boost/config/select_platform_config.hpp>" "<boost/config/detail/select_platform_config.hpp>" _contents "${_contents}")
+file(WRITE "${SOURCE_PATH}/include/libtorrent/export.hpp" "${_contents}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@@ -43,7 +31,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
# Put shared libraries into the proper directory
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
diff --git a/ports/libtorrent/vcpkg-boost-madness.patch b/ports/libtorrent/vcpkg-boost-madness.patch
deleted file mode 100644
index e9e498ee4..000000000
--- a/ports/libtorrent/vcpkg-boost-madness.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 99698a2..454bae6 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -252,7 +252,7 @@ else()
-
- set(Boost_USE_STATIC_RUNTIME ON)
- endif()
-- set(Boost_USE_STATIC_LIBS ON)
-+ set(Boost_USE_STATIC_LIBS OFF)
- add_library(torrent-rasterbar STATIC ${sources2})
- endif()
-