aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-17 14:42:05 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-17 14:42:05 -0700
commitae3fe7cd16c82b794d5074104cf078afc1a12c7d (patch)
tree99abaee5986d5d0859bb0655ad9bfc24c07a7a89
parentee2831c548b54cdccf064663b3fffda5d6a4c6b8 (diff)
downloadvcpkg-ae3fe7cd16c82b794d5074104cf078afc1a12c7d.tar.gz
vcpkg-ae3fe7cd16c82b794d5074104cf078afc1a12c7d.zip
[boost] Add feature packages for regex-icu, locale-icu, and python
-rw-r--r--ports/boost/CONTROL20
-rw-r--r--ports/boost/portfile.cmake31
-rw-r--r--toolsrc/src/vcpkg/install.cpp3
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<std::string, SourceControlFile> scf_map;
std::vector<AnyAction> action_plan;
if (GlobalState::feature_packages)
{
- std::unordered_map<std::string, SourceControlFile> scf_map;
auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports);
for (auto&& port : all_ports)
{