Update support-kfreebsd.patch
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
12 years ago
0 | 0 | diff --git a/base/const.h b/base/const.h |
1 | index dd6d3e9..e252ae9 100755 | |
1 | index 2525bc0..22f8ae8 100755 | |
2 | 2 | --- a/base/const.h |
3 | 3 | +++ b/base/const.h |
4 | @@ -107,7 +107,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event."; | |
4 | @@ -122,7 +122,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event."; | |
5 | 5 | #else |
6 | 6 | const char kEventPathPrefix[] = "Mozc.event."; |
7 | 7 | #endif // GOOGLE_JAPANESE_INPUT_BUILD |
131 | 131 | #endif |
132 | 132 | |
133 | 133 | diff --git a/base/process.cc b/base/process.cc |
134 | index 8f30cc4..7381959 100755 | |
134 | index e465d69..61031e3 100755 | |
135 | 135 | --- a/base/process.cc |
136 | 136 | +++ b/base/process.cc |
137 | 137 | @@ -52,7 +52,7 @@ |
143 | 143 | #include <fcntl.h> |
144 | 144 | #include <signal.h> |
145 | 145 | #include <spawn.h> // for posix_spawn(). |
146 | @@ -201,7 +201,7 @@ bool Process::OpenBrowser(const string &url) { | |
146 | @@ -121,7 +121,7 @@ bool Process::OpenBrowser(const string &url) { | |
147 | 147 | return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW); |
148 | 148 | #endif |
149 | 149 | |
152 | 152 | static const char kBrowserCommand[] = "/usr/bin/xdg-open"; |
153 | 153 | // xdg-open which uses kfmclient or gnome-open internally works both on KDE |
154 | 154 | // and GNOME environments. |
155 | @@ -285,7 +285,7 @@ bool Process::SpawnProcess(const string &path, | |
155 | @@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string &path, | |
156 | 156 | } |
157 | 157 | #endif |
158 | 158 | |
161 | 161 | // Do not call posix_spawn() for obviously bad path. |
162 | 162 | if (!S_ISREG(statbuf.st_mode)) { |
163 | 163 | LOG(ERROR) << "Not a regular file: " << path; |
164 | @@ -581,7 +581,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) { | |
164 | @@ -482,7 +482,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) { | |
165 | 165 | } |
166 | 166 | #endif // OS_WINDOWS |
167 | 167 | |
241 | 241 | if (-1 == clock_gettime(CLOCK_REALTIME, ×tamp)) { |
242 | 242 | return 0; |
243 | 243 | diff --git a/base/util.cc b/base/util.cc |
244 | index 047df55..58064df 100755 | |
244 | index acc7d6a..5110892 100755 | |
245 | 245 | --- a/base/util.cc |
246 | 246 | +++ b/base/util.cc |
247 | @@ -1831,7 +1831,7 @@ string Util::GetServerDirectory() { | |
247 | @@ -2319,7 +2319,7 @@ string Util::GetServerDirectory() { | |
248 | 248 | return MacUtil::GetServerDirectory(); |
249 | 249 | #endif // OS_MACOSX |
250 | 250 | |
253 | 253 | return "/usr/lib/mozc"; |
254 | 254 | #endif // OS_LINUX |
255 | 255 | } |
256 | @@ -1911,7 +1911,7 @@ string GetObjectNameAsString(HANDLE handle) { | |
256 | @@ -2399,7 +2399,7 @@ string GetObjectNameAsString(HANDLE handle) { | |
257 | 257 | #endif |
258 | 258 | |
259 | 259 | string Util::GetDesktopNameAsString() { |
262 | 262 | const char *display = getenv("DISPLAY"); |
263 | 263 | if (display == NULL) { |
264 | 264 | return ""; |
265 | @@ -2379,7 +2379,7 @@ bool Util::IsPlatformSupported() { | |
265 | @@ -2867,7 +2867,7 @@ bool Util::IsPlatformSupported() { | |
266 | 266 | #if defined(OS_MACOSX) |
267 | 267 | // TODO(yukawa): support Mac. |
268 | 268 | return true; |
271 | 271 | // TODO(yukawa): support Linux. |
272 | 272 | return true; |
273 | 273 | #elif defined(OS_WINDOWS) |
274 | @@ -2750,18 +2750,19 @@ string Util::GetOSVersionString() { | |
274 | @@ -3238,18 +3238,19 @@ string Util::GetOSVersionString() { | |
275 | 275 | } else { |
276 | 276 | LOG(WARNING) << "GetVersionEx failed"; |
277 | 277 | } |
295 | 295 | } |
296 | 296 | |
297 | 297 | void Util::DisableIME() { |
298 | @@ -2795,7 +2796,7 @@ uint64 Util::GetTotalPhysicalMemory() { | |
298 | @@ -3283,7 +3284,7 @@ uint64 Util::GetTotalPhysicalMemory() { | |
299 | 299 | return 0; |
300 | 300 | } |
301 | 301 | return total_memory; |
304 | 304 | #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES) |
305 | 305 | const long page_size = sysconf(_SC_PAGESIZE); |
306 | 306 | const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES); |
307 | @@ -2821,7 +2822,7 @@ void Util::PreloadMappedRegion(const void *begin, | |
307 | @@ -3309,7 +3310,7 @@ void Util::PreloadMappedRegion(const void *begin, | |
308 | 308 | ::ZeroMemory(&system_info, sizeof(system_info)); |
309 | 309 | ::GetSystemInfo(&system_info); |
310 | 310 | const size_t page_size = system_info.dwPageSize; |
314 | 314 | const size_t page_size = sysconf(_SC_PAGESIZE); |
315 | 315 | #else |
316 | 316 | diff --git a/build_mozc.py b/build_mozc.py |
317 | index 8e64c3e..88147e8 100755 | |
317 | index 54ca8f5..8ea9644 100755 | |
318 | 318 | --- a/build_mozc.py |
319 | 319 | +++ b/build_mozc.py |
320 | 320 | @@ -72,6 +72,14 @@ def IsLinux(): |
350 | 350 | gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR)) |
351 | 351 | # Add ibus.gyp if ibus is installed. |
352 | 352 | # Ubuntu 8.04 (Hardy) does not contain ibus package. |
353 | @@ -257,7 +265,7 @@ def CleanBuildFilesAndDirectories(): | |
353 | @@ -259,7 +267,7 @@ def CleanBuildFilesAndDirectories(): | |
354 | 354 | elif IsMac(): |
355 | 355 | directory_names.extend(glob.glob(os.path.join(gyp_directory_name, |
356 | 356 | '*.xcodeproj'))) |
358 | 358 | + elif IsLinux() or IsFreeBSD() or IsGNUkFreeBSD(): |
359 | 359 | file_names.extend(glob.glob(os.path.join(gyp_directory_name, |
360 | 360 | '*.target.mk'))) |
361 | file_names.append('%s/mozc_version.txt' % SRC_DIR) | |
362 | @@ -271,6 +279,10 @@ def CleanBuildFilesAndDirectories(): | |
361 | file_names.extend(glob.glob(os.path.join(gyp_directory_name, | |
362 | @@ -274,6 +282,10 @@ def CleanBuildFilesAndDirectories(): | |
363 | 363 | file_names.append('Makefile') |
364 | 364 | elif IsWindows(): |
365 | 365 | file_names.append('third_party/breakpad/breakpad.gyp') |
370 | 370 | # Remove files. |
371 | 371 | for file_name in file_names: |
372 | 372 | RemoveFile(file_name) |
373 | @@ -357,6 +369,8 @@ def GypMain(deps_file_name): | |
373 | @@ -359,6 +371,8 @@ def GypMain(deps_file_name): | |
374 | 374 | command_line.extend(['-D', 'use_qt=NO']) |
375 | 375 | if options.coverage: |
376 | 376 | command_line.extend(['-D', 'coverage=1']) |
379 | 379 | |
380 | 380 | command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)]) |
381 | 381 | |
382 | @@ -402,6 +416,8 @@ def RunTests(configuration, unused_calculate_coverage): | |
382 | @@ -408,6 +422,8 @@ def RunTests(configuration, unused_calculate_coverage): | |
383 | 383 | base_path = os.path.join('out_linux', configuration) |
384 | 384 | elif IsWindows(): |
385 | 385 | base_path = os.path.join('out_win', configuration) |
388 | 388 | else: |
389 | 389 | logging.error('Unsupported platform: %s', os.name) |
390 | 390 | return |
391 | @@ -550,13 +566,14 @@ def ParseGypOptions(): | |
391 | @@ -556,13 +572,14 @@ def ParseGypOptions(): | |
392 | 392 | 'This flag is false by default because it may require you ' |
393 | 393 | 'to install libchewing in your environment.') |
394 | 394 | |
404 | 404 | (options, unused_args) = parser.parse_args() |
405 | 405 | return options |
406 | 406 | |
407 | @@ -674,6 +691,7 @@ def BuildOnLinux(options, targets): | |
407 | @@ -680,6 +697,7 @@ def BuildOnLinux(options, targets): | |
408 | 408 | target_names.append(target_name) |
409 | 409 | |
410 | 410 | make_command = os.getenv('BUILD_COMMAND', 'make') |
412 | 412 | # flags for building in Chrome OS chroot environment |
413 | 413 | envvars = [ |
414 | 414 | 'CFLAGS', |
415 | @@ -688,7 +706,7 @@ def BuildOnLinux(options, targets): | |
415 | @@ -694,7 +712,7 @@ def BuildOnLinux(options, targets): | |
416 | 416 | for envvar in envvars: |
417 | 417 | if envvar in os.environ: |
418 | 418 | os.environ[envvar] = os.getenv(envvar) |
421 | 421 | # set output directory |
422 | 422 | os.environ['builddir_name'] = 'out_linux' |
423 | 423 | |
424 | @@ -698,6 +716,42 @@ def BuildOnLinux(options, targets): | |
424 | @@ -704,6 +722,42 @@ def BuildOnLinux(options, targets): | |
425 | 425 | |
426 | 426 | RunOrDie([make_command] + build_args + target_names) |
427 | 427 | |
464 | 464 | |
465 | 465 | def CheckFileOrDie(file_name): |
466 | 466 | """Check the file exists or dies if not.""" |
467 | @@ -790,6 +844,8 @@ def BuildMain(original_directory_name): | |
467 | @@ -796,6 +850,8 @@ def BuildMain(original_directory_name): | |
468 | 468 | BuildOnMac(options, targets, original_directory_name) |
469 | 469 | elif IsLinux(): |
470 | 470 | BuildOnLinux(options, targets) |
587 | 587 | static_cast<int>(config.preedit_method()) || |
588 | 588 | initial_use_keyboard_to_change_preedit_method_ != |
589 | 589 | diff --git a/gui/config_dialog/keybinding_editor.cc b/gui/config_dialog/keybinding_editor.cc |
590 | index f3301d0..9247dcd 100755 | |
590 | index c17efc6..1239316 100755 | |
591 | 591 | --- a/gui/config_dialog/keybinding_editor.cc |
592 | 592 | +++ b/gui/config_dialog/keybinding_editor.cc |
593 | 593 | @@ -443,7 +443,7 @@ bool KeyBindingFilter::eventFilter(QObject *obj, QEvent *event) { |
713 | 713 | },{ # OS!="linux" |
714 | 714 | 'uic_path': '<(qt_basepath)/bin/uic<(EXECUTABLE_SUFFIX)', |
715 | 715 | diff --git a/gyp/common.gypi b/gyp/common.gypi |
716 | index 6a7e7a6..651469e 100755 | |
716 | index b80245f..4fb428b 100755 | |
717 | 717 | --- a/gyp/common.gypi |
718 | 718 | +++ b/gyp/common.gypi |
719 | @@ -206,7 +206,7 @@ | |
719 | @@ -211,7 +211,7 @@ | |
720 | 720 | }, |
721 | 721 | }, |
722 | 722 | 'conditions': [ |
725 | 725 | 'cflags': [ |
726 | 726 | '<@(debug_extra_cflags)', |
727 | 727 | ], |
728 | @@ -245,7 +245,7 @@ | |
728 | @@ -250,7 +250,7 @@ | |
729 | 729 | }, |
730 | 730 | }, |
731 | 731 | 'conditions': [ |
734 | 734 | 'cflags': [ |
735 | 735 | '<@(release_extra_cflags)', |
736 | 736 | ], |
737 | @@ -457,6 +457,51 @@ | |
737 | @@ -459,6 +459,51 @@ | |
738 | 738 | }], |
739 | 739 | ], |
740 | 740 | }], |
786 | 786 | ['OS=="mac"', { |
787 | 787 | 'defines': [ |
788 | 788 | 'OS_MACOSX', |
789 | @@ -512,7 +557,7 @@ | |
789 | @@ -514,7 +559,7 @@ | |
790 | 790 | # Linux gyp (into scons) doesn't like target_conditions? |
791 | 791 | # TODO(team): track down why 'target_conditions' doesn't work |
792 | 792 | # on Linux gyp into scons like it does on Mac gyp into xcodeproj. |
872 | 872 | }; // namespace mozc |
873 | 873 | |
874 | 874 | -#endif // OS_LINUX |
875 | +#endif // defined(OS_LINUX) || defined(OS_MACOSX) ||\ | |
875 | +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || | |
876 | 876 | + // defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) |
877 | 877 | diff --git a/protobuf/genproto.gypi b/protobuf/genproto.gypi |
878 | 878 | index 38d8eef..b821e7c 100755 |
888 | 888 | 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)', |
889 | 889 | }, |
890 | 890 | diff --git a/protobuf/protobuf.gyp b/protobuf/protobuf.gyp |
891 | index 40fc11f..67b244a 100755 | |
891 | index e36b373..a22f11b 100755 | |
892 | 892 | --- a/protobuf/protobuf.gyp |
893 | 893 | +++ b/protobuf/protobuf.gyp |
894 | 894 | @@ -116,7 +116,7 @@ |
900 | 900 | 'conditions': [ |
901 | 901 | ['use_libprotobuf==1', { |
902 | 902 | 'link_settings': { |
903 | @@ -193,7 +193,7 @@ | |
903 | @@ -196,7 +196,7 @@ | |
904 | 904 | }, |
905 | 905 | 'conditions': [ |
906 | 906 | # use system-installed protoc on Linux |
910 | 910 | '../gyp/install_build_tool.gypi', |
911 | 911 | ], |
912 | 912 | diff --git a/testing/testing.gyp b/testing/testing.gyp |
913 | index ac62b03..03a99f5 100755 | |
913 | index dd7b8af..2177daf 100755 | |
914 | 914 | --- a/testing/testing.gyp |
915 | 915 | +++ b/testing/testing.gyp |
916 | @@ -49,7 +49,7 @@ | |
917 | 'base/internal/gtest_main.cc', | |
918 | ], | |
916 | @@ -52,7 +52,7 @@ | |
917 | '../base/base.gyp:base', | |
918 | ], | |
919 | 919 | 'conditions': [ |
920 | 920 | - ['OS!="linux"', { |
921 | 921 | + ['OS!="linux" and OS!="gnu-kfreebsd"', { |