diff --git a/debian/patches/support-kfreebsd.patch b/debian/patches/support-kfreebsd.patch index 3a665f4..12d16c6 100644 --- a/debian/patches/support-kfreebsd.patch +++ b/debian/patches/support-kfreebsd.patch @@ -1,21 +1,3 @@ -Description: Support kfreebsd -Forwarded: none -Author: Nobuhiro iwamatsu -Last-Update: 2011-10-04 - -diff --git a/base/const.h b/base/const.h -index 8e986f9..0a5b5b2 100755 ---- a/base/const.h -+++ b/base/const.h -@@ -125,7 +125,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event."; - #else - const char kEventPathPrefix[] = "Mozc.event."; - #endif // GOOGLE_JAPANESE_INPUT_BUILD --#else // OS_LINUX -+#else // OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD - const char kMozcServerName[] = "mozc_server"; - const char kEventPathPrefix[] = "mozc.event."; - const char kMozcTool[] = "mozc_tool"; diff --git a/base/cpu_stats.cc b/base/cpu_stats.cc index ef7ee3d..59094d9 100755 --- a/base/cpu_stats.cc @@ -177,7 +159,7 @@ const string arg = "--mode=error_message_dialog --error_type=" + error_type; size_t pid = 0; diff --git a/base/run_level.cc b/base/run_level.cc -index a7a085b..4900924 100755 +index cd7a42b..b82354b 100755 --- a/base/run_level.cc +++ b/base/run_level.cc @@ -38,7 +38,7 @@ @@ -238,10 +220,10 @@ // OSX doesn't support Thread Local Storage. diff --git a/base/util.cc b/base/util.cc -index 5a8fd7e..7386131 100755 +index 484cd63..d44e002 100755 --- a/base/util.cc +++ b/base/util.cc -@@ -2540,7 +2540,7 @@ string Util::GetServerDirectory() { +@@ -2592,7 +2592,7 @@ string Util::GetServerDirectory() { return MacUtil::GetServerDirectory(); #endif // OS_MACOSX @@ -250,7 +232,7 @@ return "/usr/lib/mozc"; #endif // OS_LINUX } -@@ -2628,7 +2628,7 @@ string GetObjectNameAsString(HANDLE handle) { +@@ -2671,7 +2671,7 @@ string GetObjectNameAsString(HANDLE handle) { #endif string Util::GetDesktopNameAsString() { @@ -259,7 +241,7 @@ const char *display = getenv("DISPLAY"); if (display == NULL) { return ""; -@@ -3105,7 +3105,7 @@ bool Util::IsPlatformSupported() { +@@ -3167,7 +3167,7 @@ bool Util::IsPlatformSupported() { #if defined(OS_MACOSX) // TODO(yukawa): support Mac. return true; @@ -268,7 +250,7 @@ // TODO(yukawa): support Linux. return true; #elif defined(OS_WINDOWS) -@@ -3525,18 +3525,19 @@ string Util::GetOSVersionString() { +@@ -3587,18 +3587,19 @@ string Util::GetOSVersionString() { } else { LOG(WARNING) << "GetVersionEx failed"; } @@ -292,7 +274,7 @@ } void Util::DisableIME() { -@@ -3570,7 +3571,7 @@ uint64 Util::GetTotalPhysicalMemory() { +@@ -3632,7 +3633,7 @@ uint64 Util::GetTotalPhysicalMemory() { return 0; } return total_memory; @@ -301,7 +283,7 @@ #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES) const long page_size = sysconf(_SC_PAGESIZE); const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES); -@@ -3596,7 +3597,7 @@ void Util::PreloadMappedRegion(const void *begin, +@@ -3658,7 +3659,7 @@ void Util::PreloadMappedRegion(const void *begin, ::ZeroMemory(&system_info, sizeof(system_info)); ::GetSystemInfo(&system_info); const size_t page_size = system_info.dwPageSize; @@ -311,7 +293,7 @@ const size_t page_size = sysconf(_SC_PAGESIZE); #else diff --git a/build_mozc.py b/build_mozc.py -index 6981e6a..ea56ff0 100755 +index a08f8c5..5adcbfa 100755 --- a/build_mozc.py +++ b/build_mozc.py @@ -72,6 +72,14 @@ def IsLinux(): @@ -347,7 +329,7 @@ else: logging.error('Unsupported platform: %s', os.name) -@@ -198,7 +208,7 @@ def GetGypFileNames(options): +@@ -205,7 +215,7 @@ def GetGypFileNames(options): if IsWindows(): gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR)) gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp')) @@ -356,15 +338,15 @@ gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR)) # Add ibus.gyp if ibus is installed. # Ubuntu 8.04 (Hardy) does not contain ibus package. -@@ -349,6 +359,7 @@ def AddCommonOptions(parser): - # should be done. If you want ChromeOS build, specify "ChromeOS". - parser.add_option('--target_platform', dest='target_platform', default='', +@@ -362,6 +372,7 @@ def AddCommonOptions(parser): help='If you want ChromeOS build, specify "ChromeOS"') + parser.add_option('--language', dest='language', default='japanese', + help='Specify the target language to build.') + parser.add_option('--os', dest='os', default='linux') return parser -@@ -429,7 +440,7 @@ def ExpandMetaTarget(meta_target_name, target_platform): +@@ -459,7 +470,7 @@ def ExpandMetaTarget(meta_target_name, target_platform): targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc', '%s/server/server.gyp:mozc_server', '%s/gui/gui.gyp:mozc_tool'] @@ -373,17 +355,17 @@ targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc', '%s/server/server.gyp:mozc_server', '%s/gui/gui.gyp:mozc_tool'] -@@ -547,6 +558,9 @@ def GypMain(options, unused_args): - if options.coverage: - command_line.extend(['-D', 'coverage=1']) +@@ -579,6 +590,9 @@ def GypMain(options, unused_args): + else: + command_line.extend(['-D', 'use_wix=NO']) + if options.os: + command_line.extend(['-D', 'OS=%s' % options.os]) + command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)]) - # Check the version and determine if the building version is dev-channel or -@@ -577,7 +591,7 @@ def GypMain(options, unused_args): + +@@ -616,7 +630,7 @@ def GypMain(options, unused_args): # command for pkg-config. Here we catch the environment variable # and use the specified command instead of actual pkg-config # command. @@ -392,7 +374,7 @@ command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()]) else: command_line.extend(['-D', 'pkg_config_command=']) -@@ -662,6 +676,42 @@ def BuildOnLinux(options, targets, unused_original_directory_name): +@@ -714,6 +728,42 @@ def BuildOnLinux(options, targets, unused_original_directory_name): RunOrDie([make_command] + build_args + target_names) @@ -435,7 +417,7 @@ def CheckFileOrDie(file_name): """Check the file exists or dies if not.""" -@@ -777,6 +827,8 @@ def BuildMain(options, targets, original_directory_name): +@@ -877,6 +927,8 @@ def BuildMain(options, targets, original_directory_name): BuildOnMac(options, targets, original_directory_name) elif IsLinux(): BuildOnLinux(options, targets, original_directory_name) @@ -444,7 +426,7 @@ elif IsWindows(): BuildOnWindows(options, targets, original_directory_name) else: -@@ -900,7 +952,7 @@ def CleanBuildFilesAndDirectories(options, unused_args): +@@ -1000,7 +1052,7 @@ def CleanBuildFilesAndDirectories(options, unused_args): elif IsMac(): directory_names.extend(glob.glob(os.path.join(gyp_directory_name, '*.xcodeproj'))) @@ -453,7 +435,7 @@ file_names.extend(glob.glob(os.path.join(gyp_directory_name, '*.target.mk'))) file_names.extend(glob.glob(os.path.join(gyp_directory_name, -@@ -919,6 +971,10 @@ def CleanBuildFilesAndDirectories(options, unused_args): +@@ -1019,6 +1071,10 @@ def CleanBuildFilesAndDirectories(options, unused_args): file_names.append('Makefile') elif IsWindows(): file_names.append('third_party/breakpad/breakpad.gyp') @@ -464,7 +446,7 @@ # Remove files. for file_name in file_names: RemoveFile(file_name) -@@ -945,7 +1001,6 @@ def ShowHelpAndExit(): +@@ -1045,7 +1101,6 @@ def ShowHelpAndExit(): print 'See also the comment in the script for typical usage.' sys.exit(1) @@ -528,24 +510,24 @@ // Even if the locale is not English nor Japanese, load translation // file to translate common messages like "OK" and "Cancel". diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc -index f358636..7005dae 100755 +index 5aee977..4df1942 100755 --- a/gui/config_dialog/config_dialog.cc +++ b/gui/config_dialog/config_dialog.cc -@@ -74,11 +74,11 @@ ConfigDialog::ConfigDialog() +@@ -73,11 +73,11 @@ ConfigDialog::ConfigDialog() verboseLevelLabel->setVisible(false); verboseLevelComboBox->setVisible(false); -#if defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD) // The last "misc" tab has no valid configs on Mac and Linux - const int kMiscTabIndex = 5; + const int kMiscTabIndex = 6; configDialogTabWidget->removeTab(kMiscTabIndex); -#endif // OS_MACOSX || OS_LINUX -+#endif // OS_MACOSX || OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD) ++#endif // OS_MACOSX || OS_LINUX || OS_GNU_KFREEBSD || OS_FREEBSD #endif // NO_LOGGING - client_->set_restricted(true); // start with restricted mode -@@ -261,7 +261,7 @@ ConfigDialog::ConfigDialog() + #if !defined(GOOGLE_JAPANESE_INPUT_BUILD) +@@ -277,7 +277,7 @@ ConfigDialog::ConfigDialog() dictionaryPreloadingAndUACLabel->setVisible(false); #endif // OS_WINDOWS @@ -554,7 +536,7 @@ // On Linux, disable all fields for UsageStats usageStatsLabel->setEnabled(false); usageStatsLabel->setVisible(false); -@@ -346,7 +346,7 @@ bool ConfigDialog::Update() { +@@ -364,7 +364,7 @@ bool ConfigDialog::Update() { } @@ -599,10 +581,10 @@ this, tr("Mozc settings"), diff --git a/gui/dictionary_tool/dictionary_tool.cc b/gui/dictionary_tool/dictionary_tool.cc -index 0fd9a4f..77c5cf8 100755 +index b66f13e..20c3461 100755 --- a/gui/dictionary_tool/dictionary_tool.cc +++ b/gui/dictionary_tool/dictionary_tool.cc -@@ -316,7 +316,7 @@ DictionaryTool::DictionaryTool(QWidget *parent) +@@ -317,7 +317,7 @@ DictionaryTool::DictionaryTool(QWidget *parent) } // main window @@ -612,10 +594,10 @@ // TODO(taku): investigate the cause of the crashes setCentralWidget(splitter_); diff --git a/gui/gui.gyp b/gui/gui.gyp -index 96f8b33..7034d0b 100755 +index 37e4e44..bef1334 100755 --- a/gui/gui.gyp +++ b/gui/gui.gyp -@@ -372,7 +372,7 @@ +@@ -378,7 +378,7 @@ 'includes': [ 'qt_libraries.gypi', ], @@ -651,10 +633,10 @@ ['use_libzinnia==1', { 'link_settings': { diff --git a/gyp/common.gypi b/gyp/common.gypi -index e9bc954..58f0f1d 100755 +index 551f8bd..c0e0a5f 100755 --- a/gyp/common.gypi +++ b/gyp/common.gypi -@@ -233,7 +233,7 @@ +@@ -238,7 +238,7 @@ }, }, 'conditions': [ @@ -663,7 +645,7 @@ 'cflags': [ '<@(debug_extra_cflags)', ], -@@ -272,7 +272,7 @@ +@@ -277,7 +277,7 @@ }, }, 'conditions': [ @@ -672,7 +654,7 @@ 'cflags': [ '<@(release_extra_cflags)', ], -@@ -523,6 +523,51 @@ +@@ -532,6 +532,51 @@ }], ], }], @@ -724,7 +706,7 @@ ['OS=="mac"', { 'defines': [ 'OS_MACOSX', -@@ -577,7 +622,7 @@ +@@ -586,7 +631,7 @@ # Linux gyp (into scons) doesn't like target_conditions? # TODO(team): track down why 'target_conditions' doesn't work # on Linux gyp into scons like it does on Mac gyp into xcodeproj. @@ -734,10 +716,10 @@ '-fprofile-arcs' ], 'link_settings': { 'libraries': [ '-lgcov' ] }, diff --git a/ipc/ipc_path_manager.cc b/ipc/ipc_path_manager.cc -index da0fa0c..2c9590c 100755 +index db5b5d7..ab4091b 100755 --- a/ipc/ipc_path_manager.cc +++ b/ipc/ipc_path_manager.cc -@@ -265,7 +265,7 @@ bool IPCPathManager::GetPathName(string *ipc_name) { +@@ -274,7 +274,7 @@ bool IPCPathManager::GetPathName(string *ipc_name) { *ipc_name = kIPCPrefix; #endif // OS_WINDOWS @@ -746,7 +728,7 @@ // On Linux, use abstract namespace which is independent of the file system. (*ipc_name)[0] = '\0'; #endif -@@ -358,7 +358,7 @@ bool IPCPathManager::IsValidServer(uint32 pid, +@@ -367,7 +367,7 @@ bool IPCPathManager::IsValidServer(uint32 pid, } #endif @@ -755,7 +737,7 @@ // load from /proc//exe char proc[128]; char filename[512]; -@@ -378,7 +378,7 @@ bool IPCPathManager::IsValidServer(uint32 pid, +@@ -387,7 +387,7 @@ bool IPCPathManager::IsValidServer(uint32 pid, return true; } @@ -765,10 +747,10 @@ LOG(WARNING) << server_path << " on disk is modified"; // If a user updates the server binary on disk during the server is running, diff --git a/ipc/ipc_path_manager_test.cc b/ipc/ipc_path_manager_test.cc -index a645563..0f79c70 100755 +index 82cea4a..4b24fb8 100755 --- a/ipc/ipc_path_manager_test.cc +++ b/ipc/ipc_path_manager_test.cc -@@ -92,7 +92,7 @@ TEST(IPCPathManagerTest, IPCPathManagerTest) { +@@ -108,7 +108,7 @@ TEST_F(IPCPathManagerTest, IPCPathManagerTest) { EXPECT_FALSE(manager->GetServerProductVersion().empty()); EXPECT_GT(manager->GetServerProcessId(), 0); EXPECT_EQ(t.path(), path); @@ -870,7 +852,7 @@ '../gyp/install_build_tool.gypi', ], diff --git a/session/session_converter_interface.h b/session/session_converter_interface.h -index 7f27398..da6c9cf 100755 +index be5bf45..c6cc2d0 100755 --- a/session/session_converter_interface.h +++ b/session/session_converter_interface.h @@ -56,7 +56,7 @@ struct OperationPreferences { @@ -883,10 +865,10 @@ use_cascading_window = false; #else diff --git a/session/session_test.cc b/session/session_test.cc -index 4433081..4cdf7e9 100755 +index ff8fece..1153dff 100755 --- a/session/session_test.cc +++ b/session/session_test.cc -@@ -2081,7 +2081,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) { +@@ -2089,7 +2089,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) { EXPECT_EQ(0, output.all_candidate_words().focused_index()); EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category()); @@ -895,7 +877,7 @@ // Cascading window is not supported on Linux, so the size of // candidate words is different from other platform. // TODO(komatsu): Modify the client for Linux to explicitly change -@@ -2109,7 +2109,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) { +@@ -2117,7 +2117,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) { EXPECT_EQ(1, output.all_candidate_words().focused_index()); EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());