diff options
32 files changed, 268 insertions, 262 deletions
diff --git a/inputmethod/ibus-mozc/Makefile b/inputmethod/ibus-mozc/Makefile index 13c1009e58a..76d76419d36 100644 --- a/inputmethod/ibus-mozc/Makefile +++ b/inputmethod/ibus-mozc/Makefile @@ -1,12 +1,13 @@ -# $NetBSD: Makefile,v 1.9 2013/06/06 12:54:37 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2013/07/20 04:34:53 ryoon Exp $ PKGNAME= ibus-${DISTNAME} -PKGREVISION= 3 INSTALLATION_DIRS+= libexec share/ibus share/icons share/ibus/component \ share/ibus-mozc DEPENDS+= xdg-utils-[0-9]*:../../misc/xdg-utils +DEPENDS+= mozc-server-[0-9]*:../../inputmethod/mozc-server +DEPENDS+= mozc-tool-[0-9]*:../../inputmethod/mozc-tool do-build: cd ${WRKSRC} && env ${MAKE_ENV} \ diff --git a/inputmethod/mozc-elisp/Makefile b/inputmethod/mozc-elisp/Makefile index 68baeb3c438..7da525095b4 100644 --- a/inputmethod/mozc-elisp/Makefile +++ b/inputmethod/mozc-elisp/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2013/06/06 12:54:38 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2013/07/20 04:34:53 ryoon Exp $ # PKGNAME= ${EMACS_PKGNAME_PREFIX}${DISTNAME:S/mozc-/mozc-elisp-/} -PKGREVISION= 3 CATEGORIES= inputmethod editors EMACS_MODULES= base leim diff --git a/inputmethod/mozc-server/Makefile b/inputmethod/mozc-server/Makefile index a37153291da..cbefb1abde0 100644 --- a/inputmethod/mozc-server/Makefile +++ b/inputmethod/mozc-server/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.9 2013/06/06 12:54:38 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2013/07/20 04:34:53 ryoon Exp $ PKGNAME= ${DISTNAME:S/mozc-/mozc-server-/} -PKGREVISION= 3 INSTALLATION_DIRS+= libexec diff --git a/inputmethod/mozc-server/Makefile.common b/inputmethod/mozc-server/Makefile.common index c91d0daa3f1..fcd25cd2219 100644 --- a/inputmethod/mozc-server/Makefile.common +++ b/inputmethod/mozc-server/Makefile.common @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.common,v 1.1 2013/04/29 09:52:16 ryoon Exp $ +# $NetBSD: Makefile.common,v 1.2 2013/07/20 04:34:53 ryoon Exp $ # used by inputmethod/ibus-mozc/Makefile # used by inputmethod/mozc-elisp/Makefile # used by inputmethod/mozc-server/Makefile # used by inputmethod/mozc-tool/Makefile # -DISTNAME= mozc-1.10.1390.102 +DISTNAME= mozc-1.11.1502.102 CATEGORIES= inputmethod MASTER_SITES= http://mozc.googlecode.com/files/ EXTRACT_SUFX= .tar.bz2 @@ -37,15 +37,10 @@ SUBST_STAGE.gyp= pre-configure SUBST_MESSAGE.gyp= Fix gyp defaults SUBST_FILES.gyp+= base/base.gyp SUBST_FILES.gyp+= base/process.cc +SUBST_FILES.gyp+= base/system_util.cc SUBST_FILES.gyp+= handwriting/zinnia_handwriting.cc SUBST_FILES.gyp+= unix/ibus/gen_mozc_xml.py -SUBST_FILES.gyp+= gui/qt_rcc.gypi -SUBST_FILES.gyp+= gui/qt_moc.gypi -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_FILES.gyp+= gyp/common.gypi SUBST_VARS.gyp+= OPENSSL_CFLAGS OPENSSL_INC OPENSSL_LDFLAGS OPENSSL_LIBS SUBST_VARS.gyp+= PREFIX QTDIR diff --git a/inputmethod/mozc-server/distinfo b/inputmethod/mozc-server/distinfo index 4131cea8b8e..669acb4eca8 100644 --- a/inputmethod/mozc-server/distinfo +++ b/inputmethod/mozc-server/distinfo @@ -1,52 +1,50 @@ -$NetBSD: distinfo,v 1.1 2013/04/29 09:52:16 ryoon Exp $ +$NetBSD: distinfo,v 1.2 2013/07/20 04:34:53 ryoon Exp $ -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 (mozc-1.11.1502.102.tar.bz2) = 72c06d409da957d6696bbe1341c118ba4c267877 +RMD160 (mozc-1.11.1502.102.tar.bz2) = 6cee5948fb7e0ab6dc49022caa51a55611ece179 +Size (mozc-1.11.1502.102.tar.bz2) = 58777653 bytes +SHA1 (patch-base_base.gyp) = 329bd8614282aca28fcba30b2e593f488801118d SHA1 (patch-base_cpu__stats.cc) = cda8bbcbc963d8ed635435375cc80ee5e7ca2191 SHA1 (patch-base_crash__report__handler.cc) = 210d3750b5252f19e030c1b235d8e8b65ea38fab SHA1 (patch-base_iconv.cc) = 1bf65dfc6152bf152cbe2714835a61436df2a48b -SHA1 (patch-base_logging.cc) = 56036110c3c2ba21e6fcb35ea2faac83896f4a83 -SHA1 (patch-base_mutex.cc) = 0fe135b4e6f15017c59a13ba7c4019123559c31b +SHA1 (patch-base_logging.cc) = 62259820d980bb7e6ddf81b6d168348a46371b40 +SHA1 (patch-base_mutex.cc) = 3a002e5d2430bc62c29950d3602255503753608c SHA1 (patch-base_mutex.h) = 6c3c8f0845f0fdad815c4877026894000d5eac2c SHA1 (patch-base_password__manager.cc) = cb11b9b707ab0c361c969eefd4d7c805c0b4b06a -SHA1 (patch-base_process.cc) = fcdc1e078023c330f172409f0e26203411b4b0e1 +SHA1 (patch-base_process.cc) = 0979686b20ea4b2e77ffb1bda8fd955baa25d7e1 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) = 57a59d9c6c721d28b8de3203f8b5dea71bc54664 -SHA1 (patch-build__mozc.py) = 9106a7c8b3000eba582aec065e777b2311c86bda +SHA1 (patch-base_system__util.cc) = 5866a8c83f81f060eebf5ec3b67aa4491fdb6dd0 +SHA1 (patch-base_thread.h) = 8aaacbb1421cf0e886f3b58dfd2c653f3d82ef70 +SHA1 (patch-base_util.cc) = db13648d8127e94ec9575752692f31bf81bac68d +SHA1 (patch-build__mozc.py) = 377294ac8c8ccf6b55a63632e9a512f15c479989 SHA1 (patch-build__tools_mozc__version.py) = 47460ca750d8d28652c5c55e5df9b786af4d33c7 -SHA1 (patch-build__tools_util.py) = de5e8be9b06b1a26a79314c469024dd2dd3fb119 +SHA1 (patch-build__tools_util.py) = 1700f2c061bd2501dc78370198cded8cfe7c851a SHA1 (patch-client_client.cc) = 7ca43dde3f207331005599653c6520667e3ca93c SHA1 (patch-config_stats__config__util__test.cc) = db51e6619c5c04ac8fa50890825206ea922dccf2 -SHA1 (patch-gui_base_locale__util.cc) = a501c01d20bb633f8dda9752c7c2175a64b84e91 -SHA1 (patch-gui_config__dialog_config__dialog.cc) = c26c735ebe49c27a0aa170ee01a11b9dce6dad08 +SHA1 (patch-gui_base_locale__util.cc) = 7d1e9cf3c2c36590298496471a97b8c32010a30b +SHA1 (patch-gui_config__dialog_config__dialog.cc) = e8d1f9adeb9dbc9f25deee82e4ace692d92eeb46 SHA1 (patch-gui_config__dialog_keybinding__editor.cc) = 00a6e4bb2c07e3340e188f108f0285a3aa2aceb9 -SHA1 (patch-gui_config__dialog_keymap__editor.cc) = c2439e59756a6c10cfad21d0998952912a2379bd +SHA1 (patch-gui_config__dialog_keymap__editor.cc) = a78a4fb5c484e672b0cfecf38c6713cf74007cb5 SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = d08cc3a91794d0f8eb59a105d0c94eb3f02c0133 SHA1 (patch-gui_gui.gyp) = a27d0a0a3fb6893a691450917cf2798ace1647ed SHA1 (patch-gui_qt__libraries.gypi) = 9faaac9b9fc891050e27b4be0fd899265f4a1173 -SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = eca90653e3276509818690355246841211c95171 +SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 34a7cd2a99a0082f490c3f623c7c6a856c984f8b SHA1 (patch-gui_zinnia.gyp) = 0eaad35b829d2c25e751ce6e99207781306934d5 -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) = 6e92a71e1a616525120760397467955de1cd6156 -SHA1 (patch-ipc_ipc__path__manager__test.cc) = 29c4cd860c8261346bd5c20b214f967134049800 +SHA1 (patch-gyp_common.gypi) = 3a90f34d6f1a34d264abbf59891fd363dbd00848 +SHA1 (patch-handwriting_handwriting.gyp) = 608e45f7bc4edcd434929d9e3a5cb05cee723abc +SHA1 (patch-handwriting_zinnia__handwriting.cc) = dd9363f470bf4a27fed40602f02127cb130042b2 +SHA1 (patch-ipc_ipc__path__manager.cc) = a424e9eabdfa9cb66492fc85ecf9c2659c8e35f9 +SHA1 (patch-ipc_ipc__path__manager__test.cc) = 90ea81daef93dc1ad5cee792ced26a9a2939fbdf SHA1 (patch-ipc_named__event.cc) = 92283261e7580569587e43156f13567b593c9a32 -SHA1 (patch-ipc_unix__ipc.cc) = bfb07eda02415cd1d4ce9303d960d614458476a5 +SHA1 (patch-ipc_unix__ipc.cc) = 5b314ca3eaa0a0036796b98c47d791451688002d SHA1 (patch-languages_chewing_chewing.gyp) = 26fa18398911609a53cff003943436f003772e64 SHA1 (patch-languages_hangul_hangul.gyp) = 685964cd31e91c96f0d41e729441b17ed9ac24f8 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-protobuf_genproto.gypi) = c547573192c666607c26d999f60153283c794208 +SHA1 (patch-protobuf_protobuf.gyp) = 41c7fd41e89e163b02b40d4b44947604b3730b79 +SHA1 (patch-session_session.cc) = 1ca8d62e9bff202cbaaec1bd3503c6df4843b13e SHA1 (patch-session_session__converter__interface.h) = 93bda6e51b9a9ac7146aa23ac0aa28bb017a4465 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) = 978d883a41a5dd823f94d22d62202b5210c1207e -SHA1 (patch-unix_ibus_mozc__engine.cc) = 0ae1220c1253c4d5d0d5eb97e584c12ea38b5c96 +SHA1 (patch-unix_ibus_gen__mozc__xml.py) = 58f6347e8ff448895d2e5996066c8d0d91ffe7ae +SHA1 (patch-unix_ibus_mozc__engine.cc) = 2ce0a680a0fad1abdc646737b6b5a4c3a9e87e6e diff --git a/inputmethod/mozc-server/patches/patch-DEPS b/inputmethod/mozc-server/patches/patch-DEPS deleted file mode 100644 index feb9d8858ef..00000000000 --- a/inputmethod/mozc-server/patches/patch-DEPS +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-DEPS,v 1.1 2013/04/29 09:52:16 ryoon Exp $ - ---- DEPS.orig 2013-03-29 04:33:25.000000000 +0000 -+++ DEPS -@@ -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/mozc-server/patches/patch-base_base.gyp b/inputmethod/mozc-server/patches/patch-base_base.gyp index cc4c95e0bb5..2844d9233c6 100644 --- a/inputmethod/mozc-server/patches/patch-base_base.gyp +++ b/inputmethod/mozc-server/patches/patch-base_base.gyp @@ -1,8 +1,8 @@ -$NetBSD: patch-base_base.gyp,v 1.1 2013/04/29 09:52:16 ryoon Exp $ +$NetBSD: patch-base_base.gyp,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/base.gyp.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/base.gyp.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/base.gyp -@@ -85,7 +85,7 @@ +@@ -86,7 +86,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,9 +11,9 @@ $NetBSD: patch-base_base.gyp,v 1.1 2013/04/29 09:52:16 ryoon Exp $ 'not (target_platform=="NaCl" and _toolset=="target")', { 'defines': [ 'HAVE_LIBRT=1', -@@ -262,23 +262,23 @@ +@@ -287,23 +287,23 @@ ], - } + }, }], - ['OS=="linux" and target_platform!="Android" and ' + ['OS=="netbsd" or (OS=="linux" and target_platform!="Android") and ' diff --git a/inputmethod/mozc-server/patches/patch-base_const.h b/inputmethod/mozc-server/patches/patch-base_const.h deleted file mode 100644 index 369274a0d46..00000000000 --- a/inputmethod/mozc-server/patches/patch-base_const.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-base_const.h,v 1.1 2013/04/29 09:52:16 ryoon Exp $ - ---- base/const.h.orig 2012-08-31 05:37:06.000000000 +0000 -+++ base/const.h -@@ -146,7 +146,7 @@ const char kMozcTool[] = "mozc_tool"; - #ifdef MOZC_SERVER_DIRECTORY - const char kMozcServerDirectory[] = MOZC_SERVER_DIRECTORY; - #else --const char kMozcServerDirectory[] = "/usr/lib/mozc"; -+const char kMozcServerDirectory[] = "@PREFIX@/libexec"; - #endif // MOZC_SERVER_DIRECTORY - #ifdef OS_ANDROID - #ifndef MOZC_ANDROID_APPLICATION_ID diff --git a/inputmethod/mozc-server/patches/patch-base_logging.cc b/inputmethod/mozc-server/patches/patch-base_logging.cc index ca957be1297..d463b992350 100644 --- a/inputmethod/mozc-server/patches/patch-base_logging.cc +++ b/inputmethod/mozc-server/patches/patch-base_logging.cc @@ -1,6 +1,6 @@ -$NetBSD: patch-base_logging.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_logging.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/logging.cc.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/logging.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/logging.cc @@ -61,6 +61,10 @@ #include "base/system_util.h" @@ -18,11 +18,11 @@ $NetBSD: patch-base_logging.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ #if defined(__native_client__) "%p", -#elif defined(OS_LINUX) -+#elif defined(OS_LINUX) || defined (OS_NETBSD) ++#elif defined(OS_LINUX) || defined(OS_NETBSD) "%lu", - #else // = OS_WIN or OS_MACOSX - "%u", -@@ -131,6 +135,9 @@ string Logging::GetLogMessageHeader() { + #elif defined(OS_MACOSX) && defined(__LP64__) + "%llu", +@@ -137,6 +141,9 @@ string Logging::GetLogMessageHeader() { ::getpid(), // pthread_self() returns __nc_basic_thread_data*. static_cast<void*>(pthread_self()) diff --git a/inputmethod/mozc-server/patches/patch-base_mutex.cc b/inputmethod/mozc-server/patches/patch-base_mutex.cc index a45ca926c08..df6b01d97be 100644 --- a/inputmethod/mozc-server/patches/patch-base_mutex.cc +++ b/inputmethod/mozc-server/patches/patch-base_mutex.cc @@ -1,6 +1,6 @@ -$NetBSD: patch-base_mutex.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_mutex.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/mutex.cc.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/mutex.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/mutex.cc @@ -61,7 +61,7 @@ namespace mozc { @@ -20,16 +20,16 @@ $NetBSD: patch-base_mutex.cc,v 1.1 2013/04/29 09:52:17 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) { +@@ -93,7 +93,7 @@ inline int InterlockedCompareExchange(vo return OSAtomicCompareAndSwapInt(old_value, new_value, target) -- ? old_value : *target; -+ ? old_value : *target; || OS_NETBSD + ? old_value : *target; } - #endif // OX_MACOSX +-#endif // OX_MACOSX ++#endif // OS_MACOSX + + } // namespace -@@ -296,7 +296,7 @@ Mutex::Mutex() { +@@ -300,7 +300,7 @@ Mutex::Mutex() { // PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); diff --git a/inputmethod/mozc-server/patches/patch-base_process.cc b/inputmethod/mozc-server/patches/patch-base_process.cc index afb30b153f8..be3fe5044af 100644 --- a/inputmethod/mozc-server/patches/patch-base_process.cc +++ b/inputmethod/mozc-server/patches/patch-base_process.cc @@ -1,6 +1,6 @@ -$NetBSD: patch-base_process.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_process.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/process.cc.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/process.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/process.cc @@ -46,7 +46,7 @@ #include "base/mac_process.h" @@ -11,15 +11,17 @@ $NetBSD: patch-base_process.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ #include <fcntl.h> #include <signal.h> #include <spawn.h> // for posix_spawn(). -@@ -121,7 +121,7 @@ bool Process::OpenBrowser(const string & +@@ -121,8 +121,8 @@ bool Process::OpenBrowser(const string & return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW); #endif -#ifdef OS_LINUX +- static const char kBrowserCommand[] = "/usr/bin/xdg-open"; +#if defined(OS_LINUX) || defined(OS_NETBSD) - static const char kBrowserCommand[] = "/usr/bin/xdg-open"; ++ static const char kBrowserCommand[] = "@PREFIX@/bin/xdg-open"; // xdg-open which uses kfmclient or gnome-open internally works both on KDE // and GNOME environments. + return SpawnProcess(kBrowserCommand, url); @@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string } #endif diff --git a/inputmethod/mozc-server/patches/patch-base_system__util.cc b/inputmethod/mozc-server/patches/patch-base_system__util.cc index 45ef8835687..c0844988ee9 100644 --- a/inputmethod/mozc-server/patches/patch-base_system__util.cc +++ b/inputmethod/mozc-server/patches/patch-base_system__util.cc @@ -1,17 +1,26 @@ -$NetBSD: patch-base_system__util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_system__util.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/system_util.cc.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/system_util.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/system_util.cc -@@ -421,7 +421,7 @@ string SystemUtil::GetServerDirectory() +@@ -421,14 +421,14 @@ 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_ + #if defined(MOZC_SERVER_DIRECTORY) + return MOZC_SERVER_DIRECTORY; + #else +- return "/usr/lib/mozc"; ++ return "@PREFIX@/libexec"; + #endif // MOZC_SERVER_DIRECTORY + +-#endif // OS_WIN, OS_MACOSX, OS_LINUX ++#endif // OS_WIN, OS_MACOSX, OS_LINUX, OS_NETBSD + } + + string SystemUtil::GetServerPath() { +@@ -616,7 +616,7 @@ bool GetCurrentSessionId(DWORD *session_ #endif // OS_WIN string SystemUtil::GetDesktopNameAsString() { @@ -20,7 +29,7 @@ $NetBSD: patch-base_system__util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ const char *display = getenv("DISPLAY"); if (display == NULL) { return ""; -@@ -809,7 +809,7 @@ bool SystemUtil::IsPlatformSupported() { +@@ -815,7 +815,7 @@ bool SystemUtil::IsPlatformSupported() { #if defined(OS_MACOSX) // TODO(yukawa): support Mac. return true; @@ -29,17 +38,23 @@ $NetBSD: patch-base_system__util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ // TODO(yukawa): support Linux. return true; #elif defined(OS_WIN) -@@ -1098,6 +1098,9 @@ string SystemUtil::GetOSVersionString() +@@ -1104,10 +1104,13 @@ string SystemUtil::GetOSVersionString() #elif defined(OS_LINUX) const string ret = "Linux"; return ret; +-#else // !OS_WIN && !OS_MACOSX && !OS_LINUX +#elif defined(OS_NETBSD) + const string ret = "NetBSD"; + return ret; - #else // !OS_WIN && !OS_MACOSX && !OS_LINUX ++#else // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_NETBSD const string ret = "Unknown"; return ret; -@@ -1145,7 +1148,7 @@ uint64 SystemUtil::GetTotalPhysicalMemor +-#endif // OS_WIN, OS_MACOSX, OS_LINUX ++#endif // OS_WIN, OS_MACOSX, OS_LINUX, OS_NETBSD + } + + bool SystemUtil::MacOSVersionIsGreaterOrEqual(int32 major, +@@ -1151,7 +1154,7 @@ uint64 SystemUtil::GetTotalPhysicalMemor return 0; } return total_memory; diff --git a/inputmethod/mozc-server/patches/patch-base_thread.h b/inputmethod/mozc-server/patches/patch-base_thread.h index 03eeb852dac..a51523272c9 100644 --- a/inputmethod/mozc-server/patches/patch-base_thread.h +++ b/inputmethod/mozc-server/patches/patch-base_thread.h @@ -1,14 +1,18 @@ -$NetBSD: patch-base_thread.h,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_thread.h,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/thread.h.orig 2012-08-31 05:37:06.000000000 +0000 +--- base/thread.h.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/thread.h -@@ -55,7 +55,8 @@ +@@ -55,11 +55,11 @@ // Andorid NDK and NaCl don't support TLS. #if defined(OS_LINUX) && !defined(OS_ANDROID) && \ - !defined(__native_client__) && (defined(__GNUC__) || defined(__clang__)) -+ !defined(__native_client__) && (defined(__GNUC__) || defined(__clang__)) \ -+ || defined(OS_NETBSD) ++ !defined(__native_client__) && (defined(__GNUC__) || defined(__clang__)) || defined(OS_NETBSD) // GCC and Clang support TLS. #define TLS_KEYWORD __thread #define HAVE_TLS 1 +-#endif // OS_LINUX && !OS_ANDROID && (__GNUC__ || __clang__) ++#endif // OS_LINUX && !OS_ANDROID && (__GNUC__ || __clang__) || OS_NETBSD + + + #if defined(OS_MACOSX) && MOZC_GCC_VERSION_GE(4, 5) diff --git a/inputmethod/mozc-server/patches/patch-base_util.cc b/inputmethod/mozc-server/patches/patch-base_util.cc index 550fb8e2efe..446e6843109 100644 --- a/inputmethod/mozc-server/patches/patch-base_util.cc +++ b/inputmethod/mozc-server/patches/patch-base_util.cc @@ -1,8 +1,8 @@ -$NetBSD: patch-base_util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-base_util.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- base/util.cc.orig 2013-03-29 04:33:43.000000000 +0000 +--- base/util.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ base/util.cc -@@ -932,7 +932,7 @@ class ClockImpl : public Util::ClockInte +@@ -1087,15 +1087,15 @@ class ClockImpl : public Util::ClockInte mach_timebase_info(&timebase_info); return static_cast<uint64>( 1.0e9 * timebase_info.denom / timebase_info.numer); @@ -11,7 +11,17 @@ $NetBSD: patch-base_util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ #if defined(HAVE_LIBRT) return 1000000000uLL; #else // HAVE_LIBRT -@@ -952,7 +952,7 @@ class ClockImpl : public Util::ClockInte + return 1000000uLL; + #endif // HAVE_LIBRT +-#else // platforms (OS_WIN, OS_MACOSX, OS_LINUX, ...) ++#else // platforms (OS_WIN, OS_MACOSX, OS_LINUX, OS_NETBSD, ...) + #error "Not supported platform" +-#endif // platforms (OS_WIN, OS_MACOSX, OS_LINUX, ...) ++#endif // platforms (OS_WIN, OS_MACOSX, OS_LINUX, OS_NETBSD. ...) + } + + virtual uint64 GetTicks() { +@@ -1107,7 +1107,7 @@ class ClockImpl : public Util::ClockInte return static_cast<uint64>(timestamp.QuadPart); #elif defined(OS_MACOSX) return static_cast<uint64>(mach_absolute_time()); diff --git a/inputmethod/mozc-server/patches/patch-build__mozc.py b/inputmethod/mozc-server/patches/patch-build__mozc.py index e8673e9cf65..02495aab04d 100644 --- a/inputmethod/mozc-server/patches/patch-build__mozc.py +++ b/inputmethod/mozc-server/patches/patch-build__mozc.py @@ -1,6 +1,6 @@ -$NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-build__mozc.py,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- build_mozc.py.orig 2013-03-29 04:33:25.000000000 +0000 +--- build_mozc.py.orig 2013-07-17 02:37:50.000000000 +0000 +++ build_mozc.py @@ -62,6 +62,7 @@ from build_tools.util import GetRelPath from build_tools.util import IsLinux @@ -49,16 +49,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ elif IsWindows(): default_target = 'Windows' elif IsMac(): -@@ -423,7 +435,7 @@ def ParseGypOptions(args=None, values=No - use_zinnia_default = True - - parser.add_option('--server_dir', dest='server_dir', -- default='/usr/lib/mozc', -+ default='@PREFIX@/libexec', - help='A path to the directory to be installed server ' - 'executable. This option is only available for Linux.') - -@@ -477,6 +489,12 @@ def ExpandMetaTarget(options, meta_targe +@@ -490,6 +502,12 @@ def ExpandMetaTarget(options, meta_targe SRC_DIR + '/gui/gui.gyp:mozc_tool'] if PkgExists('ibus-1.0 >= 1.4.1'): targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc') @@ -71,7 +62,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ elif target_platform == 'ChromeOS': targets.append(SRC_DIR + '/unix/ibus/ibus.gyp:ibus_mozc') elif target_platform == 'Mac': -@@ -505,7 +523,7 @@ def ParseBuildOptions(args=None, values= +@@ -517,7 +535,7 @@ def ParseBuildOptions(args=None, values= """Parses command line options for the build command.""" parser = optparse.OptionParser(usage='Usage: %prog build [options]') AddCommonOptions(parser) @@ -80,7 +71,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ default_build_concurrency = GetNumberOfProcessors() * 2 parser.add_option('--jobs', '-j', dest='jobs', default=('%d' % default_build_concurrency), -@@ -525,7 +543,7 @@ def ParseRunTestsOptions(args=None, valu +@@ -537,7 +555,7 @@ def ParseRunTestsOptions(args=None, valu parser = optparse.OptionParser( usage='Usage: %prog runtests [options] [test_targets] [-- build options]') AddCommonOptions(parser) @@ -89,7 +80,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ default_build_concurrency = GetNumberOfProcessors() * 2 parser.add_option('--jobs', '-j', dest='jobs', default=('%d' % default_build_concurrency), -@@ -673,6 +691,8 @@ def GypMain(options, unused_args): +@@ -705,6 +723,8 @@ def GypMain(options, unused_args): command_line.extend(['-D', 'wix_dir=%s' % options.wix_dir]) else: command_line.extend(['-D', 'use_wix=NO']) @@ -98,7 +89,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ android_sdk_home = options.android_sdk_home if version.GetTargetPlatform() == 'Android': -@@ -726,7 +746,7 @@ def GypMain(options, unused_args): +@@ -767,7 +787,7 @@ def GypMain(options, unused_args): def SetCommandLineForFeature(option_name, windows=False, mac=False, linux=False, chromeos=False, android=False, @@ -107,7 +98,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 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 -@@ -750,6 +770,8 @@ def GypMain(options, unused_args): +@@ -791,6 +811,8 @@ def GypMain(options, unused_args): option on Android platform. nacl: A boolean which replesents the default value of the target option on NaCl. @@ -116,41 +107,34 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ Raises: ValueError: An error occurred when 'option_name' is empty. -@@ -763,6 +785,7 @@ def GypMain(options, unused_args): +@@ -804,6 +826,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) -@@ -776,14 +799,17 @@ def GypMain(options, unused_args): +@@ -820,15 +843,18 @@ 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) + mac=is_official_dev, + nacl=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. -@@ -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): +@@ -872,7 +898,8 @@ def GypMain(options, unused_args): command_line.extend(['-D', 'use_zinnia=NO']) if ((options.target_platform == 'Linux' or @@ -160,7 +144,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ '%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names): command_line.extend(['-D', 'use_libibus=1']) -@@ -874,7 +902,7 @@ def GypMain(options, unused_args): +@@ -917,7 +944,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. @@ -169,7 +153,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()]) else: command_line.extend(['-D', 'pkg_config_command=']) -@@ -1043,6 +1071,41 @@ def BuildOnMac(options, targets, origina +@@ -1082,6 +1109,41 @@ def BuildOnMac(options, targets, origina '-parallelizeTargets', 'BUILD_WITH_GYP=1']) @@ -211,7 +195,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ def BuildOnWindows(targets): """Build the target on Windows.""" -@@ -1073,6 +1136,8 @@ def BuildMain(options, targets, original +@@ -1112,6 +1174,8 @@ def BuildMain(options, targets, original BuildOnMac(options, targets, original_directory_name) elif IsLinux(): BuildOnLinux(options, targets, original_directory_name) @@ -220,7 +204,7 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ elif IsWindows(): BuildOnWindows(targets) else: -@@ -1349,7 +1414,7 @@ def CleanBuildFilesAndDirectories(option +@@ -1388,7 +1452,7 @@ def CleanBuildFilesAndDirectories(option elif IsMac(): directory_names.extend(glob.glob(os.path.join(gyp_directory_name, '*.xcodeproj'))) @@ -229,11 +213,10 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 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, -@@ -1397,6 +1462,10 @@ def CleanBuildFilesAndDirectories(option +@@ -1436,6 +1500,9 @@ def CleanBuildFilesAndDirectories(option elif IsWindows(): file_names.append('third_party/breakpad/breakpad.gyp') -+ directory_names.append('out_win') + elif IsNetBSD(): + file_names.append('Makefile') + directory_names.append('out_bsd') diff --git a/inputmethod/mozc-server/patches/patch-build__tools_util.py b/inputmethod/mozc-server/patches/patch-build__tools_util.py index 036b253d240..f9d4e0d1592 100644 --- a/inputmethod/mozc-server/patches/patch-build__tools_util.py +++ b/inputmethod/mozc-server/patches/patch-build__tools_util.py @@ -1,14 +1,15 @@ -$NetBSD: patch-build__tools_util.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-build__tools_util.py,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- build_tools/util.py.orig 2013-03-29 04:33:44.000000000 +0000 +--- build_tools/util.py.orig 2013-07-17 02:37:50.000000000 +0000 +++ build_tools/util.py -@@ -56,6 +56,9 @@ def IsLinux(): +@@ -56,6 +56,10 @@ 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.""" ++ """Returns true if the platform is NetBSD.""" + return os.name == 'posix' and os.uname()[0] == 'NetBSD' ++ def GetNumberOfProcessors(): """Returns the number of CPU cores available. diff --git a/inputmethod/mozc-server/patches/patch-gui_base_locale__util.cc b/inputmethod/mozc-server/patches/patch-gui_base_locale__util.cc index dddf738ccdf..ef2b00d9015 100644 --- a/inputmethod/mozc-server/patches/patch-gui_base_locale__util.cc +++ b/inputmethod/mozc-server/patches/patch-gui_base_locale__util.cc @@ -1,8 +1,20 @@ -$NetBSD: patch-gui_base_locale__util.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-gui_base_locale__util.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- gui/base/locale_util.cc.orig 2013-03-29 04:34:04.000000000 +0000 +--- gui/base/locale_util.cc.orig 2013-07-17 02:38:10.000000000 +0000 +++ gui/base/locale_util.cc -@@ -207,7 +207,7 @@ TranslationDataImpl::TranslationDataImpl +@@ -121,9 +121,9 @@ QString GetUILocaleName() { + + return result; + #else // OS_MACOSX +- // return system locale on Linux ++ // return system locale on Linux or NetBSD + return QLocale::system().name(); +-#endif // OS_LINUX ++#endif // OS_LINUX || OS_NETBSD + } + + // sicnce Qtranslator and QFont must be available until +@@ -206,7 +206,7 @@ TranslationDataImpl::TranslationDataImpl qApp->installEventFilter(&window_title_modifier_); #endif // MOZC_SHOW_BUILD_NUMBER_ON_TITLE diff --git a/inputmethod/mozc-server/patches/patch-gui_config__dialog_config__dialog.cc b/inputmethod/mozc-server/patches/patch-gui_config__dialog_config__dialog.cc index 9883690f77f..d6a00ffb22e 100644 --- a/inputmethod/mozc-server/patches/patch-gui_config__dialog_config__dialog.cc +++ b/inputmethod/mozc-server/patches/patch-gui_config__dialog_config__dialog.cc @@ -1,8 +1,8 @@ -$NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- gui/config_dialog/config_dialog.cc.orig 2013-03-29 04:33:48.000000000 +0000 +--- gui/config_dialog/config_dialog.cc.orig 2013-07-17 02:38:18.000000000 +0000 +++ gui/config_dialog/config_dialog.cc -@@ -96,21 +96,21 @@ ConfigDialog::ConfigDialog() +@@ -97,21 +97,21 @@ ConfigDialog::ConfigDialog() setWindowTitle(tr("Mozc Preferences")); #endif // OS_MACOSX @@ -52,6 +52,6 @@ $NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/04/29 09:52:17 ry -#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_ != + if ((initial_preedit_method_ != + static_cast<int>(config.preedit_method())) || + (initial_use_keyboard_to_change_preedit_method_ != diff --git a/inputmethod/mozc-server/patches/patch-gui_config__dialog_keymap__editor.cc b/inputmethod/mozc-server/patches/patch-gui_config__dialog_keymap__editor.cc index 41a81ca48e0..a5bf93bd057 100644 --- a/inputmethod/mozc-server/patches/patch-gui_config__dialog_keymap__editor.cc +++ b/inputmethod/mozc-server/patches/patch-gui_config__dialog_keymap__editor.cc @@ -1,8 +1,8 @@ -$NetBSD: patch-gui_config__dialog_keymap__editor.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-gui_config__dialog_keymap__editor.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- gui/config_dialog/keymap_editor.cc.orig 2013-03-29 04:33:49.000000000 +0000 +--- gui/config_dialog/keymap_editor.cc.orig 2013-07-17 02:38:20.000000000 +0000 +++ gui/config_dialog/keymap_editor.cc -@@ -449,7 +449,7 @@ bool KeyMapEditorDialog::Update() { +@@ -448,13 +448,13 @@ bool KeyMapEditorDialog::Update() { *keymap_table += invisible_keymap_table_; if (new_ime_switch_keymap != ime_switch_keymap_) { @@ -11,3 +11,10 @@ $NetBSD: patch-gui_config__dialog_keymap__editor.cc,v 1.1 2013/04/29 09:52:17 ry QMessageBox::information( this, windowTitle(), + tr("The keymaps for IME ON and Reconversion will be " + "applied after new applications.")); +-#endif // OS_WIN || OS_LINUX ++#endif // OS_WIN || OS_LINUX || OS_NETBSD + ime_switch_keymap_ = new_ime_switch_keymap; + } + diff --git a/inputmethod/mozc-server/patches/patch-gui_word__register__dialog_word__register__dialog.cc b/inputmethod/mozc-server/patches/patch-gui_word__register__dialog_word__register__dialog.cc index cd646e982f1..c9ce1666ec8 100644 --- a/inputmethod/mozc-server/patches/patch-gui_word__register__dialog_word__register__dialog.cc +++ b/inputmethod/mozc-server/patches/patch-gui_word__register__dialog_word__register__dialog.cc @@ -1,13 +1,16 @@ -$NetBSD: patch-gui_word__register__dialog_word__register__dialog.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-gui_word__register__dialog_word__register__dialog.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- 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.orig 2013-07-17 02:38:14.000000000 +0000 +++ gui/word_register_dialog/word_register_dialog.cc -@@ -82,7 +82,7 @@ QString GetEnv(const char *envname) { +@@ -81,9 +81,9 @@ QString GetEnv(const char *envname) { } return ""; #endif // OS_WIN -#if defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_NETBSD) return ::getenv(envname); - #endif // OS_MACOSX or OS_LINUX +-#endif // OS_MACOSX or OS_LINUX ++#endif // OS_MACOSX or OS_LINUX or OS_NETBSD // TODO(team): Support other platforms. + return ""; + } diff --git a/inputmethod/mozc-server/patches/patch-gyp_common.gypi b/inputmethod/mozc-server/patches/patch-gyp_common.gypi index e64868affa6..cbf4d44db68 100644 --- a/inputmethod/mozc-server/patches/patch-gyp_common.gypi +++ b/inputmethod/mozc-server/patches/patch-gyp_common.gypi @@ -1,9 +1,17 @@ -$NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-gyp_common.gypi,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- gyp/common.gypi.orig 2013-03-29 04:33:42.000000000 +0000 +--- gyp/common.gypi.orig 2013-07-17 02:38:04.000000000 +0000 +++ gyp/common.gypi -@@ -132,7 +132,7 @@ - 'conditions': [ +@@ -101,6 +101,7 @@ + '-include base/namespace.h', + '-pipe', + '-pthread', ++ '-std=c++0x', + ], + # linux_cflags will be used in Linux except for NaCl. + 'linux_cflags': [ +@@ -150,7 +151,7 @@ + }], # enable_gtk_renderer represents if mozc_renderer is supported on Linux # or not. - ['target_platform=="Linux" and language=="japanese"', { @@ -11,7 +19,16 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $ 'enable_gtk_renderer%': 1, }, { # else 'enable_gtk_renderer%': 0, -@@ -283,12 +283,12 @@ +@@ -206,7 +207,7 @@ + + # server_dir represents the directory where mozc_server is + # installed. This option is only for Linux. +- 'server_dir%': '/usr/lib/mozc', ++ 'server_dir%': '@PREFIX@/libexec', + + # use_libprotobuf represents if protobuf library is used or not. + # This option is only for Linux. +@@ -309,12 +310,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. @@ -26,7 +43,7 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $ 'ldflags': [ '<@(linux_ldflags)', ], -@@ -447,7 +447,7 @@ +@@ -473,7 +474,7 @@ }, }, 'conditions': [ @@ -35,7 +52,7 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $ 'cflags': [ '<@(debug_extra_cflags)', ], -@@ -485,7 +485,7 @@ +@@ -511,7 +512,7 @@ }, }, 'conditions': [ @@ -44,7 +61,7 @@ $NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $ 'cflags': [ '<@(release_extra_cflags)', ], -@@ -785,6 +785,22 @@ +@@ -825,6 +826,22 @@ }], ], }], diff --git a/inputmethod/mozc-server/patches/patch-handwriting_handwriting.gyp b/inputmethod/mozc-server/patches/patch-handwriting_handwriting.gyp index 2b04e7310b0..8ad6fd68dc9 100644 --- a/inputmethod/mozc-server/patches/patch-handwriting_handwriting.gyp +++ b/inputmethod/mozc-server/patches/patch-handwriting_handwriting.gyp @@ -1,13 +1,19 @@ -$NetBSD: patch-handwriting_handwriting.gyp,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-handwriting_handwriting.gyp,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- handwriting/handwriting.gyp.orig 2013-03-29 04:33:25.000000000 +0000 +--- handwriting/handwriting.gyp.orig 2013-07-17 02:38:04.000000000 +0000 +++ handwriting/handwriting.gyp -@@ -39,7 +39,7 @@ - '../base/base.gyp:base', +@@ -43,12 +43,12 @@ '../gui/zinnia.gyp:zinnia', ], -- 'conditions': [['use_libzinnia==1 and OS=="linux"', { -+ 'conditions': [['use_libzinnia==1 and (OS=="linux" or OS=="netbsd")', { - 'defines': [ - 'USE_LIBZINNIA', - ], + 'conditions': [ +- ['target_platform=="Linux" and use_libzinnia==1', { ++ ['(target_platform=="Linux" or target_platform=="NetBSD") and use_libzinnia==1', { + 'defines': [ + 'USE_LIBZINNIA', + ], + }], +- ['target_platform=="Linux" and use_libzinnia==1 and zinnia_model_file!=""', { ++ ['(target_platform=="Linux" or target_platform=="NetBSD") and use_libzinnia==1 and zinnia_model_file!=""', { + 'defines': [ + 'MOZC_ZINNIA_MODEL_FILE="<(zinnia_model_file)"', + ], diff --git a/inputmethod/mozc-server/patches/patch-handwriting_zinnia__handwriting.cc b/inputmethod/mozc-server/patches/patch-handwriting_zinnia__handwriting.cc index 9d1269e7e2c..00467380031 100644 --- a/inputmethod/mozc-server/patches/patch-handwriting_zinnia__handwriting.cc +++ b/inputmethod/mozc-server/patches/patch-handwriting_zinnia__handwriting.cc @@ -1,15 +1,15 @@ -$NetBSD: patch-handwriting_zinnia__handwriting.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-handwriting_zinnia__handwriting.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ * Not confirmed yet. ---- handwriting/zinnia_handwriting.cc.orig 2012-08-31 05:37:06.000000000 +0000 +--- handwriting/zinnia_handwriting.cc.orig 2013-07-17 02:38:04.000000000 +0000 +++ handwriting/zinnia_handwriting.cc -@@ -52,7 +52,7 @@ string GetModelFileName() { - #elif defined(USE_LIBZINNIA) - // On Linux, use the model for tegaki-zinnia. +@@ -57,7 +57,7 @@ string ZinniaHandwriting::GetModelFileNa + const char kModelFile[] = MOZC_ZINNIA_MODEL_FILE; + #else const char kModelFile[] = - "/usr/share/tegaki/models/zinnia/handwriting-ja.model"; + "@PREFIX@/share/tegaki/models/zinnia/handwriting-ja.model"; + #endif // MOZC_ZINNIA_MODEL_FILE return kModelFile; #else - const char kModelFile[] = "handwriting-ja.model"; diff --git a/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager.cc b/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager.cc index 7106da70f69..4f90c2bff98 100644 --- a/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager.cc +++ b/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager.cc @@ -1,6 +1,6 @@ -$NetBSD: patch-ipc_ipc__path__manager.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-ipc_ipc__path__manager.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- ipc/ipc_path_manager.cc.orig 2013-03-29 04:33:26.000000000 +0000 +--- ipc/ipc_path_manager.cc.orig 2013-07-17 02:37:50.000000000 +0000 +++ ipc/ipc_path_manager.cc @@ -44,6 +44,11 @@ #endif // OS_MACOSX @@ -14,11 +14,10 @@ $NetBSD: patch-ipc_ipc__path__manager.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ #include <cstdlib> #include <map> -@@ -427,7 +432,24 @@ bool IPCPathManager::IsValidServer(uint3 +@@ -427,6 +432,23 @@ bool IPCPathManager::IsValidServer(uint3 return true; } --#ifdef OS_LINUX +#if defined(OS_NETBSD) + int name[] = { CTL_KERN, KERN_PROC_ARGS, pid }; + size_t data_len = 0; @@ -34,9 +33,8 @@ $NetBSD: patch-ipc_ipc__path__manager.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ + LOG(ERROR) << "sysctl KERN_PROC_ARGS failed"; + return false; + } -+#endif ++#endif // OS_NETBSD + -+#if defined(OS_LINUX) + #ifdef 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/mozc-server/patches/patch-ipc_ipc__path__manager__test.cc b/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager__test.cc index 9168f98bffa..8bf3300a84b 100644 --- a/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager__test.cc +++ b/inputmethod/mozc-server/patches/patch-ipc_ipc__path__manager__test.cc @@ -1,13 +1,13 @@ -$NetBSD: patch-ipc_ipc__path__manager__test.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-ipc_ipc__path__manager__test.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- ipc/ipc_path_manager_test.cc.orig 2013-03-29 04:33:26.000000000 +0000 +--- ipc/ipc_path_manager_test.cc.orig 2013-07-17 02:37:50.000000000 +0000 +++ ipc/ipc_path_manager_test.cc @@ -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 defned(OS_LINUX) || defined(OS_NETBSD) ++#if defined(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/mozc-server/patches/patch-ipc_unix__ipc.cc b/inputmethod/mozc-server/patches/patch-ipc_unix__ipc.cc index 7357d1070a5..354fa8a5a99 100644 --- a/inputmethod/mozc-server/patches/patch-ipc_unix__ipc.cc +++ b/inputmethod/mozc-server/patches/patch-ipc_unix__ipc.cc @@ -1,13 +1,13 @@ -$NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ +$NetBSD: patch-ipc_unix__ipc.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- ipc/unix_ipc.cc.orig 2013-03-29 04:33:26.000000000 +0000 +--- ipc/unix_ipc.cc.orig 2013-07-17 02:37:50.000000000 +0000 +++ ipc/unix_ipc.cc @@ -28,7 +28,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // skip all if non-Linux or Android. -#if defined(OS_LINUX) && !defined(OS_ANDROID) -+#if (defined(OS_LINUX) && !defined(OS_ANDROID)) || defined(OS_NETBSD) ++#if defined(OS_LINUX) && !defined(OS_ANDROID) || defined(OS_NETBSD) #include "ipc/ipc.h" @@ -20,10 +20,13 @@ $NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ 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__ +@@ -143,7 +143,23 @@ bool IsPeerValid(int socket, pid_t *pid) + } + *pid = peer_cred.pid; +-#endif // __arm__ ++#endif // __arm__, OS_NETBSD ++ +#if defined(OS_NETBSD) + struct unpcbid peer_cred; + int peer_cred_len = sizeof(peer_cred); @@ -39,7 +42,6 @@ $NetBSD: patch-ipc_unix__ipc.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $ + return false; + } +#endif -+ + return true; } - diff --git a/inputmethod/mozc-server/patches/patch-protobuf_genproto.gypi b/inputmethod/mozc-server/patches/patch-protobuf_genproto.gypi index e73fa2bab7c..03e0574ea3c 100644 --- a/inputmethod/mozc-server/patches/patch-protobuf_genproto.gypi +++ b/inputmethod/mozc-server/patches/patch-protobuf_genproto.gypi @@ -1,28 +1,13 @@ -$NetBSD: patch-protobuf_genproto.gypi,v 1.1 2013/04/29 09:52:18 ryoon Exp $ +$NetBSD: patch-protobuf_genproto.gypi,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- protobuf/genproto.gypi.orig 2013-03-29 04:33:43.000000000 +0000 +--- protobuf/genproto.gypi.orig 2013-07-17 02:38:05.000000000 +0000 +++ protobuf/genproto.gypi -@@ -33,19 +33,19 @@ - 'wrapper_path': '<(DEPTH)/build_tools/protoc_wrapper.py', +@@ -34,7 +34,7 @@ + 'protoc_command': 'protoc<(EXECUTABLE_SUFFIX)', }, 'conditions': [ -- ['target_platform!="linux"', { +- ['target_platform!="Linux"', { + ['target_platform!="Linux" and target_platform!="NetBSD"', { 'variables': { -- 'protoc_command%': '<(mozc_build_tools_dir)/protoc<(EXECUTABLE_SUFFIX)', -+ 'protoc_command%': '@PREFIX@/bin/protoc<(EXECUTABLE_SUFFIX)', + 'protoc_wrapper_additional_options': ['--protoc_dir=<(mozc_build_tools_dir)'], }, - }, { # else - 'conditions': [ - ['use_libprotobuf==0', { - 'variables': { -- '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/mozc-server/patches/patch-protobuf_protobuf.gyp b/inputmethod/mozc-server/patches/patch-protobuf_protobuf.gyp index 2543f585363..df67798b293 100644 --- a/inputmethod/mozc-server/patches/patch-protobuf_protobuf.gyp +++ b/inputmethod/mozc-server/patches/patch-protobuf_protobuf.gyp @@ -1,13 +1,13 @@ -$NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2013/04/29 09:52:18 ryoon Exp $ +$NetBSD: patch-protobuf_protobuf.gyp,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- protobuf/protobuf.gyp.orig 2013-03-29 04:33:43.000000000 +0000 +--- protobuf/protobuf.gyp.orig 2013-07-17 02:38:05.000000000 +0000 +++ protobuf/protobuf.gyp @@ -140,7 +140,7 @@ ], 'conditions': [ # for gcc and clang - ['OS=="linux" or OS=="mac"', { -+ ['OS=="linux" or OS=="mac" OS=="netbsd"', { ++ ['OS=="linux" or OS=="mac" or OS=="netbsd"', { 'cflags': [ '-Wno-conversion-null', # coded_stream.cc uses NULL to bool. '-Wno-unused-function', diff --git a/inputmethod/mozc-server/patches/patch-session_session.cc b/inputmethod/mozc-server/patches/patch-session_session.cc index c99086a59af..db005ac0d22 100644 --- a/inputmethod/mozc-server/patches/patch-session_session.cc +++ b/inputmethod/mozc-server/patches/patch-session_session.cc @@ -1,13 +1,13 @@ -$NetBSD: patch-session_session.cc,v 1.1 2013/04/29 09:52:18 ryoon Exp $ +$NetBSD: patch-session_session.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ ---- session/session.cc.orig 2013-03-29 04:33:25.000000000 +0000 +--- session/session.cc.orig 2013-07-17 02:38:03.000000000 +0000 +++ session/session.cc -@@ -1100,7 +1100,7 @@ void Session::UpdateOperationPreferences +@@ -1133,7 +1133,7 @@ void Session::UpdateOperationPreferences } // Cascading Window. -#ifndef OS_LINUX -+#if !defined(OS_LINUX) or !defined(OS_NETBSD) ++#if defined(OS_LINUX) || defined(OS_NETBSD) if (config.has_use_cascading_window()) { operation_preferences.use_cascading_window = config.use_cascading_window(); } diff --git a/inputmethod/mozc-server/patches/patch-unix_ibus_gen__mozc__xml.py b/inputmethod/mozc-server/patches/patch-unix_ibus_gen__mozc__xml.py index b97825d0c71..798d1a6393d 100644 --- a/inputmethod/mozc-server/patches/patch-unix_ibus_gen__mozc__xml.py +++ b/inputmethod/mozc-server/patches/patch-unix_ibus_gen__mozc__xml.py @@ -1,8 +1,8 @@ -$NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.1 2013/04/29 09:52:18 ryoon Exp $ +$NetBSD: patch-unix_ibus_gen__mozc__xml.py,v 1.2 2013/07/20 04:34:53 ryoon Exp $ * Fix for pkgsrc installation. ---- unix/ibus/gen_mozc_xml.py.orig 2013-03-29 04:33:43.000000000 +0000 +--- unix/ibus/gen_mozc_xml.py.orig 2013-07-17 02:37:50.000000000 +0000 +++ unix/ibus/gen_mozc_xml.py @@ -49,7 +49,7 @@ IBUS_COMPONENT_PROPS = { 'description': '%s Component', diff --git a/inputmethod/mozc-server/patches/patch-unix_ibus_mozc__engine.cc b/inputmethod/mozc-server/patches/patch-unix_ibus_mozc__engine.cc index 8f3001b7be0..ddc51b71fb4 100644 --- a/inputmethod/mozc-server/patches/patch-unix_ibus_mozc__engine.cc +++ b/inputmethod/mozc-server/patches/patch-unix_ibus_mozc__engine.cc @@ -1,15 +1,15 @@ -$NetBSD: patch-unix_ibus_mozc__engine.cc,v 1.1 2013/04/29 09:52:18 ryoon Exp $ +$NetBSD: patch-unix_ibus_mozc__engine.cc,v 1.2 2013/07/20 04:34:53 ryoon Exp $ * I am not sure. ---- unix/ibus/mozc_engine.cc.orig 2012-08-31 05:36:43.000000000 +0000 +--- unix/ibus/mozc_engine.cc.orig 2013-07-17 02:37:50.000000000 +0000 +++ unix/ibus/mozc_engine.cc -@@ -756,7 +756,7 @@ bool MozcEngine::ExecuteCallback(IBusEng - // on size_t, not uint32. - string selection_text; - const uint32 selection_start = min(cursor_pos, anchor_pos); -- const uint32 selection_length = abs(relative_selected_length); -+ const uint32 selection_length = ::abs(relative_selected_length); - Util::SubString(surrounding_text, - selection_start, - selection_length, +@@ -265,7 +265,7 @@ bool GetSurroundingText(IBusEngine *engi + } + + const uint32 selection_start = min(cursor_pos, anchor_pos); +- const uint32 selection_length = abs(info->relative_selected_length); ++ const uint32 selection_length = ::abs(info->relative_selected_length); + info->preceding_text = surrounding_text.substr(0, selection_start); + Util::SubString(surrounding_text, + selection_start, diff --git a/inputmethod/mozc-tool/Makefile b/inputmethod/mozc-tool/Makefile index bcf107ef7be..efe694e5afc 100644 --- a/inputmethod/mozc-tool/Makefile +++ b/inputmethod/mozc-tool/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.10 2013/06/06 12:54:38 wiz Exp $ +# $NetBSD: Makefile,v 1.11 2013/07/20 04:34:53 ryoon Exp $ PKGNAME= ${DISTNAME:S/mozc-/mozc-tool-/} -PKGREVISION= 3 INSTALLATION_DIRS+= libexec |