Fri Nov 7 23:28:36 2014 UTC ()
Update to 1.15.1917.102 from 1.15.1895.102

Changelog:
r373 2014-11-03 1.15.1917.102 - r353 2014-10-17 1.15.1896.102

You can check out Mozc r373 as follows.

gclient sync --revision=373

Summary of changes between 1.15.1896.102 (r353) and 1.15.1917.102 (r373).

    Build related changes:
        Android build is now tested with NDK r10c and OpenJDK 7
    Fixed issues:
        FIX: Warning message from keymap editor should be updated ( Issue 251 )
    Commit summary:
        r373: Remove Util:ToUTF8 since it is actually a dead code
        r372: Tidy up build_mozc.py
        r371: Unsupport BuildToolsMain in build_mozc.py except for Windows
        r370: Re-enable tests for SafeStrToDouble/SafeStrToFloat on Android
        r369: Use OpenJDK 7 to build Android binaries
        r368: Swith protobuf repository from Google Code to GitHub part2
        r367: Fix several coding style issues
        r366: Sort test cases alphabetically
        r365: Merge ANDROID_VERSION_CODE into BUILD
        r364: Replace scoped_ptr with std::unique_ptr under unix/
        r363: Stop generating xcode rule to run unittest from IDE
        r362: Fix style violations in header include guards part 3
        r361: Deprecate build fravor "Optimize"
        r360: Put mozc_build_tools under output directory
        r359: Fix indentation in a python script
        r358: Roll breakpad r1375:r1391
        r357: Swith protobuf repository from Google Code to GitHub
        r356: Show the warning message when and only when keymaps for DirectInput mode are changed
        r355: Stop using non-standard default constructor of std::istream
        r354: Fix style violations in header include guards part 2
        r353: Switch to Android NDK r10c


(ryoon)
diff -r1.14 -r1.15 pkgsrc/inputmethod/mozc-server/Makefile.common
diff -r1.10 -r1.11 pkgsrc/inputmethod/mozc-server/distinfo
diff -r1.4 -r1.5 pkgsrc/inputmethod/mozc-server/patches/patch-base_base.gyp
diff -r1.2 -r1.3 pkgsrc/inputmethod/mozc-server/patches/patch-base_run__level.cc
diff -r1.5 -r1.6 pkgsrc/inputmethod/mozc-server/patches/patch-build__mozc.py

cvs diff -r1.14 -r1.15 pkgsrc/inputmethod/mozc-server/Makefile.common (expand / switch to unified diff)

