Import of pkgsrc-2014Q1

This commit is contained in:
2014-04-17 16:38:45 +02:00
parent 785076ae39
commit 9a8c06dafb
19365 changed files with 828089 additions and 278039 deletions

View File

@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.9 2013/06/06 12:54:38 wiz Exp $
# $NetBSD: Makefile,v 1.16 2014/02/12 23:18:04 tron Exp $
PKGNAME= ${DISTNAME:S/mozc-/mozc-server-/}
PKGREVISION= 3
PKGREVISION= 2
INSTALLATION_DIRS+= libexec

View File

@@ -1,11 +1,13 @@
# $NetBSD: Makefile.common,v 1.1 2013/04/29 09:52:16 ryoon Exp $
# $NetBSD: Makefile.common,v 1.8 2014/03/27 19:28:33 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
# used by inputmethod/mozc-renderer/Makefile
# used by inputmethod/uim-mozc/Makefile
#
DISTNAME= mozc-1.10.1390.102
DISTNAME= mozc-1.13.1651.102
CATEGORIES= inputmethod
MASTER_SITES= http://mozc.googlecode.com/files/
EXTRACT_SUFX= .tar.bz2
@@ -20,7 +22,12 @@ PATCHDIR= ${.CURDIR}/../../inputmethod/mozc-server/patches
BUILD_DEPENDS+= ${PYPKGPREFIX}-gyp-[0-9]*:../../devel/gyp
PYTHON_VERSIONS_INCOMPATIBLE= 33 # py-gyp
USE_LANGUAGES= c c++
# nullptr requires -std=c++11, and -std=c++11 requires gcc 4.7 or later
GCC_REQD+= 4.7
CXXFLAGS+= -std=c++11
USE_TOOLS+= gmake pkg-config
@@ -37,15 +44,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
@@ -64,14 +66,15 @@ 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 ${MOZC_BUILD_MODE} ${_MAKE_JOBS}
${PYTHONBIN} build_mozc.py gyp \
--gypdir=${GYPDIR}/bin && \
${PYTHONBIN} build_mozc.py build_tools -c ${MOZC_BUILD_MODE} \
${_MAKE_JOBS}
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/protobuf/buildlink3.mk"
# gmock is not used yet...
#.include "../../devel/gmock/buildlink3.mk"
.include "../../inputmethod/ibus/buildlink3.mk"
.include "../../inputmethod/zinnia/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../x11/qt4-libs/buildlink3.mk"

View File

