From ff03793c3a186f34e8a300205a68fdb2fba661a8 Mon Sep 17 00:00:00 2001 From: Daichi GOTO Date: Tue, 23 Apr 2013 03:11:57 +0000 Subject: update to 1.10.1390.102 --- japanese/mozc-server/Makefile | 63 +++++++++-------- japanese/mozc-server/distinfo | 8 +-- japanese/mozc-server/files/patch-base_base.gyp | 10 +-- japanese/mozc-server/files/patch-base_iconv.cc | 4 +- japanese/mozc-server/files/patch-base_mutex.cc | 4 +- japanese/mozc-server/files/patch-base_mutex.h | 14 ---- japanese/mozc-server/files/patch-base_process.cc | 6 +- .../mozc-server/files/patch-build_tools_util.py | 4 +- .../files/patch-gui_about_dialog_about_dialog.cc | 6 +- japanese/mozc-server/files/patch-gyp_common.gypi | 15 ++++- .../files/patch-handwriting_zinnia_handwriting.cc | 10 +-- .../files/patch-ipc_ipc_path_manager.cc | 8 +-- japanese/mozc-server/files/patch-ipc_unix_ipc.cc | 78 ++++++++++++++-------- .../mozc-server/files/patch-server_mozc_server.cc | 12 ++-- .../patch-third_party_gyp_pylib_gyp_common.py | 17 ++--- ...tch-third_party_gyp_pylib_gyp_generator_make.py | 6 +- .../files/patch-unix_ibus_gen_mozc_xml.py | 20 ++++-- .../files/patch-unix_ibus_mozc_engine.cc | 6 +- .../mozc-server/files/patch-unix_ibus_path_util.cc | 4 +- 19 files changed, 159 insertions(+), 136 deletions(-) delete mode 100644 japanese/mozc-server/files/patch-base_mutex.h (limited to 'japanese/mozc-server') diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile index 2435d14ce7a3..c0c460ce44ed 100644 --- a/japanese/mozc-server/Makefile +++ b/japanese/mozc-server/Makefile @@ -6,8 +6,8 @@ # PORTNAME= mozc -PORTVERSION= 1.6.1187.102 -PORTREVISION= 3 +PORTVERSION= 1.10.1390.102 +PORTREVISION= 0 CATEGORIES= japanese MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} PKGNAMEPREFIX?= ja- @@ -16,10 +16,7 @@ PKGNAMESUFFIX?= -server MAINTAINER= daichi@FreeBSD.org COMMENT?= Mozc server for IBus and others -LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \ - gtest.0:${PORTSDIR}/devel/googletest \ - protobuf:${PORTSDIR}/devel/protobuf \ - zinnia.0:${PORTSDIR}/japanese/zinnia +LIB_DEPENDS= protobuf:${PORTSDIR}/devel/protobuf RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils USE_BZIP2= yes @@ -29,22 +26,16 @@ USE_PYTHON= yes USE_OPENSSL= yes USE_PKGCONFIG= build -BROKEN= fails to build - MAKE_JOBS_SAFE= yes BUILD_MOZC_LIST?= mozc_server -.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" -USE_GNOME+= glib20 gtk20 -.elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool" -USE_QT4+= gui dbus qmake_build moc_build uic_build rcc_build -.elif ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" -USE_GNOME+= glib20 gtk20 pygtk2 -.elif ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" -USE_GNOME+= glib20 gtk20 -.elif ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el" -USE_EMACS= yes +GYP_OPTIONS= +.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || \ + ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" || \ + ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || \ + ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el" +GYP_OPTIONS= --noqt .endif .include @@ -57,12 +48,6 @@ BROKEN= Does not compile on FreeBSD 7.X BROKEN= Does not compile: segfault .endif -.if defined(WITH_DEBUG_CODE) -BUILD_MODE= Debug -.else -BUILD_MODE= Release -.endif - LOCALBASE_REPLACE_FILES= \ gyp/common.gypi \ unix/ibus/gen_mozc_xml.py \ @@ -80,13 +65,11 @@ SSL_REINPLACE_STR+= -e "s,%%${V}%%,${${V}:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\, .endfor LOCALBASE_PTN= ${LOCALBASE:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g} -GYP_DEFINES="use_libprotobuf=1" - +BUILD_MODE= Release BUILD_CMD= ${SETENV} ${MAKE_ENV} ${GMAKE} BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \ ${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \ PYTHONPATH=${WRKSRC}/third_party/gyp/local/lib/python${PYTHON_VER}/site-packages \ - GYP_DEFINES=${GYP_DEFINES} \ ${PYTHON_CMD} build_mozc.py BUILD_GYP_CMD= cd ${WRKSRC}/third_party/gyp && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} @@ -96,6 +79,8 @@ post-patch: ${LOCALBASE_REPLACE_FILES} cd ${WRKSRC} && \ ${REINPLACE_CMD} ${SSL_REINPLACE_STR} base/base.gyp + ${MKDIR} -p ${WRKSRC}/mozc_build_tools/linux + ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/ .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" cd ${WRKSRC} && \ ${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \ @@ -111,12 +96,16 @@ pre-build: ${BUILD_GYP_CMD} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS} ${BUILD_GYP_CMD} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS} ${BUILD_GYP_CMD} ${PYDISTUTILS_INSTALL_TARGET} --prefix=${WRKSRC}/third_party/gyp/local - ${BUILD_MOZC_CMD} gyp --gypdir=${WRKSRC}/third_party/gyp/local/bin \ - --server_dir="${PREFIX}/bin" --channel_dev=0 + ${BUILD_MOZC_CMD} gyp \ + --gypdir=${WRKSRC}/third_party/gyp/local/bin \ + --server_dir="${PREFIX}/bin" --channel_dev=0 \ + ${GYP_OPTIONS} ${BUILD_MOZC_CMD} build_tools -c ${BUILD_MODE} # mozc_server .if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" +BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20 \ + gtk:${PORTSDIR}/x11-toolkits/gtk20 PLIST_FILES+= bin/mozc_server do-build-mozc_server: @@ -131,6 +120,9 @@ do-install-mozc_server: # mozc_tool .if ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool" +LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia +BUILD_DEPENDS+= gtk:${PORTSDIR}/x11-toolkits/gtk20 +USE_QT4+= corelib gui RUN_DEPENDS+= ${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model:${PORTSDIR}/japanese/tegaki-zinnia-japanese PLIST_FILES+= bin/mozc_tool \ @@ -158,7 +150,8 @@ do-install-mozc_tool: # ibus_mozc .if ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" LIB_DEPENDS+= ibus-1.0.401:${PORTSDIR}/textproc/ibus \ - xcb-xfixes.0:${PORTSDIR}/x11/libxcb + xcb-xfixes.0:${PORTSDIR}/x11/libxcb \ + zinnia.0:${PORTSDIR}/japanese/zinnia RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \ mozc_tool:${PORTSDIR}/japanese/mozc-tool \ mozc_server_start:${PORTSDIR}/japanese/mozc-additions \ @@ -204,10 +197,12 @@ do-install-ibus_mozc: # fcitx_mozc .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" PATCH_SITES= http://fcitx.googlecode.com/files/ -PATCHFILES= fcitx-mozc-${PORTVERSION}.1.patch +PATCHFILES= fcitx-mozc-${PORTVERSION}.2.patch PATCH_DIST_STRIP=-p2 -LIB_DEPENDS+= fcitx-config.4:${PORTSDIR}/chinese/fcitx +LIB_DEPENDS+= fcitx-config.4:${PORTSDIR}/chinese/fcitx \ + zinnia.0:${PORTSDIR}/japanese/zinnia +BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20 RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \ mozc_tool:${PORTSDIR}/japanese/mozc-tool \ mozc_server_start:${PORTSDIR}/japanese/mozc-additions @@ -267,7 +262,11 @@ do-install-fcitx_mozc: # mozc_el .if ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el" +USE_EMACS= yes CATEGORIES+= editors elisp +LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia +BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20 \ + gtk:${PORTSDIR}/x11-toolkits/gtk20 RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \ mozc_server_start:${PORTSDIR}/japanese/mozc-additions diff --git a/japanese/mozc-server/distinfo b/japanese/mozc-server/distinfo index 4d72d25c1e4b..e6b740b469f4 100644 --- a/japanese/mozc-server/distinfo +++ b/japanese/mozc-server/distinfo @@ -1,4 +1,4 @@ -SHA256 (mozc-1.6.1187.102.tar.bz2) = 2a9b54275400c768e14156e7654e9b9a4ca27353573627607c70d221c0e2db65 -SIZE (mozc-1.6.1187.102.tar.bz2) = 54828375 -SHA256 (fcitx-mozc-1.6.1187.102.1.patch) = 1c7549481516ed747c0ea289ebd3317c85be98fd0c4448433c48d21c270e6e75 -SIZE (fcitx-mozc-1.6.1187.102.1.patch) = 96920 +SHA256 (mozc-1.10.1390.102.tar.bz2) = 72a8ed6657daa1c03b1efe50c262a69be2ab66d45747a47df6e54996b6d5ee39 +SIZE(mozc-1.10.1390.102.tar.bz2) = 57879881 +SHA256 (fcitx-mozc-1.10.1390.102.2.patch) = 8702225049052ace5c4fa60998606cc7e08bc86966054f6f61b293277cffdcea +SIZE (fcitx-mozc-1.10.1390.102.2.patch) = 130658 diff --git a/japanese/mozc-server/files/patch-base_base.gyp b/japanese/mozc-server/files/patch-base_base.gyp index 31e967d22139..5b85404f4a72 100644 --- a/japanese/mozc-server/files/patch-base_base.gyp +++ b/japanese/mozc-server/files/patch-base_base.gyp @@ -1,8 +1,8 @@ ---- base/base.gyp.orig 2012-09-07 10:21:29.099021913 +0900 -+++ base/base.gyp 2012-09-12 12:53:34.737234489 +0900 -@@ -262,20 +262,20 @@ - }], - ['OS=="linux" and target_platform!="Android"', { +--- base/base.gyp.orig 2013-04-21 03:48:45.178270244 +0900 ++++ base/base.gyp 2013-04-21 04:16:38.943269499 +0900 +@@ -265,20 +265,20 @@ + ['OS=="linux" and target_platform!="Android" and ' + 'not (target_platform=="NaCl" and _toolset=="target")', { 'cflags': [ - ' and . '-Wno-deprecated', ], diff --git a/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc b/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc index 0646ae24ebe0..6d92dc1837ff 100644 --- a/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc +++ b/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc @@ -1,8 +1,8 @@ ---- handwriting/zinnia_handwriting.cc.orig 2012-09-07 10:21:29.209021370 +0900 -+++ handwriting/zinnia_handwriting.cc 2012-09-07 10:38:01.976021756 +0900 -@@ -50,10 +50,16 @@ +--- handwriting/zinnia_handwriting.cc.orig 2013-04-21 03:48:52.166271231 +0900 ++++ handwriting/zinnia_handwriting.cc 2013-04-21 04:20:14.073270179 +0900 +@@ -49,10 +49,16 @@ const char kModelFile[] = "handwriting-light-ja.model"; - return Util::JoinPath(MacUtil::GetResourcesDirectory(), kModelFile); + return FileUtil::JoinPath(MacUtil::GetResourcesDirectory(), kModelFile); #elif defined(USE_LIBZINNIA) +#if defined(__FreeBSD__) + const char kModelFile[] = @@ -16,4 +16,4 @@ +#endif #else const char kModelFile[] = "handwriting-ja.model"; - return Util::JoinPath(Util::GetServerDirectory(), kModelFile); + return FileUtil::JoinPath(SystemUtil::GetServerDirectory(), kModelFile); diff --git a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc b/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc index 3bb7ecad19e2..542f221f0eb0 100644 --- a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc +++ b/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc @@ -1,8 +1,8 @@ ---- ipc/ipc_path_manager.cc.orig 2012-09-07 10:21:32.692021977 +0900 -+++ ipc/ipc_path_manager.cc 2012-05-01 12:46:21.263693000 +0900 -@@ -284,7 +284,7 @@ +--- ipc/ipc_path_manager.cc.orig 2013-04-21 03:48:45.259273192 +0900 ++++ ipc/ipc_path_manager.cc 2013-04-21 04:20:12.800269260 +0900 +@@ -276,7 +276,7 @@ *ipc_name = kIPCPrefix; - #endif // OS_WINDOWS + #endif // OS_WIN -#ifdef OS_LINUX +#if defined(OS_LINUX) && !defined(__FreeBSD__) diff --git a/japanese/mozc-server/files/patch-ipc_unix_ipc.cc b/japanese/mozc-server/files/patch-ipc_unix_ipc.cc index f4c3876fac03..81be7b6270c0 100644 --- a/japanese/mozc-server/files/patch-ipc_unix_ipc.cc +++ b/japanese/mozc-server/files/patch-ipc_unix_ipc.cc @@ -1,56 +1,80 @@ ---- ipc/unix_ipc.cc.orig 2012-09-07 10:21:32.692021977 +0900 -+++ ipc/unix_ipc.cc 2012-09-07 10:38:01.136021395 +0900 -@@ -41,7 +41,7 @@ +--- ipc/unix_ipc.cc.orig 2013-04-21 03:48:45.257269513 +0900 ++++ ipc/unix_ipc.cc 2013-04-21 08:33:27.207272333 +0900 +@@ -41,6 +41,9 @@ #include #include #include --#ifdef OS_MACOSX +#if defined(OS_MACOSX) || defined(__FreeBSD__) - #include - #endif ++#include ++#endif #include -@@ -125,7 +125,7 @@ + #include + +@@ -123,6 +126,29 @@ bool IsPeerValid(int socket, pid_t *pid) { *pid = 0; --#ifdef OS_MACOSX +#if defined(OS_MACOSX) || defined(__FreeBSD__) - // If the OS is MAC, we should validate the peer by using LOCAL_PEERCRED. - struct xucred peer_cred; - socklen_t peer_cred_len = sizeof(struct xucred); -@@ -147,7 +147,7 @@ - *pid = 0; - #endif - --#ifdef OS_LINUX ++ // If the OS is MAC, we should validate the peer by using LOCAL_PEERCRED. ++ struct xucred peer_cred; ++ socklen_t peer_cred_len = sizeof(struct xucred); ++ if (::getsockopt(socket, 0, LOCAL_PEERCRED, ++ &peer_cred, &peer_cred_len) < 0) { ++ LOG(ERROR) << "cannot get peer credential. NOT a Unix socket?"; ++ return false; ++ } ++ if (peer_cred.cr_version != XUCRED_VERSION) { ++ LOG(WARNING) << "credential version mismatch."; ++ return false; ++ } ++ if (peer_cred.cr_uid != ::geteuid()) { ++ LOG(WARNING) << "uid mismatch." << peer_cred.cr_uid << "!=" << ::geteuid(); ++ return false; ++ } ++ ++ // MacOS doesn't have cr_pid; ++ *pid = 0; ++#endif ++ +#if defined(OS_LINUX) && !defined(__FreeBSD__) // On ARM Linux, we do nothing and just return true since the platform // sometimes doesn't support the getsockopt(sock, SOL_SOCKET, SO_PEERCRED) // system call. -@@ -310,7 +310,7 @@ +@@ -144,6 +170,7 @@ + + *pid = peer_cred.pid; + #endif // __arm__ ++#endif + + return true; + } +@@ -278,7 +305,12 @@ address.sun_family = AF_UNIX; ::memcpy(address.sun_path, server_address.data(), server_address_length); address.sun_path[server_address_length] = '\0'; --#ifdef OS_MACOSX +#if defined(OS_MACOSX) || defined(__FreeBSD__) - address.sun_len = SUN_LEN(&address); - const size_t sun_len = sizeof(address); - #else -@@ -435,21 +435,21 @@ ++ address.sun_len = SUN_LEN(&address); ++ const size_t sun_len = sizeof(address); ++#else + const size_t sun_len = sizeof(address.sun_family) + server_address_length; ++#endif + pid_t pid = 0; + if (::connect(socket_, + reinterpret_cast(&address), +@@ -398,16 +430,21 @@ SO_REUSEADDR, reinterpret_cast(&on), sizeof(on)); --#ifdef OS_MACOSX +#if defined(OS_MACOSX) || defined(__FreeBSD__) - addr.sun_len = SUN_LEN(&addr); - const size_t sun_len = sizeof(addr); - #else ++ addr.sun_len = SUN_LEN(&addr); ++ const size_t sun_len = sizeof(addr); ++#else const size_t sun_len = sizeof(addr.sun_family) + server_address_.size(); - #endif - if (!IsAbstractSocket(server_address_)) { - // Linux does not use files for IPC. - ::chmod(server_address_.c_str(), 0600); - } ++#endif if (::bind(socket_, reinterpret_cast(&addr), sun_len) != 0) { // The UNIX domain socket file (server_address_) already exists? LOG(FATAL) << "bind() failed: " << strerror(errno); diff --git a/japanese/mozc-server/files/patch-server_mozc_server.cc b/japanese/mozc-server/files/patch-server_mozc_server.cc index c9b414b0b7c2..543604f7df33 100644 --- a/japanese/mozc-server/files/patch-server_mozc_server.cc +++ b/japanese/mozc-server/files/patch-server_mozc_server.cc @@ -1,15 +1,15 @@ ---- server/mozc_server.cc.orig 2012-09-07 10:21:29.170020927 +0900 -+++ server/mozc_server.cc 2012-09-07 10:30:28.034021395 +0900 +--- server/mozc_server.cc.orig 2013-04-21 03:48:44.841269792 +0900 ++++ server/mozc_server.cc 2013-04-21 04:14:37.821269328 +0900 @@ -32,6 +32,9 @@ - #ifdef OS_WINDOWS + #ifdef OS_WIN #include #endif +#ifdef __FreeBSD__ +#include +#endif - #include "base/base.h" - #include "base/crash_report_util.h" + #include + #include @@ -51,6 +54,23 @@ mozc::SessionServer *g_session_server = NULL; } @@ -44,6 +44,6 @@ + ::signal(SIGTERM, sig_func); +#endif + - #if defined(OS_WINDOWS) + #if defined(OS_WIN) // On Windows, ShutdownSessionCallback is not called intentionally in order // to avoid crashes oritinates from it. See b/2696087. diff --git a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py index ce000e8b7175..a26890f1e33a 100644 --- a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py +++ b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py @@ -1,17 +1,14 @@ ---- third_party/gyp/pylib/gyp/common.py.orig 2012-09-07 10:21:29.147021135 +0900 -+++ third_party/gyp/pylib/gyp/common.py 2012-09-17 17:14:43.781601968 +0900 -@@ -362,9 +362,11 @@ +--- third_party/gyp/pylib/gyp/common.py.orig 2013-04-21 03:48:44.556270889 +0900 ++++ third_party/gyp/pylib/gyp/common.py 2013-04-21 04:16:32.525269583 +0900 +@@ -382,6 +382,11 @@ + 'cygwin': 'win', 'win32': 'win', 'darwin': 'mac', - 'sunos5': 'solaris', -- 'freebsd7': 'freebsd', -- 'freebsd8': 'freebsd', -- 'freebsd9': 'freebsd', + 'freebsd7': 'linux', + 'freebsd8': 'linux', + 'freebsd9': 'linux', + 'freebsd10': 'linux', -+ 'freebsd11': 'linux', ++ 'freebsd11': 'linux' } - flavor = flavors.get(sys.platform, 'linux') - return params.get('flavor', flavor) + + if 'flavor' in params: diff --git a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py index ba7c1672b12f..62427e26104b 100644 --- a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py +++ b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py @@ -1,6 +1,6 @@ ---- third_party/gyp/pylib/gyp/generator/make.py.orig 2012-09-07 10:21:29.146021648 +0900 -+++ third_party/gyp/pylib/gyp/generator/make.py 2012-09-17 17:15:20.613807429 +0900 -@@ -1963,6 +1963,9 @@ +--- third_party/gyp/pylib/gyp/generator/make.py.orig 2013-04-21 03:48:44.552270209 +0900 ++++ third_party/gyp/pylib/gyp/generator/make.py 2013-04-21 04:16:32.828269137 +0900 +@@ -1956,6 +1956,9 @@ srcdir_prefix = '$(srcdir)/' flock_command= 'flock' diff --git a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py b/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py index 6850aa6d5d66..4919e6da85a2 100644 --- a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py +++ b/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py @@ -1,17 +1,18 @@ ---- unix/ibus/gen_mozc_xml.py.orig 2012-09-07 10:21:29.111022215 +0900 -+++ unix/ibus/gen_mozc_xml.py 2012-09-07 10:30:26.421021738 +0900 -@@ -40,6 +40,7 @@ - import optparse +--- unix/ibus/gen_mozc_xml.py.orig 2013-04-21 03:48:44.433270458 +0900 ++++ unix/ibus/gen_mozc_xml.py 2013-04-21 04:12:50.384269164 +0900 +@@ -41,6 +41,7 @@ import os + import subprocess import sys +import os # Information to generate part of mozc.xml. %s will be replaced with # a product name, 'Mozc' or 'Google Japanese Input'. -@@ -65,6 +66,24 @@ - 'rank': '80', +@@ -75,6 +76,32 @@ + 'symbol': 'あ', } ++# Override for FreeBSD +if os.uname()[0] == 'FreeBSD': + IBUS_COMPONENT_PROPS = { + 'name': 'com.google.IBus.Mozc', @@ -29,6 +30,13 @@ + 'icon': '@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png', + 'rank': '0', + } ++ IBUS_1_5_ENGINE_COMMON_PROPS = { ++ 'description': '%s (Japanese Input Method)', ++ 'language': 'ja', ++ 'icon': '@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png', ++ 'rank': '80', ++ 'symbol': 'あ', ++ } + # A dictionary from --platform to engines that are used in the platform. The # information is used to generate part of mozc.xml. diff --git a/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc b/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc index 777eebb2b93b..3851a2841320 100644 --- a/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc +++ b/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc @@ -1,6 +1,6 @@ ---- unix/ibus/mozc_engine.cc.orig 2012-09-07 10:21:29.111022215 +0900 -+++ unix/ibus/mozc_engine.cc 2012-09-07 10:30:26.452021649 +0900 -@@ -756,7 +756,7 @@ +--- unix/ibus/mozc_engine.cc.orig 2013-04-21 03:48:44.433270458 +0900 ++++ unix/ibus/mozc_engine.cc 2013-04-21 04:12:50.609270610 +0900 +@@ -758,7 +758,7 @@ // on size_t, not uint32. string selection_text; const uint32 selection_start = min(cursor_pos, anchor_pos); diff --git a/japanese/mozc-server/files/patch-unix_ibus_path_util.cc b/japanese/mozc-server/files/patch-unix_ibus_path_util.cc index 43270812acd6..d488733b794b 100644 --- a/japanese/mozc-server/files/patch-unix_ibus_path_util.cc +++ b/japanese/mozc-server/files/patch-unix_ibus_path_util.cc @@ -1,5 +1,5 @@ ---- unix/ibus/path_util.cc.orig 2012-09-07 10:21:29.112021454 +0900 -+++ unix/ibus/path_util.cc 2012-01-29 13:49:15.994806000 +0900 +--- unix/ibus/path_util.cc.orig 2013-04-21 03:48:44.435272531 +0900 ++++ unix/ibus/path_util.cc 2013-04-21 04:12:51.235269303 +0900 @@ -30,14 +30,22 @@ #include "unix/ibus/path_util.h" -- cgit v1.2.3