vcpkg/ports/boost-build/portfile.cmake

76 lines
3.0 KiB
CMake
Raw Normal View History

2017-12-06 05:00:50 +08:00
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW")
return()
2017-12-06 05:00:50 +08:00
endif()
[boost] update to 1.78.0 (#21928) * [scripts] update scripts * [boost-*] generate ports * update versions * [scripts] update boost version in boost-modular-headers.cmake * [scripts] add post source stubs for boost-json and boost-nowide ports and re-generate Boost ports * update versions * [boost-asio] make OpenSSL optional #20718 * update versions * [boost] [boost-mpi] [boost-python] disable python for iOS and Android, fixes #21474 * update versions * [boost-fiber] add NUMA support, fixes #16507 * update version * [boost-build] apply patch https://github.com/bfgroup/b2/pull/113 for fix build boost-fiber and boost-stacktrace * update version * [boost-atomic] fix compilation for uwp * update version * ignore mapnik's fail on arm64-windows * [boost-python] support ARM on Windows * update versions * Boost features testing within CI * [boost-modular-build-helper] fix boost_python file name in Jamroot.jam * [boost-mpi] fix build with python2 or python3 * update versions * [boost-fiber] fix build with numa=on * update version * [boost-multiprecision] fix build with MSVC on ARM * update version * [boost-mpi] try to fix build on linux and osx * update versions * exclude static * guarantee the same result across platforms * minor changes to boost-modular-build-helper's CMake * correct versions * [boost-modular-build-helper] install Python extensions on Windows * [boost-mpi] add patch to fix build Python extension on Windows * update versions * [boost-mpi] remove python2 by request @BillyONeal @strega-nil-ms * update version * update versions Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
2022-01-11 03:47:12 +08:00
set(BOOST_VERSION 1.78.0)
2017-12-06 05:00:50 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/build
REF boost-${BOOST_VERSION}
[boost] update to 1.78.0 (#21928) * [scripts] update scripts * [boost-*] generate ports * update versions * [scripts] update boost version in boost-modular-headers.cmake * [scripts] add post source stubs for boost-json and boost-nowide ports and re-generate Boost ports * update versions * [boost-asio] make OpenSSL optional #20718 * update versions * [boost] [boost-mpi] [boost-python] disable python for iOS and Android, fixes #21474 * update versions * [boost-fiber] add NUMA support, fixes #16507 * update version * [boost-build] apply patch https://github.com/bfgroup/b2/pull/113 for fix build boost-fiber and boost-stacktrace * update version * [boost-atomic] fix compilation for uwp * update version * ignore mapnik's fail on arm64-windows * [boost-python] support ARM on Windows * update versions * Boost features testing within CI * [boost-modular-build-helper] fix boost_python file name in Jamroot.jam * [boost-mpi] fix build with python2 or python3 * update versions * [boost-fiber] fix build with numa=on * update version * [boost-multiprecision] fix build with MSVC on ARM * update version * [boost-mpi] try to fix build on linux and osx * update versions * exclude static * guarantee the same result across platforms * minor changes to boost-modular-build-helper's CMake * correct versions * [boost-modular-build-helper] install Python extensions on Windows * [boost-mpi] add patch to fix build Python extension on Windows * update versions * [boost-mpi] remove python2 by request @BillyONeal @strega-nil-ms * update version * update versions Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
2022-01-11 03:47:12 +08:00
SHA512 867966e3d254c0e996786587fb64ad1bda6f96546e5302c15231b17d66537798770bbd9e89f800d445a1f0a4d3be06dff8aed42dfd3a77b563d0f5d715e79324
2017-12-06 05:00:50 +08:00
HEAD_REF master
PATCHES
0001-don-t-skip-install-targets.patch
0002-fix-get-version.patch
2017-12-06 05:00:50 +08:00
)
vcpkg_download_distfile(ARCHIVE
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt"
2017-12-06 05:00:50 +08:00
FILENAME "boost_LICENSE_1_0.txt"
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
)
vcpkg_download_distfile(BOOSTCPP_ARCHIVE
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/boostcpp.jam"
FILENAME "boost-${BOOST_VERSION}-boostcpp.jam"
2021-09-28 08:12:39 +08:00
SHA512 0daa0dd315f7e426e7b9ada9cc4dad03da2eb257456e551de3fb3b2a8244f0117ed41d9d1ff77b5a3eee7a3c5fb466d345b9bb2af46004fc630209043d4862e3
2017-12-06 05:00:50 +08:00
)
# https://github.com/boostorg/boost/pull/206
# do not add version suffix for android
file(READ "${BOOSTCPP_ARCHIVE}" _contents)
string(REPLACE "aix &&" "aix android &&" _contents "${_contents}")
file(WRITE "${SOURCE_PATH}/boostcpp.jam" "${_contents}")
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
# 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}")
2017-12-06 05:00:50 +08:00
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)
2020-06-06 03:28:42 +08:00
if(VCPKG_TARGET_IS_MINGW)
set(TOOLSET mingw)
else()
set(TOOLSET msvc)
endif()
vcpkg_execute_required_process(
2020-06-06 03:28:42 +08:00
COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET}
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()