@@ -1,52 +1,50 @@
$NetBSD: distinfo,v 1.1 2013/04/29 09:52:16 ryoon Exp $
$NetBSD: distinfo,v 1.6 2014/01/20 10:39:29 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.13.1651.102.tar.bz2) = 24680b3d350e5332f2235b9c1342127f6ef0fd63
RMD160 (mozc-1.13.1651.102.tar.bz2) = 260a23c2f9f3b909aefe63c865f3b87013d2fb53
Size (mozc-1.13.1651.102.tar.bz2) = 31635636 bytes
SHA1 (uim-mozc-331.tar.xz) = 760d1deb5964358d1dc064e44d45eec38d94d9ec
RMD160 (uim-mozc-331.tar.xz) = db4df92b8adc0e6202cf7f61c326b1503e157d9b
Size (uim-mozc-331.tar.xz) = 30580 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_crash__report__handler.cc) = 28e581ffef8a108aff372c79b3578686472cb464
SHA1 (patch-base_iconv.cc) = 1bf65dfc6152bf152cbe2714835a61436df2a48b
SHA1 (patch-base_logging.cc) = 56036110c3c2ba21e6fcb35ea2faac83896f4a83
SHA1 (patch-base_mutex.cc) = 0fe135b4e6f15017c59a13ba7c4019123559c31b
SHA1 (patch-base_logging.cc) = 96ee9d1426ef1cf946a00fb15c9754603ab15bb8
SHA1 (patch-base_mutex.cc) = aed8588d4ff7b057fed072097ef09ddbc2696d31
SHA1 (patch-base_mutex.h) = 6c3c8f0845f0fdad815c4877026894000d5eac2c
SHA1 (patch-base_password__manager.cc) = cb11b9b707ab0c361c969eefd4d7c805c0b4b06a
SHA1 (patch-base_process.cc) = fcdc1e078023c330f172409f0e26203411b4b0e1
SHA1 (patch-base_password__manager.cc) = f16982447f54e397d1aa103260d8f4d10aa76f96
SHA1 (patch-base_process.cc) = abdd6a955e87506972e7f71fd4bc3a300f49b304
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-build__tools_mozc__version.py) = 47460ca750d8d28652c5c55e5df9b786af4d33c7
SHA1 (patch-build__tools_util.py) = de5e8be9b06b1a26a79314c469024dd2dd3fb119
SHA1 (patch-base_system__util.cc) = f3ef575a15cd518fe7d29264b39f775ccf502802
SHA1 (patch-base_thread.h) = 8aaacbb1421cf0e886f3b58dfd2c653f3d82ef70
SHA1 (patch-base_util.cc) = c473cb595535075b53c9c235fc28f5e7da26d087
SHA1 (patch-build__mozc.py) = a8b4596c9c5f86ca8dbbf3ea03e1873ff86baa00
SHA1 (patch-build__tools_mozc__version.py) = a6ff8a82b1328086b7d758f73a7d3c31e87bccc9
SHA1 (patch-build__tools_util.py) = 6416884ba288d60eb8e558e8c5de7ef6e538b82e
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) = aae18b7ea36fd5ff5758625875a04634ffdfd68a
SHA1 (patch-gui_config__dialog_keybinding__editor.cc) = 00a6e4bb2c07e3340e188f108f0285a3aa2aceb9
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) = 9faaac9b9fc891050e27b4be0fd899265f4a1173
SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = eca90653e3276509818690355246841211c95171
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-gui_config__dialog_keymap__editor.cc) = a78a4fb5c484e672b0cfecf38c6713cf74007cb5
SHA1 (patch-gui_dictionary__tool_dictionary__tool.cc) = 0ce41d4522c837836bad345cf82cb4741e7af4d0
SHA1 (patch-gui_gui.gyp) = 70b6d78ca5a482b9e8fa697dbb191cccbdde1c6a
SHA1 (patch-gui_qt__libraries.gypi) = 2b00307c22380d0d1c60b5d98ce08970b0e74f09
SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 34a7cd2a99a0082f490c3f623c7c6a856c984f8b
SHA1 (patch-gyp_common.gypi) = 69095a357de9d871c93fc8effda95568068bedab
SHA1 (patch-handwriting_handwriting.gyp) = 0261aef287b34f4a3c8424fb1af44720ae00a85c
SHA1 (patch-handwriting_zinnia.gyp) = d09ac17d17dabdbfdcb7c623193a5c72dbcacfbc
SHA1 (patch-handwriting_zinnia__handwriting.cc) = dd9363f470bf4a27fed40602f02127cb130042b2
SHA1 (patch-ipc_ipc__path__manager.cc) = c96fbac6d1d81ddd7f999c30bdc2539ee2df2564
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-languages_chewing_chewing.gyp) = 26fa18398911609a53cff003943436f003772e64
SHA1 (patch-languages_hangul_hangul.gyp) = 685964cd31e91c96f0d41e729441b17ed9ac24f8
SHA1 (patch-ipc_unix__ipc.cc) = d821deb2f38bf77bf6b364eb31d419c0a86c1a7f
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) = 601165a376bcd05983f87733285737ee043c13fe
SHA1 (patch-protobuf_protobuf.gyp) = 60abe727c1475e50295a5e811dccf8deb710e18a
SHA1 (patch-session_session.cc) = 0562f8646dc6f68e180d8ae98f00eeb0364fc473
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) = 9d7e1da07854c2244a22ffe5034fabb25d16d266
SHA1 (patch-unix_ibus_mozc__engine.cc) = 2ce0a680a0fad1abdc646737b6b5a4c3a9e87e6e

View File

@@ -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"),

View File

@@ -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 '

View File

@@ -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

View File

@@ -1,13 +1,19 @@
$NetBSD: patch-base_crash__report__handler.cc,v 1.1 2013/04/29 09:52:16 ryoon Exp $
$NetBSD: patch-base_crash__report__handler.cc,v 1.3 2014/01/19 01:18:50 ryoon Exp $
--- base/crash_report_handler.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/crash_report_handler.cc.orig 2014-01-06 07:10:31.000000000 +0000
+++ base/crash_report_handler.cc
@@ -364,7 +364,7 @@ void CrashReportHandler::SetCriticalSect
}
@@ -346,7 +346,7 @@ void CrashReportHandler::SetCriticalSect
} // namespace mozc
-#elif defined(OS_LINUX) // OS_WIN
+#elif defined(OS_LINUX) || defined(OS_NETBSD) // OS_WIN
-#else
+#elif defined(OS_LINUX) || defined(OS_NETBSD) // OS_WIN
namespace mozc {
@@ -372,4 +372,4 @@ void CrashReportHandler::SetCriticalSect
} // namespace mozc
-#endif
+#endif // OS_WIN OS_LINUX OS_NETBSD

View File

