summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorryoon <ryoon>2013-04-29 09:21:24 +0000
committerryoon <ryoon>2013-04-29 09:21:24 +0000
commit332eda7b68dc65f7261fae562b456411ab06dc4e (patch)
tree2230403fcf28400f27e78cc5a5d305848ef6efc1 /inputmethod
parent90cfe2b51d8eb63a45e4fac51ffbed41e1379d35 (diff)
downloadpkgsrc-332eda7b68dc65f7261fae562b456411ab06dc4e.tar.gz
Update to 1.10.1390.102
Changelog: r147 2012-03-29 1.10.1390.102 Check Qt version in GNU/Linux build ( Issue 183 ) Add missing semicolon for ibus-mozc ( Issue 184 ) Remove unnecessary dependency on libzinnia from Android build. r131 2012-03-28 1.10.1389.102 Support IBus 1.5 ( Issue 161 ) Support Mac OS X 10.8 as a build environment ( Issue 166 , Issue 176 ) Fix build failure on Windows ( Issue 173 ) Increase opaque buffer size for x32 ( Issue 177 ) Check physycal monitor area in mozc_renderer ( Issue 180 ) Add missing properties for gnome-shell ( Issue 182 ) Switch to Protocol Buffers 2.5 Switch to Ninja from msbuild to build Mozc for Windows Support Android build Unsupport Visual C++ 2008 Remove RX from the repository
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/ibus-mozc/Makefile9
-rw-r--r--inputmethod/ibus-mozc/Makefile.common10
-rw-r--r--inputmethod/ibus-mozc/distinfo68
-rw-r--r--inputmethod/ibus-mozc/patches/patch-DEPS13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_base.gyp13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_crash__report__handler.cc13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_crash__report__util.cc16
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_logging.cc38
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_mutex.cc13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_mutex.h10
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_process.cc18
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_run__level.cc14
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_system__util.cc50
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_util.cc59
-rw-r--r--inputmethod/ibus-mozc/patches/patch-base_util__test.cc13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-build__mozc.py127
-rw-r--r--inputmethod/ibus-mozc/patches/patch-build__tools_util.py7
-rw-r--r--inputmethod/ibus-mozc/patches/patch-client_client.cc16
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_base_locale__util.cc6
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_config__dialog_config__dialog.cc24
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_config__dialog_keymap__editor.cc12
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_dictionary__tool_dictionary__tool.cc8
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_qt__libraries.gypi13
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gui_word__register__dialog_word__register__dialog.cc8
-rw-r--r--inputmethod/ibus-mozc/patches/patch-gyp_common.gypi27
-rw-r--r--inputmethod/ibus-mozc/patches/patch-handwriting_handwriting.gyp6
-rw-r--r--inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager.cc45
-rw-r--r--inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager__test.cc8
-rw-r--r--inputmethod/ibus-mozc/patches/patch-ipc_unix__ipc.cc58
-rw-r--r--inputmethod/ibus-mozc/patches/patch-net_net.gyp6
-rw-r--r--inputmethod/ibus-mozc/patches/patch-protobuf_genproto.gypi24
-rw-r--r--inputmethod/ibus-mozc/patches/patch-protobuf_protobuf.gyp14
-rw-r--r--inputmethod/ibus-mozc/patches/patch-session_session.cc8
-rw-r--r--inputmethod/ibus-mozc/patches/patch-session_session__test.cc19
-rw-r--r--inputmethod/ibus-mozc/patches/patch-unix_ibus_gen__mozc__xml.py30
-rw-r--r--inputmethod/mozc-server/Makefile9
-rw-r--r--inputmethod/mozc-server/PLIST4
-rw-r--r--inputmethod/mozc-tool/Makefile9
38 files changed, 416 insertions, 429 deletions
diff --git a/inputmethod/ibus-mozc/Makefile b/inputmethod/ibus-mozc/Makefile
index 9555ed0339c..5e48f5f873a 100644
--- a/inputmethod/ibus-mozc/Makefile
+++ b/inputmethod/ibus-mozc/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2013/02/16 11:22:41 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2013/04/29 09:21:24 ryoon Exp $
#
PKGNAME= ibus-${DISTNAME}
-PKGREVISION= 2
INSTALLATION_DIRS+= libexec share/ibus share/icons share/ibus/component \
share/ibus-mozc
@@ -11,13 +10,13 @@ DEPENDS+= xdg-utils-[0-9]*:../../misc/xdg-utils
do-build:
cd ${WRKSRC} && env ${MAKE_ENV} \
- ${PYTHONBIN} build_mozc.py build -c Release ${_MAKE_JOBS} \
+ ${PYTHONBIN} build_mozc.py build -c ${MOZC_BUILD_MODE} ${_MAKE_JOBS} \
unix/ibus/ibus.gyp:ibus_mozc
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/Release/ibus_mozc \
+ ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/${MOZC_BUILD_MODE}/ibus_mozc \
${DESTDIR}${PREFIX}/libexec/ibus-engine-mozc
- ${INSTALL_DATA} ${WRKSRC}/out_${OSDEST}/Release/obj/gen/unix/ibus/mozc.xml \
+ ${INSTALL_DATA} ${WRKSRC}/out_${OSDEST}/${MOZC_BUILD_MODE}/obj/gen/unix/ibus/mozc.xml \
${DESTDIR}${PREFIX}/share/ibus/component
.for f in ui-alpha_full ui-alpha_half ui-dictionary ui-direct \
ui-hiragana ui-katakana_full ui-katakana_half ui-properties ui-tool
diff --git a/inputmethod/ibus-mozc/Makefile.common b/inputmethod/ibus-mozc/Makefile.common
index 15412168d43..e3efa791bcf 100644
--- a/inputmethod/ibus-mozc/Makefile.common
+++ b/inputmethod/ibus-mozc/Makefile.common
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.common,v 1.6 2013/03/13 15:54:44 ryoon Exp $
+# $NetBSD: Makefile.common,v 1.7 2013/04/29 09:21:24 ryoon Exp $
# used by inputmethod/mozc-elisp/Makefile
# used by inputmethod/mozc-server/Makefile
# used by inputmethod/mozc-tool/Makefile
#
-DISTNAME= mozc-1.6.1187.102
+DISTNAME= mozc-1.10.1390.102
CATEGORIES= inputmethod
MASTER_SITES= http://mozc.googlecode.com/files/
EXTRACT_SUFX= .tar.bz2
@@ -44,6 +44,7 @@ SUBST_FILES.gyp+= gui/qt_uic.gypi
SUBST_FILES.gyp+= gui/qt_libraries.gypi
SUBST_FILES.gyp+= base/const.h
SUBST_FILES.gyp+= build_mozc.py
+SUBST_FILES.gyp+= protobuf/genproto.gypi
SUBST_VARS.gyp+= OPENSSL_CFLAGS OPENSSL_INC OPENSSL_LDFLAGS OPENSSL_LIBS
SUBST_VARS.gyp+= PREFIX QTDIR
@@ -57,11 +58,13 @@ OSDEST= bsd
OSDEST= linux
.endif
+MOZC_BUILD_MODE= Release # or Debug
+
do-configure:
cd ${WRKSRC} && env ${MAKE_ENV} \
GYP_DEFINES="use_libprotobuf=1" \
${PYTHONBIN} build_mozc.py gyp --os=${LOWER_OPSYS} && \
- ${PYTHONBIN} build_mozc.py build_tools -c Release ${_MAKE_JOBS}
+ ${PYTHONBIN} build_mozc.py build_tools -c ${MOZC_BUILD_MODE} ${_MAKE_JOBS}
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/protobuf/buildlink3.mk"
@@ -70,6 +73,7 @@ do-configure:
.include "../../inputmethod/ibus/buildlink3.mk"
.include "../../inputmethod/zinnia/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/qt4-libs/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/inputmethod/ibus-mozc/distinfo b/inputmethod/ibus-mozc/distinfo
index 583f5b83269..2483ea114c8 100644
--- a/inputmethod/ibus-mozc/distinfo
+++ b/inputmethod/ibus-mozc/distinfo
@@ -1,52 +1,52 @@
-$NetBSD: distinfo,v 1.2 2013/01/26 20:33:59 ryoon Exp $
+$NetBSD: distinfo,v 1.3 2013/04/29 09:21:24 ryoon Exp $
-SHA1 (mozc-1.6.1187.102.tar.bz2) = 341e0edd1f5c8593b8936792975a4856e1c9c89e
-RMD160 (mozc-1.6.1187.102.tar.bz2) = 4997cba2b8db9d14ec085142947c92fc789f79cb
-Size (mozc-1.6.1187.102.tar.bz2) = 54828375 bytes
-SHA1 (patch-DEPS) = e86c43a1b55aec4296b9fc6d21683a0f87630828
-SHA1 (patch-base_base.gyp) = eb16f96503998e9f33bdf99474f63eec7975c7f9
+SHA1 (mozc-1.10.1390.102.tar.bz2) = d6ae2cf93eeecad93565f4bb9b51a32ce94ac9d6
+RMD160 (mozc-1.10.1390.102.tar.bz2) = 430aba0d282525bf6e760c276de3ed596e8f8608
+Size (mozc-1.10.1390.102.tar.bz2) = 57879881 bytes
+SHA1 (patch-DEPS) = 266c19178c08d610f1cd3b8c8ab905697a889ff7
+SHA1 (patch-base_base.gyp) = 03ad0f11f392d24b6b40cafa0a80741bddd4708c
SHA1 (patch-base_const.h) = 30f4fcccc5ba9bdb969697b807ec548d53fd6c60
SHA1 (patch-base_cpu__stats.cc) = cda8bbcbc963d8ed635435375cc80ee5e7ca2191
-SHA1 (patch-base_crash__report__util.cc) = b745c0ac69e06a222df8398af425e9d697f6ce68
+SHA1 (patch-base_crash__report__handler.cc) = 210d3750b5252f19e030c1b235d8e8b65ea38fab
SHA1 (patch-base_iconv.cc) = 1bf65dfc6152bf152cbe2714835a61436df2a48b
-SHA1 (patch-base_logging.cc) = fff656a611dc4eec91dfac7b035cc0fc628e3706
-SHA1 (patch-base_mutex.cc) = 48e5f3e7eacabd6d5a1aceec3e63e1c952be556e
-SHA1 (patch-base_mutex.h) = e8e1d6b1e83aae1c4de2a4b25d11f82f107df32a
+SHA1 (patch-base_logging.cc) = 56036110c3c2ba21e6fcb35ea2faac83896f4a83
+SHA1 (patch-base_mutex.cc) = 0fe135b4e6f15017c59a13ba7c4019123559c31b
+SHA1 (patch-base_mutex.h) = 6c3c8f0845f0fdad815c4877026894000d5eac2c
SHA1 (patch-base_password__manager.cc) = cb11b9b707ab0c361c969eefd4d7c805c0b4b06a
-SHA1 (patch-base_process.cc) = cf7e086d35d1bd0c640ceda6b39a9e12103979e8
-SHA1 (patch-base_run__level.cc) = 738b263a334977038629d24bef96b365c42fca57
+SHA1 (patch-base_process.cc) = fcdc1e078023c330f172409f0e26203411b4b0e1
+SHA1 (patch-base_run__level.cc) = 8aa169a8be51674898906740cb8f6103b99021b4
+SHA1 (patch-base_system__util.cc) = c01144fdee9fd9e2a19c7014316377b1e88dafd8
SHA1 (patch-base_thread.h) = b0560c13b2670dc645f3587cfd56ecab0a7fe850
-SHA1 (patch-base_util.cc) = e4c335570b51ab52a620cbbfc0112b769f07e630
-SHA1 (patch-base_util__test.cc) = 219027850ae06a5cac3c21c7a3f4555dbe19b19c
-SHA1 (patch-build__mozc.py) = dc6cfa50c588d799ac2f6b09fe3e80ea0afe2cb1
+SHA1 (patch-base_util.cc) = 57a59d9c6c721d28b8de3203f8b5dea71bc54664
+SHA1 (patch-build__mozc.py) = 9106a7c8b3000eba582aec065e777b2311c86bda
SHA1 (patch-build__tools_mozc__version.py) = 47460ca750d8d28652c5c55e5df9b786af4d33c7
-SHA1 (patch-build__tools_util.py) = 17560bc77282ae4f1fe9f9f208b087961f808276
-SHA1 (patch-client_client.cc) = 0b7e60a9222acc8360de573ec0c0e110e461bc3e
+SHA1 (patch-build__tools_util.py) = de5e8be9b06b1a26a79314c469024dd2dd3fb119
+SHA1 (patch-client_client.cc) = 7ca43dde3f207331005599653c6520667e3ca93c
SHA1 (patch-config_stats__config__util__test.cc) = db51e6619c5c04ac8fa50890825206ea922dccf2
-SHA1 (patch-gui_base_locale__util.cc) = 2900424ef4a937e24dbb0e1c618f04fec14a9cc2
-SHA1 (patch-gui_config__dialog_config__dialog.cc) = b009d4c40a03f838ff08b85f159c8f76f9282d54
+SHA1 (patch-gui_base_locale__util.cc) = a501c01d20bb633f8dda9752c7c2175a64b84e91
+SHA1 (patch-gui_config__dialog_config__dialog.cc) = c26c735ebe49c27a0aa170ee01a11b9dce6dad08
SHA1 (patch-gui_config__dialog_keybinding__editor.cc) = 00a6e4bb2c07e3340e188f108f0285a3aa2aceb9
-SHA1 (patch-gui_config__dialog_keymap__editor.cc) = b1c799e9e9aa3ca876a302ccffc1ad820662b6f9
-SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = 860b9331fc4c9df4ee20ab24406008ece66eb672
+SHA1 (patch-gui_config__dialog_keymap__editor.cc) = c2439e59756a6c10cfad21d0998952912a2379bd
+SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = d08cc3a91794d0f8eb59a105d0c94eb3f02c0133
SHA1 (patch-gui_gui.gyp) = a27d0a0a3fb6893a691450917cf2798ace1647ed
-SHA1 (patch-gui_qt__libraries.gypi) = 7db5480dc8bd244b168a8977c3103e5f09308cd8
-SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 82c814154badd33af3d5e6d07498d887c76136c1
+SHA1 (patch-gui_qt__libraries.gypi) = 9faaac9b9fc891050e27b4be0fd899265f4a1173
+SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = eca90653e3276509818690355246841211c95171
SHA1 (patch-gui_zinnia.gyp) = 0eaad35b829d2c25e751ce6e99207781306934d5
-SHA1 (patch-gyp_common.gypi) = 7f6f2c79980fb2a4aee5be1bde5350e708499682
-SHA1 (patch-handwriting_handwriting.gyp) = 951ac70a188ff640a0d526d83fd4304e8ee07d0c
+SHA1 (patch-gyp_common.gypi) = c79b7602fa4ed286eace10707ca4bbe8df7115fc
+SHA1 (patch-handwriting_handwriting.gyp) = 3084cc6615d89b24bcf074717f102642100bb587
SHA1 (patch-handwriting_zinnia__handwriting.cc) = 9f6a857571a6d13f722d0503e232943d8dd2915e
-SHA1 (patch-ipc_ipc__path__manager.cc) = a13646db4419e6c906146ecab3dcaa938edc34d0
-SHA1 (patch-ipc_ipc__path__manager__test.cc) = 000acabea50faf3d192ee219313c4c4ebfc4e330
+SHA1 (patch-ipc_ipc__path__manager.cc) = 6e92a71e1a616525120760397467955de1cd6156
+SHA1 (patch-ipc_ipc__path__manager__test.cc) = 29c4cd860c8261346bd5c20b214f967134049800
SHA1 (patch-ipc_named__event.cc) = 92283261e7580569587e43156f13567b593c9a32
-SHA1 (patch-ipc_unix__ipc.cc) = 31d02af16375edaa3b8b562225a3c41cf9ed4f45
+SHA1 (patch-ipc_unix__ipc.cc) = bfb07eda02415cd1d4ce9303d960d614458476a5
SHA1 (patch-languages_chewing_chewing.gyp) = 26fa18398911609a53cff003943436f003772e64
SHA1 (patch-languages_hangul_hangul.gyp) = 685964cd31e91c96f0d41e729441b17ed9ac24f8
-SHA1 (patch-net_net.gyp) = 60cb23882d81c8222337888dd735f3c6c72aee0f
-SHA1 (patch-protobuf_genproto.gypi) = b31dacd4e7e5a3f7baed8e1ab0d2d6983a244119
-SHA1 (patch-protobuf_protobuf.gyp) = 32639f8052e53b88c4e460f211292967fc915873
-SHA1 (patch-session_session.cc) = 477779cb73448b8ddc71eff02627f96c2469607c
+SHA1 (patch-net_net.gyp) = 937b28ad663605373d6b772097318b17dbea2eea
+SHA1 (patch-protobuf_genproto.gypi) = ccab78f72fbf0cd58ef043637e38f7eba9a3b183
+SHA1 (patch-protobuf_protobuf.gyp) = 247c16bf86287ce2b57da2653be17929692c3710
+SHA1 (patch-session_session.cc) = 485c434a0bf7119f247494bf14f3856573475e11
SHA1 (patch-session_session__converter__interface.h) = 93bda6e51b9a9ac7146aa23ac0aa28bb017a4465
-SHA1 (patch-session_session__test.cc) = 1258b334c77b08c5b423a35cfef452587f5b6db6
+SHA1 (patch-session_session__test.cc) = a256caec45a45f4eaab0555ecc18cea09c417d95
SHA1 (patch-third__party_gyp_buildbot_buildbot__run.py) = 21375df1c6c19233c66b24da4dc23ddad5515b72
-SHA1 (patch-unix_ibus_gen__mozc__xml.py) = c5c352b8039cb9625af54aa95582ef48c579577d
+SHA1 (patch-unix_ibus_gen__mozc__xml.py) = 978d883a41a5dd823f94d22d62202b5210c1207e
SHA1 (patch-unix_ibus_mozc__engine.cc) = 0ae1220c1253c4d5d0d5eb97e584c12ea38b5c96
diff --git a/inputmethod/ibus-mozc/patches/patch-DEPS b/inputmethod/ibus-mozc/patches/patch-DEPS
index fe4c3f0e4fb..9202b6a44a0 100644
--- a/inputmethod/ibus-mozc/patches/patch-DEPS
+++ b/inputmethod/ibus-mozc/patches/patch-DEPS
@@ -1,14 +1,17 @@
-$NetBSD: patch-DEPS,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-DEPS,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- DEPS.orig 2012-08-31 05:36:42.000000000 +0000
+--- DEPS.orig 2013-03-29 04:33:25.000000000 +0000
+++ DEPS
-@@ -91,3 +91,9 @@ deps_os = {
- Var("clang_helper_in_chromium_revision"),
+@@ -88,6 +88,12 @@ deps_os = {
+ Var("zinnia_revision"),
},
- }
+ "unix": {
+ "netbsd": {
+ "src/third_party/clang/scripts":
+ "https://src.chromium.org/chrome/trunk/src/tools/clang/scripts@" +
+ Var("clang_helper_in_chromium_revision"),
+ },
+}
+ "src/third_party/clang/scripts":
+ "https://src.chromium.org/chrome/trunk/src/tools/clang/scripts@" +
+ Var("clang_helper_in_chromium_revision"),
diff --git a/inputmethod/ibus-mozc/patches/patch-base_base.gyp b/inputmethod/ibus-mozc/patches/patch-base_base.gyp
index 1664511eaa8..25177c7ff9c 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_base.gyp
+++ b/inputmethod/ibus-mozc/patches/patch-base_base.gyp
@@ -1,8 +1,8 @@
-$NetBSD: patch-base_base.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_base.gyp,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/base.gyp.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/base.gyp.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/base.gyp
-@@ -98,7 +98,7 @@
+@@ -85,7 +85,7 @@
# shared among *host* binaries and *target* binaries. This means that
# you should implement *host* binaries by using limited libraries
# which are also available on NDK.
@@ -11,12 +11,13 @@ $NetBSD: patch-base_base.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'not (target_platform=="NaCl" and _toolset=="target")', {
'defines': [
'HAVE_LIBRT=1',
-@@ -260,22 +260,22 @@
+@@ -262,23 +262,23 @@
],
}
}],
-- ['OS=="linux" and target_platform!="Android"', {
-+ ['OS=="netbsd" or (OS=="linux" and target_platform!="Android")', {
+- ['OS=="linux" and target_platform!="Android" and '
++ ['OS=="netbsd" or (OS=="linux" and target_platform!="Android") and '
+ 'not (target_platform=="NaCl" and _toolset=="target")', {
'cflags': [
- '<!@(<(pkg_config_command) --cflags-only-other openssl)',
+ '@OPENSSL_CFLAGS@',
diff --git a/inputmethod/ibus-mozc/patches/patch-base_crash__report__handler.cc b/inputmethod/ibus-mozc/patches/patch-base_crash__report__handler.cc
new file mode 100644
index 00000000000..e0e980d00ab
--- /dev/null
+++ b/inputmethod/ibus-mozc/patches/patch-base_crash__report__handler.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-base_crash__report__handler.cc,v 1.1 2013/04/29 09:21:24 ryoon Exp $
+
+--- base/crash_report_handler.cc.orig 2013-03-29 04:33:43.000000000 +0000
++++ base/crash_report_handler.cc
+@@ -364,7 +364,7 @@ void CrashReportHandler::SetCriticalSect
+ }
+ } // namespace mozc
+
+-#elif defined(OS_LINUX) // OS_WIN
++#elif defined(OS_LINUX) || defined(OS_NETBSD) // OS_WIN
+
+ namespace mozc {
+
diff --git a/inputmethod/ibus-mozc/patches/patch-base_crash__report__util.cc b/inputmethod/ibus-mozc/patches/patch-base_crash__report__util.cc
deleted file mode 100644
index 8b75b786115..00000000000
--- a/inputmethod/ibus-mozc/patches/patch-base_crash__report__util.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-base_crash__report__util.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
-
---- base/crash_report_util.cc.orig 2012-08-31 05:37:06.000000000 +0000
-+++ base/crash_report_util.cc
-@@ -51,9 +51,9 @@ namespace mozc {
-
- void CrashReportUtil::InstallBreakpad() {
- // TODO(nona): Support breakpad for official branding build on Linux.
--#if defined(GOOGLE_JAPANESE_INPUT_BUILD) && !defined(OS_LINUX)
-+#if defined(GOOGLE_JAPANESE_INPUT_BUILD) && (!defined(OS_LINUX) || !defined(OS_NETBSD))
- CrashReportHandler::Initialize(false);
--#endif // GOOGLE_JAPANESE_INPUT_BUILD && !OS_LINUX
-+#endif // GOOGLE_JAPANESE_INPUT_BUILD && (!OS_LINUX || !OS_NETBSD)
- }
-
- string CrashReportUtil::GetCrashReportDirectory() {
diff --git a/inputmethod/ibus-mozc/patches/patch-base_logging.cc b/inputmethod/ibus-mozc/patches/patch-base_logging.cc
index 869b821c30e..5c912b425e6 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_logging.cc
+++ b/inputmethod/ibus-mozc/patches/patch-base_logging.cc
@@ -1,9 +1,9 @@
-$NetBSD: patch-base_logging.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_logging.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/logging.cc.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/logging.cc.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/logging.cc
-@@ -59,6 +59,10 @@
- #include "base/singleton.h"
+@@ -61,6 +61,10 @@
+ #include "base/system_util.h"
#include "base/util.h"
+#if defined(OS_NETBSD)
@@ -13,26 +13,22 @@ $NetBSD: patch-base_logging.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
DEFINE_bool(colored_log, true, "Enables colored log messages on tty devices");
DEFINE_bool(logtostderr,
false,
-@@ -106,12 +110,7 @@ string Logging::GetLogMessageHeader() {
- char buf[512];
- snprintf(buf, sizeof(buf),
+@@ -110,7 +114,7 @@ string Logging::GetLogMessageHeader() {
"%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d %u "
--#if !defined(OS_LINUX) || defined(__native_client__)
--// = OS_WINDOWS or OS_MACOSX or __native_client__
-- "%u",
--#else
+ #if defined(__native_client__)
+ "%p",
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined (OS_NETBSD)
"%lu",
--#endif
- 1900 + tm_time.tm_year,
- 1 + tm_time.tm_mon,
- tm_time.tm_mday,
-@@ -124,6 +123,9 @@ string Logging::GetLogMessageHeader() {
- #elif defined(OS_MACOSX)
+ #else // = OS_WIN or OS_MACOSX
+ "%u",
+@@ -131,6 +135,9 @@ string Logging::GetLogMessageHeader() {
::getpid(),
- reinterpret_cast<uint32>(pthread_self())
+ // pthread_self() returns __nc_basic_thread_data*.
+ static_cast<void*>(pthread_self())
+#elif defined(OS_NETBSD)
-+ ::getpid(),
-+ _lwp_self()
++ ::getpid(),
++ _lwp_self()
#else // = OS_LINUX
::getpid(),
- // In NaCl it returns uint32, otherwise it returns unsigned long.
+ // It returns unsigned long.
diff --git a/inputmethod/ibus-mozc/patches/patch-base_mutex.cc b/inputmethod/ibus-mozc/patches/patch-base_mutex.cc
index 488375ae106..23cf16fc9ad 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_mutex.cc
+++ b/inputmethod/ibus-mozc/patches/patch-base_mutex.cc
@@ -1,6 +1,6 @@
-$NetBSD: patch-base_mutex.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_mutex.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/mutex.cc.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/mutex.cc.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/mutex.cc
@@ -61,7 +61,7 @@ namespace mozc {
@@ -20,6 +20,15 @@ $NetBSD: patch-base_mutex.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
// Use OSAtomicCompareAndSwapInt on Mac OSX
// http://developer.apple.com/iphone/library/documentation/
+@@ -91,7 +91,7 @@ inline int InterlockedCompareExchange(vo
+ int new_value,
+ int old_value) {
+ return OSAtomicCompareAndSwapInt(old_value, new_value, target)
+- ? old_value : *target;
++ ? old_value : *target; || OS_NETBSD
+ }
+ #endif // OX_MACOSX
+
@@ -296,7 +296,7 @@ Mutex::Mutex() {
// PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not
pthread_mutexattr_t attr;
diff --git a/inputmethod/ibus-mozc/patches/patch-base_mutex.h b/inputmethod/ibus-mozc/patches/patch-base_mutex.h
index 368bdb1bb3a..19445699223 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_mutex.h
+++ b/inputmethod/ibus-mozc/patches/patch-base_mutex.h
@@ -1,11 +1,11 @@
-$NetBSD: patch-base_mutex.h,v 1.2 2013/01/26 20:33:59 ryoon Exp $
+$NetBSD: patch-base_mutex.h,v 1.3 2013/04/29 09:21:24 ryoon Exp $
* First chunk, NetBSD ILP32 ports seem to require larger mutex array size.
* I am not sure.
---- base/mutex.h.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/mutex.h.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/mutex.h
-@@ -46,8 +46,8 @@ namespace mozc {
+@@ -50,8 +50,8 @@ namespace mozc {
// To remove dependencies against plafrom specific headers such as
// <Windows.h> or <pthread.h>, we use an array of pointers as an opaque buffer
// where platform specific mutex structure will be placed.
@@ -16,8 +16,8 @@ $NetBSD: patch-base_mutex.h,v 1.2 2013/01/26 20:33:59 ryoon Exp $
#define MOZC_MUTEX_PTR_ARRAYSIZE 11
#define MOZC_RW_MUTEX_PTR_ARRAYSIZE 32
#else
-@@ -56,6 +56,10 @@ namespace mozc {
- #define MOZC_RW_MUTEX_PTR_ARRAYSIZE 10
+@@ -60,6 +60,10 @@ namespace mozc {
+ #define MOZC_RW_MUTEX_PTR_ARRAYSIZE 12
#endif
+#if defined(__FreeBSD__) || defined(OS_NETBSD)
diff --git a/inputmethod/ibus-mozc/patches/patch-base_process.cc b/inputmethod/ibus-mozc/patches/patch-base_process.cc
index b057c5412cb..c73d6866f72 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_process.cc
+++ b/inputmethod/ibus-mozc/patches/patch-base_process.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-base_process.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_process.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/process.cc.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/process.cc.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/process.cc
-@@ -50,7 +50,7 @@
+@@ -46,7 +46,7 @@
#include "base/mac_process.h"
#endif // OS_MACOSX
@@ -11,7 +11,7 @@ $NetBSD: patch-base_process.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
#include <fcntl.h>
#include <signal.h>
#include <spawn.h> // for posix_spawn().
-@@ -120,7 +120,7 @@ bool Process::OpenBrowser(const string &
+@@ -121,7 +121,7 @@ bool Process::OpenBrowser(const string &
return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW);
#endif
@@ -20,7 +20,7 @@ $NetBSD: patch-base_process.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
static const char kBrowserCommand[] = "/usr/bin/xdg-open";
// xdg-open which uses kfmclient or gnome-open internally works both on KDE
// and GNOME environments.
-@@ -204,7 +204,7 @@ bool Process::SpawnProcess(const string
+@@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string
}
#endif
@@ -29,7 +29,7 @@ $NetBSD: patch-base_process.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
// Do not call posix_spawn() for obviously bad path.
if (!S_ISREG(statbuf.st_mode)) {
LOG(ERROR) << "Not a regular file: " << path;
-@@ -227,7 +227,7 @@ bool Process::SpawnProcess(const string
+@@ -228,7 +228,7 @@ bool Process::SpawnProcess(const string
// (www.gnu.org/software/libc/manual/html_node/Heap-Consistency-Checking.html)
const int kOverwrite = 0; // Do not overwrite.
::setenv("MALLOC_CHECK_", "2", kOverwrite);
@@ -38,16 +38,16 @@ $NetBSD: patch-base_process.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
pid_t tmp_pid = 0;
// Spawn new process.
-@@ -398,7 +398,7 @@ bool Process::LaunchErrorMessageDialog(c
+@@ -399,7 +399,7 @@ bool Process::LaunchErrorMessageDialog(c
}
- #endif // OS_WINDOWS
+ #endif // OS_WIN
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
const char kMozcTool[] = "mozc_tool";
const string arg = "--mode=error_message_dialog --error_type=" + error_type;
size_t pid = 0;
-@@ -406,7 +406,7 @@ bool Process::LaunchErrorMessageDialog(c
+@@ -407,7 +407,7 @@ bool Process::LaunchErrorMessageDialog(c
LOG(ERROR) << "cannot launch " << kMozcTool;
return false;
}
diff --git a/inputmethod/ibus-mozc/patches/patch-base_run__level.cc b/inputmethod/ibus-mozc/patches/patch-base_run__level.cc
index da49e241343..d3accdaa4f8 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_run__level.cc
+++ b/inputmethod/ibus-mozc/patches/patch-base_run__level.cc
@@ -1,13 +1,17 @@
-$NetBSD: patch-base_run__level.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_run__level.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/run_level.cc.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/run_level.cc.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/run_level.cc
-@@ -34,7 +34,7 @@
+@@ -34,10 +34,10 @@
#include <aclapi.h>
- #endif // OS_WINDOWS
+ #endif // OS_WIN
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
#include <unistd.h>
#include <sys/types.h>
- #endif // OS_LINUX
+-#endif // OS_LINUX
++#endif // OS_LINUX || OS_NETBSD
+
+ #include "base/const.h"
+ #include "base/logging.h"
diff --git a/inputmethod/ibus-mozc/patches/patch-base_system__util.cc b/inputmethod/ibus-mozc/patches/patch-base_system__util.cc
new file mode 100644
index 00000000000..8f257f9a07d
--- /dev/null
+++ b/inputmethod/ibus-mozc/patches/patch-base_system__util.cc
@@ -0,0 +1,50 @@
+$NetBSD: patch-base_system__util.cc,v 1.1 2013/04/29 09:21:24 ryoon Exp $
+
+--- base/system_util.cc.orig 2013-03-29 04:33:43.000000000 +0000
++++ base/system_util.cc
+@@ -421,7 +421,7 @@ string SystemUtil::GetServerDirectory()
+ #elif defined(OS_MACOSX)
+ return MacUtil::GetServerDirectory();
+
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_NETBSD)
+ // TODO(mazda): Not to use hardcoded path.
+ return kMozcServerDirectory;
+ #endif // OS_WIN, OS_MACOSX, OS_LINUX
+@@ -610,7 +610,7 @@ bool GetCurrentSessionId(DWORD *session_
+ #endif // OS_WIN
+
+ string SystemUtil::GetDesktopNameAsString() {
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_NETBSD)
+ const char *display = getenv("DISPLAY");
+ if (display == NULL) {
+ return "";
+@@ -809,7 +809,7 @@ bool SystemUtil::IsPlatformSupported() {
+ #if defined(OS_MACOSX)
+ // TODO(yukawa): support Mac.
+ return true;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_NETBSD)
+ // TODO(yukawa): support Linux.
+ return true;
+ #elif defined(OS_WIN)
+@@ -1098,6 +1098,9 @@ string SystemUtil::GetOSVersionString()
+ #elif defined(OS_LINUX)
+ const string ret = "Linux";
+ return ret;
++#elif defined(OS_NETBSD)
++ const string ret = "NetBSD";
++ return ret;
+ #else // !OS_WIN && !OS_MACOSX && !OS_LINUX
+ const string ret = "Unknown";
+ return ret;
+@@ -1145,7 +1148,7 @@ uint64 SystemUtil::GetTotalPhysicalMemor
+ return 0;
+ }
+ return total_memory;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_NETBSD)
+ #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
+ const long page_size = sysconf(_SC_PAGESIZE);
+ const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
diff --git a/inputmethod/ibus-mozc/patches/patch-base_util.cc b/inputmethod/ibus-mozc/patches/patch-base_util.cc
index b94b6850443..a0c89273934 100644
--- a/inputmethod/ibus-mozc/patches/patch-base_util.cc
+++ b/inputmethod/ibus-mozc/patches/patch-base_util.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-base_util.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-base_util.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- base/util.cc.orig 2012-08-31 05:37:06.000000000 +0000
+--- base/util.cc.orig 2013-03-29 04:33:43.000000000 +0000
+++ base/util.cc
-@@ -891,7 +891,7 @@ class ClockImpl : public Util::ClockInte
+@@ -932,7 +932,7 @@ class ClockImpl : public Util::ClockInte
mach_timebase_info(&timebase_info);
return static_cast<uint64>(
1.0e9 * timebase_info.denom / timebase_info.numer);
@@ -10,8 +10,8 @@ $NetBSD: patch-base_util.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+#elif defined(OS_LINUX) || defined(OS_NETBSD)
#if defined(HAVE_LIBRT)
return 1000000000uLL;
- #else
-@@ -911,7 +911,7 @@ class ClockImpl : public Util::ClockInte
+ #else // HAVE_LIBRT
+@@ -952,7 +952,7 @@ class ClockImpl : public Util::ClockInte
return static_cast<uint64>(timestamp.QuadPart);
#elif defined(OS_MACOSX)
return static_cast<uint64>(mach_absolute_time());
@@ -20,52 +20,3 @@ $NetBSD: patch-base_util.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
#if defined(HAVE_LIBRT)
struct timespec timestamp;
if (-1 == clock_gettime(CLOCK_REALTIME, &timestamp)) {
-@@ -1869,9 +1869,9 @@ string Util::GetServerDirectory() {
- return MacUtil::GetServerDirectory();
- #endif // OS_MACOSX
-
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_NETBSD)
- return kMozcServerDirectory;
--#endif // OS_LINUX
-+#endif // OS_LINUX || OS_NETBSD
- }
-
- string Util::GetServerPath() {
-@@ -2000,7 +2000,7 @@ bool GetCurrentSessionId(DWORD *session_
- #endif // OS_WINDOWS
-
- string Util::GetDesktopNameAsString() {
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_NETBSD)
- const char *display = getenv("DISPLAY");
- if (display == NULL) {
- return "";
-@@ -2514,7 +2514,7 @@ bool Util::IsPlatformSupported() {
- #if defined(OS_MACOSX)
- // TODO(yukawa): support Mac.
- return true;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_NETBSD)
- // TODO(yukawa): support Linux.
- return true;
- #elif defined(OS_WINDOWS)
-@@ -2873,6 +2873,9 @@ string Util::GetOSVersionString() {
- #elif defined(OS_LINUX)
- const string ret = "Linux";
- return ret;
-+#elif defined(OS_NETBSD)
-+ const string ret = "NetBSD";
-+ return ret;
- #else
- const string ret = "Unknown";
- return ret;
-@@ -2910,7 +2913,7 @@ uint64 Util::GetTotalPhysicalMemory() {
- return 0;
- }
- return total_memory;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_NETBSD)
- #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES)
- const long page_size = sysconf(_SC_PAGESIZE);
- const long number_of_phyisical_pages = sysconf(_SC_PHYS_PAGES);
diff --git a/inputmethod/ibus-mozc/patches/patch-base_util__test.cc b/inputmethod/ibus-mozc/patches/patch-base_util__test.cc
deleted file mode 100644
index 2b5f84ce236..00000000000
--- a/inputmethod/ibus-mozc/patches/patch-base_util__test.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-base_util__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
-
---- base/util_test.cc.orig 2012-08-31 05:37:06.000000000 +0000
-+++ base/util_test.cc
-@@ -2210,7 +2210,7 @@ TEST(UtilTest, MacMaybeMLockTest) {
- TEST(UtilTest, LinuxMaybeMLockTest) {
- size_t data_len = 32;
- void *addr = malloc(data_len);
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_NETBSD)
- #if defined(OS_ANDROID) || defined(__native_client__)
- EXPECT_EQ(-1, Util::MaybeMLock(addr, data_len));
- EXPECT_EQ(-1, Util::MaybeMUnlock(addr, data_len));
diff --git a/inputmethod/ibus-mozc/patches/patch-build__mozc.py b/inputmethod/ibus-mozc/patches/patch-build__mozc.py
index bc0d6574069..e8e6a391152 100644
--- a/inputmethod/ibus-mozc/patches/patch-build__mozc.py
+++ b/inputmethod/ibus-mozc/patches/patch-build__mozc.py
@@ -1,8 +1,8 @@
-$NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-build__mozc.py,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- build_mozc.py.orig 2012-08-31 05:36:42.000000000 +0000
+--- build_mozc.py.orig 2013-03-29 04:33:25.000000000 +0000
+++ build_mozc.py
-@@ -60,6 +60,7 @@ from build_tools.util import GetRelPath
+@@ -62,6 +62,7 @@ from build_tools.util import GetRelPath
from build_tools.util import IsLinux
from build_tools.util import IsMac
from build_tools.util import IsWindows
@@ -10,7 +10,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
from build_tools.util import PrintErrorAndExit
from build_tools.util import RemoveDirectoryRecursively
from build_tools.util import RemoveFile
-@@ -111,6 +112,8 @@ def GetBuildBaseName(options, target_pla
+@@ -116,6 +117,8 @@ def GetBuildBaseName(options, target_pla
build_base = 'out_mac'
elif target_platform == 'Linux' or target_platform == 'ChromeOS':
build_base = 'out_linux'
@@ -19,16 +19,20 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
elif target_platform == 'Android':
build_base = 'out_android'
elif target_platform == 'NaCl':
-@@ -208,7 +211,7 @@ def GetGypFileNames(options):
- if IsWindows():
- gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
- gyp_file_names.extend(glob.glob('third_party/breakpad/*.gyp'))
-- elif IsLinux():
-+ elif IsLinux() or IsNetBSD():
- gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
- # Add ibus.gyp if ibus version is >=1.4.1.
+@@ -219,6 +222,12 @@ def GetGypFileNames(options):
if not PkgExists('ibus-1.0 >= 1.4.1'):
-@@ -274,6 +277,7 @@ def AddCommonOptions(parser):
+ logging.info('removing ibus.gyp.')
+ gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR)
++ elif options.target_platform == 'NetBSD':
++ gyp_file_names.extend(glob.glob('%s/unix/*/*.gyp' % SRC_DIR))
++ # Add ibus.gyp if ibus version is >=1.4.1.
++ if not PkgExists('ibus-1.0 >= 1.4.1'):
++ logging.info('removing ibus.gyp.')
++ gyp_file_names.remove('%s/unix/ibus/ibus.gyp' % SRC_DIR)
+ elif options.target_platform == 'ChromeOS':
+ gyp_file_names.extend(glob.glob('%s/unix/ibus/*.gyp' % SRC_DIR))
+ elif options.target_platform == 'NaCl':
+@@ -266,6 +275,7 @@ def AddCommonOptions(parser):
help='Specifies the base directory of the built binaries.')
parser.add_option('--language', dest='language', default='japanese',
help='Specify the target language to build.')
@@ -36,7 +40,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
return parser
-@@ -284,6 +288,8 @@ def AddTargetPlatformOption(parser):
+@@ -286,6 +296,8 @@ def AddTargetPlatformOption(parser):
# If you want Android build, specify "Android".
if IsLinux():
default_target = 'Linux'
@@ -45,7 +49,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
elif IsWindows():
default_target = 'Windows'
elif IsMac():
-@@ -413,7 +419,7 @@ def ParseGypOptions(args=None, values=No
+@@ -423,7 +435,7 @@ def ParseGypOptions(args=None, values=No
use_zinnia_default = True
parser.add_option('--server_dir', dest='server_dir',
@@ -54,20 +58,20 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
help='A path to the directory to be installed server '
'executable. This option is only available for Linux.')
-@@ -467,6 +473,12 @@ def ExpandMetaTarget(meta_target_name):
- '%s/gui/gui.gyp:mozc_tool']
+@@ -477,6 +489,12 @@ def ExpandMetaTarget(options, meta_targe
+ SRC_DIR + '/gui/gui.gyp:mozc_tool']
if PkgExists('ibus-1.0 >= 1.4.1'):
- targets.append('%s/unix/ibus/ibus.gyp:ibus_mozc')
+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
+ elif target_platform == 'NetBSD':
-+ targets = ['%s/server/server.gyp:mozc_server',
-+ '%s/renderer/renderer.gyp:mozc_renderer',
-+ '%s/gui/gui.gyp:mozc_tool']
++ targets = [SRC_DIR + '/server/server.gyp:mozc_server',
++ SRC_DIR + '/renderer/renderer.gyp:mozc_renderer',
++ SRC_DIR + '/gui/gui.gyp:mozc_tool']
+ if PkgExists('ibus-1.0 >= 1.4.1'):
-+ targets.append('%s/unix/ibus/ibus.gyp:ibus_mozc')
++ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
+ elif target_platform == 'ChromeOS':
+ targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc')
elif target_platform == 'Mac':
- targets = ['%s/mac/mac.gyp:DiskImage']
- elif target_platform == 'Windows':
-@@ -481,7 +493,7 @@ def ParseBuildOptions(args=None, values=
+@@ -505,7 +523,7 @@ def ParseBuildOptions(args=None, values=
"""Parses command line options for the build command."""
parser = optparse.OptionParser(usage='Usage: %prog build [options]')
AddCommonOptions(parser)
@@ -76,7 +80,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
default_build_concurrency = GetNumberOfProcessors() * 2
parser.add_option('--jobs', '-j', dest='jobs',
default=('%d' % default_build_concurrency),
-@@ -501,7 +513,7 @@ def ParseRunTestsOptions(args=None, valu
+@@ -525,7 +543,7 @@ def ParseRunTestsOptions(args=None, valu
parser = optparse.OptionParser(
usage='Usage: %prog runtests [options] [test_targets] [-- build options]')
AddCommonOptions(parser)
@@ -85,16 +89,16 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
default_build_concurrency = GetNumberOfProcessors() * 2
parser.add_option('--jobs', '-j', dest='jobs',
default=('%d' % default_build_concurrency),
-@@ -634,6 +646,8 @@ def GypMain(options, unused_args):
+@@ -673,6 +691,8 @@ def GypMain(options, unused_args):
command_line.extend(['-D', 'wix_dir=%s' % options.wix_dir])
else:
command_line.extend(['-D', 'use_wix=NO'])
+ if options.os:
+ command_line.extend(['-D', 'OS=%s' % options.os])
- command_line.extend(['-D', 'android_arch_abi=%s' % options.android_arch_abi])
- command_line.extend(['-D', 'android_application_id=%s' %
-@@ -669,7 +683,7 @@ def GypMain(options, unused_args):
+ android_sdk_home = options.android_sdk_home
+ if version.GetTargetPlatform() == 'Android':
+@@ -726,7 +746,7 @@ def GypMain(options, unused_args):
def SetCommandLineForFeature(option_name, windows=False, mac=False,
linux=False, chromeos=False, android=False,
@@ -103,7 +107,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
"""Updates an option like '--enable_foober' and add a -D argument for gyp.
This function ensures an option like '--enable_foober' exists and it has a
-@@ -693,6 +707,8 @@ def GypMain(options, unused_args):
+@@ -750,6 +770,8 @@ def GypMain(options, unused_args):
option on Android platform.
nacl: A boolean which replesents the default value of the target
option on NaCl.
@@ -112,50 +116,51 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
Raises:
ValueError: An error occurred when 'option_name' is empty.
-@@ -706,6 +722,7 @@ def GypMain(options, unused_args):
+@@ -763,6 +785,7 @@ def GypMain(options, unused_args):
'Linux': linux,
'ChromeOS': chromeos,
'Android': android,
-+ 'NetBSD' : netbsd,
++ 'NetBSD' : netbsd,
'NaCl': nacl}[options.target_platform]
enable_option_name = 'enable_%s' % option_name
enabled = options.ensure_value(enable_option_name, default_enabled)
-@@ -719,14 +736,17 @@ def GypMain(options, unused_args):
+@@ -776,14 +799,17 @@ def GypMain(options, unused_args):
SetCommandLineForFeature(option_name='webservice_infolist')
SetCommandLineForFeature(option_name='cloud_sync',
linux=is_official_dev,
-+ netbsd=is_official_dev,
++ netbsd=is_official_dev,
windows=is_official_dev,
mac=is_official_dev)
SetCommandLineForFeature(option_name='cloud_handwriting',
linux=is_official_dev,
-+ netbsd=is_official_dev,
++ netbsd=is_official_dev,
windows=is_official_dev,
mac=is_official_dev)
SetCommandLineForFeature(option_name='http_client',
linux=is_official,
-+ netbsd=is_official,
++ netbsd=is_official,
windows=is_official,
mac=is_official,
chromeos=False, # not supported.
-@@ -735,6 +755,7 @@ def GypMain(options, unused_args):
- windows=True,
- mac=True,
- linux=True,
-+ netbsd=True,
- chromeos=True,
- android=True,
- nacl=True)
-@@ -769,7 +790,7 @@ def GypMain(options, unused_args):
- else:
+@@ -796,6 +822,7 @@ def GypMain(options, unused_args):
+ android=True)
+ SetCommandLineForFeature(option_name='history_deletion',
+ linux=is_official_dev,
++ netbsd=is_official_dev,
+ windows=is_official_dev,
+ mac=is_official_dev)
+
+@@ -829,7 +856,8 @@ def GypMain(options, unused_args):
command_line.extend(['-D', 'use_zinnia=NO'])
-- if IsLinux():
-+ if IsLinux() or IsNetBSD():
- if '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names:
- command_line.extend(['-D', 'use_libibus=1'])
+ if ((options.target_platform == 'Linux' or
+- options.target_platform == 'ChromeOS') and
++ options.target_platform == 'ChromeOS' or
++ options.target_platform == 'NetBSD') and
+ '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names):
+ command_line.extend(['-D', 'use_libibus=1'])
-@@ -790,7 +811,7 @@ def GypMain(options, unused_args):
+@@ -874,7 +902,7 @@ def GypMain(options, unused_args):
# command for pkg-config. Here we catch the environment variable
# and use the specified command instead of actual pkg-config
# command.
@@ -164,7 +169,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
else:
command_line.extend(['-D', 'pkg_config_command='])
-@@ -927,6 +948,41 @@ def BuildOnMac(options, targets, origina
+@@ -1043,6 +1071,41 @@ def BuildOnMac(options, targets, origina
'-parallelizeTargets',
'BUILD_WITH_GYP=1'])
@@ -176,7 +181,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+ CanonicalTargetToGypFileAndTargetName(target))
+ target_names.append(target_name)
+
-+ make_command = os.getenv('BUILD_COMMAND', 'gmake')
++ make_command = os.getenv('BUILD_COMMAND', 'make')
+
+ envvars = [
+ 'CFLAGS',
@@ -204,18 +209,18 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+
+ RunOrDie([make_command] + build_args + target_names)
- def LocateMSBuildDir():
- """Locate the directory where msbuild.exe exists.
-@@ -1079,6 +1135,8 @@ def BuildMain(options, targets, original
+ def BuildOnWindows(targets):
+ """Build the target on Windows."""
+@@ -1073,6 +1136,8 @@ def BuildMain(options, targets, original
BuildOnMac(options, targets, original_directory_name)
elif IsLinux():
BuildOnLinux(options, targets, original_directory_name)
+ elif IsNetBSD():
+ BuildOnBSD(options, targets, original_directory_name)
elif IsWindows():
- BuildOnWindows(options, targets, original_directory_name)
+ BuildOnWindows(targets)
else:
-@@ -1350,7 +1408,7 @@ def CleanBuildFilesAndDirectories(option
+@@ -1349,7 +1414,7 @@ def CleanBuildFilesAndDirectories(option
elif IsMac():
directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
'*.xcodeproj')))
@@ -224,8 +229,8 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
file_names.extend(glob.glob(os.path.join(gyp_directory_name,
'*.target.mk')))
file_names.extend(glob.glob(os.path.join(gyp_directory_name,
-@@ -1377,6 +1435,10 @@ def CleanBuildFilesAndDirectories(option
- file_names.append('Makefile')
+@@ -1397,6 +1462,10 @@ def CleanBuildFilesAndDirectories(option
+
elif IsWindows():
file_names.append('third_party/breakpad/breakpad.gyp')
+ directory_names.append('out_win')
diff --git a/inputmethod/ibus-mozc/patches/patch-build__tools_util.py b/inputmethod/ibus-mozc/patches/patch-build__tools_util.py
index 1104cec7e59..f1f7d17e280 100644
--- a/inputmethod/ibus-mozc/patches/patch-build__tools_util.py
+++ b/inputmethod/ibus-mozc/patches/patch-build__tools_util.py
@@ -1,15 +1,14 @@
-$NetBSD: patch-build__tools_util.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-build__tools_util.py,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- build_tools/util.py.orig 2012-08-31 05:37:06.000000000 +0000
+--- build_tools/util.py.orig 2013-03-29 04:33:44.000000000 +0000
+++ build_tools/util.py
-@@ -56,6 +56,10 @@ def IsLinux():
+@@ -56,6 +56,9 @@ def IsLinux():
"""Returns true if the platform is Linux."""
return os.name == 'posix' and os.uname()[0] == 'Linux'
+def IsNetBSD():
+ """Returns true if the platform is Linux."""
+ return os.name == 'posix' and os.uname()[0] == 'NetBSD'
-+
def GetNumberOfProcessors():
"""Returns the number of CPU cores available.
diff --git a/inputmethod/ibus-mozc/patches/patch-client_client.cc b/inputmethod/ibus-mozc/patches/patch-client_client.cc
index 9c6fae3b90f..3edd5be9513 100644
--- a/inputmethod/ibus-mozc/patches/patch-client_client.cc
+++ b/inputmethod/ibus-mozc/patches/patch-client_client.cc
@@ -1,22 +1,22 @@
-$NetBSD: patch-client_client.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-client_client.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- client/client.cc.orig 2012-08-31 05:36:43.000000000 +0000
+--- client/client.cc.orig 2013-03-29 04:33:44.000000000 +0000
+++ client/client.cc
-@@ -934,7 +934,7 @@ bool Client::LaunchTool(const string &mo
+@@ -950,7 +950,7 @@ bool Client::LaunchTool(const string &mo
return false;
}
--#if defined(OS_WINDOWS) || defined(OS_LINUX)
-+#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_NETBSD)
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_NETBSD)
string arg = "--mode=" + mode;
if (!extra_arg.empty()) {
arg += " ";
-@@ -944,7 +944,7 @@ bool Client::LaunchTool(const string &mo
+@@ -960,7 +960,7 @@ bool Client::LaunchTool(const string &mo
LOG(ERROR) << "Cannot execute: " << kMozcTool << " " << arg;
return false;
}
--#endif // OS_WINDOWS || OS_LINUX
-+#endif // OS_WINDOWS || OS_LINUX || OS_NETBSD
+-#endif // OS_WIN || OS_LINUX
++#endif // OS_WIN || OS_LINUX || OS_NETBSD
// TODO(taku): move MacProcess inside SpawnMozcProcess.
// TODO(taku): support extra_arg.
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_base_locale__util.cc b/inputmethod/ibus-mozc/patches/patch-gui_base_locale__util.cc
index d20ca3a99dc..83aa35041d1 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_base_locale__util.cc
+++ b/inputmethod/ibus-mozc/patches/patch-gui_base_locale__util.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-gui_base_locale__util.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_base_locale__util.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/base/locale_util.cc.orig 2012-08-31 05:37:21.000000000 +0000
+--- gui/base/locale_util.cc.orig 2013-03-29 04:34:04.000000000 +0000
+++ gui/base/locale_util.cc
-@@ -206,7 +206,7 @@ TranslationDataImpl::TranslationDataImpl
+@@ -207,7 +207,7 @@ TranslationDataImpl::TranslationDataImpl
qApp->installEventFilter(&window_title_modifier_);
#endif // MOZC_SHOW_BUILD_NUMBER_ON_TITLE
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_config__dialog.cc b/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_config__dialog.cc
index 60a8dbeb604..518a3987f40 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_config__dialog.cc
+++ b/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_config__dialog.cc
@@ -1,9 +1,9 @@
-$NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/config_dialog/config_dialog.cc.orig 2012-08-31 05:37:09.000000000 +0000
+--- gui/config_dialog/config_dialog.cc.orig 2013-03-29 04:33:48.000000000 +0000
+++ gui/config_dialog/config_dialog.cc
-@@ -83,21 +83,21 @@ ConfigDialog::ConfigDialog()
- miscAdministrationWidget->setVisible(false);
+@@ -96,21 +96,21 @@ ConfigDialog::ConfigDialog()
+ setWindowTitle(tr("Mozc Preferences"));
#endif // OS_MACOSX
-#if defined(OS_LINUX)
@@ -28,30 +28,30 @@ $NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/01/18 11:36:40 ry
#endif // NO_LOGGING
#ifndef ENABLE_CLOUD_SYNC
-@@ -322,7 +322,7 @@ ConfigDialog::ConfigDialog()
+@@ -347,7 +347,7 @@ ConfigDialog::ConfigDialog()
dictionaryPreloadingAndUACLabel->setVisible(false);
- #endif // OS_WINDOWS
+ #endif // OS_WIN
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
// On Linux, disable all fields for UsageStats
usageStatsLabel->setEnabled(false);
usageStatsLabel->setVisible(false);
-@@ -332,7 +332,7 @@ ConfigDialog::ConfigDialog()
+@@ -357,7 +357,7 @@ ConfigDialog::ConfigDialog()
usageStatsMessage->setVisible(false);
usageStatsCheckBox->setEnabled(false);
usageStatsCheckBox->setVisible(false);
--#endif // OS_LINUX
-+#endif // OS_LINUX || OS_NETBSD
+-#endif // OS_LINUX
++#endif // OS_LINUX || OS_NETBSD
webUsageDictionaryCheckBox->setVisible(false);
editWebServiceEntryButton->setVisible(false);
-@@ -438,7 +438,7 @@ bool ConfigDialog::Update() {
+@@ -460,7 +460,7 @@ bool ConfigDialog::Update() {
}
--#if defined(OS_WINDOWS) || defined(OS_LINUX)
-+#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_NETBSD)
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_NETBSD)
if (initial_preedit_method_ !=
static_cast<int>(config.preedit_method()) ||
initial_use_keyboard_to_change_preedit_method_ !=
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_keymap__editor.cc b/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_keymap__editor.cc
index 0fdf0d1b99d..0f06e1bf0ef 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_keymap__editor.cc
+++ b/inputmethod/ibus-mozc/patches/patch-gui_config__dialog_keymap__editor.cc
@@ -1,13 +1,13 @@
-$NetBSD: patch-gui_config__dialog_keymap__editor.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_config__dialog_keymap__editor.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/config_dialog/keymap_editor.cc.orig 2012-08-31 05:37:12.000000000 +0000
+--- gui/config_dialog/keymap_editor.cc.orig 2013-03-29 04:33:49.000000000 +0000
+++ gui/config_dialog/keymap_editor.cc
-@@ -447,7 +447,7 @@ bool KeyMapEditorDialog::Update() {
+@@ -449,7 +449,7 @@ bool KeyMapEditorDialog::Update() {
*keymap_table += invisible_keymap_table_;
if (new_ime_switch_keymap != ime_switch_keymap_) {
--#if defined(OS_WINDOWS) || defined(OS_LINUX)
-+#if defined(OS_WINDOWS) || defined(OS_LINUX) || defined(OS_NETBSD)
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_NETBSD)
QMessageBox::information(
this,
- tr("Mozc settings"),
+ windowTitle(),
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_dictionary__tool_dictionary__tool.cc b/inputmethod/ibus-mozc/patches/patch-gui_dictionary__tool_dictionary__tool.cc
index 736fc20ee11..5257868a38d 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_dictionary__tool_dictionary__tool.cc
+++ b/inputmethod/ibus-mozc/patches/patch-gui_dictionary__tool_dictionary__tool.cc
@@ -1,13 +1,13 @@
-$NetBSD: patch-gui_dictionary__tool_dictionary__tool.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_dictionary__tool_dictionary__tool.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/dictionary_tool/dictionary_tool.cc.orig 2012-08-31 05:37:14.000000000 +0000
+--- gui/dictionary_tool/dictionary_tool.cc.orig 2013-03-29 04:34:06.000000000 +0000
+++ gui/dictionary_tool/dictionary_tool.cc
-@@ -339,7 +339,7 @@ DictionaryTool::DictionaryTool(QWidget *
+@@ -358,7 +358,7 @@ DictionaryTool::DictionaryTool(QWidget *
}
// main window
-#ifndef OS_LINUX
-+#if !defined(OS_LINUX) && !defined(OS_NETBSD)
++#if !defined(OS_LINUX) || !defined(OS_NETBSD)
// For some reason setCentralWidget crashes the dictionary_tool on Linux
// TODO(taku): investigate the cause of the crashes
setCentralWidget(splitter_);
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_qt__libraries.gypi b/inputmethod/ibus-mozc/patches/patch-gui_qt__libraries.gypi
index cb1ab2a479f..d09cc8cc998 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_qt__libraries.gypi
+++ b/inputmethod/ibus-mozc/patches/patch-gui_qt__libraries.gypi
@@ -1,6 +1,6 @@
-$NetBSD: patch-gui_qt__libraries.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_qt__libraries.gypi,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/qt_libraries.gypi.orig 2012-08-31 05:36:43.000000000 +0000
+--- gui/qt_libraries.gypi.orig 2013-03-29 04:33:25.000000000 +0000
+++ gui/qt_libraries.gypi
@@ -84,7 +84,7 @@
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
@@ -11,3 +11,12 @@ $NetBSD: patch-gui_qt__libraries.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'conditions': [
['qt_dir', {
'libraries': [
+@@ -112,7 +112,7 @@
+ # Workarounds related with clang.
+ ['clang==1', {
+ 'conditions': [
+- ['OS=="linux"', {
++ ['OS=="linux" or OS=="netbsd"', {
+ 'cflags': [
+ # Temporal workaround against following false warning in Clang.
+ # http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022477.html
diff --git a/inputmethod/ibus-mozc/patches/patch-gui_word__register__dialog_word__register__dialog.cc b/inputmethod/ibus-mozc/patches/patch-gui_word__register__dialog_word__register__dialog.cc
index 6f80dd8331e..e694c297bc3 100644
--- a/inputmethod/ibus-mozc/patches/patch-gui_word__register__dialog_word__register__dialog.cc
+++ b/inputmethod/ibus-mozc/patches/patch-gui_word__register__dialog_word__register__dialog.cc
@@ -1,11 +1,11 @@
-$NetBSD: patch-gui_word__register__dialog_word__register__dialog.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gui_word__register__dialog_word__register__dialog.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gui/word_register_dialog/word_register_dialog.cc.orig 2012-08-31 05:37:28.000000000 +0000
+--- gui/word_register_dialog/word_register_dialog.cc.orig 2013-03-29 04:34:02.000000000 +0000
+++ gui/word_register_dialog/word_register_dialog.cc
-@@ -81,7 +81,7 @@ QString GetEnv(const char *envname) {
+@@ -82,7 +82,7 @@ QString GetEnv(const char *envname) {
}
return "";
- #endif // OS_WINDOWS
+ #endif // OS_WIN
-#if defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_NETBSD)
return ::getenv(envname);
diff --git a/inputmethod/ibus-mozc/patches/patch-gyp_common.gypi b/inputmethod/ibus-mozc/patches/patch-gyp_common.gypi
index 37fb09e76b8..b99c8c54b38 100644
--- a/inputmethod/ibus-mozc/patches/patch-gyp_common.gypi
+++ b/inputmethod/ibus-mozc/patches/patch-gyp_common.gypi
@@ -1,13 +1,22 @@
-$NetBSD: patch-gyp_common.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-gyp_common.gypi,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- gyp/common.gypi.orig 2012-08-31 05:36:43.000000000 +0000
+--- gyp/common.gypi.orig 2013-03-29 04:33:42.000000000 +0000
+++ gyp/common.gypi
+@@ -132,7 +132,7 @@
+ 'conditions': [
+ # enable_gtk_renderer represents if mozc_renderer is supported on Linux
+ # or not.
+- ['target_platform=="Linux" and language=="japanese"', {
++ ['(target_platform=="Linux" or target_platform=="NetBSD") and language=="japanese"', {
+ 'enable_gtk_renderer%': 1,
+ }, { # else
+ 'enable_gtk_renderer%': 0,
@@ -283,12 +283,12 @@
# additional suffix except for Japanese so that multiple
# converter processes can coexist. Note that Mozc on ChromeOS does
# not use IPC so this kind of special treatment is not required.
- ['language!="japanese" and target_platform=="Linux"', {
-+ ['language!="japanese" and target_platform=="Linux" or target_platform=="NetBSD"', {
++ ['language!="japanese" and (target_platform=="Linux" or target_platform=="NetBSD")', {
'defines': [
'MOZC_LANGUAGE_SUFFIX_FOR_LINUX="_<(language)"',
],
@@ -17,7 +26,7 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'ldflags': [
'<@(linux_ldflags)',
],
-@@ -438,7 +438,7 @@
+@@ -447,7 +447,7 @@
},
},
'conditions': [
@@ -26,7 +35,7 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'cflags': [
'<@(debug_extra_cflags)',
],
-@@ -476,7 +476,7 @@
+@@ -485,7 +485,7 @@
},
},
'conditions': [
@@ -35,19 +44,25 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'cflags': [
'<@(release_extra_cflags)',
],
-@@ -789,6 +789,16 @@
+@@ -785,6 +785,22 @@
}],
],
}],
+ ['OS=="netbsd"', {
+ 'defines': [
+ 'OS_NETBSD',
++ 'MOZC_SERVER_DIRECTORY="<@(server_dir)"',
+ ],
+ 'cflags': [
+ '<@(gcc_cflags)',
+ '-fPIC',
+ '-fno-exceptions',
+ ],
++ 'cflags_cc': [
++ # We use deprecated <hash_map> and <hash_set> instead of upcoming
++ # <unordered_map> and <unordered_set>.
++ '-Wno-deprecated',
++ ],
+ }],
['OS=="mac"', {
'defines': [
diff --git a/inputmethod/ibus-mozc/patches/patch-handwriting_handwriting.gyp b/inputmethod/ibus-mozc/patches/patch-handwriting_handwriting.gyp
index c0b2c1368e8..9ce6f287c9e 100644
--- a/inputmethod/ibus-mozc/patches/patch-handwriting_handwriting.gyp
+++ b/inputmethod/ibus-mozc/patches/patch-handwriting_handwriting.gyp
@@ -1,13 +1,13 @@
-$NetBSD: patch-handwriting_handwriting.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-handwriting_handwriting.gyp,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- handwriting/handwriting.gyp.orig 2012-08-31 05:37:06.000000000 +0000
+--- handwriting/handwriting.gyp.orig 2013-03-29 04:33:25.000000000 +0000
+++ handwriting/handwriting.gyp
@@ -39,7 +39,7 @@
'../base/base.gyp:base',
'../gui/zinnia.gyp:zinnia',
],
- 'conditions': [['use_libzinnia==1 and OS=="linux"', {
-+ 'conditions': [['use_libzinnia==1 and OS=="linux" or OS=="netbsd"', {
++ 'conditions': [['use_libzinnia==1 and (OS=="linux" or OS=="netbsd")', {
'defines': [
'USE_LIBZINNIA',
],
diff --git a/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager.cc b/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager.cc
index 443b01cd51d..393b88e38c0 100644
--- a/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager.cc
+++ b/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager.cc
@@ -1,40 +1,22 @@
-$NetBSD: patch-ipc_ipc__path__manager.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-ipc_ipc__path__manager.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- ipc/ipc_path_manager.cc.orig 2012-08-31 05:37:07.000000000 +0000
+--- ipc/ipc_path_manager.cc.orig 2013-03-29 04:33:26.000000000 +0000
+++ ipc/ipc_path_manager.cc
-@@ -48,6 +48,11 @@
- #include "base/mac_util.h"
- #endif
+@@ -44,6 +44,11 @@
+ #endif // OS_MACOSX
+ #endif // OS_WIN
+#if defined(OS_NETBSD)
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
+
- #include "base/base.h"
- #include "base/const.h"
- #include "base/file_stream.h"
-@@ -284,7 +289,7 @@ bool IPCPathManager::GetPathName(string
- *ipc_name = kIPCPrefix;
- #endif // OS_WINDOWS
+ #include <cstdlib>
+ #include <map>
--#ifdef OS_LINUX
-+#if defined(OS_LINUX)
- // On Linux, use abstract namespace which is independent of the file system.
- (*ipc_name)[0] = '\0';
- #endif
-@@ -360,7 +365,7 @@ bool IPCPathManager::IsValidServer(uint3
- }
- #endif
-
--#ifdef OS_MACOSX
-+#if defined(OS_MACOSX)
- int name[] = { CTL_KERN, KERN_PROCARGS, pid };
- size_t data_len = 0;
- if (sysctl(name, arraysize(name), NULL,
-@@ -377,7 +382,24 @@ bool IPCPathManager::IsValidServer(uint3
+@@ -427,7 +432,24 @@ bool IPCPathManager::IsValidServer(uint3
+ return true;
}
- #endif
-#ifdef OS_LINUX
+#if defined(OS_NETBSD)
@@ -55,15 +37,6 @@ $NetBSD: patch-ipc_ipc__path__manager.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+#endif
+
+#if defined(OS_LINUX)
- // load from /proc/<pid>/exe
- char proc[128];
- char filename[512];
-@@ -397,7 +419,7 @@ bool IPCPathManager::IsValidServer(uint3
- return true;
- }
-
--#ifdef OS_LINUX
-+#if defined(OS_LINUX)
if ((server_path + " (deleted)") == server_path_) {
LOG(WARNING) << server_path << " on disk is modified";
// If a user updates the server binary on disk during the server is running,
diff --git a/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager__test.cc b/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager__test.cc
index bf5fa31b69f..f40bcf5befc 100644
--- a/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager__test.cc
+++ b/inputmethod/ibus-mozc/patches/patch-ipc_ipc__path__manager__test.cc
@@ -1,13 +1,13 @@
-$NetBSD: patch-ipc_ipc__path__manager__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-ipc_ipc__path__manager__test.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- ipc/ipc_path_manager_test.cc.orig 2012-08-31 05:37:07.000000000 +0000
+--- ipc/ipc_path_manager_test.cc.orig 2013-03-29 04:33:26.000000000 +0000
+++ ipc/ipc_path_manager_test.cc
-@@ -102,7 +102,7 @@ TEST_F(IPCPathManagerTest, IPCPathManage
+@@ -103,7 +103,7 @@ TEST_F(IPCPathManagerTest, IPCPathManage
EXPECT_FALSE(manager->GetServerProductVersion().empty());
EXPECT_GT(manager->GetServerProcessId(), 0);
EXPECT_EQ(t.path(), path);
-#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_NETBSD)
++#if defned(OS_LINUX) || defined(OS_NETBSD)
// On Linux, |path| should be abstract (see man unix(7) for details.)
ASSERT_FALSE(path.empty());
EXPECT_EQ('\0', path[0]);
diff --git a/inputmethod/ibus-mozc/patches/patch-ipc_unix__ipc.cc b/inputmethod/ibus-mozc/patches/patch-ipc_unix__ipc.cc
index 5c96f1cb832..40433de4a14 100644
--- a/inputmethod/ibus-mozc/patches/patch-ipc_unix__ipc.cc
+++ b/inputmethod/ibus-mozc/patches/patch-ipc_unix__ipc.cc
@@ -1,6 +1,6 @@
-$NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-ipc_unix__ipc.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- ipc/unix_ipc.cc.orig 2012-08-31 05:37:07.000000000 +0000
+--- ipc/unix_ipc.cc.orig 2013-03-29 04:33:26.000000000 +0000
+++ ipc/unix_ipc.cc
@@ -28,7 +28,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -11,18 +11,18 @@ $NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
#include "ipc/ipc.h"
-@@ -41,7 +41,7 @@
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/un.h>
--#ifdef OS_MACOSX
-+#if defined(OS_MACOSX) || defined(OS_NETBSD)
- #include <sys/ucred.h>
- #endif
- #include <sys/wait.h>
-@@ -171,6 +171,22 @@ bool IsPeerValid(int socket, pid_t *pid)
+@@ -127,7 +127,7 @@ bool IsPeerValid(int socket, pid_t *pid)
+ // sometimes doesn't support the getsockopt(sock, SOL_SOCKET, SO_PEERCRED)
+ // system call.
+ // TODO(yusukes): Add implementation for ARM Linux.
+-#ifndef __arm__
++#if !defined(__arm__) && !defined(OS_NETBSD)
+ struct ucred peer_cred;
+ int peer_cred_len = sizeof(peer_cred);
+ if (getsockopt(socket, SOL_SOCKET, SO_PEERCRED,
+@@ -145,6 +145,22 @@ bool IsPeerValid(int socket, pid_t *pid)
+ *pid = peer_cred.pid;
#endif // __arm__
- #endif
+#if defined(OS_NETBSD)
+ struct unpcbid peer_cred;
@@ -43,35 +43,3 @@ $NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
return true;
}
-@@ -310,9 +326,11 @@ void IPCClient::Init(const string &name,
- address.sun_family = AF_UNIX;
- ::memcpy(address.sun_path, server_address.data(), server_address_length);
- address.sun_path[server_address_length] = '\0';
--#ifdef OS_MACOSX
-+#if defined(OS_MACOSX)
- address.sun_len = SUN_LEN(&address);
- const size_t sun_len = sizeof(address);
-+#elif defined(OS_NETBSD)
-+ size_t sun_len = SUN_LEN(&address);
- #else
- const size_t sun_len = sizeof(address.sun_family) + server_address_length;
- #endif
-@@ -435,9 +453,11 @@ IPCServer::IPCServer(const string &name,
- SO_REUSEADDR,
- reinterpret_cast<char *>(&on),
- sizeof(on));
--#ifdef OS_MACOSX
-+#if defined(OS_MACOSX)
- addr.sun_len = SUN_LEN(&addr);
- const size_t sun_len = sizeof(addr);
-+#elif defined(OS_NETBSD)
-+ size_t sun_len = SUN_LEN(&addr);
- #else
- const size_t sun_len = sizeof(addr.sun_family) + server_address_.size();
- #endif
-@@ -534,4 +554,4 @@ void IPCServer::Terminate() {
-
- }; // namespace mozc
-
--#endif // OS_LINUX && !OS_ANDROID
-+#endif // (OS_LINUX && !OS_ANDROID) || OS_NETBSD
diff --git a/inputmethod/ibus-mozc/patches/patch-net_net.gyp b/inputmethod/ibus-mozc/patches/patch-net_net.gyp
index 23f527106db..9298e4f2ba4 100644
--- a/inputmethod/ibus-mozc/patches/patch-net_net.gyp
+++ b/inputmethod/ibus-mozc/patches/patch-net_net.gyp
@@ -1,13 +1,13 @@
-$NetBSD: patch-net_net.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-net_net.gyp,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- net/net.gyp.orig 2012-08-31 05:36:44.000000000 +0000
+--- net/net.gyp.orig 2013-03-29 04:33:42.000000000 +0000
+++ net/net.gyp
@@ -61,7 +61,7 @@
},
},
}],
- ['target_platform=="Linux"', {
-+ ['target_platform=="Linux" or OS=="netbsd"', {
++ ['target_platform=="Linux" or target_platform=="NetBSD"', {
# Enable libcurl
'cflags': [
'<!@(<(pkg_config_command) --cflags libcurl)',
diff --git a/inputmethod/ibus-mozc/patches/patch-protobuf_genproto.gypi b/inputmethod/ibus-mozc/patches/patch-protobuf_genproto.gypi
index 7c8edd1af96..b7e8a2b6296 100644
--- a/inputmethod/ibus-mozc/patches/patch-protobuf_genproto.gypi
+++ b/inputmethod/ibus-mozc/patches/patch-protobuf_genproto.gypi
@@ -1,20 +1,28 @@
-$NetBSD: patch-protobuf_genproto.gypi,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-protobuf_genproto.gypi,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- protobuf/genproto.gypi.orig 2012-08-31 05:37:07.000000000 +0000
+--- protobuf/genproto.gypi.orig 2013-03-29 04:33:43.000000000 +0000
+++ protobuf/genproto.gypi
-@@ -36,13 +36,13 @@
+@@ -33,19 +33,19 @@
+ 'wrapper_path': '<(DEPTH)/build_tools/protoc_wrapper.py',
+ },
'conditions': [
- ['OS!="linux"', {
+- ['target_platform!="linux"', {
++ ['target_platform!="Linux" and target_platform!="NetBSD"', {
'variables': {
-- 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
-+ 'protoc_command%': 'protoc<(EXECUTABLE_SUFFIX)',
+- 'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_command%': '@PREFIX@/bin/protoc<(EXECUTABLE_SUFFIX)',
},
}, { # else
'conditions': [
['use_libprotobuf==0', {
'variables': {
-- 'protoc_command%': '<(relative_dir)/<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
-+ 'protoc_command%': 'protoc<(EXECUTABLE_SUFFIX)',
+- 'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_command%': '@PREFIX@/bin/protoc<(EXECUTABLE_SUFFIX)',
},
}, { # else
'variables': {
+- 'protoc_command%': 'protoc<(EXECUTABLE_SUFFIX)',
++ 'protoc_command%': '@PREFIX@/bin/protoc<(EXECUTABLE_SUFFIX)',
+ },
+ }],
+ ],
diff --git a/inputmethod/ibus-mozc/patches/patch-protobuf_protobuf.gyp b/inputmethod/ibus-mozc/patches/patch-protobuf_protobuf.gyp
index 2d30a06c801..a640aebae5d 100644
--- a/inputmethod/ibus-mozc/patches/patch-protobuf_protobuf.gyp
+++ b/inputmethod/ibus-mozc/patches/patch-protobuf_protobuf.gyp
@@ -1,17 +1,17 @@
-$NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-protobuf_protobuf.gyp,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- protobuf/protobuf.gyp.orig 2012-08-31 05:37:07.000000000 +0000
+--- protobuf/protobuf.gyp.orig 2013-03-29 04:33:43.000000000 +0000
+++ protobuf/protobuf.gyp
-@@ -138,7 +138,7 @@
- },
+@@ -140,7 +140,7 @@
+ ],
'conditions': [
# for gcc and clang
- ['OS=="linux" or OS=="mac"', {
-+ ['OS=="linux" or OS=="mac" or OS="netbsd"', {
++ ['OS=="linux" or OS=="mac" OS=="netbsd"', {
'cflags': [
'-Wno-conversion-null', # coded_stream.cc uses NULL to bool.
'-Wno-unused-function',
-@@ -159,7 +159,7 @@
+@@ -176,7 +176,7 @@
'.',
],
'conditions': [
@@ -20,7 +20,7 @@ $NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'conditions': [
['use_libprotobuf!=1', {
'cflags': [
-@@ -196,7 +196,7 @@
+@@ -212,7 +212,7 @@
},
'conditions': [
# use system-installed protoc on Linux
diff --git a/inputmethod/ibus-mozc/patches/patch-session_session.cc b/inputmethod/ibus-mozc/patches/patch-session_session.cc
index 65c0d19a6b1..a8449641261 100644
--- a/inputmethod/ibus-mozc/patches/patch-session_session.cc
+++ b/inputmethod/ibus-mozc/patches/patch-session_session.cc
@@ -1,13 +1,13 @@
-$NetBSD: patch-session_session.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-session_session.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- session/session.cc.orig 2012-08-31 05:36:43.000000000 +0000
+--- session/session.cc.orig 2013-03-29 04:33:25.000000000 +0000
+++ session/session.cc
-@@ -1091,7 +1091,7 @@ void Session::UpdateOperationPreferences
+@@ -1100,7 +1100,7 @@ void Session::UpdateOperationPreferences
}
// Cascading Window.
-#ifndef OS_LINUX
-+#if !defined(OS_LINUX) || !defined(OS_NETBSD)
++#if !defined(OS_LINUX) or !defined(OS_NETBSD)
if (config.has_use_cascading_window()) {
operation_preferences.use_cascading_window = config.use_cascading_window();
}
diff --git a/inputmethod/ibus-mozc/patches/patch-session_session__test.cc b/inputmethod/ibus-mozc/patches/patch-session_session__test.cc
index faf3b72768f..9dedb138b18 100644
--- a/inputmethod/ibus-mozc/patches/patch-session_session__test.cc
+++ b/inputmethod/ibus-mozc/patches/patch-session_session__test.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-session_session__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-session_session__test.cc,v 1.2 2013/04/29 09:21:24 ryoon Exp $
---- session/session_test.cc.orig 2012-08-31 05:36:43.000000000 +0000
+--- session/session_test.cc.orig 2013-03-29 04:33:26.000000000 +0000
+++ session/session_test.cc
-@@ -2417,7 +2417,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
+@@ -2361,7 +2361,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
EXPECT_EQ(0, output.all_candidate_words().focused_index());
EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
@@ -11,7 +11,7 @@ $NetBSD: patch-session_session__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
// Cascading window is not supported on Linux, so the size of
// candidate words is different from other platform.
// TODO(komatsu): Modify the client for Linux to explicitly change
-@@ -2433,7 +2433,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
+@@ -2377,7 +2377,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
// "aiueo" (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
// "アイウエオ" (t13n) ]
EXPECT_EQ(11, output.all_candidate_words().candidates_size());
@@ -20,7 +20,7 @@ $NetBSD: patch-session_session__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
}
command.Clear();
-@@ -2445,7 +2445,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
+@@ -2389,7 +2389,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
EXPECT_EQ(1, output.all_candidate_words().focused_index());
EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
@@ -29,3 +29,12 @@ $NetBSD: patch-session_session__test.cc,v 1.1 2013/01/18 11:36:40 ryoon Exp $
// Cascading window is not supported on Linux, so the size of
// candidate words is different from other platform.
// TODO(komatsu): Modify the client for Linux to explicitly change
+@@ -2405,7 +2405,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
+ // "aiueo" (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
+ // "アイウエオ" (t13n) ]
+ EXPECT_EQ(11, output.all_candidate_words().candidates_size());
+-#endif // OS_LINUX
++#endif // OS_LINUX || OS_NETBSD
+ }
+ }
+
diff --git a/inputmethod/ibus-mozc/patches/patch-unix_ibus_gen__mozc__xml.py b/inputmethod/ibus-mozc/patches/patch-unix_ibus_gen__mozc__xml.py
index 95ea9b059cd..ed6f9ebdb8f 100644
--- a/inputmethod/ibus-mozc/patches/patch-unix_ibus_gen__mozc__xml.py
+++ b/inputmethod/ibus-mozc/patches/patch-unix_ibus_gen__mozc__xml.py
@@ -1,10 +1,10 @@
-$NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
+$NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.2 2013/04/29 09:21:24 ryoon Exp $
* Fix for pkgsrc installation.
---- unix/ibus/gen_mozc_xml.py.orig 2012-08-31 05:36:43.000000000 +0000
+--- unix/ibus/gen_mozc_xml.py.orig 2013-03-29 04:33:43.000000000 +0000
+++ unix/ibus/gen_mozc_xml.py
-@@ -48,7 +48,7 @@ IBUS_COMPONENT_PROPS = {
+@@ -49,7 +49,7 @@ IBUS_COMPONENT_PROPS = {
'description': '%s Component',
# TODO(yusukes): Support Linux distributions other than Gentoo/ChromeOS.
# For example, Ubuntu uses /usr/lib/ibus-mozc/.
@@ -13,7 +13,7 @@ $NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
# TODO(mazda): Generate the version number.
'version': '0.0.0.0',
'author': 'Google Inc.',
-@@ -61,7 +61,7 @@ IBUS_COMPONENT_PROPS = {
+@@ -62,7 +62,7 @@ IBUS_COMPONENT_PROPS = {
IBUS_ENGINE_COMMON_PROPS = {
'description': '%s (Japanese Input Method)',
'language': 'ja',
@@ -22,9 +22,9 @@ $NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
'rank': '80',
}
-@@ -76,6 +76,13 @@ IBUS_ENGINES_PROPS = {
+@@ -95,6 +95,13 @@ IBUS_ENGINES_PROPS = {
'longname': ['%s'],
- 'layout': ['jp'],
+ 'layout': ['default'],
},
+ 'NetBSD': {
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
@@ -36,16 +36,20 @@ $NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.1 2013/01/18 11:36:40 ryoon Exp $
# On Chrome/Chromium OS, we provide three engines.
'ChromeOS': {
# DO NOT change the engine name 'mozc-jp'. The names is referenced by
-@@ -193,7 +200,11 @@ def main():
-
- setup_arg = []
- if options.platform == 'Linux':
+@@ -228,7 +235,15 @@ def main():
+ platform = options.platform
+ common_props = IBUS_ENGINE_COMMON_PROPS
+ if platform == 'Linux':
- setup_arg.append(os.path.join(options.server_dir, 'mozc_tool'))
+ setup_arg.append(os.path.join("@PREFIX@/libexec", 'mozc_tool'))
+ setup_arg.append('--mode=config_dialog')
++ if IsIBus15OrGreater(options):
++ # A tentative workaround against IBus 1.5
++ platform = 'Linux-IBus1.5'
++ common_props = IBUS_1_5_ENGINE_COMMON_PROPS
+
-+ if options.platform == 'NetBSD':
++ if platform == 'NetBSD':
+ setup_arg.append(os.path.join("@PREFIX@/libexec", 'mozc_tool'))
setup_arg.append('--mode=config_dialog')
-
- if options.output_cpp:
+ if IsIBus15OrGreater(options):
+ # A tentative workaround against IBus 1.5
diff --git a/inputmethod/mozc-server/Makefile b/inputmethod/mozc-server/Makefile
index e2db23df926..e620f80de77 100644
--- a/inputmethod/mozc-server/Makefile
+++ b/inputmethod/mozc-server/Makefile
@@ -1,18 +1,17 @@
-# $NetBSD: Makefile,v 1.4 2013/02/16 11:22:44 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2013/04/29 09:22:04 ryoon Exp $
#
PKGNAME= ${DISTNAME:S/mozc-/mozc-server-/}
-PKGREVISION= 2
INSTALLATION_DIRS+= libexec
do-build:
cd ${WRKSRC} && env ${MAKE_ENV} \
- ${PYTHONBIN} build_mozc.py build -c Release ${_MAKE_JOBS} \
+ ${PYTHONBIN} build_mozc.py build -c ${MOZC_BUILD_MODE} ${_MAKE_JOBS} \
server/server.gyp:mozc_server
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/Release/mozc_server \
- ${DESTDIR}${PREFIX}/libexec/mozc_server_japanese
+ ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/${MOZC_BUILD_MODE}/mozc_server \
+ ${DESTDIR}${PREFIX}/libexec/mozc_server
.include "../../inputmethod/ibus-mozc/Makefile.common"
diff --git a/inputmethod/mozc-server/PLIST b/inputmethod/mozc-server/PLIST
index 7f1dfb21acd..4c91cdb460d 100644
--- a/inputmethod/mozc-server/PLIST
+++ b/inputmethod/mozc-server/PLIST
@@ -1,2 +1,2 @@
-@comment $NetBSD: PLIST,v 1.1 2013/01/18 11:38:40 ryoon Exp $
-libexec/mozc_server_japanese
+@comment $NetBSD: PLIST,v 1.2 2013/04/29 09:22:04 ryoon Exp $
+libexec/mozc_server
diff --git a/inputmethod/mozc-tool/Makefile b/inputmethod/mozc-tool/Makefile
index 7835b737ca3..675ab997b10 100644
--- a/inputmethod/mozc-tool/Makefile
+++ b/inputmethod/mozc-tool/Makefile
@@ -1,22 +1,19 @@
-# $NetBSD: Makefile,v 1.5 2013/02/16 11:22:44 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2013/04/29 09:22:35 ryoon Exp $
#
PKGNAME= ${DISTNAME:S/mozc-/mozc-tool-/}
-PKGREVISION= 3
INSTALLATION_DIRS+= libexec
-.include "../../x11/qt4-libs/buildlink3.mk"
-
ALL_ENV+= qt_dir=${QTDIR}
do-build:
cd ${WRKSRC} && env ${MAKE_ENV} \
- ${PYTHONBIN} build_mozc.py build -c Release ${_MAKE_JOBS} \
+ ${PYTHONBIN} build_mozc.py build -c ${MOZC_BUILD_MODE} ${_MAKE_JOBS} \
gui/gui.gyp:mozc_tool
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/Release/mozc_tool \
+ ${INSTALL_PROGRAM} ${WRKSRC}/out_${OSDEST}/${MOZC_BUILD_MODE}/mozc_tool \
${DESTDIR}${PREFIX}/libexec
.include "../../inputmethod/ibus-mozc/Makefile.common"