summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2020-12-24 00:00:00 +0000
committerMike Gilbert <floppym@gentoo.org>2020-12-27 13:39:09 -0500
commita8d6f62a23fcd36032df86eb2e2093907852124e (patch)
treee4db733a04afe34b76c86559eb23615abca37ce8 /app-i18n
parentdev-db/sqlite: Version bump (3.34.0). (diff)
downloadgentoo-a8d6f62a23fcd36032df86eb2e2093907852124e.tar.gz
gentoo-a8d6f62a23fcd36032df86eb2e2093907852124e.tar.bz2
gentoo-a8d6f62a23fcd36032df86eb2e2093907852124e.zip
app-i18n/mozc: Version bump (2.26.4220_p20201212102434_p20201219202429).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/mozc/Manifest3
-rw-r--r--app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch89
-rw-r--r--app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch95
-rw-r--r--app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch407
-rw-r--r--app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch141
-rw-r--r--app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch117
-rw-r--r--app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild380
-rw-r--r--app-i18n/mozc/mozc-9999.ebuild137
8 files changed, 1307 insertions, 62 deletions
diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest
index 72d8dc73f386..c9793aee241a 100644
--- a/app-i18n/mozc/Manifest
+++ b/app-i18n/mozc/Manifest
@@ -1,4 +1,7 @@
DIST fcitx-mozc-2.23.2815.102.1.patch 295112 BLAKE2B 709b84f6eaed16da38a173f40ae7cccff362fd167e6deb4090ae8a9ec522ac8e11ccff3c9ef6433907249af8c9eb4b7be12d2c05564cabd45c25e26764286ed3 SHA512 e0d4645df919838f0fe31a97bf6dd759c222a696f68133f7584d2c771f70734ea634a25bebb03a756221000d3552423207ee5163d75778dbf480b6e267ba4cd0
+DIST fcitx-mozc-2.26.4220-20201219202429.tar.gz 37174759 BLAKE2B 3f320523103ee7a35a763f6613889e282e8a654db8ef11b5a1168db12611387e300621f015977875ffec3c10c055e36b3cb525a1e8559013f3ac42bc5b0cc296 SHA512 823e64267aa69e4d30dd7408f946a54072994f9a2d68691a3d393b216a15e70fd28bcb24705f9d9f483a2291517c48c5a1aeda893d2315f9a1d9cd352fb3feb2
DIST japanese-usage-dictionary-20120416091336.tar.gz 71051 BLAKE2B 08eecf0aa021e27a2813f58c2d37f1cec760448f6ae086ae7468b8a11575c6ef9f72f656cb4d53e0179b8a7b00f2d91ff51a0ad7825e078dcbac0810f1d8b3e1 SHA512 b7e997a979b6d50e49b9af5dc830ea4df0532f6ab1321b9ef14983f65bb54f1b2967375c82e07957ae7693ebbf43c9b56ecea6bfea8dd1fdaee444bd549d83a7
+DIST japanese-usage-dictionary-20180701040110.tar.gz 71285 BLAKE2B dfad056a1d5061b6764f583da15b9ad60a3c4421cee0430c4665d1c2779a64f9b31473c1746a3e2b9bda5167349432e51dcf7d4d48f75fde9543e9c16ff74c0d SHA512 68b4d3f52dd6cd4f00a8012a870b4f5929519cd69815b1729f3881d1f964802308f4aa101e236824b4c0f832183a9e8097437ed620403f2a652f126e7cdc1eb3
DIST mozc-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch 40296 BLAKE2B 982f43fa68031eb0f779ec4d034fef838a4fce7834291db889c9edffba3df4acd5bfdf187dd4a52ee8fd0714de943f9d5112070cd69502e1449dab4dbf8543b2 SHA512 6e05b2f22663ddbfb24a8344928ec24c0b4cf523728c1623367970b8f263142af95c056c82d0827414833d5b9f26c3a024a04a688851021601a5cbcc1474e754
DIST mozc-2.23.2815.102.tar.gz 47739041 BLAKE2B 045a8a4a07e09cf923b67824111cdf672febc30256a6aef951ae779a3f582b3860042750d766120e376898c63be5b4baea870798a192cee34b0d48647e1ec5e6 SHA512 a3face616ca89990bca52371dcc8003604ebe0e9633116a64550add070152b1bc4d9b21e9f102c5afa6f8b1aa11d8dbc4bafbcebfaf4a12a934f085f245d548f
+DIST mozc-2.26.4220-20201212102434.tar.gz 37106063 BLAKE2B 7d3c236809c8feb017f35e3f7a9b024ac34204f483c69913a2d1ae6b771054548f7f81afde35ed3a6887c9f7503584cee0fc646653fc7cde6fd015158de9c3d3 SHA512 9d87947b9b9256a3cc66cb23ab6caf4b6974142090b0d315c101bdc700fd289c259d09cb7f02f5f9e7462f48d652cd2d5b4822a645751fdcaed88b939520c429
diff --git a/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch b/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch
new file mode 100644
index 000000000000..dccdff76f15d
--- /dev/null
+++ b/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch
@@ -0,0 +1,89 @@
+https://github.com/google/mozc/issues/470
+
+--- /src/base/system_util.cc
++++ /src/base/system_util.cc
+@@ -226,6 +226,11 @@
+
+ std::string UserProfileDirectoryImpl::GetUserProfileDirectory() const {
+ #if defined(OS_CHROMEOS)
++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY");
++ if (configuration_directory_env) {
++ return configuration_directory_env;
++ }
++
+ // TODO(toka): Must use passed in user profile dir which passed in. If mojo
+ // platform the user profile is determined on runtime.
+ // It's hack, the user profile dir should be passed in. Although the value in
+@@ -245,13 +250,23 @@
+ #elif defined(OS_IOS)
+ // OS_IOS block must be placed before __APPLE__ because both macros are
+ // currently defined on iOS.
+- //
++
++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY");
++ if (configuration_directory_env) {
++ return configuration_directory_env;
++ }
++
+ // On iOS, use Caches directory instead of Application Spport directory
+ // because the support directory doesn't exist by default. Also, it is backed
+ // up by iTunes and iCloud.
+ return FileUtil::JoinPath({MacUtil::GetCachesDirectory(), kProductPrefix});
+
+ #elif defined(OS_WIN)
++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY");
++ if (configuration_directory_env) {
++ return configuration_directory_env;
++ }
++
+ DCHECK(SUCCEEDED(Singleton<LocalAppDataDirectoryCache>::get()->result()));
+ std::string dir = Singleton<LocalAppDataDirectoryCache>::get()->path();
+
+@@ -263,6 +278,11 @@
+
+
+ #elif defined(__APPLE__)
++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY");
++ if (configuration_directory_env) {
++ return configuration_directory_env;
++ }
++
+ std::string dir = MacUtil::GetApplicationSupportDirectory();
+ # ifdef GOOGLE_JAPANESE_INPUT_BUILD
+ dir = FileUtil::JoinPath(dir, "Google");
+@@ -276,6 +296,11 @@
+
+
+ #elif defined(OS_LINUX)
++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY");
++ if (configuration_directory_env) {
++ return configuration_directory_env;
++ }
++
+ // 1. If "$HOME/.mozc" already exists,
+ // use "$HOME/.mozc" for backward compatibility.
+ // 2. If $XDG_CONFIG_HOME is defined
+@@ -395,6 +420,11 @@
+ #endif // OS_WIN
+
+ std::string SystemUtil::GetServerDirectory() {
++ const char *server_directory_env = Environ::GetEnv("MOZC_SERVER_DIRECTORY");
++ if (server_directory_env) {
++ return server_directory_env;
++ }
++
+ #ifdef OS_WIN
+ DCHECK(SUCCEEDED(Singleton<ProgramFilesX86Cache>::get()->result()));
+ # if defined(GOOGLE_JAPANESE_INPUT_BUILD)
+@@ -453,6 +483,11 @@
+ }
+
+ std::string SystemUtil::GetDocumentDirectory() {
++ const char *documents_directory_env = Environ::GetEnv("MOZC_DOCUMENTS_DIRECTORY");
++ if (documents_directory_env) {
++ return documents_directory_env;
++ }
++
+ #if defined(__APPLE__)
+ return GetServerDirectory();
+ #elif defined(MOZC_DOCUMENT_DIRECTORY)
diff --git a/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch b/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch
new file mode 100644
index 000000000000..8dbabeac0038
--- /dev/null
+++ b/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch
@@ -0,0 +1,95 @@
+https://github.com/google/mozc/issues/471
+
+--- /src/ipc/ipc_path_manager.cc
++++ /src/ipc/ipc_path_manager.cc
+@@ -340,9 +340,21 @@
+ return false;
+ }
+
++ // Expand symbolic links in the expected server path to avoid false negatives
++ // during comparisons of the expected server path and the actual server path.
++ string real_server_path = server_path;
++#ifndef OS_WIN
++ char real_server_path_[PATH_MAX];
++ if (realpath(server_path.c_str(), real_server_path_) == NULL) {
++ LOG(ERROR) << "realpath failed: " << strerror(errno);
++ return false;
++ }
++ real_server_path = real_server_path_;
++#endif
++
+ // compare path name
+ if (pid == server_pid_) {
+- return (server_path == server_path_);
++ return (real_server_path == server_path_);
+ }
+
+ server_pid_ = 0;
+@@ -352,17 +364,17 @@
+ {
+ std::wstring expected_server_ntpath;
+ const std::map<string, std::wstring>::const_iterator it =
+- expected_server_ntpath_cache_.find(server_path);
++ expected_server_ntpath_cache_.find(real_server_path);
+ if (it != expected_server_ntpath_cache_.end()) {
+ expected_server_ntpath = it->second;
+ } else {
+ std::wstring wide_server_path;
+- Util::UTF8ToWide(server_path, &wide_server_path);
++ Util::UTF8ToWide(real_server_path, &wide_server_path);
+ if (WinUtil::GetNtPath(wide_server_path, &expected_server_ntpath)) {
+- // Caches the relationship from |server_path| to
+- // |expected_server_ntpath| in case |server_path| is renamed later.
++ // Caches the relationship from |real_server_path| to
++ // |expected_server_ntpath| in case |real_server_path| is renamed later.
+ // (This can happen during the updating).
+- expected_server_ntpath_cache_[server_path] = expected_server_ntpath;
++ expected_server_ntpath_cache_[real_server_path] = expected_server_ntpath;
+ }
+ }
+
+@@ -379,9 +391,9 @@
+ return false;
+ }
+
+- // Here we can safely assume that |server_path| (expected one) should be
++ // Here we can safely assume that |real_server_path| (expected one) should be
+ // the same to |server_path_| (actual one).
+- server_path_ = server_path;
++ server_path_ = real_server_path;
+ server_pid_ = pid;
+ }
+ #endif // OS_WIN
+@@ -406,7 +418,7 @@
+ #ifdef OS_LINUX
+ // load from /proc/<pid>/exe
+ char proc[128];
+- char filename[512];
++ char filename[PATH_MAX];
+ absl::SNPrintF(proc, sizeof(proc) - 1, "/proc/%u/exe", pid);
+ const ssize_t size = readlink(proc, filename, sizeof(filename) - 1);
+ if (size == -1) {
+@@ -419,18 +431,18 @@
+ server_pid_ = pid;
+ #endif // OS_LINUX
+
+- VLOG(1) << "server path: " << server_path << " " << server_path_;
+- if (server_path == server_path_) {
++ VLOG(1) << "server path: " << real_server_path << " " << server_path_;
++ if (real_server_path == server_path_) {
+ return true;
+ }
+
+ #ifdef OS_LINUX
+- if ((server_path + " (deleted)") == server_path_) {
+- LOG(WARNING) << server_path << " on disk is modified";
++ if ((real_server_path + " (deleted)") == server_path_) {
++ LOG(WARNING) << real_server_path << " on disk is modified";
+ // If a user updates the server binary on disk during the server is running,
+ // "readlink /proc/<pid>/exe" returns a path with the " (deleted)" suffix.
+ // We allow the special case.
+- server_path_ = server_path;
++ server_path_ = real_server_path;
+ return true;
+ }
+ #endif // OS_LINUX
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',
+ ],
diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch
new file mode 100644
index 000000000000..47891fab9b47
--- /dev/null
+++ b/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch
@@ -0,0 +1,141 @@
+https://github.com/google/mozc/issues/490
+
+--- /src/gyp/defines.gypi
++++ /src/gyp/defines.gypi
+@@ -67,6 +67,10 @@
+ # use_system_abseil_cpp represents if system version or bundled version
+ # of abseil-cpp library is used.
+ 'use_system_abseil_cpp%': '0',
++
++ # use_system_gtest represents if system version or bundled version
++ # of gtest library is used.
++ 'use_system_gtest%': '0',
+ },
+ 'target_defaults': {
+ 'defines': [
+--- /src/testing/testing.gyp
++++ /src/testing/testing.gyp
+@@ -59,54 +59,76 @@
+ 'targets': [
+ {
+ 'target_name': 'testing',
+- 'type': 'static_library',
+- 'variables': {
+- 'gtest_defines': [
+- 'GTEST_LANG_CXX11=1',
+- 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
+- ],
+- 'gtest_dir': '<(third_party_dir)/gtest/googletest',
+- 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
+- },
+- 'sources': [
+- '<(gmock_dir)/src/gmock-cardinalities.cc',
+- '<(gmock_dir)/src/gmock-internal-utils.cc',
+- '<(gmock_dir)/src/gmock-matchers.cc',
+- '<(gmock_dir)/src/gmock-spec-builders.cc',
+- '<(gmock_dir)/src/gmock.cc',
+- '<(gtest_dir)/src/gtest-death-test.cc',
+- '<(gtest_dir)/src/gtest-filepath.cc',
+- '<(gtest_dir)/src/gtest-matchers.cc',
+- '<(gtest_dir)/src/gtest-port.cc',
+- '<(gtest_dir)/src/gtest-printers.cc',
+- '<(gtest_dir)/src/gtest-test-part.cc',
+- '<(gtest_dir)/src/gtest-typed-test.cc',
+- '<(gtest_dir)/src/gtest.cc',
+- ],
+- 'include_dirs': [
+- '<(gmock_dir)',
+- '<(gmock_dir)/include',
+- '<(gtest_dir)',
+- '<(gtest_dir)/include',
+- ],
+- 'defines': [
+- '<@(gtest_defines)',
+- ],
+- 'all_dependent_settings': {
+- 'defines': [
+- '<@(gtest_defines)',
+- ],
+- 'include_dirs': [
+- '<(gmock_dir)/include',
+- '<(gtest_dir)/include',
+- ],
+- },
+ 'conditions': [
+- ['(_toolset=="target" and compiler_target=="clang") or '
+- '(_toolset=="host" and compiler_host=="clang")', {
+- 'cflags': [
+- '-Wno-missing-field-initializers',
+- '-Wno-unused-private-field',
++ ['use_system_gtest==1', {
++ 'type': 'none',
++ 'variables': {
++ 'gtest_defines': [
++ 'GTEST_LANG_CXX11=1',
++ 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
++ ],
++ },
++ 'all_dependent_settings': {
++ 'defines': [
++ '<@(gtest_defines)',
++ ],
++ 'link_settings': {
++ 'libraries': [
++ '-lgmock -lgtest',
++ ],
++ },
++ },
++ }, {
++ 'type': 'static_library',
++ 'variables': {
++ 'gtest_defines': [
++ 'GTEST_LANG_CXX11=1',
++ 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
++ ],
++ 'gtest_dir': '<(third_party_dir)/gtest/googletest',
++ 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
++ },
++ 'sources': [
++ '<(gmock_dir)/src/gmock-cardinalities.cc',
++ '<(gmock_dir)/src/gmock-internal-utils.cc',
++ '<(gmock_dir)/src/gmock-matchers.cc',
++ '<(gmock_dir)/src/gmock-spec-builders.cc',
++ '<(gmock_dir)/src/gmock.cc',
++ '<(gtest_dir)/src/gtest-death-test.cc',
++ '<(gtest_dir)/src/gtest-filepath.cc',
++ '<(gtest_dir)/src/gtest-matchers.cc',
++ '<(gtest_dir)/src/gtest-port.cc',
++ '<(gtest_dir)/src/gtest-printers.cc',
++ '<(gtest_dir)/src/gtest-test-part.cc',
++ '<(gtest_dir)/src/gtest-typed-test.cc',
++ '<(gtest_dir)/src/gtest.cc',
++ ],
++ 'include_dirs': [
++ '<(gmock_dir)',
++ '<(gmock_dir)/include',
++ '<(gtest_dir)',
++ '<(gtest_dir)/include',
++ ],
++ 'defines': [
++ '<@(gtest_defines)',
++ ],
++ 'all_dependent_settings': {
++ 'defines': [
++ '<@(gtest_defines)',
++ ],
++ 'include_dirs': [
++ '<(gmock_dir)/include',
++ '<(gtest_dir)/include',
++ ],
++ },
++ 'conditions': [
++ ['(_toolset=="target" and compiler_target=="clang") or '
++ '(_toolset=="host" and compiler_host=="clang")', {
++ 'cflags': [
++ '-Wno-missing-field-initializers',
++ '-Wno-unused-private-field',
++ ],
++ }],
+ ],
+ }],
+ ],
diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch
new file mode 100644
index 000000000000..7ff132eaa591
--- /dev/null
+++ b/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch
@@ -0,0 +1,117 @@
+https://github.com/google/mozc/issues/490
+
+--- /src/gyp/defines.gypi
++++ /src/gyp/defines.gypi
+@@ -71,6 +71,10 @@
+ # use_system_gtest represents if system version or bundled version
+ # of gtest library is used.
+ 'use_system_gtest%': '0',
++
++ # use_system_jsoncpp represents if system version or bundled version
++ # of jsoncpp library is used.
++ 'use_system_jsoncpp%': '0',
+ },
+ 'target_defaults': {
+ 'defines': [
+--- /src/net/jsoncpp.gyp
++++ /src/net/jsoncpp.gyp
+@@ -31,32 +31,60 @@
+ 'targets': [
+ {
+ 'target_name': 'jsoncpp',
+- 'type': 'static_library',
+- 'variables': {
+- 'jsoncpp_root': '<(third_party_dir)/jsoncpp',
+- 'jsoncpp_srcs': [
+- '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
+- '<(jsoncpp_root)/src/lib_json/json_value.cpp',
+- '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
+- ],
+- 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
+- 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
+- },
+- 'defines': [
+- '<@(jsoncpp_additional_macros)',
++ 'conditions': [
++ ['use_system_jsoncpp==1', {
++ 'type': 'none',
++ 'variables': {
++ 'jsoncpp_additional_macros': [
++ 'JSON_USE_EXCEPTION=0',
++ 'MOZC_USE_SYSTEM_JSONCPP',
++ ],
++ },
++ 'all_dependent_settings': {
++ 'defines': [
++ '<@(jsoncpp_additional_macros)',
++ ],
++ 'cflags': [
++ '<!@(pkg-config --cflags jsoncpp)',
++ ],
++ 'link_settings': {
++ 'libraries': [
++ '<!@(pkg-config --libs-only-l jsoncpp)',
++ ],
++ 'ldflags': [
++ '<!@(pkg-config --libs-only-L jsoncpp)',
++ ],
++ }
++ },
++ }, {
++ 'type': 'static_library',
++ 'variables': {
++ 'jsoncpp_root': '<(third_party_dir)/jsoncpp',
++ 'jsoncpp_srcs': [
++ '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
++ '<(jsoncpp_root)/src/lib_json/json_value.cpp',
++ '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
++ ],
++ 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
++ 'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
++ },
++ 'defines': [
++ '<@(jsoncpp_additional_macros)',
++ ],
++ 'sources': [
++ '<@(jsoncpp_srcs)',
++ 'jsoncpp.h',
++ ],
++ 'include_dirs': [
++ '<@(jsoncpp_include_dirs)',
++ ],
++ 'all_dependent_settings': {
++ 'defines': [
++ '<@(jsoncpp_additional_macros)',
++ ],
++ },
++ }],
+ ],
+- 'sources': [
+- '<@(jsoncpp_srcs)',
+- 'jsoncpp.h',
+- ],
+- 'include_dirs': [
+- '<@(jsoncpp_include_dirs)',
+- ],
+- 'all_dependent_settings': {
+- 'defines': [
+- '<@(jsoncpp_additional_macros)',
+- ],
+- },
+ },
+ ],
+ }
+--- /src/net/jsoncpp.h
++++ /src/net/jsoncpp.h
+@@ -35,7 +35,11 @@
+ // Mozc basically disables C++ exception.
+ #define JSON_USE_EXCEPTION 0
+ #endif // !JSON_USE_EXCEPTION
++#ifdef MOZC_USE_SYSTEM_JSONCPP
++#include <json/json.h>
++#else
+ #include "third_party/jsoncpp/include/json/json.h"
++#endif
+ #define MOZC_JSONCPP_JSON_H_INCLUDED
+ #endif // !MOZC_JSONCPP_JSON_H_INCLUDED
+
diff --git a/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild
new file mode 100644
index 000000000000..d6d44a3758f6
--- /dev/null
+++ b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild
@@ -0,0 +1,380 @@
+# Copyright 2010-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=(python{3_7,3_8,3_9})
+
+inherit elisp-common multiprocessing python-any-r1 toolchain-funcs
+
+if [[ "${PV}" == "9999" ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/google/mozc"
+ EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary)
+else
+ MOZC_GIT_REVISION="9ba59b64d53365c1fe93c1c245b4ec3e35bdadf0"
+ MOZC_DATE="${PV#*_p}"
+ MOZC_DATE="${MOZC_DATE%%_p*}"
+
+ FCITX_MOZC_GIT_REVISION="1ea089debc31ff216473369ad71c08318384ee06"
+ FCITX_MOZC_DATE="${PV#*_p}"
+ FCITX_MOZC_DATE="${FCITX_MOZC_DATE#*_p}"
+ FCITX_MOZC_DATE="${FCITX_MOZC_DATE%%_p*}"
+
+ JAPANESE_USAGE_DICTIONARY_GIT_REVISION="a4a66772e33746b91e99caceecced9a28507e925"
+ JAPANESE_USAGE_DICTIONARY_DATE="20180701040110"
+fi
+
+DESCRIPTION="Mozc - Japanese input method editor"
+HOMEPAGE="https://github.com/google/mozc"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz
+ https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}.tar.gz -> japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
+ fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz )"
+fi
+
+# Mozc: BSD
+# src/data/dictionary_oss: ipadic, public-domain
+# src/data/unicode: unicode
+# japanese-usage-dictionary: BSD-2
+LICENSE="BSD BSD-2 ipadic public-domain unicode"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="debug emacs fcitx4 +gui ibus renderer test"
+REQUIRED_USE="|| ( emacs fcitx4 ibus )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ >=dev-libs/protobuf-3.0.0
+ dev-util/gyp
+ dev-util/ninja
+ virtual/pkgconfig
+ emacs? ( app-editors/emacs:* )
+ fcitx4? ( sys-devel/gettext )"
+DEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)]
+ >=dev-libs/protobuf-3.0.0:=
+ fcitx4? (
+ app-i18n/fcitx:4
+ virtual/libintl
+ )
+ gui? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ ibus? (
+ >=app-i18n/ibus-1.4.1
+ dev-libs/glib:2
+ x11-libs/libxcb
+ )
+ renderer? (
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )
+ test? (
+ >=dev-cpp/gtest-1.8.0
+ dev-libs/jsoncpp
+ )"
+RDEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)]
+ >=dev-libs/protobuf-3.0.0:=
+ emacs? ( app-editors/emacs:* )
+ fcitx4? (
+ app-i18n/fcitx:4
+ virtual/libintl
+ )
+ gui? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ ibus? (
+ >=app-i18n/ibus-1.4.1
+ dev-libs/glib:2
+ x11-libs/libxcb
+ )
+ renderer? (
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )"
+
+S="${WORKDIR}/${P}/src"
+
+SITEFILE="50${PN}-gentoo.el"
+
+execute() {
+ einfo "$@"
+ "$@"
+}
+
+python_check_deps() {
+ has_version -b "dev-python/six[${PYTHON_USEDEP}]"
+}
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ git-r3_src_unpack
+
+ if use fcitx4; then
+ local EGIT_SUBMODULES=()
+ git-r3_fetch https://github.com/fcitx/mozc refs/heads/fcitx
+ git-r3_checkout https://github.com/fcitx/mozc "${WORKDIR}/fcitx-mozc"
+ fi
+ else
+ unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz
+ mv mozc-${MOZC_GIT_REVISION} ${P} || die
+
+ unpack japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
+ cp -p japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}/usage_dict.txt ${P}/src/third_party/japanese_usage_dictionary || die
+
+ if use fcitx4; then
+ unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz
+ mv mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN}
+ fi
+ fi
+}
+
+src_prepare() {
+ if use fcitx4; then
+ cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die
+ fi
+
+ pushd "${WORKDIR}/${P}" > /dev/null || die
+
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_abseil-cpp.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_gtest.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_jsoncpp.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-environmental_variables.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-server_path_check.patch"
+
+ eapply_user
+
+ popd > /dev/null || die
+
+ sed \
+ -e "s/def GypMain(options, unused_args):/def GypMain(options, gyp_args):/" \
+ -e "s/RunOrDie(gyp_command + gyp_options)/RunOrDie(gyp_command + gyp_options + gyp_args)/" \
+ -e "s/RunOrDie(\[ninja/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \
+ -i build_mozc.py || die
+
+ local ar=($(tc-getAR))
+ local cc=($(tc-getCC))
+ local cxx=($(tc-getCXX))
+ local ld=($(tc-getLD))
+ local nm=($(tc-getNM))
+ local readelf=($(tc-getREADELF))
+
+ # Use absolute paths. Non-absolute paths are mishandled by GYP.
+ ar[0]=$(type -P ${ar[0]})
+ cc[0]=$(type -P ${cc[0]})
+ cxx[0]=$(type -P ${cxx[0]})
+ ld[0]=$(type -P ${ld[0]})
+ nm[0]=$(type -P ${nm[0]})
+ readelf[0]=$(type -P ${readelf[0]})
+
+ sed \
+ -e "s:<!(which ar):${ar[@]}:" \
+ -e "s:<!(which clang):${cc[@]}:" \
+ -e "s:<!(which clang++):${cxx[@]}:" \
+ -e "s:<!(which ld):${ld[@]}:" \
+ -e "s:<!(which nm):${nm[@]}:" \
+ -e "s:<!(which readelf):${readelf[@]}:" \
+ -i gyp/common.gypi || die
+
+ # https://github.com/google/mozc/issues/489
+ sed \
+ -e "/'-lc++'/d" \
+ -e "/'-stdlib=libc++'/d" \
+ -i gyp/common.gypi || die
+}
+
+src_configure() {
+ if use debug; then
+ BUILD_TYPE="Debug"
+ else
+ BUILD_TYPE="Release"
+ fi
+
+ local gyp_arguments=()
+
+ if tc-is-gcc; then
+ gyp_arguments+=(-D compiler_host=gcc -D compiler_target=gcc)
+ elif tc-is-clang; then
+ gyp_arguments+=(-D compiler_host=clang -D compiler_target=clang)
+ else
+ gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
+ fi
+
+ gyp_arguments+=(-D debug_extra_cflags=)
+ gyp_arguments+=(-D release_extra_cflags=)
+
+ gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO))
+ gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
+ gyp_arguments+=(-D use_libprotobuf=1)
+ gyp_arguments+=(-D use_system_abseil_cpp=1)
+ gyp_arguments+=(-D use_system_gtest=$(usex test 1 0))
+ gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0))
+ gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))
+
+ gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc")
+ gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents")
+
+ if use ibus; then
+ gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc")
+ gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png")
+ fi
+
+ unset AR CC CXX LD NM READELF
+
+ execute "${PYTHON}" build_mozc.py gyp \
+ --gypdir="${EPREFIX}/usr/bin" \
+ --server_dir="${EPREFIX}/usr/libexec/mozc" \
+ --verbose \
+ $(usex gui "" --noqt) \
+ -- "${gyp_arguments[@]}" || die "Configuration failed"
+}
+
+src_compile() {
+ local targets=(server/server.gyp:mozc_server)
+ if use emacs; then
+ targets+=(unix/emacs/emacs.gyp:mozc_emacs_helper)
+ fi
+ if use fcitx4; then
+ targets+=(unix/fcitx/fcitx.gyp:fcitx-mozc)
+ fi
+ if use gui; then
+ targets+=(gui/gui.gyp:mozc_tool)
+ fi
+ if use ibus; then
+ targets+=(unix/ibus/ibus.gyp:ibus_mozc)
+ fi
+ if use renderer; then
+ targets+=(renderer/renderer.gyp:mozc_renderer)
+ fi
+ if use test; then
+ targets+=(gyp/tests.gyp:unittests)
+ fi
+
+ execute "${PYTHON}" build_mozc.py build -c ${BUILD_TYPE} -v "${targets[@]}" || die "Building failed"
+
+ if use emacs; then
+ elisp-compile unix/emacs/*.el
+ fi
+}
+
+src_test() {
+ execute "${PYTHON}" build_mozc.py runtests -c ${BUILD_TYPE} --test_jobs 1 || die "Testing failed"
+}
+
+src_install() {
+ exeinto /usr/libexec/mozc
+ doexe out_linux/${BUILD_TYPE}/mozc_server
+
+ if use gui; then
+ doexe out_linux/${BUILD_TYPE}/mozc_tool
+ fi
+
+ if use renderer; then
+ doexe out_linux/${BUILD_TYPE}/mozc_renderer
+ fi
+
+ insinto /usr/libexec/mozc/documents
+ doins data/installer/credits_en.html
+
+ if use emacs; then
+ dobin out_linux/${BUILD_TYPE}/mozc_emacs_helper
+ elisp-install ${PN} unix/emacs/*.{el,elc}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN}
+ fi
+
+ if use fcitx4; then
+ exeinto /usr/$(get_libdir)/fcitx
+ doexe out_linux/${BUILD_TYPE}/fcitx-mozc.so
+
+ insinto /usr/share/fcitx/addon
+ doins unix/fcitx/fcitx-mozc.conf
+
+ insinto /usr/share/fcitx/inputmethod
+ doins unix/fcitx/mozc.conf
+
+ insinto /usr/share/fcitx/mozc/icon
+ newins data/images/product_icon_32bpp-128.png mozc.png
+ local image
+ for image in ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do
+ newins "${image}" "mozc-${image#../../fcitx-${PN}/src/data/images/unix/ui-}"
+ done
+
+ local locale mo_file
+ for mo_file in out_linux/${BUILD_TYPE}/gen/unix/fcitx/po/*.mo; do
+ locale="${mo_file##*/}"
+ locale="${locale%.mo}"
+ insinto /usr/share/locale/${locale}/LC_MESSAGES
+ newins "${mo_file}" fcitx-mozc.mo
+ done
+ fi
+
+ if use ibus; then
+ exeinto /usr/libexec
+ newexe out_linux/${BUILD_TYPE}/ibus_mozc ibus-engine-mozc
+
+ insinto /usr/share/ibus/component
+ doins out_linux/${BUILD_TYPE}/gen/unix/ibus/mozc.xml
+
+ insinto /usr/share/ibus-mozc
+ newins data/images/unix/ime_product_icon_opensource-32.png product_icon.png
+ local image
+ for image in data/images/unix/ui-*.png; do
+ newins "${image}" "${image#data/images/unix/ui-}"
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog "ENVIRONMENTAL VARIABLES"
+ elog
+ elog "MOZC_SERVER_DIRECTORY"
+ elog " Mozc server directory"
+ elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc\""
+ elog "MOZC_DOCUMENTS_DIRECTORY"
+ elog " Mozc documents directory"
+ elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc/documents\""
+ elog "MOZC_CONFIGURATION_DIRECTORY"
+ elog " Mozc configuration directory"
+ elog " Value used by default: \"~/.mozc\""
+ elog
+ if use emacs; then
+ elog
+ elog "USAGE IN EMACS"
+ elog
+ elog "mozc-mode is minor mode to input Japanese text using Mozc server."
+ elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)."
+ elog
+ elog "In order to use mozc-mode by default, the following settings should be added to"
+ elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):"
+ elog
+ elog " (require 'mozc)"
+ elog " (set-language-environment \"Japanese\")"
+ elog " (setq default-input-method \"japanese-mozc\")"
+ elog
+ elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\""
+ elog "by default) will enable mozc-mode."
+ elog
+ elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by"
+ elog "calling \"set-input-method\" and entering \"japanese-mozc\"."
+ elog
+
+ elisp-site-regen
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ fi
+}
diff --git a/app-i18n/mozc/mozc-9999.ebuild b/app-i18n/mozc/mozc-9999.ebuild
index b93a912f62ea..020c3b037550 100644
--- a/app-i18n/mozc/mozc-9999.ebuild
+++ b/app-i18n/mozc/mozc-9999.ebuild
@@ -13,9 +13,16 @@ if [[ "${PV}" == "9999" ]]; then
EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary)
else
MOZC_GIT_REVISION=""
+ MOZC_DATE="${PV#*_p}"
+ MOZC_DATE="${MOZC_DATE%%_p*}"
+
+ FCITX_MOZC_GIT_REVISION=""
+ FCITX_MOZC_DATE="${PV#*_p}"
+ FCITX_MOZC_DATE="${FCITX_MOZC_DATE#*_p}"
+ FCITX_MOZC_DATE="${FCITX_MOZC_DATE%%_p*}"
+
JAPANESE_USAGE_DICTIONARY_GIT_REVISION=""
JAPANESE_USAGE_DICTIONARY_DATE=""
- FCITX_PATCH_VERSION=""
fi
DESCRIPTION="Mozc - Japanese input method editor"
@@ -23,10 +30,9 @@ HOMEPAGE="https://github.com/google/mozc"
if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
- SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${P}.tar.gz
+ SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}.tar.gz -> japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
- https://dev.gentoo.org/~juippis/distfiles/tmp/mozc-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch
- fcitx4? ( https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${FCITX_PATCH_VERSION}.patch )"
+ fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz )"
fi
# Mozc: BSD
@@ -36,30 +42,27 @@ fi
LICENSE="BSD BSD-2 ipadic public-domain unicode"
SLOT="0"
KEYWORDS=""
-IUSE="debug emacs fcitx4 +gui +handwriting-tegaki handwriting-tomoe ibus renderer test"
-REQUIRED_USE="|| ( emacs fcitx4 ibus ) gui? ( ^^ ( handwriting-tegaki handwriting-tomoe ) ) !gui? ( !handwriting-tegaki !handwriting-tomoe )"
+IUSE="debug emacs fcitx4 +gui ibus renderer test"
+REQUIRED_USE="|| ( emacs fcitx4 ibus )"
RESTRICT="!test? ( test )"
-BDEPEND="${PYTHON_DEPS}
+BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
>=dev-libs/protobuf-3.0.0
dev-util/gyp
dev-util/ninja
virtual/pkgconfig
emacs? ( app-editors/emacs:* )
fcitx4? ( sys-devel/gettext )"
-RDEPEND=">=dev-libs/protobuf-3.0.0:=
- emacs? ( app-editors/emacs:* )
+DEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)]
+ >=dev-libs/protobuf-3.0.0:=
fcitx4? (
app-i18n/fcitx:4
virtual/libintl
)
gui? (
- app-i18n/zinnia
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
- handwriting-tegaki? ( app-i18n/tegaki-zinnia-japanese )
- handwriting-tomoe? ( app-i18n/zinnia-tomoe )
)
ibus? (
>=app-i18n/ibus-1.4.1
@@ -71,12 +74,34 @@ RDEPEND=">=dev-libs/protobuf-3.0.0:=
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/pango
- )"
-DEPEND="${RDEPEND}
+ )
test? (
>=dev-cpp/gtest-1.8.0
dev-libs/jsoncpp
)"
+RDEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)]
+ >=dev-libs/protobuf-3.0.0:=
+ emacs? ( app-editors/emacs:* )
+ fcitx4? (
+ app-i18n/fcitx:4
+ virtual/libintl
+ )
+ gui? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )
+ ibus? (
+ >=app-i18n/ibus-1.4.1
+ dev-libs/glib:2
+ x11-libs/libxcb
+ )
+ renderer? (
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )"
S="${WORKDIR}/${P}/src"
@@ -87,6 +112,10 @@ execute() {
"$@"
}
+python_check_deps() {
+ has_version -b "dev-python/six[${PYTHON_USEDEP}]"
+}
+
src_unpack() {
if [[ "${PV}" == "9999" ]]; then
git-r3_src_unpack
@@ -97,55 +126,48 @@ src_unpack() {
git-r3_checkout https://github.com/fcitx/mozc "${WORKDIR}/fcitx-mozc"
fi
else
- unpack ${P}.tar.gz
+ unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.tar.gz
mv mozc-${MOZC_GIT_REVISION} ${P} || die
unpack japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
cp -p japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}/usage_dict.txt ${P}/src/third_party/japanese_usage_dictionary || die
+
+ if use fcitx4; then
+ unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz
+ mv mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN}
+ fi
fi
}
src_prepare() {
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_1.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_2.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_3.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_4.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-system_libraries.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-gcc-8.patch"
- eapply -p2 "${DISTDIR}/${PN}-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-environmental_variables.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-reiwa.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-server_path_check.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_build.patch"
- eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_skipping.patch"
-
if use fcitx4; then
- if [[ "${PV}" == "9999" ]]; then
- cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die
- else
- eapply -p2 "${DISTDIR}/fcitx-mozc-${FCITX_PATCH_VERSION}.patch"
- fi
+ cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die
fi
+ pushd "${WORKDIR}/${P}" > /dev/null || die
+
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_abseil-cpp.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_gtest.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-system_jsoncpp.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-environmental_variables.patch"
+ eapply "${FILESDIR}/${PN}-2.26.4220-server_path_check.patch"
+
eapply_user
+ popd > /dev/null || die
+
sed \
-e "s/def GypMain(options, unused_args):/def GypMain(options, gyp_args):/" \
-e "s/RunOrDie(gyp_command + gyp_options)/RunOrDie(gyp_command + gyp_options + gyp_args)/" \
-e "s/RunOrDie(\[ninja/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \
-i build_mozc.py || die
- sed \
- -e "s/'release_extra_cflags%': \['-O2'\]/'release_extra_cflags%': []/" \
- -e "s/'debug_extra_cflags%': \['-O0', '-g'\]/'debug_extra_cflags%': []/" \
- -i gyp/common.gypi || die
-
local ar=($(tc-getAR))
local cc=($(tc-getCC))
local cxx=($(tc-getCXX))
local ld=($(tc-getLD))
local nm=($(tc-getNM))
- local readelf=($(tc-getPROG READELF readelf))
+ local readelf=($(tc-getREADELF))
# Use absolute paths. Non-absolute paths are mishandled by GYP.
ar[0]=$(type -P ${ar[0]})
@@ -163,6 +185,12 @@ src_prepare() {
-e "s:<!(which nm):${nm[@]}:" \
-e "s:<!(which readelf):${readelf[@]}:" \
-i gyp/common.gypi || die
+
+ # https://github.com/google/mozc/issues/489
+ sed \
+ -e "/'-lc++'/d" \
+ -e "/'-stdlib=libc++'/d" \
+ -i gyp/common.gypi || die
}
src_configure() {
@@ -182,23 +210,20 @@ src_configure() {
gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
fi
+ gyp_arguments+=(-D debug_extra_cflags=)
+ gyp_arguments+=(-D release_extra_cflags=)
+
gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO))
- gyp_arguments+=(-D use_libgtest=$(usex test 1 0))
gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
- gyp_arguments+=(-D use_libjsoncpp=$(usex test 1 0))
gyp_arguments+=(-D use_libprotobuf=1)
- gyp_arguments+=(-D use_libzinnia=$(usex gui 1 0))
+ gyp_arguments+=(-D use_system_abseil_cpp=1)
+ gyp_arguments+=(-D use_system_gtest=$(usex test 1 0))
+ gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0))
gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))
gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc")
gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents")
- if use handwriting-tegaki; then
- gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model")
- elif use handwriting-tomoe; then
- gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model")
- fi
-
if use ibus; then
gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc")
gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png")
@@ -280,8 +305,8 @@ src_install() {
insinto /usr/share/fcitx/mozc/icon
newins data/images/product_icon_32bpp-128.png mozc.png
local image
- for image in data/images/unix/ui-*.png; do
- newins "${image}" "mozc-${image#data/images/unix/ui-}"
+ for image in ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do
+ newins "${image}" "mozc-${image#../../fcitx-${PN}/src/data/images/unix/ui-}"
done
local locale mo_file
@@ -322,18 +347,6 @@ pkg_postinst() {
elog "MOZC_CONFIGURATION_DIRECTORY"
elog " Mozc configuration directory"
elog " Value used by default: \"~/.mozc\""
- if use gui; then
- elog "MOZC_ZINNIA_MODEL_FILE"
- elog " Zinnia handwriting recognition model file"
- if use handwriting-tegaki; then
- elog " Value used by default: \"${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model\""
- elif use handwriting-tomoe; then
- elog " Value used by default: \"${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model\""
- fi
- elog " Potential values:"
- elog " \"${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model\""
- elog " \"${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model\""
- fi
elog
if use emacs; then
elog