@@ -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.3 2013/09/15 12:30:23 joerg Exp $
--- base/logging.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/logging.cc.orig 2013-08-28 05:26:13.000000000 +0000
+++ base/logging.cc
@@ -61,6 +61,10 @@
#include "base/system_util.h"
@@ -18,17 +18,17 @@ $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())
+#elif defined(OS_NETBSD)
+ ::getpid(),
+ _lwp_self()
+ (unsigned long)_lwp_self()
#else // = OS_LINUX
::getpid(),
// It returns unsigned long.

View File

@@ -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.3 2013/09/07 18:42:14 ryoon Exp $
--- base/mutex.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/mutex.cc.orig 2013-08-28 05:26:13.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
@@ -296,7 +296,7 @@ Mutex::Mutex() {
} // namespace
@@ -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);

View File

@@ -1,11 +1,11 @@
$NetBSD: patch-base_password__manager.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-base_password__manager.cc,v 1.2 2014/01/19 01:18:50 ryoon Exp $
--- base/password_manager.cc.orig 2012-08-31 05:37:06.000000000 +0000
--- base/password_manager.cc.orig 2014-01-06 07:10:31.000000000 +0000
+++ base/password_manager.cc
@@ -366,7 +366,7 @@ class DeprecatedMacPasswordManager : pub
// this module to other Linux distro, you might want to implement
// a new password manager which adopts some secure mechanism such
// like gnome-keyring.
@@ -264,7 +264,7 @@ bool WinMacPasswordManager::RemovePasswo
// We use plain text file for password storage on Linux. If you port this module
// to other Linux distro, you might want to implement a new password manager
// which adopts some secure mechanism such like gnome-keyring.
-#if defined OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
typedef PlainPasswordManager DefaultPasswordManager;

View File

@@ -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.3 2013/09/07 18:42:14 ryoon Exp $
--- base/process.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/process.cc.orig 2013-08-28 05:26:13.000000000 +0000
+++ base/process.cc
@@ -46,7 +46,7 @@
#include "base/mac_process.h"
@@ -11,15 +11,22 @@ $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,12 +121,12 @@ 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);
-#endif // LINUX
+#endif // OS_LINUX || OS_NETBSD
#ifdef OS_MACOSX
return MacProcess::OpenBrowserForMac(url);
@@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string
}
#endif

View File

@@ -1,17 +1,35 @@
$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.3 2013/09/07 18:42:14 ryoon Exp $
--- base/system_util.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/system_util.cc.orig 2013-08-28 05:26:13.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() {
@@ -493,7 +493,7 @@ string SystemUtil::GetUserNameAsString()
return ppw->pw_name;
#else // OS_ANDROID
- // OS_MACOSX or OS_LINUX
+ // OS_MACOSX or OS_LINUX, OS_NETBSD
struct passwd pw, *ppw;
char buf[1024];
CHECK_EQ(0, getpwuid_r(geteuid(), &pw, buf, sizeof(buf), &ppw));
@@ -653,7 +653,7 @@ string GetSessionIdString() {
#endif // OS_WIN
string SystemUtil::GetDesktopNameAsString() {
@@ -20,7 +38,16 @@ $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() {
@@ -683,7 +683,7 @@ string SystemUtil::GetDesktopNameAsStrin
}
return (session_id + "." + window_station_name + "." + desktop_name);
-#endif // OS_LINUX, OS_MACOSX, OS_WIN
+#endif // OS_LINUX, OS_MACOSX, OS_WIN, OS_NETBSD
}
#ifdef OS_WIN
@@ -858,7 +858,7 @@ bool SystemUtil::IsPlatformSupported() {
#if defined(OS_MACOSX)
// TODO(yukawa): support Mac.
return true;
@@ -29,17 +56,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()
@@ -1157,10 +1157,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,
@@ -1204,7 +1207,7 @@ uint64 SystemUtil::GetTotalPhysicalMemor
return 0;
}
return total_memory;

View File

@@ -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)

View File

@@ -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.3 2013/09/07 18:42:14 ryoon Exp $
--- base/util.cc.orig 2013-03-29 04:33:43.000000000 +0000
--- base/util.cc.orig 2013-08-28 05:26:13.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());

View File

