-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boost: fix i18n_backend=icu support for version 1.7{1,2,3}.0
- Loading branch information
Showing
10 changed files
with
889 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
recipes/boost/all/patches/boost_build_configure_relevant.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/tools/build/src/build/configure.jam 2019-08-14 14:03:50.000000000 +0200 | ||
+++ b/tools/build/src/build/configure.jam 2019-09-10 14:27:54.377625059 +0200 | ||
@@ -41,4 +41,4 @@ | ||
# relevant features are also considered relevant. | ||
# | ||
feature.compose <configure> : | ||
- <target-os> <toolset> <address-model> <architecture> <cxxstd> ; | ||
+ <target-os> <toolset> <address-model> <architecture> <cxxstd> <variant> <link> <runtime-link> ; | ||
|
||
|
||
rule log-summary ( ) |
290 changes: 290 additions & 0 deletions
290
recipes/boost/all/patches/boost_locale_build_with_icu.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,290 @@ | ||
--- a/libs/locale/build/Jamfile.v2 2019-06-17 07:23:55.206087800 +0200 | ||
+++ b/libs/locale/build/Jamfile.v2 2019-06-17 16:05:21.060372400 +0200 | ||
@@ -60,142 +60,130 @@ | ||
#end xlocale | ||
|
||
|
||
-ICU_PATH = [ modules.peek : ICU_PATH ] ; | ||
-ICU_LINK = [ modules.peek : ICU_LINK ] ; | ||
+rule path_options ( properties * ) | ||
+{ | ||
+ local result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ; | ||
+ if <address-model>64<toolset>msvc in $(properties) | ||
+ { | ||
+ result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 $(result) ; | ||
+ } | ||
+ return $(result) ; | ||
+} | ||
|
||
-if $(ICU_LINK) | ||
+rule select_icu_options ( properties * ) | ||
{ | ||
- ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ; | ||
- ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ; | ||
+ if $(ICU_LINK) | ||
+ { | ||
+ return <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <define>U_STATIC_IMPLEMENTATION=1 ; | ||
+ } | ||
+ | ||
+ local result = | ||
+ <include>$(ICU_PATH)/include | ||
+ <define>BOOST_HAS_ICU=1 | ||
+ <library>icuuc/<link>$(ICU_LINK_TYPE) | ||
+ <library>icudt/<link>$(ICU_LINK_TYPE) | ||
+ <library>icuin/<link>$(ICU_LINK_TYPE) | ||
+ ; | ||
+ | ||
+ if $(ICU_LINK_TYPE) = static | ||
+ { | ||
+ result += <define>U_STATIC_IMPLEMENTATION=1 ; | ||
+ | ||
+ if <target-os>linux in $(properties) | ||
+ { | ||
+ result += <library>dl/<link>shared ; | ||
+ } | ||
+ else if <toolset>msvc in $(properties) | ||
+ { | ||
+ result += <library>advapi32 ; | ||
+ } | ||
+ } | ||
+ | ||
+ return $(result) ; | ||
} | ||
-else | ||
+ | ||
+rule use_icu_if_enable ( properties * ) | ||
{ | ||
- 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 ; | ||
- | ||
- 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 ; | ||
- | ||
- | ||
- | ||
- searched-lib icuuc_64 : : <name>icuuc | ||
- <search>$(ICU_PATH)/lib64 | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icuuc_64 : : <toolset>msvc | ||
- <variant>debug | ||
- <name>icuucd | ||
- <search>$(ICU_PATH)/lib64 | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icuuc_64 : : <name>this_is_an_invalid_library_name ; | ||
- | ||
- searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64 | ||
- <name>icudata | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64 | ||
- <name>icudt | ||
- <toolset>msvc | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icudt_64 : : <name>this_is_an_invalid_library_name ; | ||
- | ||
- searched-lib icuin_64 : : <search>$(ICU_PATH)/lib64 | ||
- <name>icui18n | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icuin_64 : : <toolset>msvc | ||
- <variant>debug | ||
- <name>icuind | ||
- <search>$(ICU_PATH)/lib64 | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icuin_64 : : <toolset>msvc | ||
- <variant>release | ||
- <name>icuin | ||
- <search>$(ICU_PATH)/lib64 | ||
- <link>shared | ||
- <runtime-link>shared ; | ||
- | ||
- searched-lib icuin_64 : : <name>this_is_an_invalid_library_name ; | ||
- | ||
- explicit icuuc_64 icudt_64 icuin_64 ; | ||
- | ||
- ICU64_OPTS = <include>$(ICU_PATH)/include | ||
- <library>icuuc_64/<link>shared/<runtime-link>shared | ||
- <library>icudt_64/<link>shared/<runtime-link>shared | ||
- <library>icuin_64/<link>shared/<runtime-link>shared | ||
- <dll-path>$(ICU_PATH)/bin64 | ||
- <runtime-link>shared ; | ||
- | ||
- | ||
+ local result ; | ||
+ if [ configure.builds has_icu : $(properties) ] | ||
+ { | ||
+ result = [ select_icu_options $(properties) ] ; | ||
+ } | ||
+ return $(result) ; | ||
} | ||
|
||
-obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ; | ||
-obj has_icu64_obj : ../build/has_icu_test.cpp : $(ICU64_OPTS) ; | ||
|
||
-exe has_icu : has_icu_obj : $(ICU_OPTS) ; | ||
-exe has_icu64 : has_icu64_obj : $(ICU64_OPTS) ; | ||
+# | ||
+# ICU configuration: | ||
+# | ||
+if ! $(disable-icu) | ||
+{ | ||
+ if [ modules.peek : ICU_PATH ] | ||
+ { | ||
+ ICU_PATH = [ modules.peek : ICU_PATH ] ; | ||
+ } | ||
+ if [ modules.peek : ICU_LINK_TYPE ] | ||
+ { | ||
+ ICU_LINK_TYPE = [ modules.peek : ICU_LINK_TYPE ] ; | ||
+ if ! $(ICU_LINK_TYPE) in shared static | ||
+ { | ||
+ EXIT "error: Invalid ICU_LINK_TYPE : $(ICU_LINK_TYPE). Valid value are \"shared or static\"" : 1 ; | ||
+ } | ||
+ } | ||
+ else | ||
+ { | ||
+ ICU_LINK_TYPE = shared ; | ||
+ } | ||
+ | ||
+ if [ modules.peek : ICU_LINK ] | ||
+ { | ||
+ ICU_LINK = [ modules.peek : ICU_LINK ] ; | ||
+ } | ||
+ | ||
+ | ||
+ lib icuuc : : <name>icuuc <link>shared <conditional>@path_options ; | ||
+ lib icuuc : : <name>icuucd <toolset>msvc <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icuuc : : <name>icuucd <toolset>intel <target-os>windows <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icuuc : : <name>icuuc <link>static <conditional>@path_options ; | ||
+ lib icuuc : : <name>sicuuc <toolset>msvc <link>static <conditional>@path_options ; | ||
+ lib icuuc : : <name>sicuucd <toolset>msvc <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icuuc : : <name>sicuuc <toolset>intel <target-os>windows <link>static <conditional>@path_options ; | ||
+ lib icuuc : : <name>sicuucd <toolset>intel <target-os>windows <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icuuc : : <name>this_is_an_invalid_library_name ; | ||
+ | ||
+ lib icudt : : <name>icudata <link>shared <conditional>@path_options ; | ||
+ lib icudt : : <name>icudt <toolset>msvc <link>shared <conditional>@path_options ; | ||
+ lib icudt : : <name>icudtd <toolset>msvc <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icudt : : <name>icudt <toolset>intel <target-os>windows <link>shared <conditional>@path_options ; | ||
+ lib icudt : : <name>icudtd <toolset>intel <target-os>windows <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icudt : : <name>icudata <link>static <conditional>@path_options ; | ||
+ lib icudt : : <name>sicudt <toolset>msvc <link>static <conditional>@path_options ; | ||
+ lib icudt : : <name>sicudtd <toolset>msvc <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icudt : : <name>sicudt <toolset>intel <target-os>windows <link>static <conditional>@path_options ; | ||
+ lib icudt : : <name>sicudtd <toolset>intel <target-os>windows <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icudt : : <name>this_is_an_invalid_library_name ; | ||
+ | ||
+ lib icuin : : <name>icui18n <link>shared <conditional>@path_options ; | ||
+ lib icuin : : <name>icuin <toolset>msvc <link>shared <conditional>@path_options ; | ||
+ lib icuin : : <name>icuind <toolset>msvc <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icuin : : <name>icuin <toolset>intel <target-os>windows <link>shared <conditional>@path_options ; | ||
+ lib icuin : : <name>icuind <toolset>intel <target-os>windows <variant>debug <link>shared <conditional>@path_options ; | ||
+ lib icuin : : <name>icui18n <link>static <conditional>@path_options ; | ||
+ lib icuin : : <name>sicuin <toolset>msvc <link>static <conditional>@path_options ; | ||
+ lib icuin : : <name>sicuind <toolset>msvc <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icuin : : <name>sicuin <toolset>intel <target-os>windows <link>static <conditional>@path_options ; | ||
+ lib icuin : : <name>sicuind <toolset>intel <target-os>windows <variant>debug <link>static <conditional>@path_options ; | ||
+ lib icuin : : <name>this_is_an_invalid_library_name ; | ||
+ | ||
+ lib dl : : <name>dl <link>shared ; | ||
+ lib dl : : <name>this_is_an_invalid_library_name ; | ||
|
||
-explicit has_icu has_icu64 ; | ||
+ lib advapi32 : : <name>advapi32 <toolset>msvc ; | ||
+ lib advapi32 : : <name>this_is_an_invalid_library_name ; | ||
+} | ||
+ | ||
+unit-test has_icu : ../build/has_icu_test.cpp : <conditional>@select_icu_options ; | ||
+explicit has_icu ; | ||
|
||
|
||
# This function is called whenever the 'boost_locale' metatarget | ||
@@ -239,16 +221,8 @@ | ||
if [ configure.builds has_icu : $(properties) : "icu" ] | ||
{ | ||
found-icu = true ; | ||
- flags-result += <define>BOOST_LOCALE_WITH_ICU=1 $(ICU_OPTS) ; | ||
- } | ||
- else if [ configure.builds has_icu64 : $(properties) : "icu (lib64)" ] | ||
- { | ||
- found-icu = true ; | ||
- flags-result += <define>BOOST_LOCALE_WITH_ICU=1 $(ICU64_OPTS) ; | ||
- } | ||
+ flags-result += <define>BOOST_LOCALE_WITH_ICU=1 [ select_icu_options $(properties) ] ; | ||
|
||
- if $(found-icu) | ||
- { | ||
ICU_SOURCES = | ||
boundary | ||
codecvt | ||
--- a/libs/locale/build/has_icu_test.cpp 2019-05-21 10:45:05.709311300 +0200 | ||
+++ b/libs/locale/build/has_icu_test.cpp 2019-06-21 16:09:57.742157700 +0200 | ||
@@ -16,7 +16,7 @@ | ||
#include <unicode/coll.h> | ||
|
||
#if defined(_MSC_VER) && !defined(_DLL) | ||
-#error "Mixing ICU with a static runtime doesn't work" | ||
+//#error "Mixing ICU with a static runtime doesn't work" | ||
#endif | ||
|
||
int main() |
Oops, something went wrong.