diff options
Diffstat (limited to 'app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch')
-rw-r--r-- | app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch | 407 |
1 files changed, 407 insertions, 0 deletions
diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch new file mode 100644 index 000000000000..33f72b8f7a63 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch @@ -0,0 +1,407 @@ +https://github.com/google/mozc/issues/490 + +--- /src/base/absl.gyp ++++ /src/base/absl.gyp +@@ -28,119 +28,209 @@ + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + { +- 'variables': { +- 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl', +- 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl', +- }, ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'variables': { ++ 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl', ++ 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl', ++ }, ++ }], ++ ], + 'targets': [ + { + 'target_name': 'absl_base', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/base/internal/cycleclock.cc', +- '<(absl_srcdir)/base/internal/low_level_alloc.cc', +- '<(absl_srcdir)/base/internal/raw_logging.cc', +- '<(absl_srcdir)/base/internal/spinlock.cc', +- '<(absl_srcdir)/base/internal/spinlock_wait.cc', +- '<(absl_srcdir)/base/internal/sysinfo.cc', +- '<(absl_srcdir)/base/internal/thread_identity.cc', +- '<(absl_srcdir)/base/internal/throw_delegate.cc', +- '<(absl_srcdir)/base/internal/unscaledcycleclock.cc', +- '<(absl_srcdir)/container/internal/raw_hash_set.cc', +- '<(absl_srcdir)/hash/internal/city.cc', +- '<(absl_srcdir)/hash/internal/hash.cc', +- ], +- 'msvs_disabled_warnings': [ +- # 'type' : forcing value to bool 'true' or 'false' +- # (performance warning) +- # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx +- '4800', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_base -labsl_city -labsl_hash -labsl_malloc_internal -labsl_raw_hash_set -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_throw_delegate', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/cycleclock.cc', ++ # libabsl_malloc_internal ++ '<(absl_srcdir)/base/internal/low_level_alloc.cc', ++ # libabsl_raw_logging_internal ++ '<(absl_srcdir)/base/internal/raw_logging.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/spinlock.cc', ++ # libabsl_spinlock_wait ++ '<(absl_srcdir)/base/internal/spinlock_wait.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/sysinfo.cc', ++ '<(absl_srcdir)/base/internal/thread_identity.cc', ++ # libabsl_throw_delegate ++ '<(absl_srcdir)/base/internal/throw_delegate.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/unscaledcycleclock.cc', ++ # libabsl_raw_hash_set ++ '<(absl_srcdir)/container/internal/raw_hash_set.cc', ++ # libabsl_city ++ '<(absl_srcdir)/hash/internal/city.cc', ++ # libabsl_hash ++ '<(absl_srcdir)/hash/internal/hash.cc', ++ ], ++ 'msvs_disabled_warnings': [ ++ # 'type' : forcing value to bool 'true' or 'false' ++ # (performance warning) ++ # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx ++ '4800', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_numeric', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/numeric/int128.cc', +- ], +- 'dependencies': [ +- 'absl_base', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_int128', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_int128 ++ '<(absl_srcdir)/numeric/int128.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_strings_internal', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/strings/internal/charconv_bigint.cc', +- '<(absl_srcdir)/strings/internal/charconv_parse.cc', +- '<(absl_srcdir)/strings/internal/escaping.cc', +- '<(absl_srcdir)/strings/internal/memutil.cc', +- '<(absl_srcdir)/strings/internal/str_format/arg.cc', +- '<(absl_srcdir)/strings/internal/str_format/bind.cc', +- '<(absl_srcdir)/strings/internal/str_format/extension.cc', +- '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc', +- '<(absl_srcdir)/strings/internal/str_format/output.cc', +- '<(absl_srcdir)/strings/internal/str_format/parser.cc', +- '<(absl_srcdir)/strings/internal/utf8.cc', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_strings_internal', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_strings ++ '<(absl_srcdir)/strings/internal/charconv_bigint.cc', ++ '<(absl_srcdir)/strings/internal/charconv_parse.cc', ++ # libabsl_strings_internal ++ '<(absl_srcdir)/strings/internal/escaping.cc', ++ # libabsl_strings ++ '<(absl_srcdir)/strings/internal/memutil.cc', ++ # libabsl_str_format_internal ++ '<(absl_srcdir)/strings/internal/str_format/arg.cc', ++ '<(absl_srcdir)/strings/internal/str_format/bind.cc', ++ '<(absl_srcdir)/strings/internal/str_format/extension.cc', ++ '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc', ++ '<(absl_srcdir)/strings/internal/str_format/output.cc', ++ '<(absl_srcdir)/strings/internal/str_format/parser.cc', ++ # libabsl_strings_internal ++ '<(absl_srcdir)/strings/internal/utf8.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_strings', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/strings/ascii.cc', +- '<(absl_srcdir)/strings/charconv.cc', +- '<(absl_srcdir)/strings/escaping.cc', +- '<(absl_srcdir)/strings/match.cc', +- '<(absl_srcdir)/strings/numbers.cc', +- '<(absl_srcdir)/strings/str_cat.cc', +- '<(absl_srcdir)/strings/str_replace.cc', +- '<(absl_srcdir)/strings/str_split.cc', +- '<(absl_srcdir)/strings/string_view.cc', +- '<(absl_srcdir)/strings/substitute.cc', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', +- 'absl_strings_internal', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_str_format_internal -labsl_strings -labsl_strings_internal', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_strings ++ '<(absl_srcdir)/strings/ascii.cc', ++ '<(absl_srcdir)/strings/charconv.cc', ++ '<(absl_srcdir)/strings/escaping.cc', ++ '<(absl_srcdir)/strings/match.cc', ++ '<(absl_srcdir)/strings/numbers.cc', ++ '<(absl_srcdir)/strings/str_cat.cc', ++ '<(absl_srcdir)/strings/str_replace.cc', ++ '<(absl_srcdir)/strings/str_split.cc', ++ '<(absl_srcdir)/strings/string_view.cc', ++ '<(absl_srcdir)/strings/substitute.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ 'absl_strings_internal', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_time', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/time/civil_time.cc', +- '<(absl_srcdir)/time/clock.cc', +- '<(absl_srcdir)/time/duration.cc', +- '<(absl_srcdir)/time/format.cc', +- '<(absl_srcdir)/time/time.cc', +- '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc', +- '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc', +- ], +- 'cflags': [ +- '-Wno-error', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', +- 'absl_strings_internal', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_civil_time -labsl_time -labsl_time_zone', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_time ++ '<(absl_srcdir)/time/civil_time.cc', ++ '<(absl_srcdir)/time/clock.cc', ++ '<(absl_srcdir)/time/duration.cc', ++ '<(absl_srcdir)/time/format.cc', ++ '<(absl_srcdir)/time/time.cc', ++ # libabsl_civil_time ++ '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc', ++ # libabsl_time_zone ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc', ++ ], ++ 'cflags': [ ++ '-Wno-error', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ 'absl_strings_internal', ++ ], ++ }], + ], + }, + ], +--- /src/config/config_test.gyp ++++ /src/config/config_test.gyp +@@ -36,6 +36,7 @@ + 'config_handler_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + '../testing/testing.gyp:mozctest', + 'config.gyp:config_handler', +@@ -80,6 +81,7 @@ + 'character_form_manager_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + 'config.gyp:character_form_manager', + ], +--- /src/gyp/common.gypi ++++ /src/gyp/common.gypi +@@ -194,7 +194,13 @@ + 'include_dirs': [ + '<(abs_depth)', + '<(SHARED_INTERMEDIATE_DIR)', +- '<(absl_dir)', ++ ], ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'include_dirs': [ ++ '<(absl_dir)', ++ ], ++ }], + ], + 'mac_framework_headers': [], + 'target_conditions': [ +--- /src/gyp/common_win.gypi ++++ /src/gyp/common_win.gypi +@@ -307,10 +307,16 @@ + 'include_dirs': [ + '<(abs_depth)', + '<(SHARED_INTERMEDIATE_DIR)', +- '<(absl_dir)', + '<@(msvs_includes)', + '<(wtl_dir)/include', + ], ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'include_dirs': [ ++ '<(absl_dir)', ++ ], ++ }], ++ ], + 'msvs_configuration_attributes': { + 'CharacterSet': '<(win_char_set_unicode)', + }, +--- /src/gyp/defines.gypi ++++ /src/gyp/defines.gypi +@@ -63,6 +63,10 @@ + # use_libibus represents if ibus library is used or not. + # This option is only for Linux. + 'use_libibus%': '0', ++ ++ # use_system_abseil_cpp represents if system version or bundled version ++ # of abseil-cpp library is used. ++ 'use_system_abseil_cpp%': '0', + }, + 'target_defaults': { + 'defines': [ +--- /src/gyp/directories.gypi ++++ /src/gyp/directories.gypi +@@ -31,7 +31,12 @@ + 'variables': { + # Top directory of third party libraries. + 'third_party_dir': '<(DEPTH)/third_party', +- 'absl_dir': '<(DEPTH)/third_party/abseil-cpp', ++ ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'absl_dir': '<(DEPTH)/third_party/abseil-cpp', ++ }], ++ ], + + # Top directory of additional third party libraries. + 'ext_third_party_dir%': '<(abs_depth)/third_party', +--- /src/session/session_test.gyp ++++ /src/session/session_test.gyp +@@ -221,6 +221,7 @@ + 'internal/key_event_transformer_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../base/base.gyp:base', + '../converter/converter_base.gyp:converter_mock', + '../engine/engine.gyp:mock_converter_engine', +--- /src/storage/storage_test.gyp ++++ /src/storage/storage_test.gyp +@@ -41,6 +41,7 @@ + 'tiny_storage_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + 'storage.gyp:storage', + ], |