@@ -1,25 +1,25 @@
$NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-build__mozc.py,v 1.4 2014/01/19 01:18:50 ryoon Exp $
--- build_mozc.py.orig 2013-03-29 04:33:25.000000000 +0000
--- build_mozc.py.orig 2014-01-06 07:10:26.000000000 +0000
+++ build_mozc.py
@@ -62,6 +62,7 @@ from build_tools.util import GetRelPath
@@ -60,6 +60,7 @@ from build_tools.util import FindFileFro
from build_tools.util import GetNumberOfProcessors
from build_tools.util import GetRelPath
from build_tools.util import IsLinux
+from build_tools.util import IsNetBSD
from build_tools.util import IsMac
from build_tools.util import IsWindows
+from build_tools.util import IsNetBSD
from build_tools.util import PrintErrorAndExit
from build_tools.util import RemoveDirectoryRecursively
from build_tools.util import RemoveFile
@@ -116,6 +117,8 @@ def GetBuildBaseName(options, target_pla
@@ -120,6 +121,8 @@ def GetBuildBaseName(options, target_pla
build_base = 'out_mac'
elif target_platform == 'Linux' or target_platform == 'ChromeOS':
elif target_platform == 'Linux':
build_base = 'out_linux'
+ elif target_platform == 'NetBSD':
+ build_base = 'out_bsd'
elif target_platform == 'Android':
build_base = 'out_android'
elif target_platform == 'NaCl':
@@ -219,6 +222,12 @@ def GetGypFileNames(options):
@@ -214,6 +217,14 @@ def GetGypFileNames(options):
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)
@@ -29,18 +29,12 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $
+ 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 == '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.')
+ parser.add_option('--os', dest='os', default='linux')
return parser
@@ -286,6 +296,8 @@ def AddTargetPlatformOption(parser):
# Add chrome NaCl Mozc gyp scripts.
gyp_file_names.append('%s/chrome/nacl/nacl_extension.gyp' % SRC_DIR)
@@ -309,6 +320,8 @@ def AddTargetPlatformOption(parser):
# If you want Android build, specify "Android".
if IsLinux():
default_target = 'Linux'
@@ -49,16 +43,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
@@ -506,6 +519,14 @@ 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')
@@ -68,10 +53,12 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $
+ 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')
elif target_platform == 'ChromeOS':
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':
@@ -505,7 +523,7 @@ def ParseBuildOptions(args=None, values=
targets = [SRC_DIR + '/mac/mac.gyp:DiskImage']
elif target_platform == 'Windows':
@@ -531,7 +552,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,57 +67,44 @@ $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
@@ -551,7 +572,7 @@ def ParseRunTestsOptions(args=None, valu
parser = optparse.OptionParser(
usage='Usage: %prog runtests [options] [test_targets] [-- build options]')
AddCommonOptions(parser)
- if IsLinux():
+ if IsLinux() or IsNetBSD():
+ if IsLinux() or ISNetBSD():
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):
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])
android_sdk_home = options.android_sdk_home
if version.GetTargetPlatform() == 'Android':
@@ -726,7 +746,7 @@ def GypMain(options, unused_args):
@@ -777,7 +798,8 @@ def GypMain(options, unused_args, _):
gyp_options.extend(['-D', 'channel_dev=1'])
def SetCommandLineForFeature(option_name, windows=False, mac=False,
linux=False, chromeos=False, android=False,
- nacl=False):
+ nacl=False, netbsd=False):
- linux=False, android=False, nacl=False):
+ linux=False, android=False, nacl=False,
+ netbsd=False):
"""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):
@@ -799,6 +821,8 @@ def GypMain(options, unused_args, _):
option on Android platform.
nacl: A boolean which replesents the default value of the target
option on NaCl.
+ netbsd: boolean which replesents the default value of the target option
+ on NetBSD platform.
+ on NetBSD platform.
Raises:
ValueError: An error occurred when 'option_name' is empty.
@@ -763,6 +785,7 @@ def GypMain(options, unused_args):
@@ -811,6 +835,7 @@ def GypMain(options, unused_args, _):
'Mac': mac,
'Linux': linux,
'ChromeOS': chromeos,
'Android': android,
+ '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):
SetCommandLineForFeature(option_name='webservice_infolist')
SetCommandLineForFeature(option_name='cloud_sync',
linux=is_official_dev,
+ netbsd=is_official_dev,
windows=is_official_dev,
mac=is_official_dev)
@@ -822,10 +847,12 @@ def GypMain(options, unused_args, _):
SetCommandLineForFeature(option_name='cloud_handwriting',
linux=is_official_dev,
+ netbsd=is_official_dev,
@@ -141,35 +115,27 @@ $NetBSD: patch-build__mozc.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $
+ 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)
android=is_official,
@@ -863,7 +890,8 @@ def GypMain(options, unused_args, _):
else:
gyp_options.extend(['-D', 'use_zinnia=NO'])
@@ -829,7 +856,8 @@ def GypMain(options, unused_args):
command_line.extend(['-D', 'use_zinnia=NO'])
if ((options.target_platform == 'Linux' or
- options.target_platform == 'ChromeOS') and
+ options.target_platform == 'ChromeOS' or
- if (options.target_platform == 'Linux' and
+ if ((options.target_platform == 'Linux' or
+ options.target_platform == 'NetBSD') and
'%s/unix/ibus/ibus.gyp' % SRC_DIR in gyp_file_names):
command_line.extend(['-D', 'use_libibus=1'])
gyp_options.extend(['-D', 'use_libibus=1'])
@@ -874,7 +902,7 @@ def GypMain(options, unused_args):
@@ -896,7 +924,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.
- if IsLinux():
+ if IsLinux() or IsNetBSD():
command_line.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
gyp_options.extend(['-D', 'pkg_config_command=%s' % GetPkgConfigCommand()])
else:
command_line.extend(['-D', 'pkg_config_command='])
@@ -1043,6 +1071,41 @@ def BuildOnMac(options, targets, origina
gyp_options.extend(['-D', 'pkg_config_command='])
@@ -1049,6 +1077,41 @@ def BuildOnMac(options, targets, origina
'-parallelizeTargets',
'BUILD_WITH_GYP=1'])
@@ -211,7 +177,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
@@ -1076,6 +1139,8 @@ def BuildMain(options, targets, original
BuildOnMac(options, targets, original_directory_name)
elif IsLinux():
BuildOnLinux(options, targets, original_directory_name)
@@ -220,7 +186,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
@@ -1341,7 +1406,7 @@ def CleanBuildFilesAndDirectories(option
elif IsMac():
directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
'*.xcodeproj')))
@@ -229,14 +195,3 @@ $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
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')
# Remove files.
for file_name in file_names:
RemoveFile(file_name)

View File

@@ -1,9 +1,9 @@
$NetBSD: patch-build__tools_mozc__version.py,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-build__tools_mozc__version.py,v 1.2 2014/01/19 01:18:50 ryoon Exp $
--- build_tools/mozc_version.py.orig 2012-08-31 05:37:06.000000000 +0000
--- build_tools/mozc_version.py.orig 2014-01-06 07:10:26.000000000 +0000
+++ build_tools/mozc_version.py
@@ -65,6 +65,7 @@ TARGET_PLATFORM_TO_DIGIT = {
'ChromeOS': '2',
@@ -64,6 +64,7 @@ TARGET_PLATFORM_TO_DIGIT = {
'Linux': '2',
'Android': '3',
'NaCl': '4',
+ 'NetBSD': '5',

View File

@@ -1,13 +1,13 @@
$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.3 2013/09/07 18:42:14 ryoon Exp $
--- build_tools/util.py.orig 2013-03-29 04:33:44.000000000 +0000
--- build_tools/util.py.orig 2013-08-28 05:25:59.000000000 +0000
+++ build_tools/util.py
@@ -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."""
+ """Returns true if the platform is NetBSD."""
+ return os.name == 'posix' and os.uname()[0] == 'NetBSD'
def GetNumberOfProcessors():

