Codebase list mozc / a30c769
Updated kfreebsd suuport patch Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 11 years ago
1 changed file(s) with 128 addition(s) and 223 deletion(s). Raw diff Collapse all Expand all
11 Forwarded: None
22 Author: Nobuhiri Iwamatsu <iwamatsu@debian.org>
33 Bug-Debian: No
4 Last-Update: 2012-06-14
5
6 From e45c381a2a9a9a727ec4f7a2cea3b1635d951b85 Mon Sep 17 00:00:00 2001
7 From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
8 Date: Fri, 15 Jun 2012 12:26:28 +0900
9 Subject: [PATCH] Fix kfreebsd
10
11 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
12 ---
13 base/base.gyp | 4 +-
14 base/cpu_stats.cc | 6 +-
15 base/flags.h | 2 +-
16 base/iconv.cc | 4 ++
17 base/logging.cc | 5 --
18 base/mutex.cc | 3 +-
19 base/mutex.h | 6 +-
20 base/password_manager.cc | 2 +-
21 base/process.cc | 8 +--
22 base/run_level.cc | 2 +-
23 base/thread.h | 3 +-
24 base/util.cc | 17 +++--
25 base/util_test.cc | 2 +-
26 build_mozc.py | 83 +++++++++++++++++++---
27 build_tools/mozc_version.py | 9 +++
28 chrome/skk/skk.gyp | 2 +-
29 client/client.cc | 2 +-
30 config/stats_config_util_test.cc | 2 +-
31 gui/base/locale_util.cc | 2 +-
32 gui/config_dialog/config_dialog.cc | 8 +--
33 gui/config_dialog/keybinding_editor.cc | 8 +--
34 gui/config_dialog/keymap_editor.cc | 2 +-
35 gui/dictionary_tool/dictionary_tool.cc | 2 +-
36 gui/gui.gyp | 2 +-
37 gui/qt_libraries.gypi | 2 +-
38 gui/word_register_dialog/word_register_dialog.cc | 2 +-
39 gui/zinnia.gyp | 2 +-
40 gyp/common.gypi | 18 +++--
41 handwriting/handwriting.gyp | 2 +-
42 ipc/ipc_path_manager.cc | 6 +-
43 ipc/ipc_path_manager_test.cc | 2 +-
44 ipc/unix_ipc.cc | 10 +--
45 languages/chewing/chewing.gyp | 2 +-
46 languages/hangul/hangul.gyp | 2 +-
47 net/net.gyp | 2 +-
48 protobuf/genproto.gypi | 2 +-
49 protobuf/protobuf.gyp | 6 +-
50 session/session_converter_interface.h | 2 +-
51 session/session_test.cc | 4 +-
52 39 files changed, 170 insertions(+), 80 deletions(-)
4 Last-Update: 2012-09-06
535
546 diff --git a/base/base.gyp b/base/base.gyp
55 index eb71957..28a6a3f 100755
7 index e2773bc..2f64dd8 100755
568 --- a/base/base.gyp
579 +++ b/base/base.gyp
58 @@ -104,7 +104,7 @@
10 @@ -98,7 +98,7 @@
5911 # shared among *host* binaries and *target* binaries. This means that
6012 # you should implement *host* binaries by using limited libraries
6113 # which are also available on NDK.
6416 'not (target_platform=="NaCl" and _toolset=="target")', {
6517 'defines': [
6618 'HAVE_LIBRT=1',
67 @@ -235,7 +235,7 @@
19 @@ -260,7 +260,7 @@
6820 ],
6921 }
7022 }],
7426 '<!@(<(pkg_config_command) --cflags-only-other openssl)',
7527 ],
7628 diff --git a/base/cpu_stats.cc b/base/cpu_stats.cc
77 index e915b35..a53141d 100755
29 index 19617bb..27f168d 100755
7830 --- a/base/cpu_stats.cc
7931 +++ b/base/cpu_stats.cc
80 @@ -122,7 +122,7 @@ float CPUStats::GetSystemCPULoad() {
32 @@ -123,7 +123,7 @@ float CPUStats::GetSystemCPULoad() {
8133
8234 #endif // OS_MACOSX
8335
8638 // NOT IMPLEMENTED
8739 // TODO(taku): implement Linux version
8840 // can take the info from /proc/stats
89 @@ -177,7 +177,7 @@ float CPUStats::GetCurrentProcessCPULoad() {
41 @@ -178,7 +178,7 @@ float CPUStats::GetCurrentProcessCPULoad() {
9042 TimeValueTToInt64(task_times_info.system_time);
9143 #endif // OS_MACOSX
9244
9547 // not implemented
9648 const uint64 total_times = 0;
9749 const uint64 cpu_times = 0;
98 @@ -209,7 +209,7 @@ size_t CPUStats::GetNumberOfProcessors() const {
50 @@ -210,7 +210,7 @@ size_t CPUStats::GetNumberOfProcessors() const {
9951 return static_cast<size_t>(basic_info.avail_cpus);
10052 #endif // OS_MACOSX
10153
10456 // Not implemented
10557 return 1;
10658 #endif // OS_LINUX
107 diff --git a/base/flags.h b/base/flags.h
108 index 4b2004f..838f2e5 100755
109 --- a/base/flags.h
110 +++ b/base/flags.h
111 @@ -75,7 +75,7 @@ extern void InitGoogleInternal(const char *arg0,
112 // so that CrashReportHandler() is resovled in link time
113 inline void InstallBreakpad() {
114 #ifdef GOOGLE_JAPANESE_INPUT_BUILD
115 -#ifndef OS_LINUX
116 +#if !defined(OS_LINUX) && !defined(OS_GNU_KFREEBSD) && !defined(OS_FREEBSD)
117 if (StatsConfigUtil::IsEnabled()) {
118 CrashReportHandler::Initialize(false);
119 }
12059 diff --git a/base/iconv.cc b/base/iconv.cc
121 index 84c6380..6785171 100755
60 index 089124d..f3fd74c 100755
12261 --- a/base/iconv.cc
12362 +++ b/base/iconv.cc
124 @@ -52,7 +52,11 @@ bool IconvHelper(iconv_t ic, const string &input, string *output) {
63 @@ -53,7 +53,11 @@ bool IconvHelper(iconv_t ic, const string &input, string *output) {
12564 size_t olen_org = olen;
12665 iconv(ic, 0, &ilen, 0, &olen); // reset iconv state
12766 while (ilen != 0) {
13473 return false;
13574 }
13675 diff --git a/base/logging.cc b/base/logging.cc
137 index 10578ef..06d5b15 100755
76 index fcebb22..29d0e98 100755
13877 --- a/base/logging.cc
13978 +++ b/base/logging.cc
140 @@ -75,12 +75,7 @@ string Logging::GetLogMessageHeader() {
79 @@ -106,12 +106,7 @@ string Logging::GetLogMessageHeader() {
14180 char buf[512];
14281 snprintf(buf, sizeof(buf),
14382 "%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d %u "
15190 1 + tm_time.tm_mon,
15291 tm_time.tm_mday,
15392 diff --git a/base/mutex.cc b/base/mutex.cc
154 index 930e24d..44d58c0 100755
93 index 4e34ec9..f6560b2 100755
15594 --- a/base/mutex.cc
15695 +++ b/base/mutex.cc
157 @@ -44,7 +44,8 @@ namespace mozc {
96 @@ -61,7 +61,8 @@ namespace mozc {
15897
15998 // Wrapper for Windows InterlockedCompareExchange
16099 namespace {
164103 // Linux doesn't provide InterlockedCompareExchange-like function.
165104 inline int InterlockedCompareExchange(volatile int *target,
166105 int new_value,
167 diff --git a/base/mutex.h b/base/mutex.h
168 index c5df9c8..7cc89b3 100755
169 --- a/base/mutex.h
170 +++ b/base/mutex.h
171 @@ -97,10 +97,14 @@ class Mutex {
172 #define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE
173 #endif
174
175 -#ifdef OS_LINUX
176 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
177 #define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE_NP
178 #endif
179
180 +#ifdef OS_FREEBSD
181 +#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE
182 +#endif
183 +
184 pthread_mutexattr_t attr;
185 pthread_mutexattr_init(&attr);
186 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_VALUE);
187106 diff --git a/base/password_manager.cc b/base/password_manager.cc
188 index aa8b6b4..42718af 100755
107 index b597d81..f960955 100755
189108 --- a/base/password_manager.cc
190109 +++ b/base/password_manager.cc
191 @@ -363,7 +363,7 @@ class DeprecatedMacPasswordManager : public PasswordManagerInterface {
110 @@ -366,7 +366,7 @@ class DeprecatedMacPasswordManager : public PasswordManagerInterface {
192111 // this module to other Linux distro, you might want to implement
193112 // a new password manager which adopts some secure mechanism such
194113 // like gnome-keyring.
198117 #endif
199118
200119 diff --git a/base/process.cc b/base/process.cc
201 index 51eae95..7f2d89b 100755
120 index 4e5dd2e..b18aa22 100755
202121 --- a/base/process.cc
203122 +++ b/base/process.cc
204 @@ -51,7 +51,7 @@
123 @@ -50,7 +50,7 @@
205124 #include "base/mac_process.h"
206125 #endif // OS_MACOSX
207126
228147 // Do not call posix_spawn() for obviously bad path.
229148 if (!S_ISREG(statbuf.st_mode)) {
230149 LOG(ERROR) << "Not a regular file: " << path;
231 @@ -399,7 +399,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
150 @@ -398,7 +398,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
232151 }
233152 #endif // OS_WINDOWS
234153
238157 const string arg = "--mode=error_message_dialog --error_type=" + error_type;
239158 size_t pid = 0;
240159 diff --git a/base/run_level.cc b/base/run_level.cc
241 index 8b1fe47..cc4c58a 100755
160 index 15081c2..af68530 100755
242161 --- a/base/run_level.cc
243162 +++ b/base/run_level.cc
244 @@ -38,7 +38,7 @@
245 #include <windows.h>
246 #endif
163 @@ -34,7 +34,7 @@
164 #include <aclapi.h>
165 #endif // OS_WINDOWS
247166
248167 -#ifdef OS_LINUX
249168 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
250169 #include <unistd.h>
251170 #include <sys/types.h>
252 #endif
171 #endif // OS_LINUX
253172 diff --git a/base/thread.h b/base/thread.h
254 index 0397937..c2488e9 100755
173 index 165e909..ec5aa43 100755
255174 --- a/base/thread.h
256175 +++ b/base/thread.h
257 @@ -61,7 +61,8 @@
176 @@ -55,7 +55,8 @@
258177
259178 // Andorid NDK and NaCl don't support TLS.
260179 #if defined(OS_LINUX) && !defined(OS_ANDROID) && \
265184 #define TLS_KEYWORD __thread
266185 #define HAVE_TLS 1
267186 diff --git a/base/util.cc b/base/util.cc
268 index 3b39cb6..846fcfb 100755
187 index 8788e10..e55919c 100755
269188 --- a/base/util.cc
270189 +++ b/base/util.cc
271 @@ -1414,7 +1414,7 @@ class ClockImpl : public Util::ClockInterface {
190 @@ -891,7 +891,7 @@ class ClockImpl : public Util::ClockInterface {
272191 mach_timebase_info(&timebase_info);
273192 return static_cast<uint64>(
274193 1.0e9 * timebase_info.denom / timebase_info.numer);
277196 #if defined(HAVE_LIBRT)
278197 return 1000000000uLL;
279198 #else
280 @@ -1434,7 +1434,7 @@ class ClockImpl : public Util::ClockInterface {
199 @@ -911,7 +911,7 @@ class ClockImpl : public Util::ClockInterface {
281200 return static_cast<uint64>(timestamp.QuadPart);
282201 #elif defined(OS_MACOSX)
283202 return static_cast<uint64>(mach_absolute_time());
286205 #if defined(HAVE_LIBRT)
287206 struct timespec timestamp;
288207 if (-1 == clock_gettime(CLOCK_REALTIME, &timestamp)) {
289 @@ -2746,7 +2746,7 @@ string Util::GetServerDirectory() {
208 @@ -1869,7 +1869,7 @@ string Util::GetServerDirectory() {
290209 return MacUtil::GetServerDirectory();
291210 #endif // OS_MACOSX
292211
295214 return kMozcServerDirectory;
296215 #endif // OS_LINUX
297216 }
298 @@ -2847,7 +2847,7 @@ bool GetCurrentSessionId(DWORD *session_id) {
217 @@ -2000,7 +2000,7 @@ bool GetCurrentSessionId(DWORD *session_id) {
299218 #endif // OS_WINDOWS
300219
301220 string Util::GetDesktopNameAsString() {
304223 const char *display = getenv("DISPLAY");
305224 if (display == NULL) {
306225 return "";
307 @@ -3357,7 +3357,7 @@ bool Util::IsPlatformSupported() {
226 @@ -2514,7 +2514,7 @@ bool Util::IsPlatformSupported() {
308227 #if defined(OS_MACOSX)
309228 // TODO(yukawa): support Mac.
310229 return true;
313232 // TODO(yukawa): support Linux.
314233 return true;
315234 #elif defined(OS_WINDOWS)
316 @@ -3793,6 +3793,9 @@ string Util::GetOSVersionString() {
235 @@ -2873,6 +2873,9 @@ string Util::GetOSVersionString() {
317236 #elif defined(OS_LINUX)
318237 const string ret = "Linux";
319238 return ret;
323242 #else
324243 const string ret = "Unknown";
325244 return ret;
326 @@ -3830,7 +3833,7 @@ uint64 Util::GetTotalPhysicalMemory() {
245 @@ -2910,7 +2913,7 @@ uint64 Util::GetTotalPhysicalMemory() {
327246 return 0;
328247 }
329248 return total_memory;
332251 #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
333252 const long page_size = sysconf(_SC_PAGESIZE);
334253 const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
335 @@ -3856,7 +3859,7 @@ void Util::PreloadMappedRegion(const void *begin,
336 ::ZeroMemory(&system_info, sizeof(system_info));
337 ::GetSystemInfo(&system_info);
338 const size_t page_size = system_info.dwPageSize;
339 -#elif defined(OS_MACOSX) || defined(OS_LINUX)
340 +#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
341 #if defined(_SC_PAGESIZE)
342 const size_t page_size = sysconf(_SC_PAGESIZE);
343 #else
344254 diff --git a/base/util_test.cc b/base/util_test.cc
345 index 11ae77f..3dc5a44 100755
255 index 6d5d1c3..6a9b239 100755
346256 --- a/base/util_test.cc
347257 +++ b/base/util_test.cc
348 @@ -3626,7 +3626,7 @@ TEST(UtilTest, MacMaybeMLockTest) {
258 @@ -2210,7 +2210,7 @@ TEST(UtilTest, MacMaybeMLockTest) {
349259 TEST(UtilTest, LinuxMaybeMLockTest) {
350260 size_t data_len = 32;
351261 void *addr = malloc(data_len);
355265 EXPECT_EQ(-1, Util::MaybeMLock(addr, data_len));
356266 EXPECT_EQ(-1, Util::MaybeMUnlock(addr, data_len));
357267 diff --git a/build_mozc.py b/build_mozc.py
358 index f584489..979598d 100755
268 index 8742994..a119309 100755
359269 --- a/build_mozc.py
360270 +++ b/build_mozc.py
361 @@ -93,6 +93,14 @@ def GetMozcVersion():
271 @@ -82,6 +82,14 @@ def GetMozcVersion():
362272 # TODO(matsuzakit): Caching might be better.
363273 return mozc_version.MozcVersion('%s/mozc_version.txt' % SRC_DIR)
364274
371281 + os.environ['GYP_DEFINES'] = 'OS=="GNU/kFreeBSD"'
372282 + return os.name == 'posix' and os.uname()[0] == 'GNU/kFreeBSD'
373283
374 def GetColoredText(text, color):
375 """Gets colored text for terminal."""
376 @@ -183,7 +191,7 @@ def GetBuildBaseName(options, target_platform):
284 def GetBuildBaseName(options, target_platform):
285 """Returns the build base directory.
286 @@ -109,7 +117,7 @@ def GetBuildBaseName(options, target_platform):
377287 build_base = 'out_win'
378288 elif target_platform == 'Mac':
379289 build_base = 'out_mac'
382292 build_base = 'out_linux'
383293 elif target_platform == 'Android':
384294 build_base = 'out_android'
385 @@ -310,7 +318,7 @@ def GetGypFileNames(options):
295 @@ -208,7 +216,7 @@ def GetGypFileNames(options):
386296 if IsWindows():
387297 gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
388298 gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp'))
389299 - elif IsLinux():
390300 + elif IsLinux() or IsGNUkFreeBSD():
391301 gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
392 # Add ibus.gyp if ibus is installed.
393 # Ubuntu 8.04 (Hardy) does not contain ibus package.
394 @@ -380,6 +388,7 @@ def AddCommonOptions(parser):
302 # Add ibus.gyp if ibus version is >=1.4.1.
303 if not PkgExists('ibus-1.0 >= 1.4.1'):
304 @@ -274,6 +282,7 @@ def AddCommonOptions(parser):
395305 help='Specifies the base directory of the built binaries.')
396306 parser.add_option('--language', dest='language', default='japanese',
397307 help='Specify the target language to build.')
399309 return parser
400310
401311
402 @@ -394,6 +403,10 @@ def AddTargetPlatformOption(parser):
312 @@ -288,6 +297,10 @@ def AddTargetPlatformOption(parser):
403313 default_target = 'Windows'
404314 elif IsMac():
405315 default_target = 'Mac'
410320 parser.add_option('--target_platform', dest='target_platform',
411321 default=default_target,
412322 help=('Linux environment can build for Linux, Android and '
413 @@ -566,7 +579,7 @@ def ExpandMetaTarget(meta_target_name):
414 # Note that ChromeOS does not use this method.
415 if target_platform == 'Android':
416 targets = ['%s/android/android.gyp:apk']
417 - elif target_platform == 'Linux':
418 + elif target_platform == 'Linux' or target_platform == 'Linux' :
419 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
420 '%s/server/server.gyp:mozc_server',
421 '%s/renderer/renderer.gyp:mozc_renderer',
422 @@ -585,7 +598,7 @@ def ParseBuildOptions(args=None, values=None):
323 @@ -481,7 +494,7 @@ def ParseBuildOptions(args=None, values=None):
423324 """Parses command line options for the build command."""
424325 parser = optparse.OptionParser(usage='Usage: %prog build [options]')
425326 AddCommonOptions(parser)
428329 default_build_concurrency = GetNumberOfProcessors() * 2
429330 parser.add_option('--jobs', '-j', dest='jobs',
430331 default=('%d' % default_build_concurrency),
431 @@ -605,7 +618,7 @@ def ParseRunTestsOptions(args=None, values=None):
332 @@ -501,7 +514,7 @@ def ParseRunTestsOptions(args=None, values=None):
432333 parser = optparse.OptionParser(
433334 usage='Usage: %prog runtests [options] [test_targets] [-- build options]')
434335 AddCommonOptions(parser)
437338 default_build_concurrency = GetNumberOfProcessors() * 2
438339 parser.add_option('--jobs', '-j', dest='jobs',
439340 default=('%d' % default_build_concurrency),
440 @@ -734,6 +747,8 @@ def GypMain(options, unused_args):
341 @@ -634,6 +647,8 @@ def GypMain(options, unused_args):
441342 command_line.extend(['-D', 'wix_dir=%s' % options.wix_dir])
442343 else:
443344 command_line.extend(['-D', 'use_wix=NO'])
444345 + if options.os:
445346 + command_line.extend(['-D', 'OS=%s' % options.os])
446347
447 command_line.extend(['-D', 'build_base=%s' %
448 GetBuildBaseName(options, version.GetTargetPlatform())])
449 @@ -766,7 +781,7 @@ def GypMain(options, unused_args):
348 command_line.extend(['-D', 'android_arch_abi=%s' % options.android_arch_abi])
349 command_line.extend(['-D', 'android_application_id=%s' %
350 @@ -669,7 +684,7 @@ def GypMain(options, unused_args):
450351
451352 def SetCommandLineForFeature(option_name, windows=False, mac=False,
452353 linux=False, chromeos=False, android=False,
455356 """Updates an option like '--enable_foober' and add a -D argument for gyp.
456357
457358 This function ensures an option like '--enable_foober' exists and it has a
458 @@ -790,6 +805,10 @@ def GypMain(options, unused_args):
359 @@ -693,6 +708,10 @@ def GypMain(options, unused_args):
459360 option on Android platform.
460361 nacl: A boolean which replesents the default value of the target
461362 option on NaCl.
466367
467368 Raises:
468369 ValueError: An error occurred when 'option_name' is empty.
469 @@ -803,6 +822,7 @@ def GypMain(options, unused_args):
370 @@ -706,6 +725,7 @@ def GypMain(options, unused_args):
470371 'Linux': linux,
471372 'ChromeOS': chromeos,
472373 'Android': android,
474375 'NaCl': nacl}[options.target_platform]
475376 enable_option_name = 'enable_%s' % option_name
476377 enabled = options.ensure_value(enable_option_name, default_enabled)
477 @@ -861,7 +881,7 @@ def GypMain(options, unused_args):
378 @@ -769,7 +789,7 @@ def GypMain(options, unused_args):
478379 else:
479380 command_line.extend(['-D', 'use_zinnia=NO'])
480381
482383 + if IsLinux() or IsGNUkFreeBSD():
483384 if '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names:
484385 command_line.extend(['-D', 'use_libibus=1'])
485 if '%s/unix/scim/scim.gyp' % SRC_DIR in gyp_file_names:
486 @@ -886,7 +906,7 @@ def GypMain(options, unused_args):
386
387 @@ -790,7 +810,7 @@ def GypMain(options, unused_args):
487388 # command for pkg-config. Here we catch the environment variable
488389 # and use the specified command instead of actual pkg-config
489390 # command.
492393 command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
493394 else:
494395 command_line.extend(['-D', 'pkg_config_command='])
495 @@ -1020,6 +1040,44 @@ def BuildOnMac(options, targets, original_directory_name):
396 @@ -927,6 +947,44 @@ def BuildOnMac(options, targets, original_directory_name):
496397 '-parallelizeTargets',
497398 'BUILD_WITH_GYP=1'])
498399
537438
538439 def LocateMSBuildDir():
539440 """Locate the directory where msbuild.exe exists.
540 @@ -1171,6 +1229,8 @@ def BuildMain(options, targets, original_directory_name):
441 @@ -1079,6 +1137,8 @@ def BuildMain(options, targets, original_directory_name):
541442 BuildOnMac(options, targets, original_directory_name)
542443 elif IsLinux():
543444 BuildOnLinux(options, targets, original_directory_name)
546447 elif IsWindows():
547448 BuildOnWindows(options, targets, original_directory_name)
548449 else:
549 @@ -1323,7 +1383,7 @@ def CleanBuildFilesAndDirectories(options, unused_args):
450 @@ -1350,7 +1410,7 @@ def CleanBuildFilesAndDirectories(options, unused_args):
550451 elif IsMac():
551452 directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
552453 '*.xcodeproj')))
555456 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
556457 '*.target.mk')))
557458 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
558 @@ -1350,6 +1410,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
459 @@ -1377,6 +1437,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
559460 file_names.append('Makefile')
560461 elif IsWindows():
561462 file_names.append('third_party/breakpad/breakpad.gyp')
566467 # Remove files.
567468 for file_name in file_names:
568469 RemoveFile(file_name)
569 @@ -1376,7 +1440,6 @@ def ShowHelpAndExit():
470 @@ -1403,7 +1467,6 @@ def ShowHelpAndExit():
570471 print 'See also the comment in the script for typical usage.'
571472 sys.exit(1)
572473
573474 -
574475 def main():
575 logging.basicConfig(level=logging.INFO, format='%(message)s')
576
476 logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
477 logging.getLogger().addFilter(ColoredLoggingFilter())
577478 diff --git a/build_tools/mozc_version.py b/build_tools/mozc_version.py
578 index e8bbafd..6f38964 100755
479 index 9bebbc4..bdb823c 100755
579480 --- a/build_tools/mozc_version.py
580481 +++ b/build_tools/mozc_version.py
581 @@ -56,6 +56,13 @@ import os
482 @@ -57,6 +57,13 @@ import os
582483 import re
583484 import sys
584485
592493
593494 TARGET_PLATFORM_TO_DIGIT = {
594495 'Windows': '0',
595 @@ -64,6 +71,8 @@ TARGET_PLATFORM_TO_DIGIT = {
496 @@ -65,6 +72,8 @@ TARGET_PLATFORM_TO_DIGIT = {
596497 'ChromeOS': '2',
597498 'Android': '3',
598499 'NaCl': '4',
615516 # directory across configurations. The following variables must be
616517 # the same as <(PRODUCT_DIR) for each configuration.
617518 diff --git a/client/client.cc b/client/client.cc
618 index 5cc62a2..5265601 100755
519 index 5c7f718..7db07b5 100755
619520 --- a/client/client.cc
620521 +++ b/client/client.cc
621 @@ -933,7 +933,7 @@ bool Client::LaunchTool(const string &mode, const string &extra_arg) {
522 @@ -934,7 +934,7 @@ bool Client::LaunchTool(const string &mode, const string &extra_arg) {
622523 return false;
623524 }
624525
628529 if (!extra_arg.empty()) {
629530 arg += " ";
630531 diff --git a/config/stats_config_util_test.cc b/config/stats_config_util_test.cc
631 index ed5ebd2..8be77d1 100755
532 index 48a4eba..e373b25 100755
632533 --- a/config/stats_config_util_test.cc
633534 +++ b/config/stats_config_util_test.cc
634 @@ -687,7 +687,7 @@ TEST_F(StatsConfigUtilTestWin, IsEnabled) {
635 #endif // OS_WINDOWS
636
637
638 -#ifdef OS_LINUX
639 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
535 @@ -708,13 +708,13 @@ TEST(StatsConfigUtilTestAndroid, DefaultValueTest) {
536 }
537 #endif // OS_ANDROID
538
539 -#ifdef OS_LINUX
540 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
541 #ifndef OS_ANDROID
640542 TEST(StatsConfigUtilTestLinux, DefaultValueTest) {
641 EXPECT_FALSE(mozc::StatsConfigUtil::IsEnabled());
543 EXPECT_FALSE(StatsConfigUtil::IsEnabled());
642544 }
545 #endif // OS_ANDROID
546 -#endif // OS_LINUX
547 +#endif // #if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD)
548
549 #else // !GOOGLE_JAPANESE_INPUT_BUILD
550 TEST(StatsConfigUtilTestNonOfficialBuild, DefaultValueTest) {
643551 diff --git a/gui/base/locale_util.cc b/gui/base/locale_util.cc
644552 index 3bc8e98..6c1ccb3 100755
645553 --- a/gui/base/locale_util.cc
654562 // Even if the locale is not English nor Japanese, load translation
655563 // file to translate common messages like "OK" and "Cancel".
656564 diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc
657 index d5ade5e..77b536b 100755
565 index 61ee405..453a672 100755
658566 --- a/gui/config_dialog/config_dialog.cc
659567 +++ b/gui/config_dialog/config_dialog.cc
660 @@ -81,7 +81,7 @@ ConfigDialog::ConfigDialog()
568 @@ -83,7 +83,7 @@ ConfigDialog::ConfigDialog()
661569 miscAdministrationWidget->setVisible(false);
662570 #endif // OS_MACOSX
663571
666574 miscDefaultIMEWidget->setVisible(false);
667575 miscAdministrationWidget->setVisible(false);
668576 miscStartupWidget->setVisible(false);
669 @@ -91,7 +91,7 @@ ConfigDialog::ConfigDialog()
577 @@ -93,7 +93,7 @@ ConfigDialog::ConfigDialog()
670578 // disable logging options
671579 miscLoggingWidget->setVisible(false);
672580
675583 // The last "misc" tab has no valid configs on Linux
676584 const int kMiscTabIndex = 6;
677585 configDialogTabWidget->removeTab(kMiscTabIndex);
678 @@ -320,7 +320,7 @@ ConfigDialog::ConfigDialog()
586 @@ -322,7 +322,7 @@ ConfigDialog::ConfigDialog()
679587 dictionaryPreloadingAndUACLabel->setVisible(false);
680588 #endif // OS_WINDOWS
681589
684592 // On Linux, disable all fields for UsageStats
685593 usageStatsLabel->setEnabled(false);
686594 usageStatsLabel->setVisible(false);
687 @@ -436,7 +436,7 @@ bool ConfigDialog::Update() {
595 @@ -438,7 +438,7 @@ bool ConfigDialog::Update() {
688596 }
689597
690598
747655 this,
748656 tr("Mozc settings"),
749657 diff --git a/gui/dictionary_tool/dictionary_tool.cc b/gui/dictionary_tool/dictionary_tool.cc
750 index d47ce0c..608f57d 100755
658 index f9846e1..2b0199d 100755
751659 --- a/gui/dictionary_tool/dictionary_tool.cc
752660 +++ b/gui/dictionary_tool/dictionary_tool.cc
753 @@ -327,7 +327,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
661 @@ -339,7 +339,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
754662 }
755663
756664 // main window
760668 // TODO(taku): investigate the cause of the crashes
761669 setCentralWidget(splitter_);
762670 diff --git a/gui/gui.gyp b/gui/gui.gyp
763 index fc05c5e..bc0abe1 100755
671 index 8f2f3c0..5e0f08b 100755
764672 --- a/gui/gui.gyp
765673 +++ b/gui/gui.gyp
766674 @@ -387,7 +387,7 @@
773681 'USE_LIBZINNIA',
774682 ],
775683 diff --git a/gui/qt_libraries.gypi b/gui/qt_libraries.gypi
776 index 8b4a80a..059d844 100755
684 index 4c4894f..d9ec5a0 100755
777685 --- a/gui/qt_libraries.gypi
778686 +++ b/gui/qt_libraries.gypi
779687 @@ -84,7 +84,7 @@
786694 ['qt_dir', {
787695 'libraries': [
788696 diff --git a/gui/word_register_dialog/word_register_dialog.cc b/gui/word_register_dialog/word_register_dialog.cc
789 index 1310118..4e170cc 100755
697 index 1830653..7f08de3 100755
790698 --- a/gui/word_register_dialog/word_register_dialog.cc
791699 +++ b/gui/word_register_dialog/word_register_dialog.cc
792 @@ -74,7 +74,7 @@ QString GetEnv(const char *envname) {
700 @@ -81,7 +81,7 @@ QString GetEnv(const char *envname) {
793701 }
794702 return "";
795703 #endif // OS_WINDOWS
799707 #endif // OS_MACOSX or OS_LINUX
800708 // TODO(team): Support other platforms.
801709 diff --git a/gui/zinnia.gyp b/gui/zinnia.gyp
802 index e4d323a..dc6d8a9 100755
710 index 3209843..e76f55a 100755
803711 --- a/gui/zinnia.gyp
804712 +++ b/gui/zinnia.gyp
805 @@ -45,7 +45,7 @@
806 'target_name': 'zinnia',
807 'type': 'static_library',
713 @@ -48,7 +48,7 @@
714 '-Wno-type-limits',
715 ],
808716 'conditions': [
809717 - ['OS=="linux"', {
810718 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
812720 ['use_libzinnia==1', {
813721 'link_settings': {
814722 diff --git a/gyp/common.gypi b/gyp/common.gypi
815 index ef8fb08..d40ac35 100755
723 index 93e1981..68ef1cf 100755
816724 --- a/gyp/common.gypi
817725 +++ b/gyp/common.gypi
818 @@ -269,12 +269,12 @@
726 @@ -283,12 +283,12 @@
819727 # additional suffix except for Japanese so that multiple
820728 # converter processes can coexist. Note that Mozc on ChromeOS does
821729 # not use IPC so this kind of special treatment is not required.
830738 'ldflags': [
831739 '<@(linux_ldflags)',
832740 ],
833 @@ -416,7 +416,7 @@
741 @@ -438,7 +438,7 @@
834742 },
835743 },
836744 'conditions': [
839747 'cflags': [
840748 '<@(debug_extra_cflags)',
841749 ],
842 @@ -454,7 +454,7 @@
750 @@ -476,7 +476,7 @@
843751 },
844752 },
845753 'conditions': [
848756 'cflags': [
849757 '<@(release_extra_cflags)',
850758 ],
851 @@ -760,6 +760,16 @@
759 @@ -789,6 +789,16 @@
852760 }],
853761 ],
854762 }],
910818 LOG(WARNING) << server_path << " on disk is modified";
911819 // If a user updates the server binary on disk during the server is running,
912820 diff --git a/ipc/ipc_path_manager_test.cc b/ipc/ipc_path_manager_test.cc
913 index e1e2481..7b7e5c8 100755
821 index 592499c..7c0e9cb 100755
914822 --- a/ipc/ipc_path_manager_test.cc
915823 +++ b/ipc/ipc_path_manager_test.cc
916824 @@ -102,7 +102,7 @@ TEST_F(IPCPathManagerTest, IPCPathManagerTest) {
923831 ASSERT_FALSE(path.empty());
924832 EXPECT_EQ('\0', path[0]);
925833 diff --git a/ipc/unix_ipc.cc b/ipc/unix_ipc.cc
926 index 7b85039..4da8032 100755
834 index e4b8c68..3f611a8 100755
927835 --- a/ipc/unix_ipc.cc
928836 +++ b/ipc/unix_ipc.cc
929837 @@ -28,7 +28,7 @@
944852 #include <sys/ucred.h>
945853 #endif
946854 #include <sys/wait.h>
947 @@ -124,7 +124,7 @@ bool IsWriteTimeout(int socket, int timeout) {
855 @@ -125,7 +125,7 @@ bool IsWriteTimeout(int socket, int timeout) {
948856 bool IsPeerValid(int socket, pid_t *pid) {
949857 *pid = 0;
950858
953861 // If the OS is MAC, we should validate the peer by using LOCAL_PEERCRED.
954862 struct xucred peer_cred;
955863 socklen_t peer_cred_len = sizeof(struct xucred);
956 @@ -146,7 +146,7 @@ bool IsPeerValid(int socket, pid_t *pid) {
864 @@ -147,7 +147,7 @@ bool IsPeerValid(int socket, pid_t *pid) {
957865 *pid = 0;
958866 #endif
959867
962870 // On ARM Linux, we do nothing and just return true since the platform
963871 // sometimes doesn't support the getsockopt(sock, SOL_SOCKET, SO_PEERCRED)
964872 // system call.
965 @@ -185,7 +185,7 @@ bool SendMessage(int socket,
873 @@ -186,7 +186,7 @@ bool SendMessage(int socket,
966874 return false;
967875 }
968876 const ssize_t l = ::send(socket, buf, buf_length_left,
972880 #else
973881 MSG_NOSIGNAL
974882 diff --git a/languages/chewing/chewing.gyp b/languages/chewing/chewing.gyp
975 index e94e8dd..a5bfb3c 100755
883 index 92354eb..f1c70ab 100755
976884 --- a/languages/chewing/chewing.gyp
977885 +++ b/languages/chewing/chewing.gyp
978886 @@ -55,7 +55,7 @@
985893 {
986894 'target_name': 'ibus_mozc_chewing',
987895 diff --git a/languages/hangul/hangul.gyp b/languages/hangul/hangul.gyp
988 index bd5ee6f..3cb36de 100755
896 index 57a6f53..f8db52b 100755
989897 --- a/languages/hangul/hangul.gyp
990898 +++ b/languages/hangul/hangul.gyp
991899 @@ -59,7 +59,7 @@
998906 {
999907 'target_name': 'ibus_mozc_hangul',
1000908 diff --git a/net/net.gyp b/net/net.gyp
1001 index 717bdd7..a0bcb88 100755
909 index af01882..3c76edd 100755
1002910 --- a/net/net.gyp
1003911 +++ b/net/net.gyp
1004912 @@ -61,7 +61,7 @@
1024932 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
1025933 },
1026934 diff --git a/protobuf/protobuf.gyp b/protobuf/protobuf.gyp
1027 index 6998e9f..c3f66aa 100755
935 index 82a2b21..4f35ce5 100755
1028936 --- a/protobuf/protobuf.gyp
1029937 +++ b/protobuf/protobuf.gyp
1030 @@ -117,7 +117,7 @@
1031 'type': 'static_library',
1032 'toolsets': ['host', 'target'],
1033 'conditions': [
1034 - ['OS=="linux"', {
1035 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
938 @@ -138,7 +138,7 @@
939 },
1036940 'conditions': [
1037 ['use_libprotobuf==1', {
1038 'link_settings': {
1039 @@ -162,7 +162,7 @@
941 # for gcc and clang
942 - ['OS=="linux" or OS=="mac"', {
943 + ['OS=="linux" or OS=="mac" or OS=="gnu-kfreebsd"', {
944 'cflags': [
945 '-Wno-conversion-null', # coded_stream.cc uses NULL to bool.
946 '-Wno-unused-function',
947 @@ -159,7 +159,7 @@
1040948 '.',
1041949 ],
1042950 'conditions': [
1045953 'conditions': [
1046954 ['use_libprotobuf!=1', {
1047955 'cflags': [
1048 @@ -199,7 +199,7 @@
956 @@ -196,7 +196,7 @@
1049957 },
1050958 'conditions': [
1051959 # use system-installed protoc on Linux
1055963 '../gyp/install_build_tool.gypi',
1056964 ],
1057965 diff --git a/session/session_converter_interface.h b/session/session_converter_interface.h
1058 index 0c55421..66310be 100755
966 index 2693c90..2a8e016 100755
1059967 --- a/session/session_converter_interface.h
1060968 +++ b/session/session_converter_interface.h
1061 @@ -56,7 +56,7 @@ struct OperationPreferences {
969 @@ -68,7 +68,7 @@ struct OperationPreferences {
1062970 bool use_cascading_window;
1063971 string candidate_shortcuts;
1064972 OperationPreferences() {
1068976 use_cascading_window = false;
1069977 #else
1070978 diff --git a/session/session_test.cc b/session/session_test.cc
1071 index 13d574f..a94f31a 100755
979 index 8c58b86..63e92c9 100755
1072980 --- a/session/session_test.cc
1073981 +++ b/session/session_test.cc
1074 @@ -2343,7 +2343,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
982 @@ -2417,7 +2417,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
1075983
1076984 EXPECT_EQ(0, output.all_candidate_words().focused_index());
1077985 EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
1080988 // Cascading window is not supported on Linux, so the size of
1081989 // candidate words is different from other platform.
1082990 // TODO(komatsu): Modify the client for Linux to explicitly change
1083 @@ -2371,7 +2371,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
991 @@ -2445,7 +2445,7 @@ TEST_F(SessionTest, OutputAllCandidateWords) {
1084992
1085993 EXPECT_EQ(1, output.all_candidate_words().focused_index());
1086994 EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
1089997 // Cascading window is not supported on Linux, so the size of
1090998 // candidate words is different from other platform.
1091999 // TODO(komatsu): Modify the client for Linux to explicitly change
1092 --
1093 1.7.10
1094