[boost-locale] Fix boost-locale failing to build with ICU (#10943)

Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
This commit is contained in:
Victor-Bergman 2020-06-30 18:00:31 -04:00 committed by GitHub
parent 7c9bf0a6cd
commit 0a5c4e4ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 102 additions and 1 deletions

View File

@ -0,0 +1,100 @@
---
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/build/Jamfile.v2
+++ b/build/Jamfile.v2
@@ -70,62 +70,17 @@ if $(ICU_LINK)
}
else
{
- searched-lib icuuc : : <name>icuuc
- <search>$(ICU_PATH)/lib
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icuuc : : <toolset>msvc
- <variant>debug
- <name>icuucd
- <search>$(ICU_PATH)/lib
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icuuc : : <name>this_is_an_invalid_library_name ;
-
- searched-lib icudt : : <search>$(ICU_PATH)/lib
- <name>icudata
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icudt : : <search>$(ICU_PATH)/lib
- <name>icudt
- <toolset>msvc
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icudt : : <name>this_is_an_invalid_library_name ;
-
- searched-lib icuin : : <search>$(ICU_PATH)/lib
- <name>icui18n
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icuin : : <toolset>msvc
- <variant>debug
- <name>icuind
- <search>$(ICU_PATH)/lib
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icuin : : <toolset>msvc
- <variant>release
- <name>icuin
- <search>$(ICU_PATH)/lib
- <link>shared
- <runtime-link>shared ;
-
- searched-lib icuin : : <name>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 = <include>$(ICU_PATH)/include
- <library>icuuc/<link>shared/<runtime-link>shared
- <library>icudt/<link>shared/<runtime-link>shared
- <library>icuin/<link>shared/<runtime-link>shared
- <dll-path>$(ICU_PATH)/bin
- <runtime-link>shared ;
+ <library>icuuc
+ <library>icuin
+ <library>icudt
+ <dll-path>$(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/build/has_icu_test.cpp
+++ b/build/has_icu_test.cpp
@@ -15,10 +15,6 @@
#include <unicode/uchar.h>
#include <unicode/coll.h>
-#if defined(_MSC_VER) && !defined(_DLL)
-#error "Mixing ICU with a static runtime doesn't work"
-#endif
-
int main()
{
icu::Locale loc;
--
2.12.2.windows.2

View File

@ -1,6 +1,6 @@
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-locale
Version: 1.73.0
Version: 1.73.0-1
Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows)
Homepage: https://github.com/boostorg/locale
Description: Boost locale module

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
REF boost-1.73.0
SHA512 0af88d8db7b18395a2b3668bcb51a5f32cd0de9acb9633572c2fb7edcdf06f354802392606394cf75ec4fd4d9cfe5c96351db766e55f8ef30f746b0a7017ad1f
HEAD_REF master
PATCHES 0001-Fix-boost-ICU-support.patch
)
include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)