Package list mozc / deb4d66
Update patches/support-kfreebsd.patch Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 9 years ago
1 changed file(s) with 50 addition(s) and 68 deletion(s). Raw diff Collapse all Expand all
0 Description: Support kfreebsd
1 Forwarded: none
2 Author: Nobuhiro iwamatsu <iwamatsut@debian.org>
3 Last-Update: 2011-10-04
4
5 diff --git a/base/const.h b/base/const.h
6 index 8e986f9..0a5b5b2 100755
7 --- a/base/const.h
8 +++ b/base/const.h
9 @@ -125,7 +125,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event.";
10 #else
11 const char kEventPathPrefix[] = "Mozc.event.";
12 #endif // GOOGLE_JAPANESE_INPUT_BUILD
13 -#else // OS_LINUX
14 +#else // OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD
15 const char kMozcServerName[] = "mozc_server";
16 const char kEventPathPrefix[] = "mozc.event.";
17 const char kMozcTool[] = "mozc_tool";
180 diff --git a/base/cpu_stats.cc b/base/cpu_stats.cc
191 index ef7ee3d..59094d9 100755
202 --- a/base/cpu_stats.cc
176158 const string arg = "--mode=error_message_dialog --error_type=" + error_type;
177159 size_t pid = 0;
178160 diff --git a/base/run_level.cc b/base/run_level.cc
179 index a7a085b..4900924 100755
161 index cd7a42b..b82354b 100755
180162 --- a/base/run_level.cc
181163 +++ b/base/run_level.cc
182164 @@ -38,7 +38,7 @@
237219
238220 // OSX doesn't support Thread Local Storage.
239221 diff --git a/base/util.cc b/base/util.cc
240 index 5a8fd7e..7386131 100755
222 index 484cd63..d44e002 100755
241223 --- a/base/util.cc
242224 +++ b/base/util.cc
243 @@ -2540,7 +2540,7 @@ string Util::GetServerDirectory() {
225 @@ -2592,7 +2592,7 @@ string Util::GetServerDirectory() {
244226 return MacUtil::GetServerDirectory();
245227 #endif // OS_MACOSX
246228
249231 return "/usr/lib/mozc";
250232 #endif // OS_LINUX
251233 }
252 @@ -2628,7 +2628,7 @@ string GetObjectNameAsString(HANDLE handle) {
234 @@ -2671,7 +2671,7 @@ string GetObjectNameAsString(HANDLE handle) {
253235 #endif
254236
255237 string Util::GetDesktopNameAsString() {
258240 const char *display = getenv("DISPLAY");
259241 if (display == NULL) {
260242 return "";
261 @@ -3105,7 +3105,7 @@ bool Util::IsPlatformSupported() {
243 @@ -3167,7 +3167,7 @@ bool Util::IsPlatformSupported() {
262244 #if defined(OS_MACOSX)
263245 // TODO(yukawa): support Mac.
264246 return true;
267249 // TODO(yukawa): support Linux.
268250 return true;
269251 #elif defined(OS_WINDOWS)
270 @@ -3525,18 +3525,19 @@ string Util::GetOSVersionString() {
252 @@ -3587,18 +3587,19 @@ string Util::GetOSVersionString() {
271253 } else {
272254 LOG(WARNING) << "GetVersionEx failed";
273255 }
291273 }
292274
293275 void Util::DisableIME() {
294 @@ -3570,7 +3571,7 @@ uint64 Util::GetTotalPhysicalMemory() {
276 @@ -3632,7 +3633,7 @@ uint64 Util::GetTotalPhysicalMemory() {
295277 return 0;
296278 }
297279 return total_memory;
300282 #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
301283 const long page_size = sysconf(_SC_PAGESIZE);
302284 const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
303 @@ -3596,7 +3597,7 @@ void Util::PreloadMappedRegion(const void *begin,
285 @@ -3658,7 +3659,7 @@ void Util::PreloadMappedRegion(const void *begin,
304286 ::ZeroMemory(&system_info, sizeof(system_info));
305287 ::GetSystemInfo(&system_info);
306288 const size_t page_size = system_info.dwPageSize;
310292 const size_t page_size = sysconf(_SC_PAGESIZE);
311293 #else
312294 diff --git a/build_mozc.py b/build_mozc.py
313 index 6981e6a..ea56ff0 100755
295 index a08f8c5..5adcbfa 100755
314296 --- a/build_mozc.py
315297 +++ b/build_mozc.py
316298 @@ -72,6 +72,14 @@ def IsLinux():
346328 else:
347329 logging.error('Unsupported platform: %s', os.name)
348330
349 @@ -198,7 +208,7 @@ def GetGypFileNames(options):
331 @@ -205,7 +215,7 @@ def GetGypFileNames(options):
350332 if IsWindows():
351333 gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
352334 gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp'))
355337 gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
356338 # Add ibus.gyp if ibus is installed.
357339 # Ubuntu 8.04 (Hardy) does not contain ibus package.
358 @@ -349,6 +359,7 @@ def AddCommonOptions(parser):
359 # should be done. If you want ChromeOS build, specify "ChromeOS".
360 parser.add_option('--target_platform', dest='target_platform', default='',
340 @@ -362,6 +372,7 @@ def AddCommonOptions(parser):
361341 help='If you want ChromeOS build, specify "ChromeOS"')
342 parser.add_option('--language', dest='language', default='japanese',
343 help='Specify the target language to build.')
362344 + parser.add_option('--os', dest='os', default='linux')
363345 return parser
364346
365347
366 @@ -429,7 +440,7 @@ def ExpandMetaTarget(meta_target_name, target_platform):
348 @@ -459,7 +470,7 @@ def ExpandMetaTarget(meta_target_name, target_platform):
367349 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
368350 '%s/server/server.gyp:mozc_server',
369351 '%s/gui/gui.gyp:mozc_tool']
372354 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
373355 '%s/server/server.gyp:mozc_server',
374356 '%s/gui/gui.gyp:mozc_tool']
375 @@ -547,6 +558,9 @@ def GypMain(options, unused_args):
376 if options.coverage:
377 command_line.extend(['-D', 'coverage=1'])
357 @@ -579,6 +590,9 @@ def GypMain(options, unused_args):
358 else:
359 command_line.extend(['-D', 'use_wix=NO'])
378360
379361 + if options.os:
380362 + command_line.extend(['-D', 'OS=%s' % options.os])
381363 +
382364 command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)])
383365
384 # Check the version and determine if the building version is dev-channel or
385 @@ -577,7 +591,7 @@ def GypMain(options, unused_args):
366
367 @@ -616,7 +630,7 @@ def GypMain(options, unused_args):
386368 # command for pkg-config. Here we catch the environment variable
387369 # and use the specified command instead of actual pkg-config
388370 # command.
391373 command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
392374 else:
393375 command_line.extend(['-D', 'pkg_config_command='])
394 @@ -662,6 +676,42 @@ def BuildOnLinux(options, targets, unused_original_directory_name):
376 @@ -714,6 +728,42 @@ def BuildOnLinux(options, targets, unused_original_directory_name):
395377
396378 RunOrDie([make_command] + build_args + target_names)
397379
434416
435417 def CheckFileOrDie(file_name):
436418 """Check the file exists or dies if not."""
437 @@ -777,6 +827,8 @@ def BuildMain(options, targets, original_directory_name):
419 @@ -877,6 +927,8 @@ def BuildMain(options, targets, original_directory_name):
438420 BuildOnMac(options, targets, original_directory_name)
439421 elif IsLinux():
440422 BuildOnLinux(options, targets, original_directory_name)
443425 elif IsWindows():
444426 BuildOnWindows(options, targets, original_directory_name)
445427 else:
446 @@ -900,7 +952,7 @@ def CleanBuildFilesAndDirectories(options, unused_args):
428 @@ -1000,7 +1052,7 @@ def CleanBuildFilesAndDirectories(options, unused_args):
447429 elif IsMac():
448430 directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
449431 '*.xcodeproj')))
452434 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
453435 '*.target.mk')))
454436 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
455 @@ -919,6 +971,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
437 @@ -1019,6 +1071,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
456438 file_names.append('Makefile')
457439 elif IsWindows():
458440 file_names.append('third_party/breakpad/breakpad.gyp')
463445 # Remove files.
464446 for file_name in file_names:
465447 RemoveFile(file_name)
466 @@ -945,7 +1001,6 @@ def ShowHelpAndExit():
448 @@ -1045,7 +1101,6 @@ def ShowHelpAndExit():
467449 print 'See also the comment in the script for typical usage.'
468450 sys.exit(1)
469451
527509 // Even if the locale is not English nor Japanese, load translation
528510 // file to translate common messages like "OK" and "Cancel".
529511 diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc
530 index f358636..7005dae 100755
512 index 5aee977..4df1942 100755
531513 --- a/gui/config_dialog/config_dialog.cc
532514 +++ b/gui/config_dialog/config_dialog.cc
533 @@ -74,11 +74,11 @@ ConfigDialog::ConfigDialog()
515 @@ -73,11 +73,11 @@ ConfigDialog::ConfigDialog()
534516 verboseLevelLabel->setVisible(false);
535517 verboseLevelComboBox->setVisible(false);
536518
537519 -#if defined(OS_MACOSX) || defined(OS_LINUX)
538520 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
539521 // The last "misc" tab has no valid configs on Mac and Linux
540 const int kMiscTabIndex = 5;
522 const int kMiscTabIndex = 6;
541523 configDialogTabWidget->removeTab(kMiscTabIndex);
542524 -#endif // OS_MACOSX || OS_LINUX
543 +#endif // OS_MACOSX || OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD)
525 +#endif // OS_MACOSX || OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD
544526 #endif // NO_LOGGING
545527
546 client_->set_restricted(true); // start with restricted mode
547 @@ -261,7 +261,7 @@ ConfigDialog::ConfigDialog()
528 #if !defined(GOOGLE_JAPANESE_INPUT_BUILD)
529 @@ -277,7 +277,7 @@ ConfigDialog::ConfigDialog()
548530 dictionaryPreloadingAndUACLabel->setVisible(false);
549531 #endif // OS_WINDOWS
550532
553535 // On Linux, disable all fields for UsageStats
554536 usageStatsLabel->setEnabled(false);
555537 usageStatsLabel->setVisible(false);
556 @@ -346,7 +346,7 @@ bool ConfigDialog::Update() {
538 @@ -364,7 +364,7 @@ bool ConfigDialog::Update() {
557539 }
558540
559541
598580 this,
599581 tr("Mozc settings"),
600582 diff --git a/gui/dictionary_tool/dictionary_tool.cc b/gui/dictionary_tool/dictionary_tool.cc
601 index 0fd9a4f..77c5cf8 100755
583 index b66f13e..20c3461 100755
602584 --- a/gui/dictionary_tool/dictionary_tool.cc
603585 +++ b/gui/dictionary_tool/dictionary_tool.cc
604 @@ -316,7 +316,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
586 @@ -317,7 +317,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
605587 }
606588
607589 // main window
611593 // TODO(taku): investigate the cause of the crashes
612594 setCentralWidget(splitter_);
613595 diff --git a/gui/gui.gyp b/gui/gui.gyp
614 index 96f8b33..7034d0b 100755
596 index 37e4e44..bef1334 100755
615597 --- a/gui/gui.gyp
616598 +++ b/gui/gui.gyp
617 @@ -372,7 +372,7 @@
599 @@ -378,7 +378,7 @@
618600 'includes': [
619601 'qt_libraries.gypi',
620602 ],
650632 ['use_libzinnia==1', {
651633 'link_settings': {
652634 diff --git a/gyp/common.gypi b/gyp/common.gypi
653 index e9bc954..58f0f1d 100755
635 index 551f8bd..c0e0a5f 100755
654636 --- a/gyp/common.gypi
655637 +++ b/gyp/common.gypi
656 @@ -233,7 +233,7 @@
638 @@ -238,7 +238,7 @@
657639 },
658640 },
659641 'conditions': [
662644 'cflags': [
663645 '<@(debug_extra_cflags)',
664646 ],
665 @@ -272,7 +272,7 @@
647 @@ -277,7 +277,7 @@
666648 },
667649 },
668650 'conditions': [
671653 'cflags': [
672654 '<@(release_extra_cflags)',
673655 ],
674 @@ -523,6 +523,51 @@
656 @@ -532,6 +532,51 @@
675657 }],
676658 ],
677659 }],
723705 ['OS=="mac"', {
724706 'defines': [
725707 'OS_MACOSX',
726 @@ -577,7 +622,7 @@
708 @@ -586,7 +631,7 @@
727709 # Linux gyp (into scons) doesn't like target_conditions?
728710 # TODO(team): track down why 'target_conditions' doesn't work
729711 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
733715 '-fprofile-arcs' ],
734716 'link_settings': { 'libraries': [ '-lgcov' ] },
735717 diff --git a/ipc/ipc_path_manager.cc b/ipc/ipc_path_manager.cc
736 index da0fa0c..2c9590c 100755
718 index db5b5d7..ab4091b 100755
737719 --- a/ipc/ipc_path_manager.cc
738720 +++ b/ipc/ipc_path_manager.cc
739 @@ -265,7 +265,7 @@ bool IPCPathManager::GetPathName(string *ipc_name) {
721 @@ -274,7 +274,7 @@ bool IPCPathManager::GetPathName(string *ipc_name) {
740722 *ipc_name = kIPCPrefix;
741723 #endif // OS_WINDOWS
742724
745727 // On Linux, use abstract namespace which is independent of the file system.
746728 (*ipc_name)[0] = '\0';
747729 #endif
748 @@ -358,7 +358,7 @@ bool IPCPathManager::IsValidServer(uint32 pid,
730 @@ -367,7 +367,7 @@ bool IPCPathManager::IsValidServer(uint32 pid,
749731 }
750732 #endif
751733
754736 // load from /proc/<pid>/exe
755737 char proc[128];
756738 char filename[512];
757 @@ -378,7 +378,7 @@ bool IPCPathManager::IsValidServer(uint32 pid,
739 @@ -387,7 +387,7 @@ bool IPCPathManager::IsValidServer(uint32 pid,
758740 return true;
759741 }
760742
764746 LOG(WARNING) << server_path << " on disk is modified";
765747 // If a user updates the server binary on disk during the server is running,
766748 diff --git a/ipc/ipc_path_manager_test.cc b/ipc/ipc_path_manager_test.cc
767 index a645563..0f79c70 100755
749 index 82cea4a..4b24fb8 100755
768750 --- a/ipc/ipc_path_manager_test.cc
769751 +++ b/ipc/ipc_path_manager_test.cc
770 @@ -92,7 +92,7 @@ TEST(IPCPathManagerTest, IPCPathManagerTest) {
752 @@ -108,7 +108,7 @@ TEST_F(IPCPathManagerTest, IPCPathManagerTest) {
771753 EXPECT_FALSE(manager->GetServerProductVersion().empty());
772754 EXPECT_GT(manager->GetServerProcessId(), 0);
773755 EXPECT_EQ(t.path(), path);
869851 '../gyp/install_build_tool.gypi',
870852 ],
871853 diff --git a/session/session_converter_interface.h b/session/session_converter_interface.h
872 index 7f27398..da6c9cf 100755
854 index be5bf45..c6cc2d0 100755
873855 --- a/session/session_converter_interface.h
874856 +++ b/session/session_converter_interface.h
875857 @@ -56,7 +56,7 @@ struct OperationPreferences {
882864 use_cascading_window = false;
883865 #else
884866 diff --git a/session/session_test.cc b/session/session_test.cc
885 index 4433081..4cdf7e9 100755
867 index ff8fece..1153dff 100755
886868 --- a/session/session_test.cc
887869 +++ b/session/session_test.cc
888 @@ -2081,7 +2081,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
870 @@ -2089,7 +2089,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
889871
890872 EXPECT_EQ(0, output.all_candidate_words().focused_index());
891873 EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
894876 // Cascading window is not supported on Linux, so the size of
895877 // candidate words is different from other platform.
896878 // TODO(komatsu): Modify the client for Linux to explicitly change
897 @@ -2109,7 +2109,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
879 @@ -2117,7 +2117,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
898880
899881 EXPECT_EQ(1, output.all_candidate_words().focused_index());
900882 EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());