View File

@@ -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

View File

@@ -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.4 2014/01/19 01:18:50 ryoon Exp $
--- gui/config_dialog/config_dialog.cc.orig 2013-03-29 04:33:48.000000000 +0000
--- gui/config_dialog/config_dialog.cc.orig 2014-01-06 07:10:44.000000000 +0000
+++ gui/config_dialog/config_dialog.cc
@@ -96,21 +96,21 @@ ConfigDialog::ConfigDialog()
@@ -94,21 +94,21 @@ ConfigDialog::ConfigDialog()
setWindowTitle(tr("Mozc Preferences"));
#endif // OS_MACOSX
@@ -27,8 +27,8 @@ $NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/04/29 09:52:17 ry
+#endif // OS_LINUX || OS_NETBSD
#endif // NO_LOGGING
#ifndef ENABLE_CLOUD_SYNC
@@ -347,7 +347,7 @@ ConfigDialog::ConfigDialog()
#ifndef ENABLE_CLOUD_HANDWRITING
@@ -323,7 +323,7 @@ ConfigDialog::ConfigDialog()
dictionaryPreloadingAndUACLabel->setVisible(false);
#endif // OS_WIN
@@ -37,21 +37,30 @@ $NetBSD: patch-gui_config__dialog_config__dialog.cc,v 1.1 2013/04/29 09:52:17 ry
// On Linux, disable all fields for UsageStats
usageStatsLabel->setEnabled(false);
usageStatsLabel->setVisible(false);
@@ -357,7 +357,7 @@ ConfigDialog::ConfigDialog()
@@ -333,7 +333,7 @@ ConfigDialog::ConfigDialog()
usageStatsMessage->setVisible(false);
usageStatsCheckBox->setEnabled(false);
usageStatsCheckBox->setVisible(false);
-#endif // OS_LINUX
+#endif // OS_LINUX || OS_NETBSD
webUsageDictionaryCheckBox->setVisible(false);
editWebServiceEntryButton->setVisible(false);
@@ -460,7 +460,7 @@ bool ConfigDialog::Update() {
Reload();
@@ -409,7 +409,7 @@ bool ConfigDialog::Update() {
}
-#if defined(OS_WIN) || defined(OS_LINUX)
-#if defined(OS_WIN)
+#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_ !=
@@ -421,7 +421,7 @@ bool ConfigDialog::Update() {
initial_use_keyboard_to_change_preedit_method_ =
config.use_keyboard_to_change_preedit_method();
}
-#endif // OS_WIN
+#endif // OS_WIN, OS_LINUX or OS_NETBSD
#ifdef OS_WIN
if (initial_use_mode_indicator_ != config.use_mode_indicator()) {

View File

@@ -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;
}

View File

@@ -1,13 +1,27 @@
$NetBSD: patch-gui_dictionary__tool_dictionary__tool.cc,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-gui_dictionary__tool_dictionary__tool.cc,v 1.4 2014/01/19 01:18:50 ryoon Exp $
--- gui/dictionary_tool/dictionary_tool.cc.orig 2013-03-29 04:34:06.000000000 +0000
--- gui/dictionary_tool/dictionary_tool.cc.orig 2014-01-06 07:10:48.000000000 +0000
+++ gui/dictionary_tool/dictionary_tool.cc
@@ -358,7 +358,7 @@ DictionaryTool::DictionaryTool(QWidget *
@@ -194,11 +194,11 @@ class MultiByteTextLineIterator
}
bool IsAvailable() const {
- return *(ifs_.get());
+ return (ifs_.get())->good() || (ifs_.get())->eof();
}
bool Next(string *line) {
- if (!*(ifs_.get())) {
+ if (!IsAvailable()) {
return false;
}
@@ -341,7 +341,7 @@ DictionaryTool::DictionaryTool(QWidget *
#endif // !ENABLE_CLOUD_SYNC
// 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_);

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-gui_gui.gyp,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-gui_gui.gyp,v 1.2 2013/09/07 18:42:14 ryoon Exp $
--- gui/gui.gyp.orig 2012-08-31 05:36:43.000000000 +0000
--- gui/gui.gyp.orig 2013-08-28 05:26:12.000000000 +0000
+++ gui/gui.gyp
@@ -387,7 +387,7 @@
'../session/session_base.gyp:session_protocol',

View File

@@ -1,6 +1,6 @@
$NetBSD: patch-gui_qt__libraries.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-gui_qt__libraries.gypi,v 1.2 2013/09/07 18:42:14 ryoon Exp $
--- gui/qt_libraries.gypi.orig 2013-03-29 04:33:25.000000000 +0000
--- gui/qt_libraries.gypi.orig 2013-08-28 05:26:12.000000000 +0000
+++ gui/qt_libraries.gypi
@@ -84,7 +84,7 @@
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',

View File

@@ -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 "";
}

View File

@@ -1,32 +1,43 @@
$NetBSD: patch-gyp_common.gypi,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-gyp_common.gypi,v 1.4 2014/01/19 01:18:50 ryoon Exp $
--- gyp/common.gypi.orig 2013-03-29 04:33:42.000000000 +0000
--- gyp/common.gypi.orig 2014-01-06 07:10:31.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"', {
@@ -92,6 +92,7 @@
'-include base/namespace.h',
'-pipe',
'-pthread',
+ '-std=c++0x',
],
# linux_cflags will be used in Linux except for NaCl.
'linux_cflags': [
@@ -137,7 +138,7 @@
'clang_bin_dir': '/Applications/Xcode.app/Contents/Developer/Toolchains'
'/XcodeDefault.xctoolchain/usr/bin/',
}],
- ['target_platform=="Linux"', {
+ ['target_platform=="Linux" or target_platform=="NetBSD"', {
# enable_gtk_renderer represents if mozc_renderer is supported on Linux
# or not.
'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")', {
'defines': [
'MOZC_LANGUAGE_SUFFIX_FOR_LINUX="_<(language)"',
],
@@ -195,7 +196,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',
# Represents the directory where the source code of protobuf is
# extracted. This value is ignored when 'use_libprotobuf' is 1.
@@ -286,7 +287,7 @@
['channel_dev==1', {
'defines': ['CHANNEL_DEV'],
}],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'ldflags': [
'<@(linux_ldflags)',
],
@@ -447,7 +447,7 @@
@@ -451,7 +452,7 @@
},
},
'conditions': [
@@ -35,7 +46,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 @@
@@ -489,7 +490,7 @@
},
},
'conditions': [
@@ -44,7 +55,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 @@
@@ -753,6 +754,22 @@
}],
],
}],

