Codebase list mozc / f6500bb
Update kfreebsd patch Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 12 years ago
1 changed file(s) with 158 addition(s) and 275 deletion(s). Raw diff Collapse all Expand all
00 diff --git a/base/const.h b/base/const.h
1 index 2525bc0..22f8ae8 100755
1 index 8e986f9..0a5b5b2 100755
22 --- a/base/const.h
33 +++ b/base/const.h
4 @@ -122,7 +122,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event.";
4 @@ -125,7 +125,7 @@ const char kEventPathPrefix[] = "GoogleJapaneseInput.event.";
55 #else
66 const char kEventPathPrefix[] = "Mozc.event.";
77 #endif // GOOGLE_JAPANESE_INPUT_BUILD
4242 return 1;
4343 #endif // OS_LINUX
4444 diff --git a/base/flags.h b/base/flags.h
45 index cc524c3..b2d8e79 100755
45 index 18b9c58..fdb210d 100755
4646 --- a/base/flags.h
4747 +++ b/base/flags.h
48 @@ -76,7 +76,7 @@ namespace {
48 @@ -75,7 +75,7 @@ extern void InitGoogleInternal(const char *arg0,
4949 // so that CrashReportHandler() is resovled in link time
5050 inline void InstallBreakpad() {
5151 #ifdef GOOGLE_JAPANESE_INPUT_BUILD
131131 #endif
132132
133133 diff --git a/base/process.cc b/base/process.cc
134 index e465d69..61031e3 100755
134 index c230b31..2d5859a 100755
135135 --- a/base/process.cc
136136 +++ b/base/process.cc
137 @@ -52,7 +52,7 @@
137 @@ -51,7 +51,7 @@
138138 #include "base/mac_process.h"
139139 #endif // OS_MACOSX
140140
143143 #include <fcntl.h>
144144 #include <signal.h>
145145 #include <spawn.h> // for posix_spawn().
146 @@ -121,7 +121,7 @@ bool Process::OpenBrowser(const string &url) {
146 @@ -120,7 +120,7 @@ bool Process::OpenBrowser(const string &url) {
147147 return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW);
148148 #endif
149149
152152 static const char kBrowserCommand[] = "/usr/bin/xdg-open";
153153 // xdg-open which uses kfmclient or gnome-open internally works both on KDE
154154 // and GNOME environments.
155 @@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string &path,
155 @@ -204,7 +204,7 @@ bool Process::SpawnProcess(const string &path,
156156 }
157157 #endif
158158
161161 // Do not call posix_spawn() for obviously bad path.
162162 if (!S_ISREG(statbuf.st_mode)) {
163163 LOG(ERROR) << "Not a regular file: " << path;
164 @@ -482,7 +482,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
164 @@ -399,7 +399,7 @@ bool Process::LaunchErrorMessageDialog(const string &error_type) {
165165 }
166166 #endif // OS_WINDOWS
167167
171171 const string arg = "--mode=error_message_dialog --error_type=" + error_type;
172172 size_t pid = 0;
173173 diff --git a/base/run_level.cc b/base/run_level.cc
174 index 6e9d53a..8652937 100755
174 index a7a085b..4900924 100755
175175 --- a/base/run_level.cc
176176 +++ b/base/run_level.cc
177177 @@ -38,7 +38,7 @@
183183 #include <unistd.h>
184184 #include <sys/types.h>
185185 #endif
186 diff --git a/base/stats_config_util.cc b/base/stats_config_util.cc
187 index 8bd3f9e..aed4d37 100755
188 --- a/base/stats_config_util.cc
189 +++ b/base/stats_config_util.cc
190 @@ -337,7 +337,7 @@ bool MacStatsConfigUtilImpl::SetEnabled(bool val) {
191 #endif // MACOSX
192
193
194 -#ifdef OS_LINUX
195 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
196 class LinuxStatsConfigUtilImpl : public StatsConfigUtilInterface {
197 // TODO(toshiyuki): implement this
198 public:
199 diff --git a/base/stats_config_util_test.cc b/base/stats_config_util_test.cc
200 index b780a5a..59d3fb7 100755
201 --- a/base/stats_config_util_test.cc
202 +++ b/base/stats_config_util_test.cc
203 @@ -841,7 +841,7 @@ TEST_F(StatsConfigUtilTestWin,
204 #endif // OS_WINDOWS
205
206
207 -#ifdef OS_LINUX
208 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
209 TEST(StatsConfigUtilTestLinux, DefaultValueTest) {
210 EXPECT_FALSE(mozc::StatsConfigUtil::IsEnabled());
211 }
212186 diff --git a/base/stopwatch.cc b/base/stopwatch.cc
213187 index 15afad3..8ff2e29 100755
214188 --- a/base/stopwatch.cc
241215 if (-1 == clock_gettime(CLOCK_REALTIME, &timestamp)) {
242216 return 0;
243217 diff --git a/base/util.cc b/base/util.cc
244 index 4260471..e12b98f 100755
218 index 41f30e7..ecaaba5 100755
245219 --- a/base/util.cc
246220 +++ b/base/util.cc
247 @@ -2352,7 +2352,7 @@ string Util::GetServerDirectory() {
221 @@ -2544,7 +2544,7 @@ string Util::GetServerDirectory() {
248222 return MacUtil::GetServerDirectory();
249223 #endif // OS_MACOSX
250224
253227 return "/usr/lib/mozc";
254228 #endif // OS_LINUX
255229 }
256 @@ -2440,7 +2440,7 @@ string GetObjectNameAsString(HANDLE handle) {
230 @@ -2632,7 +2632,7 @@ string GetObjectNameAsString(HANDLE handle) {
257231 #endif
258232
259233 string Util::GetDesktopNameAsString() {
262236 const char *display = getenv("DISPLAY");
263237 if (display == NULL) {
264238 return "";
265 @@ -2917,7 +2917,7 @@ bool Util::IsPlatformSupported() {
239 @@ -3109,7 +3109,7 @@ bool Util::IsPlatformSupported() {
266240 #if defined(OS_MACOSX)
267241 // TODO(yukawa): support Mac.
268242 return true;
271245 // TODO(yukawa): support Linux.
272246 return true;
273247 #elif defined(OS_WINDOWS)
274 @@ -3288,18 +3288,19 @@ string Util::GetOSVersionString() {
248 @@ -3513,18 +3513,19 @@ string Util::GetOSVersionString() {
275249 } else {
276250 LOG(WARNING) << "GetVersionEx failed";
277251 }
295269 }
296270
297271 void Util::DisableIME() {
298 @@ -3333,7 +3334,7 @@ uint64 Util::GetTotalPhysicalMemory() {
272 @@ -3558,7 +3559,7 @@ uint64 Util::GetTotalPhysicalMemory() {
299273 return 0;
300274 }
301275 return total_memory;
304278 #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
305279 const long page_size = sysconf(_SC_PAGESIZE);
306280 const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
307 @@ -3359,7 +3360,7 @@ void Util::PreloadMappedRegion(const void *begin,
281 @@ -3584,7 +3585,7 @@ void Util::PreloadMappedRegion(const void *begin,
308282 ::ZeroMemory(&system_info, sizeof(system_info));
309283 ::GetSystemInfo(&system_info);
310284 const size_t page_size = system_info.dwPageSize;
314288 const size_t page_size = sysconf(_SC_PAGESIZE);
315289 #else
316290 diff --git a/build_mozc.py b/build_mozc.py
317 index 680c539..a3adfae 100755
291 index d9afab8..57542c7 100755
318292 --- a/build_mozc.py
319293 +++ b/build_mozc.py
320294 @@ -72,6 +72,14 @@ def IsLinux():
350324 else:
351325 logging.error('Unsupported platform: %s', os.name)
352326
353 @@ -188,7 +198,7 @@ def GetGypFileNames():
327 @@ -198,7 +208,7 @@ def GetGypFileNames(options):
328 if IsWindows():
354329 gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
355330 gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp'))
356 gyp_file_names.append('third_party/mozc/sandbox/sandbox.gyp')
357331 - elif IsLinux():
358332 + elif IsLinux() or IsFreeBSD() or IsGNUkFreeBSD():
359333 gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
360334 # Add ibus.gyp if ibus is installed.
361335 # Ubuntu 8.04 (Hardy) does not contain ibus package.
362 @@ -263,7 +273,7 @@ def CleanBuildFilesAndDirectories():
336 @@ -349,6 +359,7 @@ def AddCommonOptions(parser):
337 # should be done. If you want ChromeOS build, specify "ChromeOS".
338 parser.add_option('--target_platform', dest='target_platform', default='',
339 help='If you want ChromeOS build, specify "ChromeOS"')
340 + parser.add_option('--os', dest='os', default='linux')
341 return parser
342
343
344 @@ -428,7 +439,7 @@ def ExpandMetaTarget(meta_target_name, target_platform):
345 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
346 '%s/server/server.gyp:mozc_server',
347 '%s/gui/gui.gyp:mozc_tool']
348 - elif IsLinux():
349 + elif IsLinux() or IsFreeBSD() or IsGNUkFreeBSD():
350 targets = ['%s/unix/ibus/ibus.gyp:ibus_mozc',
351 '%s/server/server.gyp:mozc_server',
352 '%s/gui/gui.gyp:mozc_tool']
353 @@ -546,6 +557,9 @@ def GypMain(options, unused_args):
354 if options.coverage:
355 command_line.extend(['-D', 'coverage=1'])
356
357 + if options.os:
358 + command_line.extend(['-D', 'OS=%s' % options.os])
359 +
360 command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)])
361
362 # Check the version and determine if the building version is dev-channel or
363 @@ -576,7 +590,7 @@ def GypMain(options, unused_args):
364 # command for pkg-config. Here we catch the environment variable
365 # and use the specified command instead of actual pkg-config
366 # command.
367 - if IsLinux():
368 + if IsLinux() or IsFreeBSD() or IsGNUkFreeBSD():
369 command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
370 else:
371 command_line.extend(['-D', 'pkg_config_command='])
372 @@ -661,6 +675,41 @@ def BuildOnLinux(options, targets, unused_original_directory_name):
373
374 RunOrDie([make_command] + build_args + target_names)
375
376 +def BuildOnBSD(options, targets):
377 + """Build the targets on *BSD."""
378 + target_names = []
379 + for target in targets:
380 + (unused_gyp_file_name, target_name) = ParseTarget(target)
381 + target_names.append(target_name)
382 +
383 + if os.uname()[0] == 'FreeBSD' :
384 + make_command = os.getenv('BUILD_COMMAND', 'gmake')
385 + else:
386 + make_command = os.getenv('BUILD_COMMAND', 'make')
387 +
388 + # flags for building in Chrome OS chroot environment
389 + envvars = [
390 + 'CFLAGS',
391 + 'CXXFLAGS',
392 + 'CXX',
393 + 'CC',
394 + 'AR',
395 + 'AS',
396 + 'RANLIB',
397 + 'LD',
398 + ]
399 + for envvar in envvars:
400 + if envvar in os.environ:
401 + os.environ[envvar] = os.getenv(envvar)
402 +
403 + # set output directory
404 + os.environ['builddir_name'] = 'out_bsd'
405 +
406 + build_args = ['-j%s' % options.jobs, 'BUILDTYPE=%s' % options.configuration]
407 + if options.build_base:
408 + build_args.append('builddir_name=%s' % options.build_base)
409 +
410 + RunOrDie([make_command] + build_args + target_names)
411
412 def CheckFileOrDie(file_name):
413 """Check the file exists or dies if not."""
414 @@ -776,6 +825,8 @@ def BuildMain(options, targets, original_directory_name):
415 BuildOnMac(options, targets, original_directory_name)
416 elif IsLinux():
417 BuildOnLinux(options, targets, original_directory_name)
418 + elif IsFreeBSD() or IsGNUkFreeBSD():
419 + BuildOnBSD(options, targets)
420 elif IsWindows():
421 BuildOnWindows(options, targets, original_directory_name)
422 else:
423 @@ -899,7 +950,7 @@ def CleanBuildFilesAndDirectories(options, unused_args):
363424 elif IsMac():
364425 directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
365426 '*.xcodeproj')))
368429 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
369430 '*.target.mk')))
370431 file_names.extend(glob.glob(os.path.join(gyp_directory_name,
371 @@ -282,6 +292,10 @@ def CleanBuildFilesAndDirectories():
432 @@ -918,6 +969,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
372433 file_names.append('Makefile')
373434 elif IsWindows():
374435 file_names.append('third_party/breakpad/breakpad.gyp')
379440 # Remove files.
380441 for file_name in file_names:
381442 RemoveFile(file_name)
382 @@ -378,6 +392,8 @@ def GypMain(deps_file_name):
383 command_line.extend(['-D', 'use_qt=NO'])
384 if options.coverage:
385 command_line.extend(['-D', 'coverage=1'])
386 + if options.os:
387 + command_line.extend(['-D', 'OS=%s' % options.os])
388
389 command_line.extend(['-D', 'build_base=%s' % GetBuildBaseName(options)])
390
391 @@ -425,6 +441,8 @@ def RunTests(configuration, unused_calculate_coverage):
392 base_path = os.path.join('out_linux', configuration)
393 elif IsWindows():
394 base_path = os.path.join('out_win', configuration)
395 + elif IsFreeBSD() or IsGNUkFreeBSD():
396 + base_path = os.path.join('out_bsd', configuration)
397 else:
398 logging.error('Unsupported platform: %s', os.name)
399 return
400 @@ -578,13 +596,14 @@ def ParseGypOptions():
401 'This flag is false by default because it may require you '
402 'to install libhangul in your environment.')
403
404 -
405 # Linux environment can build both for Linux and ChromeOS.
406 # This option enable this script to know which build (Linux or ChromeOS)
407 # should be done. If you want ChromeOS build, specify "ChromeOS".
408 parser.add_option('--target_platform', dest='target_platform',
409 help='if you want ChromeOS build, specify "ChromeOS"')
410
411 + parser.add_option('--os', dest='os', default='linux')
412 +
413 (options, unused_args) = parser.parse_args()
414 return options
415
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):
435 target_names.append(target_name)
436
437 make_command = os.getenv('BUILD_COMMAND', 'make')
438 +
439 # flags for building in Chrome OS chroot environment
440 envvars = [
441 'CFLAGS',
442 @@ -723,7 +743,7 @@ def BuildOnLinux(options, targets):
443 for envvar in envvars:
444 if envvar in os.environ:
445 os.environ[envvar] = os.getenv(envvar)
446 -
447 +
448 # set output directory
449 os.environ['builddir_name'] = 'out_linux'
450
451 @@ -735,6 +755,42 @@ def BuildOnLinux(options, targets):
452
453 RunOrDie([make_command] + build_args + target_names)
443 @@ -944,6 +999,42 @@ def ShowHelpAndExit():
444 print 'See also the comment in the script for typical usage.'
445 sys.exit(1)
454446
455447 +def BuildOnBSD(options, targets):
456448 + """Build the targets on *BSD."""
489481 + RunOrDie([make_command] + build_args + target_names)
490482 +
491483
492 def CheckFileOrDie(file_name):
493 """Check the file exists or dies if not."""
494 @@ -827,6 +883,8 @@ def BuildMain(original_directory_name):
495 BuildOnMac(options, targets, original_directory_name)
496 elif IsLinux():
497 BuildOnLinux(options, targets)
498 + elif IsFreeBSD() or IsGNUkFreeBSD():
499 + BuildOnBSD(options, targets)
500 elif IsWindows():
501 BuildOnWindows(options, targets, original_directory_name)
502 else:
484 def main():
485 if len(sys.argv) < 2:
503486 diff --git a/build_tools/mozc_version.py b/build_tools/mozc_version.py
504 index 4fbb7c6..91d099f 100755
487 index 04d644b..b3ed870 100755
505488 --- a/build_tools/mozc_version.py
506489 +++ b/build_tools/mozc_version.py
507490 @@ -58,6 +58,13 @@ def IsLinux():
518501
519502 def CalculateRevisionForPlatform(revision, target_platform):
520503 """Returns the revision for the current platform."""
521 @@ -71,6 +78,10 @@ def CalculateRevisionForPlatform(revision, target_platform):
504 @@ -76,6 +83,10 @@ def CalculateRevisionForPlatform(revision, target_platform):
522505 last_digit = '1'
523506 elif IsLinux():
524507 last_digit = '2'
529512 if last_digit:
530513 return revision[0:-1] + last_digit
531514
532 diff --git a/client/session.cc b/client/session.cc
533 index 5704872..6e16334 100755
534 --- a/client/session.cc
535 +++ b/client/session.cc
536 @@ -885,7 +885,7 @@ bool Session::LaunchTool(const string &mode, const string &extra_arg) {
537 return false;
538 }
539
540 -#if defined(OS_WINDOWS) || defined(OS_LINUX)
541 +#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
542 string arg = "--mode=" + mode;
543 if (!extra_arg.empty()) {
544 arg += " ";
545 diff --git a/dictionary/dictionary_preloader.cc b/dictionary/dictionary_preloader.cc
546 index 5c08288..baf8858 100755
547 --- a/dictionary/dictionary_preloader.cc
548 +++ b/dictionary/dictionary_preloader.cc
549 @@ -89,7 +89,7 @@ bool IsPreloadable(const char *image, size_t size) {
550 return available_memory > preload_size * FLAGS_preload_memory_factor;
551 #endif
552
553 -#ifdef OS_LINUX
554 +#if defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
555 // TOOD(taku): implement Linux version.
556 // Since Linux is installed into heterogeneous environment,
557 // we have to check the amount of available memory.
558 @@ -161,7 +161,7 @@ void DictionaryPreloader::PreloadIfApplicable(const char *image, size_t size) {
559 // GoogleIMEJaCacheService.exe is responsible for keeping the dictionary
560 // on-page (or freeing the memory in low-memory condition).
561 // See http://b/2354549 for details.
562 -#if defined(OS_MACOSX) || defined(OS_LINUX)
563 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_GNU_KFREEBSD) || defined(OS_FREEBSD)
564 if (!IsPreloadable(image, size)) {
565 return;
566 }
567515 diff --git a/gui/base/locale_util.cc b/gui/base/locale_util.cc
568516 index 827fd28..52c881b 100755
569517 --- a/gui/base/locale_util.cc
578526 // Even if the locale is not English nor Japanese, load translation
579527 // file to translate common messages like "OK" and "Cancel".
580528 diff --git a/gui/config_dialog/config_dialog.cc b/gui/config_dialog/config_dialog.cc
581 index 515f702..5639f96 100755
529 index f358636..7005dae 100755
582530 --- a/gui/config_dialog/config_dialog.cc
583531 +++ b/gui/config_dialog/config_dialog.cc
584532 @@ -74,11 +74,11 @@ ConfigDialog::ConfigDialog()
649597 this,
650598 tr("Mozc settings"),
651599 diff --git a/gui/dictionary_tool/dictionary_tool.cc b/gui/dictionary_tool/dictionary_tool.cc
652 index b9dd49d..b01ec09 100755
600 index 0fd9a4f..77c5cf8 100755
653601 --- a/gui/dictionary_tool/dictionary_tool.cc
654602 +++ b/gui/dictionary_tool/dictionary_tool.cc
655 @@ -305,7 +305,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
603 @@ -316,7 +316,7 @@ DictionaryTool::DictionaryTool(QWidget *parent)
656604 }
657605
658606 // main window
661609 // For some reason setCentralWidget crashes the dictionary_tool on Linux
662610 // TODO(taku): investigate the cause of the crashes
663611 setCentralWidget(splitter_);
664 diff --git a/gui/qt_common.gypi b/gui/qt_common.gypi
665 index ba6989a..ff9a5c5 100755
666 --- a/gui/qt_common.gypi
667 +++ b/gui/qt_common.gypi
668 @@ -33,7 +33,7 @@
669 'variables': {
670 'qt_basepath': '$(QTDIR)',
671 'conditions': [
672 - ['OS=="linux"', {
673 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
674 'qt_cflags': ' <!@(pkg-config --cflags QtCore QtGui)',
675 },{ # OS!="linux"
676 'qt_cflags': '<(qt_basepath)/include',
612 diff --git a/gui/gui.gyp b/gui/gui.gyp
613 index be08f33..370956b 100755
614 --- a/gui/gui.gyp
615 +++ b/gui/gui.gyp
616 @@ -372,7 +372,7 @@
617 'includes': [
618 'qt_libraries.gypi',
619 ],
620 - 'conditions': [['use_libzinnia==1 and OS=="linux"', {
621 + 'conditions': [['use_libzinnia==1 and (OS=="linux" or OS=="gnu-kfreebsd")', {
622 'defines': [
623 'USE_LIBZINNIA',
624 ],
677625 diff --git a/gui/qt_libraries.gypi b/gui/qt_libraries.gypi
678 index 8b035cf..731b7ce 100755
626 index b406bc6..b564c1c 100755
679627 --- a/gui/qt_libraries.gypi
680628 +++ b/gui/qt_libraries.gypi
681 @@ -44,7 +44,7 @@
682 ],
683 },
629 @@ -86,7 +86,7 @@
630 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
631 ]
684632 }],
685633 - ['OS=="linux"', {
686634 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
687 'link_settings': {
688 'libraries': [
689 ' <!@(pkg-config --libs QtCore QtGui)',
690 diff --git a/gui/qt_moc.gypi b/gui/qt_moc.gypi
691 index db47221..f5a006e 100755
692 --- a/gui/qt_moc.gypi
693 +++ b/gui/qt_moc.gypi
694 @@ -31,7 +31,7 @@
695 {
696 'variables': {
697 'conditions': [
698 - ['OS=="linux"', {
699 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
700 'moc_path': '<!(pkg-config --variable=moc_location QtGui)',
701 },{ # OS!="linux"
702 'moc_path': '<(qt_basepath)/bin/moc<(EXECUTABLE_SUFFIX)',
703 diff --git a/gui/qt_rcc.gypi b/gui/qt_rcc.gypi
704 index 0649510..33637da 100755
705 --- a/gui/qt_rcc.gypi
706 +++ b/gui/qt_rcc.gypi
707 @@ -31,7 +31,7 @@
708 {
709 'variables': {
710 'conditions': [
711 - ['OS=="linux"', {
712 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
713 # seems that --variable=rcc_location is not supported
714 'rcc_path': '<!(pkg-config --variable=exec_prefix QtGui)/bin/rcc',
715 },{ # OS!="linux"
716 diff --git a/gui/qt_target_default.gypi b/gui/qt_target_default.gypi
717 index 855da5f..2a437af 100755
718 --- a/gui/qt_target_default.gypi
719 +++ b/gui/qt_target_default.gypi
720 @@ -91,7 +91,7 @@
721 },
722 },
723 }],
724 - ['OS=="linux"', {
725 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
726 'target_defaults': {
727 'configurations': {
728 'Common_Base': {
729 diff --git a/gui/qt_uic.gypi b/gui/qt_uic.gypi
730 index 8cb765d..c61af9f 100755
731 --- a/gui/qt_uic.gypi
732 +++ b/gui/qt_uic.gypi
733 @@ -31,7 +31,7 @@
734 {
735 'variables': {
736 'conditions': [
737 - ['OS=="linux"', {
738 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
739 'uic_path': '<!(pkg-config --variable=uic_location QtGui)',
740 },{ # OS!="linux"
741 'uic_path': '<(qt_basepath)/bin/uic<(EXECUTABLE_SUFFIX)',
635 'conditions': [
636 ['qt_dir', {
637 'libraries': [
638 diff --git a/gui/zinnia.gyp b/gui/zinnia.gyp
639 index b4cd01c..481b280 100755
640 --- a/gui/zinnia.gyp
641 +++ b/gui/zinnia.gyp
642 @@ -45,7 +45,7 @@
643 'target_name': 'zinnia',
644 'type': 'static_library',
645 'conditions': [
646 - ['OS=="linux"', {
647 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
648 'conditions': [
649 ['use_libzinnia==1', {
650 'link_settings': {
742651 diff --git a/gyp/common.gypi b/gyp/common.gypi
743 index 0f7fade..839fecb 100755
652 index e9bc954..58f0f1d 100755
744653 --- a/gyp/common.gypi
745654 +++ b/gyp/common.gypi
746 @@ -226,7 +226,7 @@
655 @@ -233,7 +233,7 @@
747656 },
748657 },
749658 'conditions': [
752661 'cflags': [
753662 '<@(debug_extra_cflags)',
754663 ],
755 @@ -265,7 +265,7 @@
664 @@ -272,7 +272,7 @@
756665 },
757666 },
758667 'conditions': [
759668 - ['OS=="linux"', {
760669 + ['OS=="linux" or OS=="gnu-kfreebsd"', {
761670 'cflags': [
762 '<@(release_extra_cflags)',
671 '<@(release_extra_cflags)',
763672 ],
764 @@ -470,6 +470,51 @@
673 @@ -523,6 +523,51 @@
765674 }],
766675 ],
767676 }],
813722 ['OS=="mac"', {
814723 'defines': [
815724 'OS_MACOSX',
816 @@ -524,7 +569,7 @@
725 @@ -577,7 +622,7 @@
817726 # Linux gyp (into scons) doesn't like target_conditions?
818727 # TODO(team): track down why 'target_conditions' doesn't work
819728 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
949858 'dependencies': [
950859 'testing',
951860 ],
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': {