vcpkg/ports/boost-build/portfile.cmake
Andrew McMahon 0e759709dd [boost] update boost to 1.69. Fixes #5023 #4961 (#5059)
* Update boost to 1.69. Fixes #5023

- Remove boost-signal (rationale: deprecated and removed in 1.69)
- Remove boost-hana workaround by xiangfan-ms #4186 #3579 (rationale: 1.69 incorporates required fixes in hana master branch; builds fine in VS2017 15.9)

* [boost-signals] Restore signals from boost 1.68 because it is required by wt

* [boost-vcpkg-helpers] Improve dependency detection

* [boost-iostreams] Revert to cmake build to enable dependencies

* [boost-iostreams] Fix use of zstd in static builds

* [libtorrent] Update to 1.2.0

* [wt] Update to 4.0.5

* [boost-safe-numerics] [boost-vcpkg-helpers] Added safe_numerics; slight mod to regex match

* [hpx] Backport boost 1.69 fixes

* [libtorrent] Clean up cmake file installation

* [boost-type-traits] Fix MSVC arm
2019-01-30 16:04:17 -08:00

65 lines
2.7 KiB
CMake

include(vcpkg_common_functions)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
return()
elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
return()
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/build
REF boost-1.69.0
SHA512 e8d89e75c83a08bab29f52b5100fccf1d2ddf492a532ae4cb8121a5f49819aebb8157d1a1fd7d514bd8a0fe444e5ebb1103b10c8579d5c234ab81110d9c334a8
HEAD_REF master
)
vcpkg_download_distfile(ARCHIVE
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.69.0/LICENSE_1_0.txt"
FILENAME "boost_LICENSE_1_0.txt"
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
)
vcpkg_download_distfile(BOOSTCPP_ARCHIVE
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.69.0/boostcpp.jam"
FILENAME "boost-1.69.0-boostcpp.jam"
SHA512 1d05142f33b86a342674513cd5890b78601b0b3824540588f2c9e4c1fea43fadaa94f4a99495614445d3930861470fbfb8ad8c94b8bddf6a24ee65661a9bddc9
)
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam)
# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")
set(ENV{LIB} "${LIB}")
file(COPY
${SOURCE_PATH}/
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build
)
file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents)
string(REPLACE " /ZW /EHsc " "" _contents "${_contents}")
string(REPLACE "-nologo" "" _contents "${_contents}")
string(REPLACE "/nologo" "" _contents "${_contents}")
string(REPLACE "/Zm800" "" _contents "${_contents}")
string(REPLACE "<define>_WIN32_WINNT=0x0602" "" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}")
message(STATUS "Bootstrapping...")
if(CMAKE_HOST_WIN32)
vcpkg_execute_required_process(
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
LOGNAME bootstrap-${TARGET_TRIPLET}
)
else()
vcpkg_execute_required_process(
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh"
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
LOGNAME bootstrap-${TARGET_TRIPLET}
)
endif()