View File

@@ -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.3 2014/01/19 01:18:50 ryoon Exp $
--- handwriting/handwriting.gyp.orig 2013-03-29 04:33:25.000000000 +0000
--- handwriting/handwriting.gyp.orig 2014-01-06 07:10:31.000000000 +0000
+++ handwriting/handwriting.gyp
@@ -39,7 +39,7 @@
'../base/base.gyp:base',
'../gui/zinnia.gyp:zinnia',
@@ -43,12 +43,12 @@
'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)"',
],

View File

@@ -1,7 +1,7 @@
$NetBSD: patch-gui_zinnia.gyp,v 1.1 2013/04/29 09:52:17 ryoon Exp $
$NetBSD: patch-handwriting_zinnia.gyp,v 1.1 2014/01/19 01:18:50 ryoon Exp $
--- gui/zinnia.gyp.orig 2012-08-31 05:36:43.000000000 +0000
+++ gui/zinnia.gyp
--- handwriting/zinnia.gyp.orig 2014-01-06 07:10:31.000000000 +0000
+++ handwriting/zinnia.gyp
@@ -48,7 +48,7 @@
'-Wno-type-limits',
],

View File

@@ -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";

View File

@@ -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.4 2014/01/19 01:18:50 ryoon Exp $
--- ipc/ipc_path_manager.cc.orig 2013-03-29 04:33:26.000000000 +0000
--- ipc/ipc_path_manager.cc.orig 2014-01-06 07:10:26.000000000 +0000
+++ ipc/ipc_path_manager.cc
@@ -44,6 +44,11 @@
#endif // OS_MACOSX
@@ -13,14 +13,13 @@ $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
#ifdef OS_WIN
@@ -407,6 +412,23 @@ bool IPCPathManager::IsValidServer(uint3
return true;
}
-#ifdef OS_LINUX
+#if defined(OS_NETBSD)
+ int name[] = { CTL_KERN, KERN_PROC_ARGS, pid };
+ int name[] = { CTL_KERN, KERN_PROC_ARGS, static_cast<int>(pid) };
+ size_t data_len = 0;
+ if (sysctl(name, arraysize(name), NULL,
+ &data_len, NULL, 0) < 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,

View File

@@ -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]);

