diff options
author | hrs <hrs@FreeBSD.org> | 2014-08-31 06:19:55 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-08-31 06:19:55 +0800 |
commit | 537d732605166587be8d8cea3b2500fdc248ef1e (patch) | |
tree | b45c24812af6e0279d602b9561cf92c7ca220197 | |
parent | 0881579374a70b98e4ec66fe23ffdba3f35f05b6 (diff) | |
download | freebsd-ports-gnome-537d732605166587be8d8cea3b2500fdc248ef1e.tar.gz freebsd-ports-gnome-537d732605166587be8d8cea3b2500fdc248ef1e.tar.zst freebsd-ports-gnome-537d732605166587be8d8cea3b2500fdc248ef1e.zip |
Update Mozc to 1.15.1868.102.
17 files changed, 232 insertions, 488 deletions
diff --git a/japanese/fcitx-mozc/Makefile b/japanese/fcitx-mozc/Makefile index 1f9bf6fc8f5a..5c450c1a00c6 100644 --- a/japanese/fcitx-mozc/Makefile +++ b/japanese/fcitx-mozc/Makefile @@ -11,7 +11,4 @@ PKGMESSAGE= ${.CURDIR}/pkg-message BUILD_MOZC_LIST= fcitx_mozc -IGNORE= not compatible with mozc 1.11.1502.102 - -NO_STAGE= yes .include "${MASTERDIR}/Makefile" diff --git a/japanese/mozc-additions/Makefile b/japanese/mozc-additions/Makefile index b0f50c2eab6f..4a590f778179 100644 --- a/japanese/mozc-additions/Makefile +++ b/japanese/mozc-additions/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= mozc-additions -PORTVERSION= 1.11.1502.102 +PORTVERSION= 1.15 CATEGORIES= japanese MASTER_SITES= # empty PKGNAMEPREFIX?= ja- @@ -25,6 +25,7 @@ PLIST_FILES= bin/ibus-daemon_restart \ bin/mozc_tool_word_register do-install: - ${INSTALL_SCRIPT} ${PLIST_FILES:S,bin/,${FILESDIR}/,} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${PLIST_FILES:S,bin/,${FILESDIR}/,} \ + ${STAGEDIR}${PREFIX}/bin .include <bsd.port.mk> diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile index 486831cb2ee6..35a87d781354 100644 --- a/japanese/mozc-server/Makefile +++ b/japanese/mozc-server/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= mozc -PORTVERSION= 1.11.1502.102 -PORTREVISION= 1 +PORTVERSION= 1.15.1868.102 CATEGORIES= japanese MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -12,10 +11,11 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= hrs@FreeBSD.org COMMENT?= Mozc Japanese Input Method, Server -LICENSE= BSD +LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/third_party/gyp/LICENSE -BUILD_DEPENDS= python:${PORTSDIR}/lang/python +BUILD_DEPENDS= python:${PORTSDIR}/lang/python \ + ninja:${PORTSDIR}/devel/ninja EXTRACT_DEPENDS=${PYTHON_CMD}:${PYTHON_PORTSDIR} LIB_DEPENDS= libprotobuf.so:${PORTSDIR}/devel/protobuf \ libzinnia.so:${PORTSDIR}/japanese/zinnia @@ -23,7 +23,6 @@ RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils USES= pkgconfig iconv gmake tar:bzip2 USE_PYTHON_BUILD=yes -USE_OPENSSL= yes BUILD_MOZC_LIST?= mozc_server @@ -31,10 +30,10 @@ BUILD_MOZC_LIST?= mozc_server PKGNAMEPREFIX= ja- PKGNAMESUFFIX= -server -LICENSE= BSD NAISTL +LICENSE= BSD3CLAUSE NAISTL LICENSE_COMB= multi -LICENSE_FILE_BSD= ${WRKSRC}/third_party/gyp/LICENSE -LICENSE_DISTFILES_BSD= ${DISTNAME}${EXTRACT_SUFX} +LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/third_party/gyp/LICENSE +LICENSE_DISTFILES_BSD3CLAUSE= ${DISTNAME}${EXTRACT_SUFX} LICENSE_NAME_NAISTL= Nara Institute of Science and Technology License LICENSE_PERMS_NAISTL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LICENSE_FILE_NAISTL= ${WRKSRC}/data/dictionary_oss/README.txt @@ -62,60 +61,51 @@ BROKEN= Does not compile: segfault GYP_DEFINES= use_libprotobuf=1 \ channel_dev=0 \ enable_unittest=0 \ - zinnia_model_file="${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model" + zinnia_model_file="${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model" \ + ibus_mozc_icon_path="${LOCALBASE}/share/ibus-mozc/icons/product_icon.png" \ + ibus_mozc_path="${PREFIX}/libexec/ibus-engine-mozc" BUILD_MODE= Release BUILD_CMD= ${SETENV} ${MAKE_ENV} PATH=/bin:/usr/bin:${PATH} ${MAKE_CMD} BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \ ${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \ - PYTHONPATH=${WRKSRC}/third_party/gyp/local/lib/python${PYTHON_VER}/site-packages \ - ${DEBUG} \ - GYP_DEFINES="${GYP_DEFINES}" \ - CC_host="${CC}" \ - CXX_host="${CXX}" \ - LD_host="${CXX}" \ - AR_host="${AR}" \ - ${PYTHON_CMD} build_mozc.py + PYTHONPATH=${WRKSRC}/third_party/gyp/pylib/gyp \ + GYP_DEFINES="${GYP_DEFINES}" \ + CC_host="${CC}" \ + CXX_host="${CXX}" \ + LD_host="${CXX}" \ + AR_host="${AR}" \ + ${PYTHON_CMD} build_mozc.py BUILD_MOZC_CMD_BUILD= ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} ${_MAKE_JOBS} BUILD_GYP_CMD= cd ${WRKSRC}/third_party/gyp && \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} post-patch: ${MKDIR} ${WRKSRC}/mozc_build_tools/linux ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/ - ${REINPLACE_CMD} 's,-liconv,${ICONV_LIB},g' ${WRKSRC}/gui/qt_libraries.gypi + ${REINPLACE_CMD} 's,-liconv,${ICONV_LIB},g' \ + ${WRKSRC}/gui/qt_libraries.gypi + .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" ${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \ - ${WRKSRC}/unix/fcitx/gen_fcitx_mozc_i18n.sh + ${WRKSRC}/unix/fcitx/gen_fcitx_mozc_i18n.sh ${REINPLACE_CMD} "s,/usr,${LOCALBASE:Q}," \ - ${WRKSRC}/unix/fcitx/mozc.conf + ${WRKSRC}/unix/fcitx/mozc.conf .endif -.if ! ${BUILD_MOZC_LIST:Mmozc_el} +.if !${BUILD_MOZC_LIST:Mmozc_el} ${WRKSRC}/mozcmake: ${PRINTF} "%s\n%s\n" "#!/bin/sh" 'exec ${BUILD_CMD} $$@' \ - > ${WRKSRC}/mozcmake + > ${WRKSRC}/mozcmake ${CHMOD} +x ${WRKSRC}/mozcmake post-configure: ${WRKSRC}/mozcmake - ${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" \ - --localbase="${LOCALBASE}" \ - --ldflags="${LDFLAGS} -fstack-protector -L${LOCALBASE}/lib" \ - --include_dirs="${LOCALBASE}/include" \ - --openssl_cflags="${OPENSSL_CFLAGS}" \ - --openssl_ldflags="${OPENSSL_LDFLAGS}" \ - --openssl_inc="-I${OPENSSLINC}" \ - --openssl_lib="-lssl -lcrypto -L${OPENSSLLIB}" \ - ${GYP_OPTIONS} - -pre-build: - ${BUILD_MOZC_CMD} build_tools -c ${BUILD_MODE} ${_MAKE_JOBS} + --gypdir=${WRKSRC}/third_party/gyp \ + --server_dir="${PREFIX}/bin" \ + --localbase="${LOCALBASE}" \ + --ldflags="${LDFLAGS} -fstack-protector -L${LOCALBASE}/lib" \ + --include_dirs="${LOCALBASE}/include" \ + ${GYP_OPTIONS} .endif # mozc_server @@ -139,9 +129,9 @@ post-extract-mozc_server: ${LHA_CMD} xfq2w=${WRKSRC}/data/dictionary_oss ${DISTDIR}/$$F; \ done @cd ${WRKSRC}/data/dictionary_oss && \ - ${PYTHON_CMD} ${WRKSRC}/dictionary/gen_zip_code_seed.py \ - --zip_code=ken_all.csv --jigyosyo=jigyosyo.csv \ - >> dictionary09.txt + ${PYTHON_CMD} ${WRKSRC}/dictionary/gen_zip_code_seed.py \ + --zip_code=ken_all.csv --jigyosyo=jigyosyo.csv \ + >> dictionary09.txt post-extract: post-extract-mozc_server @@ -151,9 +141,9 @@ do-build-mozc_server: do-install-mozc_server: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \ - ${STAGEDIR}${PREFIX}/bin + ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \ + ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \ + ${STAGEDIR}${PREFIX}/bin .endif # mozc_tool @@ -175,16 +165,16 @@ do-build-mozc_tool: do-install-mozc_tool: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_tool \ - ${STAGEDIR}${PREFIX}/libexec + ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_tool \ + ${STAGEDIR}${PREFIX}/libexec ${INSTALL_SCRIPT} ${WRKDIR}/mozc_tool ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${DATADIR}/icons ${INSTALL_DATA} \ - ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ - ${STAGEDIR}${DATADIR}/icons/product_logo.png + ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ + ${STAGEDIR}${DATADIR}/icons/product_logo.png ${INSTALL_DATA} \ - ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ - ${STAGEDIR}${DATADIR}/icons/update_uptodate.png + ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ + ${STAGEDIR}${DATADIR}/icons/update_uptodate.png .endif # ibus_mozc @@ -216,45 +206,48 @@ PLIST_DIRS+= %%DATADIR%%/icons ${DATADIR_REL} do-build-ibus_mozc: ${BUILD_MOZC_CMD_BUILD} \ - unix/ibus/ibus.gyp:ibus_mozc \ - renderer/renderer.gyp:mozc_renderer + unix/ibus/ibus.gyp:ibus_mozc \ + renderer/renderer.gyp:mozc_renderer do-install-ibus_mozc: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_renderer \ - ${STAGEDIR}${PREFIX}/bin/mozc_renderer + ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_renderer \ + ${STAGEDIR}${PREFIX}/bin/mozc_renderer ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/ibus_mozc \ - ${STAGEDIR}${PREFIX}/libexec/ibus-engine-mozc + ${WRKSRC}/out_linux/${BUILD_MODE}/ibus_mozc \ + ${STAGEDIR}${PREFIX}/libexec/ibus-engine-mozc ${MKDIR} ${STAGEDIR}${PREFIX}/share/ibus/component ${INSTALL_DATA} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/obj/gen/unix/ibus/mozc.xml \ - ${STAGEDIR}${PREFIX}/share/ibus/component/mozc.xml + ${WRKSRC}/out_linux/${BUILD_MODE}/gen/unix/ibus/mozc.xml \ + ${STAGEDIR}${PREFIX}/share/ibus/component/mozc.xml @${MKDIR} ${STAGEDIR}${DATADIR}/icons .for F in ui-alpha_full ui-alpha_half ui-dictionary ui-direct \ ui-hiragana ui-katakana_full ui-katakana_half ui-properties ui-tool ${INSTALL_DATA} \ - ${WRKSRC}/data/images/unix/${F}.png \ - ${STAGEDIR}${DATADIR}/icons/${F:S/^ui-//}.png + ${WRKSRC}/data/images/unix/${F}.png \ + ${STAGEDIR}${DATADIR}/icons/${F:S/^ui-//}.png .endfor ${INSTALL_DATA} \ - ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ - ${STAGEDIR}${DATADIR}/icons/product_icon.png + ${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ + ${STAGEDIR}${DATADIR}/icons/product_icon.png .endif # fcitx_mozc -.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" # || make(makesum) -PATCH_SITES= http://fcitx.googlecode.com/files/ -PATCHFILES= fcitx-${DISTNAME}.2.patch +.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || make(makesum) +PATCH_SITES= http://download.fcitx-im.org/fcitx-mozc/ +PATCHFILES= fcitx-mozc-1.15.1834.102.1.patch .endif .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" PATCH_DIST_STRIP=-p2 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-unix-fcitx-eim.cc \ + ${FILESDIR}/extra-patch-unix-fcitx-mozc_response_parser.cc \ + ${FILESDIR}/extra-patch-unix-fcitx-surrounding_text_util.cc GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=0 -LIB_DEPENDS+= fcitx-core:${PORTSDIR}/chinese/fcitx +LIB_DEPENDS+= libfcitx-core.so:${PORTSDIR}/chinese/fcitx RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \ mozc_tool:${PORTSDIR}/japanese/mozc-tool \ mozc_server_start:${PORTSDIR}/japanese/mozc-additions @@ -282,32 +275,32 @@ do-build-fcitx_mozc: do-install-fcitx_mozc: @${MKDIR} \ - ${STAGEDIR}${PREFIX}/lib/fcitx \ - ${STAGEDIR}${PREFIX}/share/fcitx/addon \ - ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod + ${STAGEDIR}${PREFIX}/lib/fcitx \ + ${STAGEDIR}${PREFIX}/share/fcitx/addon \ + ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod ${INSTALL_LIB} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \ - ${STAGEDIR}${PREFIX}/lib/fcitx/fcitx-mozc.so + ${WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \ + ${STAGEDIR}${PREFIX}/lib/fcitx/fcitx-mozc.so ${INSTALL_DATA} \ - ${WRKSRC}/unix/fcitx/fcitx-mozc.conf \ - ${STAGEDIR}${PREFIX}/share/fcitx/addon/fcitx-mozc.conf + ${WRKSRC}/unix/fcitx/fcitx-mozc.conf \ + ${STAGEDIR}${PREFIX}/share/fcitx/addon/fcitx-mozc.conf ${INSTALL_DATA} \ - ${WRKSRC}/unix/fcitx/mozc.conf \ - ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod/mozc.conf - @${MKDIR} ${DATADIR}/icon + ${WRKSRC}/unix/fcitx/mozc.conf \ + ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod/mozc.conf + @${MKDIR} ${STAGEDIR}${DATADIR}/icon .for F in ui-alpha_full ui-alpha_half ui-dictionary ui-direct \ ui-hiragana ui-katakana_full ui-katakana_half ui-properties ui-tool ${INSTALL_DATA} \ - ${WRKSRC}/data/images/unix/${F}.png \ - ${STAGEDIR}${DATADIR}/icon/${F:S,^ui-,mozc-,}.png + ${WRKSRC}/data/images/unix/${F}.png \ + ${STAGEDIR}${DATADIR}/icon/${F:S,^ui-,mozc-,}.png .endfor ${INSTALL_DATA} \ - ${WRKSRC}/data/images/product_icon_32bpp-128.png \ - ${STAGEDIR}${DATADIR}/icon/mozc.png + ${WRKSRC}/data/images/product_icon_32bpp-128.png \ + ${STAGEDIR}${DATADIR}/icon/mozc.png .for L in ja zh_CN zh_TW ${INSTALL_DATA} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/obj/gen/unix/fcitx/po/${L}.mo \ - ${STAGEDIR}${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo + ${WRKSRC}/out_linux/${BUILD_MODE}/gen/unix/fcitx/po/${L}.mo \ + ${STAGEDIR}${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo .endfor .endif @@ -324,16 +317,16 @@ PLIST_DIRS+= ${EMACS_VERSION_SITE_LISPDIR}/mozc do-build-mozc_el: cd ${WRKSRC}/unix/emacs && \ - ${EMACS_CMD} -batch -q -no-site-file -no-init-file \ - -f batch-byte-compile mozc.el + ${EMACS_CMD} -batch -q -no-site-file -no-init-file \ + -f batch-byte-compile mozc.el do-install-mozc_el: @${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc ${INSTALL_DATA} \ - ${WRKSRC}/unix/emacs/mozc.el \ - ${WRKSRC}/unix/emacs/mozc.elc \ - ${FILESDIR}/leim-list.el \ - ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/ + ${WRKSRC}/unix/emacs/mozc.el \ + ${WRKSRC}/unix/emacs/mozc.elc \ + ${FILESDIR}/leim-list.el \ + ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/ .endif do-build: ${BUILD_MOZC_LIST:S/^/do-build-/} diff --git a/japanese/mozc-server/distinfo b/japanese/mozc-server/distinfo index d7c8daf2ece0..08e851f3fe46 100644 --- a/japanese/mozc-server/distinfo +++ b/japanese/mozc-server/distinfo @@ -1,6 +1,8 @@ -SHA256 (mozc-1.11.1502.102.tar.bz2) = c74eb3f1096b0c1144868f6807fdf113412bd4cb23a297974ee22bd7a5f2dfe9 -SIZE (mozc-1.11.1502.102.tar.bz2) = 58777653 +SHA256 (mozc-1.15.1868.102.tar.bz2) = c4935d6e2413dfe4683bc6b402a1911e60d942b94159ad66cc7754e643e45bf1 +SIZE (mozc-1.15.1868.102.tar.bz2) = 71791752 SHA256 (ken_all-20130628.lzh) = 78630e7f8b396603cde066c4a6d598c9af94bb97f415a68148dd3144dea18871 SIZE (ken_all-20130628.lzh) = 1735995 SHA256 (jigyosyo-20130628.lzh) = d7b796d8643457d883de4a33cb3edf7455f11d778ea74d07b450ea10f3339cf7 SIZE (jigyosyo-20130628.lzh) = 823590 +SHA256 (fcitx-mozc-1.15.1834.102.1.patch) = fd1291cedfb0e14810f243b69244eab9a2468efcba024072edff839f03c12112 +SIZE (fcitx-mozc-1.15.1834.102.1.patch) = 140485 diff --git a/japanese/mozc-server/files/extra-patch-unix-fcitx-eim.cc b/japanese/mozc-server/files/extra-patch-unix-fcitx-eim.cc new file mode 100644 index 000000000000..87638c4861c4 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-unix-fcitx-eim.cc @@ -0,0 +1,12 @@ +--- unix/fcitx/eim.cc.orig 2014-08-31 06:48:00.000000000 +0900 ++++ unix/fcitx/eim.cc 2014-08-31 06:48:11.000000000 +0900 +@@ -176,7 +176,9 @@ + // clear candidate table + FcitxCandidateWordReset(candList); + FcitxCandidateWordSetPageSize(candList, 9); ++#if 0 + FcitxCandidateWordSetLayoutHint(candList, CLH_Vertical); ++#endif + FcitxCandidateWordSetChoose(candList, "\0\0\0\0\0\0\0\0\0\0"); + FcitxMessagesAddMessageAtLast(preedit, MSG_TIPS, "%s [%s]", usage.first.c_str(), _("Press Escape to go back")); + diff --git a/japanese/mozc-server/files/extra-patch-unix-fcitx-mozc_response_parser.cc b/japanese/mozc-server/files/extra-patch-unix-fcitx-mozc_response_parser.cc new file mode 100644 index 000000000000..a36dd8fe2dd9 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-unix-fcitx-mozc_response_parser.cc @@ -0,0 +1,41 @@ +--- unix/fcitx/mozc_response_parser.cc.orig 2014-08-31 07:00:01.000000000 +0900 ++++ unix/fcitx/mozc_response_parser.cc 2014-08-31 07:00:45.000000000 +0900 +@@ -235,11 +235,13 @@ + } + } + ++#if 0 + static boolean FcitxMozcPaging(void* arg, boolean prev) + { + FcitxMozc* mozc = static_cast<FcitxMozc*>(arg); + return mozc->paging(prev); + } ++#endif + + void MozcResponseParser::ParseCandidates( + const mozc::commands::Candidates &candidates, FcitxMozc *fcitx_mozc) const { +@@ -286,12 +288,14 @@ + FcitxCandidateWordList* candList = FcitxInputStateGetCandidateList(fcitx_mozc->GetInputState()); + FcitxCandidateWordReset(candList); + FcitxCandidateWordSetPageSize(candList, 9); ++#if 0 + if (candidates.has_direction() && + candidates.direction() == commands::Candidates::HORIZONTAL) { + FcitxCandidateWordSetLayoutHint(candList, CLH_Horizontal); + } else { + FcitxCandidateWordSetLayoutHint(candList, CLH_Vertical); + } ++#endif + + map<int32, pair<string, string> > usage_map; + if (candidates.has_usages()) { +@@ -395,7 +399,9 @@ + else + FcitxCandidateWordSetChoose(candList, EMPTY_STR_CHOOSE); + FcitxCandidateWordSetFocus(candList, local_index); ++#if 0 + FcitxCandidateWordSetOverridePaging(candList, hasPrev, hasNext, FcitxMozcPaging, fcitx_mozc, NULL); ++#endif + } + + static int GetRawCursorPos(const char * str, int upos) diff --git a/japanese/mozc-server/files/extra-patch-unix-fcitx-surrounding_text_util.cc b/japanese/mozc-server/files/extra-patch-unix-fcitx-surrounding_text_util.cc new file mode 100644 index 000000000000..a995c0d93a99 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-unix-fcitx-surrounding_text_util.cc @@ -0,0 +1,28 @@ +--- unix/fcitx/surrounding_text_util.cc.orig 2014-08-31 07:02:14.000000000 +0900 ++++ unix/fcitx/surrounding_text_util.cc 2014-08-31 07:03:49.000000000 +0900 +@@ -32,7 +32,9 @@ + #include <limits> + #include <string> + #include <fcitx/instance.h> ++#if 0 + #include <fcitx/module/clipboard/fcitx-clipboard.h> ++#endif + + #include "base/port.h" + #include "base/logging.h" +@@ -207,6 +209,7 @@ + const string surrounding_text(str); + free(str); + ++#if 0 + if (cursor_pos == anchor_pos) { + const char* primary = NULL; + +@@ -220,6 +223,7 @@ + } + } + } ++#endif + + if (!SurroundingTextUtil::GetSafeDelta(cursor_pos, anchor_pos, + &info->relative_selected_length)) { diff --git a/japanese/mozc-server/files/leim-list.el b/japanese/mozc-server/files/leim-list.el index 62365f953453..7cb0f17861a5 100644 --- a/japanese/mozc-server/files/leim-list.el +++ b/japanese/mozc-server/files/leim-list.el @@ -26,4 +26,4 @@ This indicator is not shown when you don't use LEIM." (register-input-method "japanese-mozc" "Japanese" #'mozc-leim-activate mozc-leim-title - "Japanese input method with Mozc/Google Japanese Input.") + "Japanese input method with Mozc.") diff --git a/japanese/mozc-server/files/patch-base_base.gyp b/japanese/mozc-server/files/patch-base_base.gyp deleted file mode 100644 index d3f893ed4fe2..000000000000 --- a/japanese/mozc-server/files/patch-base_base.gyp +++ /dev/null @@ -1,27 +0,0 @@ ---- base/base.gyp.orig 2013-03-29 13:33:43.000000000 +0900 -+++ base/base.gyp 2013-04-23 23:49:53.000000000 +0900 -@@ -265,20 +265,20 @@ - ['OS=="linux" and target_platform!="Android" and ' - 'not (target_platform=="NaCl" and _toolset=="target")', { - 'cflags': [ -- '<!@(<(pkg_config_command) --cflags-only-other openssl)', -+ '<(openssl_cflags)', - ], - 'defines': [ - 'HAVE_OPENSSL=1', - ], - 'include_dirs': [ -- '<!@(<(pkg_config_command) --cflags-only-I openssl)', -+ '<(openssl_inc)', - ], - 'link_settings': { - 'ldflags': [ -- '<!@(<(pkg_config_command) --libs-only-L openssl)', -+ '<(openssl_ldflags)', - ], - 'libraries': [ -- '<!@(<(pkg_config_command) --libs-only-l openssl)', -+ '<(openssl_lib)', - ], - }, - }], diff --git a/japanese/mozc-server/files/patch-build_mozc.py b/japanese/mozc-server/files/patch-build_mozc.py index 55ea82f24091..5ee70ede6bf1 100644 --- a/japanese/mozc-server/files/patch-build_mozc.py +++ b/japanese/mozc-server/files/patch-build_mozc.py @@ -1,20 +1,16 @@ ---- build_mozc.py.orig 2013-07-17 11:37:50.000000000 +0900 -+++ build_mozc.py 2013-07-19 22:27:55.000000000 +0900 -@@ -332,6 +332,13 @@ - help='use rsync to copy files instead of builtin function') - AddTargetPlatformOption(parser) - +--- build_mozc.py.orig 2014-08-31 03:36:22.000000000 +0900 ++++ build_mozc.py 2014-08-31 06:04:34.000000000 +0900 +@@ -351,6 +351,9 @@ + parser.add_option('--version_file', dest='version_file', + help='use the specified version template file', + default='mozc_version_template.txt') + parser.add_option('--localbase', dest='localbase') + parser.add_option('--ldflags', dest='ldflags') + parser.add_option('--include_dirs', dest='include_dirs') -+ parser.add_option('--openssl_cflags', dest='openssl_cflags') -+ parser.add_option('--openssl_ldflags', dest='openssl_ldflags') -+ parser.add_option('--openssl_lib', dest='openssl_lib') -+ parser.add_option('--openssl_inc', dest='openssl_inc') + AddTargetPlatformOption(parser) # Mac and Linux - warn_as_error_default = False -@@ -518,7 +525,7 @@ +@@ -538,7 +541,7 @@ parser = optparse.OptionParser(usage='Usage: %prog build [options]') AddCommonOptions(parser) if IsLinux(): @@ -23,36 +19,17 @@ parser.add_option('--jobs', '-j', dest='jobs', default=('%d' % default_build_concurrency), metavar='N', help='run build jobs in parallel') -@@ -566,9 +573,6 @@ - - return parser.parse_args(args, values) - -- -- -- - def AddPythonPathToEnvironmentFilesForWindows(out_dir): - """Add PYTHONPATH to environment files for Ninja.""" - mozc_root = os.path.abspath(GetTopLevelSourceDirectoryName()) -@@ -746,6 +750,22 @@ - else: - command_line.extend(['-D', 'warn_as_error=0']) +@@ -701,6 +704,13 @@ + logging.info('Building GYP command line...') + gyp_options = ['--depth=.', '--include=%s/gyp/common.gypi' % SRC_DIR] + localbase = options.localbase or '/usr' -+ command_line.extend(['-D', 'localbase=%s' % localbase]) ++ gyp_options.extend(['-D', 'localbase=%s' % localbase]) + + ldflags = options.ldflags or '' -+ command_line.extend(['-D', 'ldflags=%s' % ldflags]) ++ gyp_options.extend(['-D', 'ldflags=%s' % ldflags]) + include_dirs = options.include_dirs or '' -+ command_line.extend(['-D', 'include_dirs=%s' % include_dirs]) -+ -+ openssl_cflags = options.openssl_cflags or '' -+ command_line.extend(['-D', 'openssl_cflags=%s' % openssl_cflags]) -+ openssl_ldflags = options.openssl_cflags or '' -+ command_line.extend(['-D', 'openssl_ldflags=%s' % openssl_ldflags]) -+ openssl_inc = options.openssl_inc or '' -+ command_line.extend(['-D', 'openssl_inc=%s' % openssl_inc]) -+ openssl_lib = options.openssl_lib or '' -+ command_line.extend(['-D', 'openssl_lib=%s' % openssl_lib]) ++ gyp_options.extend(['-D', 'include_dirs=%s' % include_dirs]) - # mac_dir should be started with '<(DEPTH)', otherwise some - # operations in XCode fails. So if the mac_dir option is an + mozc_root = os.path.abspath(GetTopLevelSourceDirectoryName()) + gyp_options.extend(['-D', 'abs_depth=%s' % mozc_root]) diff --git a/japanese/mozc-server/files/patch-gyp_common.gypi b/japanese/mozc-server/files/patch-gyp_common.gypi index 9bf6d634c878..b6f0583ffd30 100644 --- a/japanese/mozc-server/files/patch-gyp_common.gypi +++ b/japanese/mozc-server/files/patch-gyp_common.gypi @@ -1,6 +1,6 @@ ---- gyp/common.gypi.orig 2013-07-17 11:38:04.000000000 +0900 -+++ gyp/common.gypi 2013-07-19 22:51:13.000000000 +0900 -@@ -749,6 +749,8 @@ +--- gyp/common.gypi.orig 2014-08-31 03:36:19.000000000 +0900 ++++ gyp/common.gypi 2014-08-31 03:46:27.000000000 +0900 +@@ -759,6 +759,8 @@ ['OS=="linux"', { 'defines': [ 'OS_LINUX', @@ -9,7 +9,7 @@ ], 'cflags': [ '<@(warning_cflags)', -@@ -760,6 +762,13 @@ +@@ -770,6 +772,13 @@ # <unordered_map> and <unordered_set>. '-Wno-deprecated', ], @@ -21,18 +21,5 @@ + '-fstack-protector', + ], 'conditions': [ - ['target_platform=="ChromeOS"', { - 'defines': [ -@@ -774,12 +783,10 @@ - '-Wno-covered-switch-default', - '-Wno-unnamed-type-template-args', - '-Wno-c++11-narrowing', -- '-std=gnu++0x', - ], - }], - ['clang==0 and target_platform!="Windows"', { - 'cflags_cc': [ -- '-std=gnu++0x', - ], - 'defines': [ - 'GTEST_LANG_CXX11=0', + ['target_platform!="NaCl"', { + 'cflags': [ diff --git a/japanese/mozc-server/files/patch-third_party_gyp_gyp b/japanese/mozc-server/files/patch-third_party_gyp_gyp new file mode 100644 index 000000000000..9816e1eade65 --- /dev/null +++ b/japanese/mozc-server/files/patch-third_party_gyp_gyp @@ -0,0 +1,8 @@ +--- third_party/gyp/gyp.orig 2014-08-31 04:28:46.000000000 +0900 ++++ third_party/gyp/gyp 2014-08-31 04:28:50.000000000 +0900 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # Copyright 2013 The Chromium Authors. All rights reserved. + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. diff --git a/japanese/mozc-server/files/patch-unix_emacs_mozc.el b/japanese/mozc-server/files/patch-unix_emacs_mozc.el index 2fd5c22d674f..26fc4b133d5c 100644 --- a/japanese/mozc-server/files/patch-unix_emacs_mozc.el +++ b/japanese/mozc-server/files/patch-unix_emacs_mozc.el @@ -1,35 +1,34 @@ ---- unix/emacs/mozc.el.orig 2013-07-17 11:37:50.000000000 +0900 -+++ unix/emacs/mozc.el 2013-07-19 22:36:17.000000000 +0900 -@@ -1834,19 +1834,20 @@ - "Deactivate mozc-mode via LEIM." +--- unix/emacs/mozc.el.orig 2014-08-31 03:35:19.000000000 +0900 ++++ unix/emacs/mozc.el 2014-08-31 03:52:11.000000000 +0900 +@@ -1973,12 +1973,12 @@ + "Deactivate function `mozc-mode' via LEIM." (mozc-mode nil)) -(defcustom mozc-leim-title "[Mozc]" -- "Mode line string shown when mozc-mode is enabled. +- "Mode line string shown when function `mozc-mode' is enabled. -This indicator is not shown when you don't use LEIM." - :type '(choice (const :tag "No indicator" nil) - (string :tag "Show an indicator")) - :group 'mozc) -+;; defined in leim-list.el -+;; (defcustom mozc-leim-title "[Mozc]" -+;; "Mode line string shown when mozc-mode is enabled. -+;; This indicator is not shown when you don't use LEIM." ++;;(defcustom mozc-leim-title "[Mozc]" ++;; "Mode line string shown when function `mozc-mode' is enabled. ++;;This indicator is not shown when you don't use LEIM." +;; :type '(choice (const :tag "No indicator" nil) +;; (string :tag "Show an indicator")) +;; :group 'mozc) --(register-input-method -- "japanese-mozc" -- "Japanese" -- #'mozc-leim-activate -- mozc-leim-title -- "Japanese input method with Mozc/Google Japanese Input.") -+;; (register-input-method -+;; "japanese-mozc" -+;; "Japanese" -+;; #'mozc-leim-activate -+;; mozc-leim-title -+;; "Japanese input method with Mozc/Google Japanese Input.") + (defun mozc-leim-register-input-method () + "Register function `mozc-mode' as an input method of LEIM. +@@ -1994,10 +1994,10 @@ + ;; Register mozc-mode as an input method after the init file has been read + ;; so the user has a chance to specify `mozc-leim-title' in the init file + ;; after loading this file. +-(add-hook 'emacs-startup-hook #'mozc-leim-register-input-method) ++;;(add-hook 'emacs-startup-hook #'mozc-leim-register-input-method) + ;; In the case that `emacs-startup-hook' has already been run, especially + ;; when the user loads this file interactively, register immediately. +-(mozc-leim-register-input-method) ++;;(mozc-leim-register-input-method) 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 deleted file mode 100644 index f747b3c76402..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py +++ /dev/null @@ -1,163 +0,0 @@ ---- unix/ibus/gen_mozc_xml.py.orig 2013-03-29 13:33:43.000000000 +0900 -+++ unix/ibus/gen_mozc_xml.py 2013-04-28 20:40:28.000000000 +0900 -@@ -46,10 +46,10 @@ - # a product name, 'Mozc' or 'Google Japanese Input'. - IBUS_COMPONENT_PROPS = { - 'name': 'com.google.IBus.Mozc', -- 'description': '%s Component', -+ 'description': '%(product_name)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', -+ 'exec': '%(localbase)s/libexec/ibus-engine-mozc --ibus', - # TODO(mazda): Generate the version number. - 'version': '0.0.0.0', - 'author': 'Google Inc.', -@@ -60,17 +60,17 @@ - - # Information to generate <engines> part of mozc.xml. - 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': '%(localbase)s/share/ibus-mozc/icons/product_icon.png', - 'rank': '80', - } - - # Information to generate <engines> part of mozc.xml for IBus 1.5 or later. - IBUS_1_5_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': '%(localbase)s/share/ibus-mozc/icons/product_icon.png', - 'rank': '80', - 'symbol': 'あ', - } -@@ -83,7 +83,7 @@ - # 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 Linux (IBus >= 1.5), we use special label 'default' for the keyboard -@@ -92,7 +92,7 @@ - # 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': ['default'], - }, - # On Chrome/Chromium OS, we provide three engines. -@@ -100,8 +100,8 @@ - # DO NOT change the engine name 'mozc-jp'. The names is referenced by - # unix/ibus/mozc_engine.cc. - 'name': ['mozc-jp', 'mozc', 'mozc-dv'], -- 'longname': ['%s (Japanese keyboard layout)', '%s (US keyboard layout)', -- '%s (US Dvorak keyboard layout)'], -+ 'longname': ['%(product_name)s (Japanese keyboard layout)', '%(product_name)s (US keyboard layout)', -+ '%(product_name)s (US Dvorak keyboard layout)'], - 'layout': ['jp', 'us', 'us(dvorak)'], - }, - } -@@ -123,18 +123,11 @@ - #endif // %s""" - - --def EmbedProductName(product_name, format_string): -- if format_string.find('%s') != -1: -- return format_string % product_name -- return format_string -- -- --def OutputXmlElement(product_name, element_name, value): -- print ' <%s>%s</%s>' % (element_name, EmbedProductName(product_name, value), -- element_name) -+def OutputXmlElement(element_name, value): -+ print ' <%s>%s</%s>' % (element_name, value, element_name) - - --def OutputXml(product_name, component, engine_common, engines, setup_arg): -+def OutputXml(product_name, component, engine_common, engines, setup_arg, localbase): - """Outputs a XML data for ibus-daemon. - - Args: -@@ -148,27 +141,25 @@ - """ - print '<component>' - for key in component: -- OutputXmlElement(product_name, key, component[key]) -+ OutputXmlElement(key, component[key] % locals()) - print '<engines>' - for i in range(len(engines['name'])): - print '<engine>' - for key in engine_common: -- OutputXmlElement(product_name, key, engine_common[key]) -+ OutputXmlElement(key, engine_common[key] % locals()) - if setup_arg: -- OutputXmlElement(product_name, 'setup', ' '.join(setup_arg)) -+ OutputXmlElement('setup', ' '.join(setup_arg)) - for key in engines: -- OutputXmlElement(product_name, key, engines[key][i]) -+ OutputXmlElement(key, engines[key][i] % locals()) - print '</engine>' - print '</engines>' - print '</component>' - - --def OutputCppVariable(product_name, prefix, variable_name, value): -- print 'const char k%s%s[] = "%s";' % (prefix, variable_name.capitalize(), -- EmbedProductName(product_name, value)) -- -+def OutputCppVariable(prefix, variable_name, value): -+ print 'const char k%s%s[] = "%s";' % (prefix, variable_name.capitalize(), value) - --def OutputCpp(product_name, component, engine_common, engines): -+def OutputCpp(product_name, component, engine_common, engines, localbase): - """Outputs a C++ header file for mozc/unix/ibus/main.cc. - - Args: -@@ -180,13 +171,13 @@ - guard_name = 'MOZC_UNIX_IBUS_MAIN_H_' - print CPP_HEADER % (guard_name, guard_name) - for key in component: -- OutputCppVariable(product_name, 'Component', key, component[key]) -+ OutputCppVariable('Component', key, component[key] % locals()) - for key in engine_common: -- OutputCppVariable(product_name, 'Engine', key, engine_common[key]) -+ OutputCppVariable('Engine', key, engine_common[key] % locals()) - for key in engines: - print 'const char* kEngine%sArray[] = {' % key.capitalize() - for i in range(len(engines[key])): -- print '"%s",' % EmbedProductName(product_name, engines[key][i]) -+ print '"%s",' % engines[key][i] % locals() - print '};' - print 'const size_t kEngineArrayLen = %s;' % len(engines['name']) - print CPP_FOOTER % guard_name -@@ -222,6 +213,7 @@ - parser.add_option('--pkg_config_command', dest='pkg_config_command', - default='pkg-config', - help='The path to pkg-config command.') -+ parser.add_option('--localbase', dest='localbase') - (options, unused_args) = parser.parse_args() - - setup_arg = [] -@@ -238,12 +230,12 @@ - if options.output_cpp: - OutputCpp(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS, - common_props, -- IBUS_ENGINES_PROPS[platform]) -+ IBUS_ENGINES_PROPS[platform], options.localbase) - else: - OutputXml(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS, - common_props, - IBUS_ENGINES_PROPS[platform], -- setup_arg) -+ setup_arg, options.localbase) - return 0 - - if __name__ == '__main__': diff --git a/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp b/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp deleted file mode 100644 index bb3682b3ff15..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp +++ /dev/null @@ -1,10 +0,0 @@ ---- unix/ibus/ibus.gyp.orig 2013-04-27 19:26:29.000000000 +0900 -+++ unix/ibus/ibus.gyp 2013-04-27 19:27:05.000000000 +0900 -@@ -134,6 +134,7 @@ - '--platform=Linux', - '--branding=Mozc', - '--server_dir=<(server_dir)', -+ '--localbase=<(localbase)', - '--pkg_config_command=<(pkg_config_command)', - ], - }], 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 2291dbf19c23..ea78852a5b49 100644 --- a/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc +++ b/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc @@ -1,11 +1,11 @@ ---- unix/ibus/mozc_engine.cc.orig 2013-07-17 11:37:50.000000000 +0900 -+++ unix/ibus/mozc_engine.cc 2013-07-19 22:37:55.000000000 +0900 -@@ -265,7 +265,7 @@ +--- unix/ibus/mozc_engine.cc.orig 2014-08-31 03:35:19.000000000 +0900 ++++ unix/ibus/mozc_engine.cc 2014-08-31 04:04:15.000000000 +0900 +@@ -224,7 +224,7 @@ } - 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, + const size_t selection_start = min(cursor_pos, anchor_pos); +- const size_t selection_length = abs(info->relative_selected_length); ++ const size_t selection_length = ::abs(info->relative_selected_length); + Util::SubStringPiece(surrounding_text, 0, selection_start) + .CopyToString(&info->preceding_text); + Util::SubStringPiece(surrounding_text, selection_start, selection_length) diff --git a/japanese/mozc-server/files/patch-unix_ibus_selection_monitor.cc b/japanese/mozc-server/files/patch-unix_ibus_selection_monitor.cc deleted file mode 100644 index bf15ef7e2b13..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_selection_monitor.cc +++ /dev/null @@ -1,101 +0,0 @@ ---- unix/ibus/selection_monitor.cc.orig 2013-07-20 00:29:25.000000000 +0900 -+++ unix/ibus/selection_monitor.cc 2013-07-20 00:37:48.000000000 +0900 -@@ -38,6 +38,7 @@ - - #include "base/logging.h" - #include "base/mutex.h" -+#include "base/scoped_ptr.h" - #include "base/thread.h" - #include "base/port.h" - #include "base/util.h" -@@ -47,8 +48,6 @@ - - namespace { - --using std::unique_ptr; -- - class ScopedXcbGenericError { - public: - ScopedXcbGenericError() -@@ -69,27 +68,6 @@ - xcb_generic_error_t *error_; - }; - --template <typename T> --struct FreeDeleter { -- void operator()(T *ptr) const { -- free(ptr); -- } --}; -- --// TODO(yukawa): Use template aliases when GCC 4.6 is retired. --typedef unique_ptr<xcb_get_property_reply_t, -- FreeDeleter<xcb_get_property_reply_t>> -- ScopedXcbGetPropertyReply; --typedef unique_ptr<xcb_get_atom_name_reply_t, -- FreeDeleter<xcb_get_atom_name_reply_t>> -- ScopedXcbGetAtomNameReply; --typedef unique_ptr<xcb_intern_atom_reply_t, -- FreeDeleter<xcb_intern_atom_reply_t>> -- ScopedXcbInternAtomReply; --typedef unique_ptr<xcb_xfixes_query_version_reply_t, -- FreeDeleter<xcb_xfixes_query_version_reply_t>> -- ScopedXcbXFixesQueqyVersionReply; -- - struct XcbAtoms { - xcb_atom_t mozc_selection_monitor; - xcb_atom_t net_wm_name; -@@ -231,7 +209,7 @@ - *atom = XCB_NONE; - xcb_intern_atom_cookie_t cookie = - ::xcb_intern_atom(connection_, false, name.size(), name.c_str()); -- ScopedXcbInternAtomReply reply( -+ scoped_ptr_malloc<xcb_intern_atom_reply_t> reply( - ::xcb_intern_atom_reply(connection_, cookie, 0)); - if (reply.get() == NULL) { - LOG(ERROR) << "xcb_intern_atom_reply returned NULL reply."; -@@ -267,7 +245,7 @@ - XCB_XFIXES_MAJOR_VERSION, - XCB_XFIXES_MINOR_VERSION); - ScopedXcbGenericError xcb_error; -- ScopedXcbXFixesQueqyVersionReply xfixes_query( -+ scoped_ptr_malloc<xcb_xfixes_query_version_reply_t> xfixes_query( - ::xcb_xfixes_query_version_reply( - connection_, xfixes_query_cookie, xcb_error.mutable_get())); - if (xcb_error.get() != NULL) { -@@ -298,7 +276,7 @@ - const xcb_get_atom_name_cookie_t cookie = ::xcb_get_atom_name( - connection_, atom); - ScopedXcbGenericError xcb_error; -- ScopedXcbGetAtomNameReply reply( -+ scoped_ptr_malloc<xcb_get_atom_name_reply_t> reply( - ::xcb_get_atom_name_reply( - connection_, cookie, xcb_error.mutable_get())); - if (xcb_error.get() != NULL) { -@@ -331,7 +309,7 @@ - property_atom, - property_type_atom, - 0, 0); -- ScopedXcbGetPropertyReply reply( -+ scoped_ptr_malloc<xcb_get_property_reply_t> reply( - ::xcb_get_property_reply(connection_, cookie, 0)); - if (reply.get() == NULL) { - VLOG(2) << "reply is NULL"; -@@ -378,7 +356,7 @@ - property_type_atom, - byte_offset, - max_bytes); -- ScopedXcbGetPropertyReply reply( -+ scoped_ptr_malloc<xcb_get_property_reply_t> reply( - ::xcb_get_property_reply(connection_, cookie, 0)); - if (reply.get() == NULL) { - VLOG(2) << "reply is NULL"; -@@ -408,7 +386,7 @@ - property_atom, - XCB_ATOM_CARDINAL, - 0, sizeof(T) * 8); -- ScopedXcbGetPropertyReply reply( -+ scoped_ptr_malloc<xcb_get_property_reply_t> reply( - ::xcb_get_property_reply(connection_, cookie, 0)); - if (reply.get() == NULL) { - VLOG(2) << "reply is NULL"; |