From 99a8d745495815916801003c744b845c2f9e278a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 17:31:51 +0200 Subject: Use ICU in boost build --- ports/boost/0001-Fix-boost-ICU-support.patch | 166 +++++++++++++++++++++++++++ ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 28 +++++ ports/boost/portfile.cmake | 6 +- ports/boost/uwp/user-config.jam | 8 ++ 5 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 ports/boost/0001-Fix-boost-ICU-support.patch diff --git a/ports/boost/0001-Fix-boost-ICU-support.patch b/ports/boost/0001-Fix-boost-ICU-support.patch new file mode 100644 index 000000000..1952f5a64 --- /dev/null +++ b/ports/boost/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,166 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/libs/locale/build/Jamfile.v2 ++++ b/libs/locale/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/libs/locale/build/has_icu_test.cpp ++++ b/libs/locale/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +diff --git a/libs/regex/build/Jamfile.v2 b/libs/regex/build/Jamfile.v2 +index 58fd1fb..76ee9f4 100644 +--- a/libs/regex/build/Jamfile.v2 ++++ b/libs/regex/build/Jamfile.v2 +@@ -48,50 +48,25 @@ if ! $(disable-icu) + } + else + { +- lib icuuc : : shared @path_options ; +- lib icuuc : : msvc debug icuucd shared @path_options ; +- lib icuuc : : intel windows debug icuucd shared @path_options ; +- lib icuuc : : sicuuc static @path_options ; +- lib icuuc : : msvc debug sicuucd static @path_options ; +- lib icuuc : : intel windows debug sicuucd static @path_options ; +- lib icuuc : : this_is_an_invalid_library_name ; +- +- lib icudt : : icudata shared @path_options ; +- lib icudt : : icudt msvc shared @path_options ; +- lib icudt : : icudt intel windows shared @path_options ; +- lib icudt : : sicudata static @path_options ; +- lib icudt : : sicudt msvc static @path_options ; +- lib icudt : : sicudt intel windows static @path_options ; +- lib icudt : : this_is_an_invalid_library_name ; +- +- lib icuin : : icui18n shared @path_options ; +- lib icuin : : msvc debug icuind shared @path_options ; +- lib icuin : : msvc icuin shared @path_options ; +- lib icuin : : intel windows debug icuind shared @path_options ; +- lib icuin : : intel windows icuin shared @path_options ; +- lib icuin : : sicui18n static @path_options ; +- lib icuin : : msvc debug sicuind static @path_options ; +- lib icuin : : msvc sicuin static @path_options ; +- lib icuin : : intel windows debug sicuind static @path_options ; +- lib icuin : : intel windows sicuin static @path_options ; +- lib icuin : : this_is_an_invalid_library_name ; ++ ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = + $(ICU_PATH)/include +- shared:icuuc/shared +- shared:icudt/shared +- shared:icuin/shared +- static:icuuc +- static:icudt +- static:icuin +- BOOST_HAS_ICU=1 +- static:U_STATIC_IMPLEMENTATION=1 ++ icuuc ++ icudt ++ icuin ++ BOOST_HAS_ICU=1 + ; + } + + } + +-unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; ++exe has_icu : has_icu_test.cpp : $(ICU_OPTS) ; + explicit has_icu ; + + alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; +-- +2.12.2.windows.2 + diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 8200d54d1..6c7732021 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2 +Build-Depends: zlib, bzip2, icu [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 8faba6d72..212cd06b8 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -5,3 +5,31 @@ using msvc : 14.0 : cl.exe : using msvc : 14.1 : cl.exe : echo ; + +project user-config ; +lib advapi32 ; +lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuucd : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuind : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icudtd : : + @LIB_RUNTIME_LINK@ ; \ No newline at end of file diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 3ed0ed9c5..74db8a524 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -32,7 +32,8 @@ 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) FILE(WRITE ${DIFF2} "${content}") -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2} + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-boost-ICU-support.patch) ###################### # Cleanup previous builds @@ -83,6 +84,7 @@ message(STATUS "Bootstrapping done") set(B2_OPTIONS -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" + -sICU_PATH="${CURRENT_INSTALLED_DIR}" -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration --hash @@ -92,10 +94,12 @@ set(B2_OPTIONS threading=multi ) +set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) else() list(APPEND B2_OPTIONS runtime-link=static) + set(LIB_RUNTIME_LINK "static") endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/boost/uwp/user-config.jam b/ports/boost/uwp/user-config.jam index 88e7c5974..975b1d412 100644 --- a/ports/boost/uwp/user-config.jam +++ b/ports/boost/uwp/user-config.jam @@ -13,3 +13,11 @@ using msvc : 14.1 : cl.exe : RuntimeObject.lib ole32.lib ; + +project user-config ; + +lib icuuc : : dummy_lib_that_doesnt_exist ; + +lib icuin : : dummy_lib_that_doesnt_exist ; + +lib icudt : : dummy_lib_that_doesnt_exist ; \ No newline at end of file -- cgit v1.2.3 From 481128e9792d47343b3a5682350569ebcebc63f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:12:01 +0200 Subject: Build boost.python --- ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 3 +++ ports/boost/portfile.cmake | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 6c7732021..e2d9f7dba 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows] +Build-Depends: zlib, bzip2, icu [windows], python3 [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 212cd06b8..83206c098 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,6 +6,9 @@ using msvc : 14.1 : cl.exe : echo ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; + project user-config ; lib advapi32 ; lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 74db8a524..8fd29a1f6 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -90,7 +90,6 @@ set(B2_OPTIONS --hash -q - --without-python threading=multi ) @@ -147,6 +146,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") --without-thread --without-iostreams --without-container + --without-python ) if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") find_path(PATH_TO_CL cl.exe) @@ -165,6 +165,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) endif() -- cgit v1.2.3 From 1304b772024dc09227fea9242a867794f764f9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:16:26 +0200 Subject: Bump boost version --- ports/boost/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index e2d9f7dba..1743379fb 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.65-1 +Version: 1.65-2 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2, icu [windows], python3 [windows] -- cgit v1.2.3 From d88f53de9c284cfc67ba21707d60a44ba41ede8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 14 Jul 2017 23:07:55 +0200 Subject: In debug configuration, link boost with debug Python libraries instead of release ones --- ports/boost/portfile.cmake | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 8fd29a1f6..530351c7e 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -93,6 +93,21 @@ set(B2_OPTIONS threading=multi ) +# Add build type specific options +set(B2_OPTIONS_DBG + -sZLIB_BINARY=zlibd + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" +) + +set(B2_OPTIONS_REL + -sZLIB_BINARY=zlib + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" +) + set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) @@ -172,6 +187,8 @@ else() string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + list(APPEND B2_OPTIONS_DBG + python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") @@ -182,21 +199,14 @@ else() message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") endif() -# Add build type specific options set(B2_OPTIONS_DBG ${B2_OPTIONS} - -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + ${B2_OPTIONS_DBG} ) set(B2_OPTIONS_REL ${B2_OPTIONS} - -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + ${B2_OPTIONS_REL} ) ###################### -- cgit v1.2.3 From ae3fe7cd16c82b794d5074104cf078afc1a12c7d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 14:42:05 -0700 Subject: [boost] Add feature packages for regex-icu, locale-icu, and python --- ports/boost/CONTROL | 20 ++++++++++++++------ ports/boost/portfile.cmake | 31 ++++++++++++++++++++++++------- toolsrc/src/vcpkg/install.cpp | 3 ++- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 7001c968a..a5da89a5a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,8 +1,16 @@ Source: boost -<<<<<<< HEAD -Version: 1.65-2 -======= -Version: 1.65.1 ->>>>>>> master +Version: 1.65.1-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows], python3 [windows] +Build-Depends: zlib, bzip2 + +Feature: locale-icu +Description: ICU backend for Boost.Locale +Build-Depends: icu + +Feature: regex-icu +Description: ICU support for Boost.Regex +Build-Depends: icu + +Feature: python +Description: a C++ library which enables seamless interoperability between C++ and the Python programming language. +Build-Depends: python3 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 4d2d06aae..b0699eaa2 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -119,6 +119,30 @@ if(TRIPLET_SYSTEM_ARCH MATCHES "x64") list(APPEND B2_OPTIONS address-model=64) endif() +if("python" IN_LIST FEATURES) + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) + list(APPEND B2_OPTIONS_DBG python-debugging=on) +else() + list(APPEND B2_OPTIONS --without-python) +endif() + +if("locale-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS boost.locale.icu=on) +else() + list(APPEND B2_OPTIONS boost.locale.icu=off) +endif() + +if("regex-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS --enable-icu) +else() + list(APPEND B2_OPTIONS --disable-icu) +endif() + + if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") list(APPEND B2_OPTIONS windows-api=store @@ -173,15 +197,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() - # Find Python. Can't use find_package here, but we already know where everything is - file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") - set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") - set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") - string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - list(APPEND B2_OPTIONS_DBG - python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index adbd8c943..70757ff38 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -591,11 +591,12 @@ namespace vcpkg::Install const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), Build::to_allow_downloads(!no_downloads)}; + // Note: action_plan will hold raw pointers to SourceControlFiles from this map + std::unordered_map scf_map; std::vector action_plan; if (GlobalState::feature_packages) { - std::unordered_map scf_map; auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); for (auto&& port : all_ports) { -- cgit v1.2.3