View File

@@ -1,6 +1,6 @@
$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.3 2013/09/07 18:42:14 ryoon Exp $
--- ipc/unix_ipc.cc.orig 2013-03-29 04:33:26.000000000 +0000
--- ipc/unix_ipc.cc.orig 2013-08-28 05:25:59.000000000 +0000
+++ ipc/unix_ipc.cc
@@ -28,7 +28,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -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;
}

View File

@@ -1,13 +0,0 @@
$NetBSD: patch-languages_chewing_chewing.gyp,v 1.1 2013/04/29 09:52:18 ryoon Exp $
--- languages/chewing/chewing.gyp.orig 2012-08-31 05:36:42.000000000 +0000
+++ languages/chewing/chewing.gyp
@@ -55,7 +55,7 @@
},
],
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'targets': [
{
'target_name': 'ibus_mozc_chewing',

View File

@@ -1,13 +0,0 @@
$NetBSD: patch-languages_hangul_hangul.gyp,v 1.1 2013/04/29 09:52:18 ryoon Exp $
--- languages/hangul/hangul.gyp.orig 2012-08-31 05:36:42.000000000 +0000
+++ languages/hangul/hangul.gyp
@@ -59,7 +59,7 @@
},
],
'conditions': [
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="netbsd"', {
'targets': [
{
'target_name': 'ibus_mozc_hangul',

View File

@@ -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.3 2013/09/07 18:42:14 ryoon Exp $
--- protobuf/genproto.gypi.orig 2013-03-29 04:33:43.000000000 +0000
--- protobuf/genproto.gypi.orig 2013-08-28 05:26:13.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)',
},
}],
],

View File