--- pkgsrc/inputmethod/mozc-server/Makefile.common 2014/10/25 21:03:30 1.14
+++ pkgsrc/inputmethod/mozc-server/Makefile.common 2014/11/07 23:28:36 1.15
@@ -1,44 +1,44 @@ @@ -1,44 +1,44 @@
1# $NetBSD: Makefile.common,v 1.14 2014/10/25 21:03:30 ryoon Exp $ 1# $NetBSD: Makefile.common,v 1.15 2014/11/07 23:28:36 ryoon Exp $
2# used by inputmethod/ibus-mozc/Makefile 2# used by inputmethod/ibus-mozc/Makefile
3# used by inputmethod/mozc-elisp/Makefile 3# used by inputmethod/mozc-elisp/Makefile
4# used by inputmethod/mozc-server/Makefile 4# used by inputmethod/mozc-server/Makefile
5# used by inputmethod/mozc-tool/Makefile 5# used by inputmethod/mozc-tool/Makefile
6# used by inputmethod/mozc-renderer/Makefile 6# used by inputmethod/mozc-renderer/Makefile
7# used by inputmethod/uim-mozc/Makefile 7# used by inputmethod/uim-mozc/Makefile
8# 8#
9 9
10DISTNAME= mozc-1.15.1895.102 10DISTNAME= mozc-1.15.1917.102
11CATEGORIES= inputmethod 11CATEGORIES= inputmethod
12MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pnsft-aur/} 12MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pnsft-aur/}
13EXTRACT_SUFX= .tar.xz 13EXTRACT_SUFX= .tar.xz
14 14
15MAINTAINER= ryoon@NetBSD.org 15MAINTAINER= ryoon@NetBSD.org
16HOMEPAGE= http://code.google.com/p/mozc/ 16HOMEPAGE= http://code.google.com/p/mozc/
17COMMENT= Japanese inputmethod Mozc engine for IBus 17COMMENT= Japanese inputmethod Mozc engine for IBus
18LICENSE= modified-bsd 18LICENSE= modified-bsd
19 19
20DISTINFO_FILE= ${.CURDIR}/../../inputmethod/mozc-server/distinfo 20DISTINFO_FILE= ${.CURDIR}/../../inputmethod/mozc-server/distinfo
21PATCHDIR= ${.CURDIR}/../../inputmethod/mozc-server/patches 21PATCHDIR= ${.CURDIR}/../../inputmethod/mozc-server/patches
22 22
23BUILD_DEPENDS+= ${PYPKGPREFIX}-gyp-[0-9]*:../../devel/gyp 23BUILD_DEPENDS+= ${PYPKGPREFIX}-gyp-[0-9]*:../../devel/gyp
24BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build 24BUILD_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
25 25
26PYTHON_VERSIONS_INCOMPATIBLE= 33 # py-gyp 26PYTHON_VERSIONS_INCOMPATIBLE= 33 # py-gyp
27 27
28USE_LANGUAGES= c c++ 28USE_LANGUAGES= c c++
29# nullptr requires -std=c++11, and -std=c++11 requires gcc 4.7 or later 29# nullptr requires -std=c++11, and -std=c++11 requires gcc 4.7 or later
30GCC_REQD+= 4.7 30GCC_REQD+= 4.6
31CXXFLAGS+= -std=c++11 31CXXFLAGS+= -std=c++03
32 32
33USE_TOOLS+= gmake pkg-config 33USE_TOOLS+= gmake pkg-config
34 34
35FIND_PREFIX:= GYPDIR=${PYPKGPREFIX}-gyp 35FIND_PREFIX:= GYPDIR=${PYPKGPREFIX}-gyp
36#FIND_PREFIX:= NINJADIR=ninja 36#FIND_PREFIX:= NINJADIR=ninja
37.include "../../mk/find-prefix.mk" 37.include "../../mk/find-prefix.mk"
38 38
39OPENSSL_CFLAGS= -I${BUILDLINK_PREFIX.openssl}/include 39OPENSSL_CFLAGS= -I${BUILDLINK_PREFIX.openssl}/include
40OPENSSL_INC= -I${BUILDLINK_PREFIX.openssl}/include 40OPENSSL_INC= -I${BUILDLINK_PREFIX.openssl}/include
41OPENSSL_LDFLAGS= -L${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto 41OPENSSL_LDFLAGS= -L${BUILDLINK_PREFIX.openssl}/lib -lssl -lcrypto
42OPENSSL_LIBS= -lssl -lcrypto 42OPENSSL_LIBS= -lssl -lcrypto
43 43
44SUBST_CLASSES+= gyp 44SUBST_CLASSES+= gyp

cvs diff -r1.10 -r1.11 pkgsrc/inputmethod/mozc-server/distinfo (expand / switch to unified diff)

--- pkgsrc/inputmethod/mozc-server/distinfo 2014/10/25 21:03:30 1.10
+++ pkgsrc/inputmethod/mozc-server/distinfo 2014/11/07 23:28:36 1.11
@@ -1,42 +1,41 @@ @@ -1,42 +1,41 @@
1$NetBSD: distinfo,v 1.10 2014/10/25 21:03:30 ryoon Exp $ 1$NetBSD: distinfo,v 1.11 2014/11/07 23:28:36 ryoon Exp $
2 2
3SHA1 (mozc-1.15.1895.102.tar.xz) = 28ecf5bfec1706cbffbb73ae6c831158b30af9bd 3SHA1 (mozc-1.15.1917.102.tar.xz) = be7f09f424d519c6b856049f587e86072c7aed21
4RMD160 (mozc-1.15.1895.102.tar.xz) = 029fa3fdd0f410056fcfcfa897dfc6f229425bef 4RMD160 (mozc-1.15.1917.102.tar.xz) = 97b7293339e0791642d791764aae841179b1b2c8
5Size (mozc-1.15.1895.102.tar.xz) = 32468784 bytes 5Size (mozc-1.15.1917.102.tar.xz) = 32524892 bytes
6SHA1 (uim-mozc-334.tar.xz) = af86ce7a04b291629bd5dc56d5c1115332954a91 6SHA1 (uim-mozc-334.tar.xz) = af86ce7a04b291629bd5dc56d5c1115332954a91
7RMD160 (uim-mozc-334.tar.xz) = b988667237f65e61fabf3935f83f5d21a8059f4e 7RMD160 (uim-mozc-334.tar.xz) = b988667237f65e61fabf3935f83f5d21a8059f4e
8Size (uim-mozc-334.tar.xz) = 30544 bytes 8Size (uim-mozc-334.tar.xz) = 30544 bytes
9SHA1 (patch-base_base.gyp) = d1b0c6133bcef09a58bb02da0154fe54a5e71564 9SHA1 (patch-base_base.gyp) = 437fa7ef6c84448a2a8fb049af773ab9df64dc81
10SHA1 (patch-base_cpu__stats.cc) = cda8bbcbc963d8ed635435375cc80ee5e7ca2191 10SHA1 (patch-base_cpu__stats.cc) = cda8bbcbc963d8ed635435375cc80ee5e7ca2191
11SHA1 (patch-base_iconv.cc) = 1bf65dfc6152bf152cbe2714835a61436df2a48b 11SHA1 (patch-base_iconv.cc) = 1bf65dfc6152bf152cbe2714835a61436df2a48b
12SHA1 (patch-base_logging.cc) = 96ee9d1426ef1cf946a00fb15c9754603ab15bb8 12SHA1 (patch-base_logging.cc) = 96ee9d1426ef1cf946a00fb15c9754603ab15bb8
13SHA1 (patch-base_mutex.cc) = aed8588d4ff7b057fed072097ef09ddbc2696d31 13SHA1 (patch-base_mutex.cc) = aed8588d4ff7b057fed072097ef09ddbc2696d31
14SHA1 (patch-base_mutex.h) = 6c3c8f0845f0fdad815c4877026894000d5eac2c 14SHA1 (patch-base_mutex.h) = 6c3c8f0845f0fdad815c4877026894000d5eac2c
15SHA1 (patch-base_password__manager.cc) = f16982447f54e397d1aa103260d8f4d10aa76f96 15SHA1 (patch-base_password__manager.cc) = f16982447f54e397d1aa103260d8f4d10aa76f96
16SHA1 (patch-base_process.cc) = abdd6a955e87506972e7f71fd4bc3a300f49b304 16SHA1 (patch-base_process.cc) = abdd6a955e87506972e7f71fd4bc3a300f49b304
17SHA1 (patch-base_run__level.cc) = bf9897527494fda5e5f97366e2fd26a283225450 17SHA1 (patch-base_run__level.cc) = ead96536246093bd3d44f59a80085da2f39904e8
18SHA1 (patch-base_system__util.cc) = f3ef575a15cd518fe7d29264b39f775ccf502802 18SHA1 (patch-base_system__util.cc) = f3ef575a15cd518fe7d29264b39f775ccf502802
19SHA1 (patch-base_thread.h) = 8aaacbb1421cf0e886f3b58dfd2c653f3d82ef70 19SHA1 (patch-base_thread.h) = 8aaacbb1421cf0e886f3b58dfd2c653f3d82ef70
20SHA1 (patch-base_util.cc) = c473cb595535075b53c9c235fc28f5e7da26d087 20SHA1 (patch-base_util.cc) = c473cb595535075b53c9c235fc28f5e7da26d087
21SHA1 (patch-build__mozc.py) = b6e94a43564cd4a7032cc9c6d5bd297453010d36 21SHA1 (patch-build__mozc.py) = 693e5d67ddf4dc1bc12fd9fa62bd72654c2ce5bc
22SHA1 (patch-build__tools_mozc__version.py) = a6ff8a82b1328086b7d758f73a7d3c31e87bccc9 22SHA1 (patch-build__tools_mozc__version.py) = a6ff8a82b1328086b7d758f73a7d3c31e87bccc9
23SHA1 (patch-build__tools_util.py) = 6416884ba288d60eb8e558e8c5de7ef6e538b82e 23SHA1 (patch-build__tools_util.py) = 6416884ba288d60eb8e558e8c5de7ef6e538b82e
24SHA1 (patch-client_client.cc) = 7ca43dde3f207331005599653c6520667e3ca93c 24SHA1 (patch-client_client.cc) = 7ca43dde3f207331005599653c6520667e3ca93c
25SHA1 (patch-config_stats__config__util__test.cc) = db51e6619c5c04ac8fa50890825206ea922dccf2 25SHA1 (patch-config_stats__config__util__test.cc) = db51e6619c5c04ac8fa50890825206ea922dccf2
26SHA1 (patch-gui_base_locale__util.cc) = 7d1e9cf3c2c36590298496471a97b8c32010a30b 26SHA1 (patch-gui_base_locale__util.cc) = 7d1e9cf3c2c36590298496471a97b8c32010a30b
27SHA1 (patch-gui_config__dialog_config__dialog.cc) = aae18b7ea36fd5ff5758625875a04634ffdfd68a 27SHA1 (patch-gui_config__dialog_config__dialog.cc) = aae18b7ea36fd5ff5758625875a04634ffdfd68a
28SHA1 (patch-gui_config__dialog_keybinding__editor.cc) = 00a6e4bb2c07e3340e188f108f0285a3aa2aceb9 28SHA1 (patch-gui_config__dialog_keybinding__editor.cc) = 00a6e4bb2c07e3340e188f108f0285a3aa2aceb9
29SHA1 (patch-gui_config__dialog_keymap__editor.cc) = a78a4fb5c484e672b0cfecf38c6713cf74007cb5 
30SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = 3652713857d03f847108952f2994ee44bfe62608 29SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = 3652713857d03f847108952f2994ee44bfe62608
31SHA1 (patch-gui_gui.gyp) = 70b6d78ca5a482b9e8fa697dbb191cccbdde1c6a 30SHA1 (patch-gui_gui.gyp) = 70b6d78ca5a482b9e8fa697dbb191cccbdde1c6a
32SHA1 (patch-gui_qt__libraries.gypi) = e92be78947dcf66211c80169b864b7c9d057b3db 31SHA1 (patch-gui_qt__libraries.gypi) = e92be78947dcf66211c80169b864b7c9d057b3db
33SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 34a7cd2a99a0082f490c3f623c7c6a856c984f8b 32SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 34a7cd2a99a0082f490c3f623c7c6a856c984f8b
34SHA1 (patch-gyp_common.gypi) = 4859bc46c17088f29f0addd75a0af6b4f5fc3525 33SHA1 (patch-gyp_common.gypi) = 4859bc46c17088f29f0addd75a0af6b4f5fc3525
35SHA1 (patch-handwriting_handwriting.gyp) = 0261aef287b34f4a3c8424fb1af44720ae00a85c 34SHA1 (patch-handwriting_handwriting.gyp) = 0261aef287b34f4a3c8424fb1af44720ae00a85c
36SHA1 (patch-handwriting_zinnia.gyp) = d09ac17d17dabdbfdcb7c623193a5c72dbcacfbc 35SHA1 (patch-handwriting_zinnia.gyp) = d09ac17d17dabdbfdcb7c623193a5c72dbcacfbc
37SHA1 (patch-handwriting_zinnia__handwriting.cc) = dd9363f470bf4a27fed40602f02127cb130042b2 36SHA1 (patch-handwriting_zinnia__handwriting.cc) = dd9363f470bf4a27fed40602f02127cb130042b2
38SHA1 (patch-ipc_ipc__path__manager.cc) = c96fbac6d1d81ddd7f999c30bdc2539ee2df2564 37SHA1 (patch-ipc_ipc__path__manager.cc) = c96fbac6d1d81ddd7f999c30bdc2539ee2df2564
39SHA1 (patch-ipc_ipc__path__manager__test.cc) = 90ea81daef93dc1ad5cee792ced26a9a2939fbdf 38SHA1 (patch-ipc_ipc__path__manager__test.cc) = 90ea81daef93dc1ad5cee792ced26a9a2939fbdf
40SHA1 (patch-ipc_named__event.cc) = 92283261e7580569587e43156f13567b593c9a32 39SHA1 (patch-ipc_named__event.cc) = 92283261e7580569587e43156f13567b593c9a32
41SHA1 (patch-ipc_unix__ipc.cc) = d821deb2f38bf77bf6b364eb31d419c0a86c1a7f 40SHA1 (patch-ipc_unix__ipc.cc) = d821deb2f38bf77bf6b364eb31d419c0a86c1a7f
42SHA1 (patch-net_net.gyp) = 937b28ad663605373d6b772097318b17dbea2eea 41SHA1 (patch-net_net.gyp) = 937b28ad663605373d6b772097318b17dbea2eea

cvs diff -r1.4 -r1.5 pkgsrc/inputmethod/mozc-server/patches/patch-base_base.gyp (expand / switch to unified diff)

--- pkgsrc/inputmethod/mozc-server/patches/patch-base_base.gyp 2014/07/19 09:03:04 1.4
+++ pkgsrc/inputmethod/mozc-server/patches/patch-base_base.gyp 2014/11/07 23:28:36 1.5
@@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
1$NetBSD: patch-base_base.gyp,v 1.4 2014/07/19 09:03:04 ryoon Exp $ 1$NetBSD: patch-base_base.gyp,v 1.5 2014/11/07 23:28:36 ryoon Exp $
2 2
3--- base/base.gyp.orig 2014-07-06 07:03:03.000000000 +0000 3--- base/base.gyp.orig 2014-11-03 05:13:02.000000000 +0000
4+++ base/base.gyp 4+++ base/base.gyp
5@@ -78,7 +78,7 @@ 5@@ -78,7 +78,7 @@
6 # shared among *host* binaries and *target* binaries. This means that 6 # shared among *host* binaries and *target* binaries. This means that
7 # you should implement *host* binaries by using limited libraries 7 # you should implement *host* binaries by using limited libraries
8 # which are also available on NDK. 8 # which are also available on NDK.
9- ['OS=="linux" and target_platform!="Android" and ' 9- ['OS=="linux" and target_platform!="Android" and '
10+ ['OS=="netbsd" or (OS=="linux" and target_platform!="Android") and ' 10+ ['OS=="netbsd" or (OS=="linux" and target_platform!="Android") and '
11 'not (target_platform=="NaCl" and _toolset=="target")', { 11 'not (target_platform=="NaCl" and _toolset=="target")', {
12 'defines': [ 12 'defines': [
13 'HAVE_LIBRT=1', 13 'HAVE_LIBRT=1',

cvs diff -r1.2 -r1.3 pkgsrc/inputmethod/mozc-server/patches/patch-base_run__level.cc (expand / switch to unified diff)

--- pkgsrc/inputmethod/mozc-server/patches/patch-base_run__level.cc 2014/07/19 09:03:04 1.2
+++ pkgsrc/inputmethod/mozc-server/patches/patch-base_run__level.cc 2014/11/07 23:28:36 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: patch-base_run__level.cc,v 1.2 2014/07/19 09:03:04 ryoon Exp $ 1$NetBSD: patch-base_run__level.cc,v 1.3 2014/11/07 23:28:36 ryoon Exp $
2 2
3--- base/run_level.cc.orig 2014-07-06 07:03:03.000000000 +0000 3--- base/run_level.cc.orig 2014-11-03 05:13:02.000000000 +0000
4+++ base/run_level.cc 4+++ base/run_level.cc
5@@ -38,10 +38,10 @@ 5@@ -38,10 +38,10 @@
6 #include <unistd.h> 6 #include <unistd.h>
7 #endif // OS_MACOSX 7 #endif // OS_MACOSX
8  8
9-#ifdef OS_LINUX 9-#ifdef OS_LINUX
10+#if defined(OS_LINUX) || defined(OS_NETBSD) 10+#if defined(OS_LINUX) || defined(OS_NETBSD)
11 #include <unistd.h> 11 #include <unistd.h>
12 #include <sys/types.h> 12 #include <sys/types.h>
13-#endif // OS_LINUX 13-#endif // OS_LINUX
14+#endif // OS_LINUX || OS_NETBSD 14+#endif // OS_LINUX || OS_NETBSD
15  15
16 #include "base/const.h" 16 #include "base/const.h"

cvs diff -r1.5 -r1.6 pkgsrc/inputmethod/mozc-server/patches/patch-build__mozc.py (expand / switch to unified diff)

--- pkgsrc/inputmethod/mozc-server/patches/patch-build__mozc.py 2014/07/19 09:03:04 1.5
+++ pkgsrc/inputmethod/mozc-server/patches/patch-build__mozc.py 2014/11/07 23:28:36 1.6
@@ -1,172 +1,172 @@ @@ -1,172 +1,172 @@
1$NetBSD: patch-build__mozc.py,v 1.5 2014/07/19 09:03:04 ryoon Exp $ 1$NetBSD: patch-build__mozc.py,v 1.6 2014/11/07 23:28:36 ryoon Exp $
2 2
3--- build_mozc.py.orig 2014-07-14 10:14:21.000000000 +0000 3--- build_mozc.py.orig 2014-11-03 05:13:03.000000000 +0000
4+++ build_mozc.py 4+++ build_mozc.py
5@@ -60,6 +60,7 @@ from build_tools.util import FindFileFro 5@@ -60,6 +60,7 @@ from build_tools.util import FindFileFro
6 from build_tools.util import GetNumberOfProcessors 6 from build_tools.util import GetNumberOfProcessors
7 from build_tools.util import GetRelPath 7 from build_tools.util import GetRelPath
8 from build_tools.util import IsLinux 8 from build_tools.util import IsLinux
9+from build_tools.util import IsNetBSD 9+from build_tools.util import IsNetBSD
10 from build_tools.util import IsMac 10 from build_tools.util import IsMac
11 from build_tools.util import IsWindows 11 from build_tools.util import IsWindows
12 from build_tools.util import PrintErrorAndExit 12 from build_tools.util import PrintErrorAndExit
13@@ -121,6 +122,8 @@ def GetBuildShortBaseName(options, targe 13@@ -121,6 +122,8 @@ def GetBuildShortBaseName(options, targe
14 build_base = 'out_mac' 14 build_base = 'out_mac'
15 elif target_platform == 'Linux': 15 elif target_platform == 'Linux':
16 build_base = 'out_linux' 16 build_base = 'out_linux'
17+ elif target_platform == 'NetBSD': 17+ elif target_platform == 'NetBSD':
18+ build_base = 'out_bsd' 18+ build_base = 'out_bsd'
19 elif target_platform == 'Android': 19 elif target_platform == 'Android':
20 build_base = 'out_android' 20 build_base = 'out_android'
21 elif target_platform == 'NaCl': 21 elif target_platform == 'NaCl':
22@@ -220,6 +223,14 @@ def GetGypFileNames(options): 22@@ -219,6 +222,14 @@ def GetGypFileNames(options):
23 if not PkgExists('ibus-1.0 >= 1.4.1'): 23 if not PkgExists('ibus-1.0 >= 1.4.1'):
24 logging.info('removing ibus.gyp.') 24 logging.info('removing ibus.gyp.')
25 gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR) 25 gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR)
26+ elif options.target_platform == 'NetBSD': 26+ elif options.target_platform == 'NetBSD':
27+ gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR)) 27+ gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
28+ # Add ibus.gyp if ibus version is >=1.4.1. 28+ # Add ibus.gyp if ibus version is >=1.4.1.
29+ if not PkgExists('ibus-1.0 >= 1.4.1'): 29+ if not PkgExists('ibus-1.0 >= 1.4.1'):
30+ logging.info('removing ibus.gyp.') 30+ logging.info('removing ibus.gyp.')
31+ gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR) 31+ gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR)
32+ elif options.target_platform == 'ChromeOS': 32+ elif options.target_platform == 'ChromeOS':
33+ gyp_file_names.extend(glob.glob('%s/unix/ibus/*.gyp' % SRC_DIR)) 33+ gyp_file_names.extend(glob.glob('%s/unix/ibus/*.gyp' % SRC_DIR))
34 elif options.target_platform == 'NaCl': 34 elif options.target_platform == 'NaCl':
35 # Add chrome NaCl Mozc gyp scripts. 35 # Add chrome NaCl Mozc gyp scripts.
36 gyp_file_names.append('%s/chrome/nacl/nacl_extension.gyp' % SRC_DIR) 36 gyp_file_names.append('%s/chrome/nacl/nacl_extension.gyp' % SRC_DIR)
37@@ -315,6 +326,8 @@ def AddTargetPlatformOption(parser): 37@@ -314,6 +325,8 @@ def AddTargetPlatformOption(parser):
38 # If you want Android build, specify "Android". 38 # If you want Android build, specify "Android".
39 if IsLinux(): 39 if IsLinux():
40 default_target = 'Linux' 40 default_target = 'Linux'
41+ elif IsNetBSD(): 41+ elif IsNetBSD():
42+ default_target = 'NetBSD' 42+ default_target = 'NetBSD'
43 elif IsWindows(): 43 elif IsWindows():
44 default_target = 'Windows' 44 default_target = 'Windows'
45 elif IsMac(): 45 elif IsMac():
46@@ -512,6 +525,14 @@ def ExpandMetaTarget(options, meta_targe 46@@ -511,6 +524,14 @@ def ExpandMetaTarget(options, meta_targe
47 SRC_DIR + '/gui/gui.gyp:mozc_tool'] 47 SRC_DIR + '/gui/gui.gyp:mozc_tool']
48 if PkgExists('ibus-1.0 >= 1.4.1'): 48 if PkgExists('ibus-1.0 >= 1.4.1'):
49 targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc') 49 targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
50+ elif target_platform == 'NetBSD': 50+ elif target_platform == 'NetBSD':
51+ targets = [SRC_DIR + '/server/server.gyp:mozc_server', 51+ targets = [SRC_DIR + '/server/server.gyp:mozc_server',
52+ SRC_DIR + '/renderer/renderer.gyp:mozc_renderer', 52+ SRC_DIR + '/renderer/renderer.gyp:mozc_renderer',
53+ SRC_DIR + '/gui/gui.gyp:mozc_tool'] 53+ SRC_DIR + '/gui/gui.gyp:mozc_tool']
54+ if PkgExists('ibus-1.0 >= 1.4.1'): 54+ if PkgExists('ibus-1.0 >= 1.4.1'):
55+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc') 55+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
56+ elif target_platform == 'ChromeOS': 56+ elif target_platform == 'ChromeOS':
57+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc') 57+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
58 elif target_platform == 'Mac': 58 elif target_platform == 'Mac':
59 targets = [SRC_DIR + '/mac/mac.gyp:DiskImage'] 59 targets = [SRC_DIR + '/mac/mac.gyp:DiskImage']
60 elif target_platform == 'Windows': 60 elif target_platform == 'Windows':
61@@ -537,7 +558,7 @@ def ParseBuildOptions(args=None, values= 61@@ -536,7 +557,7 @@ def ParseBuildOptions(args=None, values=
62 """Parses command line options for the build command.""" 62 """Parses command line options for the build command."""
63 parser = optparse.OptionParser(usage='Usage: %prog build [options]') 63 parser = optparse.OptionParser(usage='Usage: %prog build [options]')
64 AddCommonOptions(parser) 64 AddCommonOptions(parser)
65- if IsLinux(): 65- if IsLinux():
66+ if IsLinux() or IsNetBSD(): 66+ if IsLinux() or IsNetBSD():
67 default_build_concurrency = GetNumberOfProcessors() * 2 67 default_build_concurrency = GetNumberOfProcessors() * 2
68 parser.add_option('--jobs', '-j', dest='jobs', 68 parser.add_option('--jobs', '-j', dest='jobs',
69 default=('%d' % default_build_concurrency), 69 default=('%d' % default_build_concurrency),
70@@ -566,7 +587,7 @@ def ParseRunTestsOptions(args=None, valu 70@@ -565,7 +586,7 @@ def ParseRunTestsOptions(args=None, valu
71 parser = optparse.OptionParser( 71 parser = optparse.OptionParser(
72 usage='Usage: %prog runtests [options] [test_targets] [-- build options]') 72 usage='Usage: %prog runtests [options] [test_targets] [-- build options]')
73 AddCommonOptions(parser) 73 AddCommonOptions(parser)
74- if IsLinux(): 74- if IsLinux():
75+ if IsLinux() or ISNetBSD(): 75+ if IsLinux() or ISNetBSD():
76 default_build_concurrency = GetNumberOfProcessors() * 2 76 default_build_concurrency = GetNumberOfProcessors() * 2
77 parser.add_option('--jobs', '-j', dest='jobs', 77 parser.add_option('--jobs', '-j', dest='jobs',
78 default=('%d' % default_build_concurrency), 78 default=('%d' % default_build_concurrency),
79@@ -787,7 +808,8 @@ def GypMain(options, unused_args, _): 79@@ -788,7 +809,8 @@ def GypMain(options, unused_args, _):
80 gyp_options.extend(['-D', 'channel_dev=1']) 80 gyp_options.extend(['-D', 'channel_dev=1'])
81  81
82 def SetCommandLineForFeature(option_name, windows=False, mac=False, 82 def SetCommandLineForFeature(option_name, windows=False, mac=False,
83- linux=False, android=False, nacl=False): 83- linux=False, android=False, nacl=False):
84+ linux=False, android=False, nacl=False, 84+ linux=False, android=False, nacl=False,
85+ netbsd=False): 85+ netbsd=False):
86 """Updates an option like '--enable_foober' and add a -D argument for gyp. 86 """Updates an option like '--enable_foober' and add a -D argument for gyp.
87  87
88 This function ensures an option like '--enable_foober' exists and it has a 88 This function ensures an option like '--enable_foober' exists and it has a
89@@ -809,6 +831,8 @@ def GypMain(options, unused_args, _): 89@@ -810,6 +832,8 @@ def GypMain(options, unused_args, _):
90 option on Android platform. 90 option on Android platform.
91 nacl: A boolean which replesents the default value of the target 91 nacl: A boolean which replesents the default value of the target
92 option on NaCl. 92 option on NaCl.
93+ netbsd: boolean which replesents the default value of the target option 93+ netbsd: boolean which replesents the default value of the target option
94+ on NetBSD platform. 94+ on NetBSD platform.
95  95
96 Raises: 96 Raises:
97 ValueError: An error occurred when 'option_name' is empty. 97 ValueError: An error occurred when 'option_name' is empty.
98@@ -821,6 +845,7 @@ def GypMain(options, unused_args, _): 98@@ -822,6 +846,7 @@ def GypMain(options, unused_args, _):
99 'Mac': mac, 99 'Mac': mac,
100 'Linux': linux, 100 'Linux': linux,
101 'Android': android, 101 'Android': android,
102+ 'NetBSD' : netbsd, 102+ 'NetBSD' : netbsd,
103 'NaCl': nacl}[options.target_platform] 103 'NaCl': nacl}[options.target_platform]
104 enable_option_name = 'enable_%s' % option_name 104 enable_option_name = 'enable_%s' % option_name
105 enabled = options.ensure_value(enable_option_name, default_enabled) 105 enabled = options.ensure_value(enable_option_name, default_enabled)
106@@ -832,10 +857,12 @@ def GypMain(options, unused_args, _): 106@@ -833,10 +858,12 @@ def GypMain(options, unused_args, _):
107  107
108 SetCommandLineForFeature(option_name='cloud_handwriting', 108 SetCommandLineForFeature(option_name='cloud_handwriting',
109 linux=is_official_dev, 109 linux=is_official_dev,
110+ netbsd=is_official_dev, 110+ netbsd=is_official_dev,
111 windows=is_official_dev, 111 windows=is_official_dev,
112 mac=is_official_dev) 112 mac=is_official_dev)
113 SetCommandLineForFeature(option_name='http_client', 113 SetCommandLineForFeature(option_name='http_client',
114 linux=is_official, 114 linux=is_official,
115+ netbsd=is_official, 115+ netbsd=is_official,
116 windows=is_official, 116 windows=is_official,
117 mac=is_official, 117 mac=is_official,
118 android=is_official, 118 android=is_official,
119@@ -873,7 +900,8 @@ def GypMain(options, unused_args, _): 119@@ -874,7 +901,8 @@ def GypMain(options, unused_args, _):
120 else: 120 else:
121 gyp_options.extend(['-D', 'use_zinnia=NO']) 121 gyp_options.extend(['-D', 'use_zinnia=NO'])
122  122
123- if (options.target_platform == 'Linux' and 123- if (options.target_platform == 'Linux' and
124+ if ((options.target_platform == 'Linux' or 124+ if ((options.target_platform == 'Linux' or
125+ options.target_platform == 'NetBSD') and 125+ options.target_platform == 'NetBSD') and
126 '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names): 126 '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names):
127 gyp_options.extend(['-D', 'use_libibus=1']) 127 gyp_options.extend(['-D', 'use_libibus=1'])
128  128
129@@ -906,7 +934,7 @@ def GypMain(options, unused_args, _): 129@@ -907,7 +935,7 @@ def GypMain(options, unused_args, _):
130 # command for pkg-config. Here we catch the environment variable 130 # command for pkg-config. Here we catch the environment variable
131 # and use the specified command instead of actual pkg-config 131 # and use the specified command instead of actual pkg-config
132 # command. 132 # command.
133- if IsLinux(): 133- if IsLinux():
134+ if IsLinux() or IsNetBSD(): 134+ if IsLinux() or IsNetBSD():
135 gyp_options.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()]) 135 gyp_options.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
136 else: 136 else:
137 gyp_options.extend(['-D', 'pkg_config_command=']) 137 gyp_options.extend(['-D', 'pkg_config_command='])
138@@ -1050,6 +1078,25 @@ def BuildOnMac(options, targets, origina 138@@ -1045,6 +1073,25 @@ def BuildOnMac(options, targets, origina
139 '-parallelizeTargets', 139 '-parallelizeTargets',
140 'BUILD_WITH_GYP=1']) 140 'BUILD_WITH_GYP=1'])
141  141
142+def BuildOnBSD(options, targets, unused_original_directory_name): 142+def BuildOnBSD(options, targets, unused_original_directory_name):
143+ """Build the targets on BSD.""" 143+ """Build the targets on BSD."""
144+ target_names = [] 144+ target_names = []
145+ for target in targets: 145+ for target in targets:
146+ (unused_gyp_file_name, target_name) = ( 146+ (unused_gyp_file_name, target_name) = (
147+ CanonicalTargetToGypFileAndTargetName(target)) 147+ CanonicalTargetToGypFileAndTargetName(target))
148+ target_names.append(target_name) 148+ target_names.append(target_name)
149+ 149+
150+ ninja = 'ninja' 150+ ninja = 'ninja'
151+ if hasattr(options, 'android_device'): 151+ if hasattr(options, 'android_device'):
152+ # Only for android testing. 152+ # Only for android testing.
153+ os.environ['ANDROID_DEVICES'] = options.android_device 153+ os.environ['ANDROID_DEVICES'] = options.android_device
154+ 154+
155+ short_basename = GetBuildShortBaseName(options, 155+ short_basename = GetBuildShortBaseName(options,
156+ GetMozcVersion().GetTargetPlatform()) 156+ GetMozcVersion().GetTargetPlatform())
157+ make_command = ninja 157+ make_command = ninja
158+ build_args = ['-j %s' % options.jobs, 158+ build_args = ['-j %s' % options.jobs,
159+ '-C', '%s/%s' % (short_basename, options.configuration)] 159+ '-C', '%s/%s' % (short_basename, options.configuration)]
160+ RunOrDie([make_command] + build_args + target_names) 160+ RunOrDie([make_command] + build_args + target_names)
161  161
162 def BuildOnWindows(targets): 162 def BuildOnWindows(targets):
163 """Build the target on Windows.""" 163 """Build the target on Windows."""
164@@ -1077,6 +1124,8 @@ def BuildMain(options, targets, original 164@@ -1072,6 +1119,8 @@ def BuildMain(options, targets, original
165 BuildOnMac(options, targets, original_directory_name) 165 BuildOnMac(options, targets, original_directory_name)
166 elif IsLinux(): 166 elif IsLinux():
167 BuildOnLinux(options, targets, original_directory_name) 167 BuildOnLinux(options, targets, original_directory_name)
168+ elif IsNetBSD(): 168+ elif IsNetBSD():
169+ BuildOnBSD(options, targets, original_directory_name) 169+ BuildOnBSD(options, targets, original_directory_name)
170 elif IsWindows(): 170 elif IsWindows():
171 BuildOnWindows(targets) 171 BuildOnWindows(targets)
172 else: 172 else: