From 9878f153c1dbdab96f55b26f4eac61a4190cb7c7 Mon Sep 17 00:00:00 2001 From: Fabian Wosar Date: Tue, 21 Mar 2017 19:34:29 +0100 Subject: [PATCH 1/4] Add boost patch to fix initialisation issues when using the VS2017 14.1 toolchain and static linking --- ports/boost/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 343e0c5b05a..c622764ca51 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -14,6 +14,14 @@ vcpkg_download_distfile(DIFF FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" SHA512 77dad42bfd9bbab2bbddf361d5b7ad3dd6f812f4294c6dd1a677bb4d0191a4fff43bca32fdd4fce05d428562abb6e38afd0fd33ca6a8b5f28481d70cd2f3dd67 ) + +# apply boost TLS fix for VS2017 +vcpkg_download_distfile(DIFF + URLS "https://github.com/boostorg/thread/commit/bd0379af57fa294df310221492da618844182658.diff" + FILENAME "boost-thread-on_tls_callback-bd0379af57fa294df310221492da618844182658.diff" + SHA512 29501de9da5d101c762c9617eb74f072ec47eb9ef0021f036545bc883cbeb09c24b2ba7f78c24fb1a5d6b1fb3d7ae1def05a75be8634fc32bde0dface571c0a8 +) + FILE(READ "${DIFF}" content) STRING(REGEX REPLACE "include/" "" content "${content}") set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed) From 2aab56942a58a435539b501e822f01b0b6302467 Mon Sep 17 00:00:00 2001 From: Fabian Wosar Date: Tue, 21 Mar 2017 19:51:09 +0100 Subject: [PATCH 2/4] Forgot the actual patch application --- ports/boost/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index c622764ca51..cde96e7c60e 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_download_distfile(DIFF ) # apply boost TLS fix for VS2017 -vcpkg_download_distfile(DIFF +vcpkg_download_distfile(TLS_DIFF URLS "https://github.com/boostorg/thread/commit/bd0379af57fa294df310221492da618844182658.diff" FILENAME "boost-thread-on_tls_callback-bd0379af57fa294df310221492da618844182658.diff" SHA512 29501de9da5d101c762c9617eb74f072ec47eb9ef0021f036545bc883cbeb09c24b2ba7f78c24fb1a5d6b1fb3d7ae1def05a75be8634fc32bde0dface571c0a8 @@ -28,6 +28,11 @@ set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7 FILE(WRITE ${DIFF2} "${content}") vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2}) +FILE(READ "${TLS_DIFF}" content) +set(TLS_DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-thread-on_tls_callback-bd0379af57fa294df310221492da618844182658.diff) +FILE(WRITE ${TLS_DIFF2} "${content}") +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${TLS_DIFF2}) + if(NOT EXISTS ${SOURCE_PATH}/b2.exe) message(STATUS "Bootstrapping") vcpkg_execute_required_process( From a9ec74f176328e4959dda5e5ebd4b389b2bf2028 Mon Sep 17 00:00:00 2001 From: Fabian Wosar Date: Tue, 21 Mar 2017 20:03:24 +0100 Subject: [PATCH 3/4] Fix paths in patch file --- ports/boost/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index cde96e7c60e..0d066629e9f 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -29,7 +29,8 @@ FILE(WRITE ${DIFF2} "${content}") vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2}) FILE(READ "${TLS_DIFF}" content) -set(TLS_DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-thread-on_tls_callback-bd0379af57fa294df310221492da618844182658.diff) +STRING(REGEX REPLACE "src/win32/" "libs/thread/src/win32/" content "${content}") +set(TLS_DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-thread-on_tls_callback-bd0379af57fa294df310221492da618844182658.diff.fixed) FILE(WRITE ${TLS_DIFF2} "${content}") vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${TLS_DIFF2}) From 3b5c7dff225dd8a057ec82e4d7e99da6ff5f483e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Mar 2017 12:59:28 -0700 Subject: [PATCH 4/4] [boost] Bump version to observe addition of patch. --- ports/boost/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 3f1127ab013..aa81e94a4ea 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.63-2 +Version: 1.63-3 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2