@@ -1,18 +1,18 @@
$NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2013/04/29 09:52:18 ryoon Exp $
$NetBSD: patch-protobuf_protobuf.gyp,v 1.3 2014/01/19 01:18:50 ryoon Exp $
--- protobuf/protobuf.gyp.orig 2013-03-29 04:33:43.000000000 +0000
--- protobuf/protobuf.gyp.orig 2014-01-06 07:10:31.000000000 +0000
+++ protobuf/protobuf.gyp
@@ -140,7 +140,7 @@
@@ -161,7 +161,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',
@@ -176,7 +176,7 @@
'.',
@@ -201,7 +201,7 @@
'<(protobuf_root)/src',
],
'conditions': [
- ['OS=="linux"', {
@@ -20,7 +20,7 @@ $NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2013/04/29 09:52:18 ryoon Exp $
'conditions': [
['use_libprotobuf!=1', {
'cflags': [
@@ -212,7 +212,7 @@
@@ -237,7 +237,7 @@
},
'conditions': [
# use system-installed protoc on Linux

View File

@@ -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.3 2013/09/07 18:42:14 ryoon Exp $
--- session/session.cc.orig 2013-03-29 04:33:25.000000000 +0000
--- session/session.cc.orig 2013-08-28 05:26:12.000000000 +0000
+++ session/session.cc
@@ -1100,7 +1100,7 @@ void Session::UpdateOperationPreferences
@@ -1139,7 +1139,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();
}

View File

@@ -1,13 +0,0 @@
$NetBSD: patch-third__party_gyp_buildbot_buildbot__run.py,v 1.1 2013/04/29 09:52:18 ryoon Exp $
--- third_party/gyp/buildbot/buildbot_run.py.orig 2012-02-23 21:18:54.000000000 +0000
+++ third_party/gyp/buildbot/buildbot_run.py
@@ -74,6 +74,8 @@ def GypBuild():
retcode += GypTestFormat('ninja')
retcode += GypTestFormat('scons')
retcode += GypTestFormat('make')
+ elif sys.platform == 'netbsd':
+ retcode += GypTestFormat('make')
elif sys.platform == 'darwin':
retcode += GypTestFormat('ninja')
retcode += GypTestFormat('xcode')

View File

@@ -1,55 +1,71 @@
$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.4 2014/01/19 01:18:50 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 2014-01-06 07:10:26.000000000 +0000
+++ unix/ibus/gen_mozc_xml.py
@@ -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/.
- 'exec': '/usr/libexec/ibus-engine-mozc --ibus',
@@ -47,7 +47,7 @@ import sys
IBUS_COMPONENT_PROPS = {
'name': 'com.google.IBus.Mozc',
'description': '%(product_name)s Component',
- 'exec': '%(ibus_mozc_path)s --ibus',
+ 'exec': '@PREFIX@/libexec/ibus-engine-mozc --ibus',
# TODO(mazda): Generate the version number.
'version': '0.0.0.0',
'author': 'Google Inc.',
@@ -62,7 +62,7 @@ IBUS_COMPONENT_PROPS = {
@@ -60,7 +60,7 @@ IBUS_COMPONENT_PROPS = {
IBUS_ENGINE_COMMON_PROPS = {
'description': '%s (Japanese Input Method)',
'description': '%(product_name)s (Japanese Input Method)',
'language': 'ja',
- 'icon': '/usr/share/ibus-mozc/product_icon.png',
- 'icon': '%(ibus_mozc_icon_path)s',
+ 'icon': '@PREFIX@/share/ibus-mozc/product_icon.png',
'rank': '80',
}
@@ -95,6 +95,13 @@ IBUS_ENGINES_PROPS = {
'longname': ['%s'],
@@ -93,6 +93,22 @@ IBUS_ENGINES_PROPS = {
'longname': ['%(product_name)s'],
'layout': ['default'],
},
+ 'NetBSD': {
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
+ # unix/ibus/mozc_engine.cc.
+ 'name': ['mozc-jp'],
+ 'longname': ['%s'],
+ 'longname': ['%(product_name)s'],
+ 'layout': ['jp'],
+ },
# On Chrome/Chromium OS, we provide three engines.
'ChromeOS': {
# DO NOT change the engine name 'mozc-jp'. The names is referenced by
@@ -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'))
+ # On NetBSD (IBus >= 1.5), we use special label 'default' for the keyboard
+ # layout.
+ 'NetBSD-IBus1.5': {
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
+ # unix/ibus/mozc_engine.cc.
+ 'name': ['mozc-jp'],
+ 'longname': ['%(product_name)s'],
+ 'layout': ['default'],
+ },
}
# A dictionary from --branding to a product name which is embedded into the
@@ -209,7 +225,7 @@ def main():
(options, unused_args) = parser.parse_args()
setup_arg = []
- 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
@@ -219,6 +235,14 @@ def main():
platform = 'Linux'
common_props = IBUS_ENGINE_COMMON_PROPS
+ if platform == 'NetBSD':
+ 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'
+ platform = 'NetBSD-IBus1.5'
+ common_props = IBUS_1_5_ENGINE_COMMON_PROPS
+
+ if platform == 'NetBSD':
+ 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
param_dict = {'product_name': PRODUCT_NAMES[options.branding],
'ibus_mozc_path': options.ibus_mozc_path,
'ibus_mozc_icon_path': options.ibus_mozc_icon_path}

View File

@@ -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,