forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-i18n/mozc: Version bump (2.26.4220_p20201212102434_p20201219202429).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <[email protected]> Signed-off-by: Mike Gilbert <[email protected]>
- Loading branch information
Showing
8 changed files
with
1,307 additions
and
62 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
89 changes: 89 additions & 0 deletions
89
app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.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,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) |
95 changes: 95 additions & 0 deletions
95
app-i18n/mozc/files/mozc-2.26.4220-server_path_check.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,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 |
Oops, something went wrong.