Codebase list mozc / 2bb22a4
Update patches/support-kfreebsd.patch Support build with libzinnia. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 12 years ago
2 changed file(s) with 100 addition(s) and 45 deletion(s). Raw diff Collapse all Expand all
11
22 * New upstream release (r57) (Closes: #633007).
33 * Remove mozc-el-issue76.patch. Applied to upstream.
4 * Update patches/support-kfreebsd.patch.
5 Support build with libzinnia.
46
57 -- Nobuhiro Iwamatsu <iwamatsu@debian.org> Wed, 06 Jul 2011 23:01:42 +0900
68
118118 pthread_mutexattr_init(&attr);
119119 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_VALUE);
120120 diff --git a/base/password_manager.cc b/base/password_manager.cc
121 index 2a25e28..6b3b37e 100755
121 index cf0b422..61a381f 100755
122122 --- a/base/password_manager.cc
123123 +++ b/base/password_manager.cc
124 @@ -358,7 +358,7 @@ class MacPasswordManager : public PasswordManagerInterface {
124 @@ -363,7 +363,7 @@ class DeprecatedMacPasswordManager : public PasswordManagerInterface {
125125 // this module to other Linux distro, you might want to implement
126126 // a new password manager which adopts some secure mechanism such
127127 // like gnome-keyring.
184184 #include <sys/types.h>
185185 #endif
186186 diff --git a/base/stats_config_util.cc b/base/stats_config_util.cc
187 index 9c53383..057280a 100755
187 index 8bd3f9e..aed4d37 100755
188188 --- a/base/stats_config_util.cc
189189 +++ b/base/stats_config_util.cc
190 @@ -336,7 +336,7 @@ bool MacStatsConfigUtilImpl::SetEnabled(bool val) {
191 }
190 @@ -337,7 +337,7 @@ bool MacStatsConfigUtilImpl::SetEnabled(bool val) {
192191 #endif // MACOSX
192
193193
194194 -#ifdef OS_LINUX
195195 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
197197 // TODO(toshiyuki): implement this
198198 public:
199199 diff --git a/base/stats_config_util_test.cc b/base/stats_config_util_test.cc
200 index 9e15918..461e9ef 100755
200 index b780a5a..59d3fb7 100755
201201 --- a/base/stats_config_util_test.cc
202202 +++ b/base/stats_config_util_test.cc
203 @@ -840,7 +840,7 @@ TEST_F(StatsConfigUtilTestWin,
204 } // namespace mozc
203 @@ -841,7 +841,7 @@ TEST_F(StatsConfigUtilTestWin,
205204 #endif // OS_WINDOWS
205
206206
207207 -#ifdef OS_LINUX
208208 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
241241 if (-1 == clock_gettime(CLOCK_REALTIME, &timestamp)) {
242242 return 0;
243243 diff --git a/base/util.cc b/base/util.cc
244 index acc7d6a..5110892 100755
244 index 4260471..e12b98f 100755
245245 --- a/base/util.cc
246246 +++ b/base/util.cc
247 @@ -2319,7 +2319,7 @@ string Util::GetServerDirectory() {
247 @@ -2352,7 +2352,7 @@ string Util::GetServerDirectory() {
248248 return MacUtil::GetServerDirectory();
249249 #endif // OS_MACOSX
250250
253253 return "/usr/lib/mozc";
254254 #endif // OS_LINUX
255255 }
256 @@ -2399,7 +2399,7 @@ string GetObjectNameAsString(HANDLE handle) {
256 @@ -2440,7 +2440,7 @@ string GetObjectNameAsString(HANDLE handle) {
257257 #endif
258258
259259 string Util::GetDesktopNameAsString() {
262262 const char *display = getenv("DISPLAY");
263263 if (display == NULL) {
264264 return "";
265 @@ -2867,7 +2867,7 @@ bool Util::IsPlatformSupported() {
265 @@ -2917,7 +2917,7 @@ bool Util::IsPlatformSupported() {
266266 #if defined(OS_MACOSX)
267267 // TODO(yukawa): support Mac.
268268 return true;
271271 // TODO(yukawa): support Linux.
272272 return true;
273273 #elif defined(OS_WINDOWS)
274 @@ -3238,18 +3238,19 @@ string Util::GetOSVersionString() {
274 @@ -3288,18 +3288,19 @@ string Util::GetOSVersionString() {
275275 } else {
276276 LOG(WARNING) << "GetVersionEx failed";
277277 }
295295 }
296296
297297 void Util::DisableIME() {
298 @@ -3283,7 +3284,7 @@ uint64 Util::GetTotalPhysicalMemory() {
298 @@ -3333,7 +3334,7 @@ uint64 Util::GetTotalPhysicalMemory() {
299299 return 0;
300300 }
301301 return total_memory;
304304 #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
305305 const long page_size = sysconf(_SC_PAGESIZE);
306306 const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
307 @@ -3309,7 +3310,7 @@ void Util::PreloadMappedRegion(const void *begin,
307 @@ -3359,7 +3360,7 @@ void Util::PreloadMappedRegion(const void *begin,
308308 ::ZeroMemory(&system_info, sizeof(system_info));
309309 ::GetSystemInfo(&system_info);
310310 const size_t page_size = system_info.dwPageSize;
314314 const size_t page_size = sysconf(_SC_PAGESIZE);
315315 #else
316316 diff --git a/build_mozc.py b/build_mozc.py
317 index 54ca8f5..8ea9644 100755
317 index 680c539..a3adfae 100755
318318 --- a/build_mozc.py
319319 +++ b/build_mozc.py
320320 @@ -72,6 +72,14 @@ def IsLinux():
341341 # Count the number of 'vendor_id' in /proc/cpuinfo, assuming that
342342 # each line corresponds to one logical CPU.
343343 cpuinfo = open('/proc/cpuinfo', 'r')
344 @@ -184,7 +192,7 @@ def GetGypFileNames():
344 @@ -114,6 +122,8 @@ def GetBuildBaseName(options):
345 # On Linux, seems there is no way to specify the build_base directory
346 # inside common.gypi
347 build_base = 'out_linux'
348 + elif IsFreeBSD() or IsGNUkFreeBSD():
349 + build_base = 'out_bsd'
350 else:
351 logging.error('Unsupported platform: %s', os.name)
352
353 @@ -188,7 +198,7 @@ def GetGypFileNames():
345354 gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
346355 gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp'))
347356 gyp_file_names.append('third_party/mozc/sandbox/sandbox.gyp')
350359 gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
351360 # Add ibus.gyp if ibus is installed.
352361 # Ubuntu 8.04 (Hardy) does not contain ibus package.
353 @@ -259,7 +267,7 @@ def CleanBuildFilesAndDirectories():
362 @@ -263,7 +273,7 @@ def CleanBuildFilesAndDirectories():
354363 elif IsMac():
355364 directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
356365 '*.xcodeproj')))
359368 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
360369 '*.target.mk')))
361370 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
362 @@ -274,6 +282,10 @@ def CleanBuildFilesAndDirectories():
371 @@ -282,6 +292,10 @@ def CleanBuildFilesAndDirectories():
363372 file_names.append('Makefile')
364373 elif IsWindows():
365374 file_names.append('third_party/breakpad/breakpad.gyp')
370379 # Remove files.
371380 for file_name in file_names:
372381 RemoveFile(file_name)
373 @@ -359,6 +371,8 @@ def GypMain(deps_file_name):
382 @@ -378,6 +392,8 @@ def GypMain(deps_file_name):
374383 command_line.extend(['-D', 'use_qt=NO'])
375384 if options.coverage:
376385 command_line.extend(['-D', 'coverage=1'])
379388
380389 command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)])
381390
382 @@ -408,6 +422,8 @@ def RunTests(configuration, unused_calculate_coverage):
391 @@ -425,6 +441,8 @@ def RunTests(configuration, unused_calculate_coverage):
383392 base_path = os.path.join('out_linux', configuration)
384393 elif IsWindows():
385394 base_path = os.path.join('out_win', configuration)
388397 else:
389398 logging.error('Unsupported platform: %s', os.name)
390399 return
391 @@ -556,13 +572,14 @@ def ParseGypOptions():
400 @@ -578,13 +596,14 @@ def ParseGypOptions():
392401 'This flag is false by default because it may require you '
393 'to install libchewing in your environment.')
402 'to install libhangul in your environment.')
394403
395404 -
396405 # Linux environment can build both for Linux and ChromeOS.
404413 (options, unused_args) = parser.parse_args()
405414 return options
406415
407 @@ -680,6 +697,7 @@ def BuildOnLinux(options, targets):
416 @@ -611,7 +630,7 @@ def ParseMetaTarget(meta_target_name, target_platform):
417 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
418 '%s/server/server.gyp:mozc_server',
419 '%s/gui/gui.gyp:mozc_tool']
420 - elif IsLinux():
421 + elif IsLinux() or IsFreeBSD() or IsGNUkFreeBSD():
422 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
423 '%s/server/server.gyp:mozc_server',
424 '%s/gui/gui.gyp:mozc_tool']
425 @@ -639,7 +658,7 @@ def ParseBuildOptions():
426 help='specify target platform.')
427
428 # On Linux, seems there is no way to set build_base in the ParseGyp section
429 - if IsLinux():
430 + if IsLinux() or IsFreeBSD() or IsGNUkFreeBSD():
431 parser.add_option('--build_base', dest='build_base',
432 help='specify the base directory of the built binaries.')
433
434 @@ -709,6 +728,7 @@ def BuildOnLinux(options, targets):
408435 target_names.append(target_name)
409436
410437 make_command = os.getenv('BUILD_COMMAND', 'make')
412439 # flags for building in Chrome OS chroot environment
413440 envvars = [
414441 'CFLAGS',
415 @@ -694,7 +712,7 @@ def BuildOnLinux(options, targets):
442 @@ -723,7 +743,7 @@ def BuildOnLinux(options, targets):
416443 for envvar in envvars:
417444 if envvar in os.environ:
418445 os.environ[envvar] = os.getenv(envvar)
421448 # set output directory
422449 os.environ['builddir_name'] = 'out_linux'
423450
424 @@ -704,6 +722,42 @@ def BuildOnLinux(options, targets):
451 @@ -735,6 +755,42 @@ def BuildOnLinux(options, targets):
425452
426453 RunOrDie([make_command] + build_args + target_names)
427454
464491
465492 def CheckFileOrDie(file_name):
466493 """Check the file exists or dies if not."""
467 @@ -796,6 +850,8 @@ def BuildMain(original_directory_name):
494 @@ -827,6 +883,8 @@ def BuildMain(original_directory_name):
468495 BuildOnMac(options, targets, original_directory_name)
469496 elif IsLinux():
470497 BuildOnLinux(options, targets)
474501 BuildOnWindows(options, targets, original_directory_name)
475502 else:
476503 diff --git a/build_tools/mozc_version.py b/build_tools/mozc_version.py
477 index 0717592..52d8477 100755
504 index 4fbb7c6..91d099f 100755
478505 --- a/build_tools/mozc_version.py
479506 +++ b/build_tools/mozc_version.py
480 @@ -57,6 +57,13 @@ def IsLinux():
507 @@ -58,6 +58,13 @@ def IsLinux():
481508 """Returns true if the platform is Linux."""
482509 return os.name == 'posix' and os.uname()[0] == 'Linux'
483510
489516 + """Returns true if the platform is GNU/kFreeBSD."""
490517 + return os.name == 'posix' and os.uname()[0] == 'GNU/kFreeBSD'
491518
492 def CalculateRevisionForPlatform(revision):
519 def CalculateRevisionForPlatform(revision, target_platform):
493520 """Returns the revision for the current platform."""
494 @@ -68,6 +75,10 @@ def CalculateRevisionForPlatform(revision):
521 @@ -71,6 +78,10 @@ def CalculateRevisionForPlatform(revision, target_platform):
495522 last_digit = '1'
496523 elif IsLinux():
497524 last_digit = '2'
503530 return revision[0:-1] + last_digit
504531
505532 diff --git a/client/session.cc b/client/session.cc
506 index 9b113d1..8d36ef5 100755
533 index 5704872..6e16334 100755
507534 --- a/client/session.cc
508535 +++ b/client/session.cc
509 @@ -848,7 +848,7 @@ bool Session::LaunchTool(const string &mode, const string &extra_arg) {
536 @@ -885,7 +885,7 @@ bool Session::LaunchTool(const string &mode, const string &extra_arg) {
510537 return false;
511538 }
512539
551578 // Even if the locale is not English nor Japanese, load translation
552579 // file to translate common messages like "OK" and "Cancel".
553580 diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc
554 index 9ca0af8..02b13ed 100755
581 index 515f702..5639f96 100755
555582 --- a/gui/config_dialog/config_dialog.cc
556583 +++ b/gui/config_dialog/config_dialog.cc
557584 @@ -74,11 +74,11 @@ ConfigDialog::ConfigDialog()
622649 this,
623650 tr("Mozc settings"),
624651 diff --git a/gui/dictionary_tool/dictionary_tool.cc b/gui/dictionary_tool/dictionary_tool.cc
625 index 3bfc372..525b4ff 100755
652 index b9dd49d..b01ec09 100755
626653 --- a/gui/dictionary_tool/dictionary_tool.cc
627654 +++ b/gui/dictionary_tool/dictionary_tool.cc
628655 @@ -305,7 +305,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
661688 'libraries': [
662689 ' <!@(pkg-config --libs QtCore QtGui)',
663690 diff --git a/gui/qt_moc.gypi b/gui/qt_moc.gypi
664 index 81e6015..d768b10 100755
691 index db47221..f5a006e 100755
665692 --- a/gui/qt_moc.gypi
666693 +++ b/gui/qt_moc.gypi
667694 @@ -31,7 +31,7 @@
713740 },{ # OS!="linux"
714741 'uic_path': '<(qt_basepath)/bin/uic<(EXECUTABLE_SUFFIX)',
715742 diff --git a/gyp/common.gypi b/gyp/common.gypi
716 index b80245f..4fb428b 100755
743 index 0f7fade..839fecb 100755
717744 --- a/gyp/common.gypi
718745 +++ b/gyp/common.gypi
719 @@ -211,7 +211,7 @@
746 @@ -226,7 +226,7 @@
720747 },
721748 },
722749 'conditions': [
725752 'cflags': [
726753 '<@(debug_extra_cflags)',
727754 ],
728 @@ -250,7 +250,7 @@
755 @@ -265,7 +265,7 @@
729756 },
730757 },
731758 'conditions': [
734761 'cflags': [
735762 '<@(release_extra_cflags)',
736763 ],
737 @@ -459,6 +459,51 @@
764 @@ -470,6 +470,51 @@
738765 }],
739766 ],
740767 }],
786813 ['OS=="mac"', {
787814 'defines': [
788815 'OS_MACOSX',
789 @@ -514,7 +559,7 @@
816 @@ -524,7 +569,7 @@
790817 # Linux gyp (into scons) doesn't like target_conditions?
791818 # TODO(team): track down why 'target_conditions' doesn't work
792819 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
827854 LOG(WARNING) << server_path << " on disk is modified";
828855 // If a user updates the server binary on disk during the server is running,
829856 diff --git a/ipc/unix_ipc.cc b/ipc/unix_ipc.cc
830 index 3085320..5e8c080 100755
857 index 3085320..3f94332 100755
831858 --- a/ipc/unix_ipc.cc
832859 +++ b/ipc/unix_ipc.cc
833860 @@ -28,7 +28,8 @@
888915 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
889916 },
890917 diff --git a/protobuf/protobuf.gyp b/protobuf/protobuf.gyp
891 index e36b373..a22f11b 100755
918 index 6072864..a619ddc 100755
892919 --- a/protobuf/protobuf.gyp
893920 +++ b/protobuf/protobuf.gyp
894921 @@ -116,7 +116,7 @@
910937 '../gyp/install_build_tool.gypi',
911938 ],
912939 diff --git a/testing/testing.gyp b/testing/testing.gyp
913 index dd7b8af..2177daf 100755
940 index 58d1cf3..34a59d6 100755
914941 --- a/testing/testing.gyp
915942 +++ b/testing/testing.gyp
916 @@ -52,7 +52,7 @@
943 @@ -53,7 +53,7 @@
917944 '../base/base.gyp:base',
918945 ],
919946 'conditions': [
922949 'dependencies': [
923950 'testing',
924951 ],
952 diff --git a/gui/gui.gyp b/gui/gui.gyp
953 index 63db153..f558643 100755
954 --- a/gui/gui.gyp
955 +++ b/gui/gui.gyp
956 @@ -360,7 +360,7 @@
957 'gen_character_pad_data',
958 'gen_dictionary_tool_files',
959 ],
960 - 'conditions': [['use_libzinnia==1 and OS=="linux"', {
961 + 'conditions': [['use_libzinnia==1 and (OS=="linux" or OS=="gnu-kfreebsd")', {
962 'defines': [
963 'USE_LIBZINNIA',
964 ],
965 diff --git a/gui/zinnia.gyp b/gui/zinnia.gyp
966 index e06e67c..a3ca5ae 100755
967 --- a/gui/zinnia.gyp
968 +++ b/gui/zinnia.gyp
969 @@ -45,7 +45,7 @@
970 'target_name': 'zinnia',
971 'type': 'static_library',
972 'conditions': [
973 - ['OS=="linux"', {
974 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
975 'conditions': [
976 ['use_libzinnia==1', {
977 'link_settings': {