Package list mozc / 9c699db
Update Add-support-kfreebsd.patch Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 10 years ago
2 changed file(s) with 54 addition(s) and 55 deletion(s). Raw diff Collapse all Expand all
0 From a3e8186ee23cb4ff0b05add946d66d811d7d88fb Mon Sep 17 00:00:00 2001
0 From 3b7ac867fe894005bf4ac46341d1dc7114ddf630 Mon Sep 17 00:00:00 2001
11 From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
22 Date: Sat, 9 Oct 2010 08:15:18 +0900
33 Subject: [PATCH] Add support kfreebsd
55 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
66 ---
77 base/const.h | 2 +-
8 base/cpu_stats.cc | 6 ++--
8 base/cpu_stats.cc | 6 +-
99 base/flags.h | 2 +-
1010 base/iconv.cc | 4 ++
1111 base/logging.cc | 2 +-
1212 base/mutex.cc | 3 +-
13 base/mutex.h | 6 +++-
13 base/mutex.h | 6 ++-
1414 base/password_manager.cc | 2 +-
1515 base/process.cc | 8 ++--
1616 base/run_level.cc | 2 +-
1717 base/stats_config_util.cc | 2 +-
1818 base/stats_config_util_test.cc | 2 +-
19 base/stopwatch.cc | 6 ++--
20 base/util.cc | 19 +++++-----
21 build_mozc.py | 63 ++++++++++++++++++++++++++++++--
22 build_tools/mozc_version.py | 11 ++++++
19 base/stopwatch.cc | 6 +-
20 base/util.cc | 19 +++++----
21 build_mozc.py | 64 ++++++++++++++++++++++++++++++--
22 build_tools/mozc_version.py | 11 +++++
2323 client/session.cc | 2 +-
2424 dictionary/dictionary_preloader.cc | 4 +-
2525 gui/base/locale_util.cc | 2 +-
3333 gui/qt_rcc.gypi | 2 +-
3434 gui/qt_target_default.gypi | 2 +-
3535 gui/qt_uic.gypi | 2 +-
36 gyp/common.gypi | 51 ++++++++++++++++++++++++--
37 ipc/ipc_path_manager.cc | 6 ++--
38 ipc/unix_ipc.cc | 12 ++++---
36 gyp/common.gypi | 51 ++++++++++++++++++++++++-
37 ipc/ipc_path_manager.cc | 6 +-
38 ipc/unix_ipc.cc | 12 +++--
3939 protobuf/genproto.gypi | 2 +-
4040 protobuf/protobuf.gyp | 4 +-
4141 session/session_converter.cc | 2 +-
4242 testing/testing.gyp | 2 +-
43 37 files changed, 195 insertions(+), 66 deletions(-)
43 36 files changed, 190 insertions(+), 66 deletions(-)
4444
4545 diff --git a/base/const.h b/base/const.h
4646 index a018527..c8b8946 100755
8787 return 1;
8888 #endif // OS_LINUX
8989 diff --git a/base/flags.h b/base/flags.h
90 index da799db..e8d1471 100755
90 index 2767113..81567c4 100755
9191 --- a/base/flags.h
9292 +++ b/base/flags.h
93 @@ -72,7 +72,7 @@ namespace {
93 @@ -76,7 +76,7 @@ namespace {
9494 // so that CrashReportHandler() is resovled in link time
9595 inline void InstallBreakpad() {
9696 #ifdef GOOGLE_JAPANESE_INPUT_BUILD
129129 #else
130130 "%lu",
131131 diff --git a/base/mutex.cc b/base/mutex.cc
132 index 1b49e04..e13cc51 100755
132 index 36f4dc3..79ed9b3 100755
133133 --- a/base/mutex.cc
134134 +++ b/base/mutex.cc
135135 @@ -44,7 +44,8 @@ namespace mozc {
137137 // Wrapper for Windows InterlockedCompareExchange
138138 namespace {
139139 -#ifdef OS_LINUX
140 +
141 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
142 // TODO(taku):
140 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
141 +// TODO(taku):
143142 // Linux doesn't provide InterlockedCompareExchange-like function.
144 // we have to double-check it
143 inline int InterlockedCompareExchange(volatile int *target,
144 int new_value,
145145 diff --git a/base/mutex.h b/base/mutex.h
146146 index 6d2d1e4..0f19a80 100755
147147 --- a/base/mutex.h
176176 #endif
177177
178178 diff --git a/base/process.cc b/base/process.cc
179 index 3d4b74f..7cfe961 100755
179 index 445fa30..f1bf767 100755
180180 --- a/base/process.cc
181181 +++ b/base/process.cc
182182 @@ -52,7 +52,7 @@
206206 // Do not call posix_spawn() for obviously bad path.
207207 if (!S_ISREG(statbuf.st_mode)) {
208208 LOG(ERROR) << "Not a regular file: " << path;
209 @@ -503,7 +503,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
209 @@ -574,7 +574,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
210210 }
211211 #endif // OS_WINDOWS
212212
216216 const string arg = "--mode=error_message_dialog --error_type=" + error_type;
217217 size_t pid = 0;
218218 diff --git a/base/run_level.cc b/base/run_level.cc
219 index bbbadf7..79a7d31 100755
219 index 87b0f0a..1578ad8 100755
220220 --- a/base/run_level.cc
221221 +++ b/base/run_level.cc
222 @@ -37,7 +37,7 @@
222 @@ -38,7 +38,7 @@
223223 #include <windows.h>
224224 #endif
225225
286286 if (-1 == clock_gettime(CLOCK_REALTIME, &timestamp)) {
287287 return 0;
288288 diff --git a/base/util.cc b/base/util.cc
289 index 6a458a6..7e7d199 100755
289 index 8dc2f89..fddcfb0 100755
290290 --- a/base/util.cc
291291 +++ b/base/util.cc
292 @@ -1571,7 +1571,7 @@ string Util::GetServerDirectory() {
292 @@ -1629,7 +1629,7 @@ string Util::GetServerDirectory() {
293293 return MacUtil::GetServerDirectory();
294294 #endif // OS_MACOSX
295295
298298 return "/usr/lib/mozc";
299299 #endif // OS_LINUX
300300 }
301 @@ -1647,7 +1647,7 @@ string GetObjectNameAsString(HANDLE handle) {
301 @@ -1705,7 +1705,7 @@ string GetObjectNameAsString(HANDLE handle) {
302302 #endif
303303
304304 string Util::GetDesktopNameAsString() {
307307 const char *display = getenv("DISPLAY");
308308 if (display == NULL) {
309309 return "";
310 @@ -2094,7 +2094,7 @@ bool Util::IsPlatformSupported() {
310 @@ -2152,7 +2152,7 @@ bool Util::IsPlatformSupported() {
311311 #if defined(OS_MACOSX)
312312 // TODO(yukawa): support Mac.
313313 return true;
316316 // TODO(yukawa): support Linux.
317317 return true;
318318 #elif defined(OS_WINDOWS)
319 @@ -2410,18 +2410,19 @@ string Util::GetOSVersionString() {
319 @@ -2468,18 +2468,19 @@ string Util::GetOSVersionString() {
320320 } else {
321321 LOG(WARNING) << "GetVersionEx failed";
322322 }
340340 }
341341
342342 void Util::DisableIME() {
343 @@ -2455,7 +2456,7 @@ uint64 Util::GetTotalPhysicalMemory() {
343 @@ -2513,7 +2514,7 @@ uint64 Util::GetTotalPhysicalMemory() {
344344 return 0;
345345 }
346346 return total_memory;
349349 #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
350350 const long page_size = sysconf(_SC_PAGESIZE);
351351 const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
352 @@ -2481,7 +2482,7 @@ void Util::PreloadMappedRegion(const void *begin,
352 @@ -2539,7 +2540,7 @@ void Util::PreloadMappedRegion(const void *begin,
353353 ::ZeroMemory(&system_info, sizeof(system_info));
354354 ::GetSystemInfo(&system_info);
355355 const size_t page_size = system_info.dwPageSize;
359359 const size_t page_size = sysconf(_SC_PAGESIZE);
360360 #else
361361 diff --git a/build_mozc.py b/build_mozc.py
362 index 91b8681..d9646d8 100755
362 index 0c2991d..786b09d 100755
363363 --- a/build_mozc.py
364364 +++ b/build_mozc.py
365365 @@ -71,6 +71,14 @@ def IsLinux():
404404 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
405405 '*.target.mk')))
406406 file_names.append('%s/mozc_version.txt' % SRC_DIR)
407 @@ -271,6 +279,9 @@ def CleanBuildFilesAndDirectories():
407 @@ -270,6 +278,10 @@ def CleanBuildFilesAndDirectories():
408 file_names.append('Makefile')
408409 elif IsWindows():
409410 file_names.append('third_party/breakpad/breakpad.gyp')
410 directory_names.append('out_win')
411 + directory_names.append('out_win')
411412 + elif IsFreeBSD() or IsGNUkFreeBSD():
412413 + file_names.append('Makefile')
413414 + directory_names.append('out_bsd')
414415 # Remove files.
415416 for file_name in file_names:
416417 RemoveFile(file_name)
417 @@ -352,6 +363,8 @@ def GypMain(deps_file_name):
418 @@ -351,6 +363,8 @@ def GypMain(deps_file_name):
418419 command_line.extend(['-D', 'use_qt=NO'])
419420 if options.coverage:
420421 command_line.extend(['-D', 'coverage=1'])
423424
424425 command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)])
425426
426 @@ -387,6 +400,8 @@ def RunTests(configuration, calculate_coverage):
427 @@ -386,6 +400,8 @@ def RunTests(configuration, calculate_coverage):
427428 base_path = os.path.join('out_linux', configuration)
428429 elif IsWindows():
429430 base_path = os.path.join('out_win', configuration)
432433 else:
433434 logging.error('Unsupported platform: %s', os.name)
434435 return
435 @@ -528,6 +543,7 @@ def ParseGypOptions():
436 @@ -527,6 +543,7 @@ def ParseGypOptions():
436437 parser.add_option('--build_base', dest='build_base',
437438 help='specify the base directory of the built binaries.')
438439
440441 (options, unused_args) = parser.parse_args()
441442 return options
442443
443 @@ -629,6 +645,7 @@ def BuildOnLinux(options, targets):
444 @@ -639,6 +656,7 @@ def BuildOnLinux(options, targets):
444445 target_names.append(target_name)
445446
446447 make_command = os.getenv('BUILD_COMMAND', 'make')
448449 # flags for building in Chrome OS chroot environment
449450 envvars = [
450451 'CFLAGS',
451 @@ -643,7 +660,7 @@ def BuildOnLinux(options, targets):
452 @@ -653,7 +671,7 @@ def BuildOnLinux(options, targets):
452453 for envvar in envvars:
453454 if envvar in os.environ:
454455 os.environ[envvar] = os.getenv(envvar)
457458 # set output directory
458459 os.environ['builddir_name'] = 'out_linux'
459460
460 @@ -653,6 +670,42 @@ def BuildOnLinux(options, targets):
461 @@ -663,6 +681,42 @@ def BuildOnLinux(options, targets):
461462
462463 RunOrDie([make_command] + build_args + target_names)
463464
500501
501502 def CheckFileOrDie(file_name):
502503 """Check the file exists or dies if not."""
503 @@ -745,6 +798,8 @@ def BuildMain(original_directory_name):
504 @@ -756,6 +810,8 @@ def BuildMain(original_directory_name):
504505 BuildOnMac(options, targets, original_directory_name)
505506 elif IsLinux():
506507 BuildOnLinux(options, targets)
539540 return revision[0:-1] + last_digit
540541
541542 diff --git a/client/session.cc b/client/session.cc
542 index b79aa62..b2a68cf 100755
543 index 4557a0a..72c10f6 100755
543544 --- a/client/session.cc
544545 +++ b/client/session.cc
545 @@ -831,7 +831,7 @@ bool Session::LaunchTool(const string &mode, const string &extra_arg) {
546 @@ -847,7 +847,7 @@ bool Session::LaunchTool(const string &mode, const string &extra_arg) {
546547 return false;
547548 }
548549
587588 // Even if the locale is not English nor Japanese, load translation
588589 // file to translate common messages like "OK" and "Cancel".
589590 diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc
590 index 2eb7367..17b19f1 100755
591 index e748393..04e91ae 100755
591592 --- a/gui/config_dialog/config_dialog.cc
592593 +++ b/gui/config_dialog/config_dialog.cc
593 @@ -72,11 +72,11 @@ ConfigDialog::ConfigDialog()
594 @@ -73,11 +73,11 @@ ConfigDialog::ConfigDialog()
594595 verboseLevelLabel->setVisible(false);
595596 verboseLevelComboBox->setVisible(false);
596597
604605 #endif // NO_LOGGING
605606
606607 client_->set_restricted(true); // start with restricted mode
607 @@ -251,7 +251,7 @@ ConfigDialog::ConfigDialog()
608 @@ -258,7 +258,7 @@ ConfigDialog::ConfigDialog()
608609 dictionaryPreloadingAndUACLabel->setVisible(false);
609610 #endif // OS_WINDOWS
610611
613614 // On Linux, disable all fields for UsageStats
614615 usageStatsLabel->setEnabled(false);
615616 usageStatsLabel->setVisible(false);
616 @@ -334,7 +334,7 @@ bool ConfigDialog::Update() {
617 @@ -343,7 +343,7 @@ bool ConfigDialog::Update() {
617618 }
618619
619620
620621 -#if defined(OS_WINDOWS) || defined(OS_LINUX)
621622 +#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
622623 if (initial_preedit_method_ !=
623 static_cast<int>(config.preedit_method())) {
624 QMessageBox::information(this,
624 static_cast<int>(config.preedit_method()) ||
625 initial_use_keyboard_to_change_preedit_method_ !=
625626 diff --git a/gui/config_dialog/keybinding_editor.cc b/gui/config_dialog/keybinding_editor.cc
626627 index 6749dcb..17d90da 100755
627628 --- a/gui/config_dialog/keybinding_editor.cc
863864 LOG(WARNING) << server_path << " on disk is modified";
864865 // If a user updates the server binary on disk during the server is running,
865866 diff --git a/ipc/unix_ipc.cc b/ipc/unix_ipc.cc
866 index f0db26b..d9f3c4d 100755
867 index 66eb90c..69373f1 100755
867868 --- a/ipc/unix_ipc.cc
868869 +++ b/ipc/unix_ipc.cc
869870 @@ -28,7 +28,8 @@
894895 // If the OS is MAC, we should validate the peer by using LOCAL_PEERCRED.
895896 struct xucred peer_cred;
896897 socklen_t peer_cred_len = sizeof(struct xucred);
897 @@ -187,7 +188,7 @@ bool SendMessage(int socket,
898 @@ -179,7 +180,7 @@ bool SendMessage(int socket,
898899 return false;
899900 }
900901 const ssize_t l = ::send(socket, buf, buf_length_left,
903904 SO_NOSIGPIPE
904905 #else
905906 MSG_NOSIGNAL
906 @@ -526,4 +527,5 @@ void IPCServer::Loop() {
907 @@ -518,4 +519,5 @@ void IPCServer::Loop() {
907908
908909 }; // namespace mozc
909910
924925 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
925926 },
926927 diff --git a/protobuf/protobuf.gyp b/protobuf/protobuf.gyp
927 index 0b8ca63..b5f4287 100755
928 index 0b8ca63..449167c 100755
928929 --- a/protobuf/protobuf.gyp
929930 +++ b/protobuf/protobuf.gyp
930931 @@ -116,7 +116,7 @@
972973 'testing',
973974 ],
974975 --
975 1.7.1
976 1.7.2.3
976977
00 0001-Add-support-kfreebsd.patch
11 0002-Add-uim-mozc-r204.patch
2 r47-r48.patch
3 emacs_mozc_isuue48.patch
42 mozc-el-pseudo-cursor.patch
5 mozc-el-not-suggest-in-minibuffer-fixed.patch
3 # mozc-el-not-suggest-in-minibuffer-fixed.patch
64 add_file_to_gypfile_check.patch