From 06b01ec2f77fad9d681817f68b2dc5b0296dfe9c Mon Sep 17 00:00:00 2001 From: hrs Date: Mon, 13 Jul 2015 07:30:49 +0000 Subject: Update to 2.17.2106.102. --- japanese/mozc-server/Makefile | 117 +++++++++++---------- japanese/mozc-server/distinfo | 8 +- .../files/extra-patch-src-unix-fcitx-eim.cc | 12 +++ .../files/extra-patch-src-unix-fcitx-fcitx.gyp | 10 ++ ...-patch-src-unix-fcitx-fcitx_key_event_handler.h | 13 +++ ...tra-patch-src-unix-fcitx-fcitx_key_translator.h | 11 ++ .../files/extra-patch-src-unix-fcitx-fcitx_mozc.h | 11 ++ .../extra-patch-src-unix-fcitx-mozc_connection.cc | 11 ++ .../extra-patch-src-unix-fcitx-mozc_connection.h | 11 ++ ...ra-patch-src-unix-fcitx-mozc_response_parser.cc | 50 +++++++++ ...a-patch-src-unix-fcitx-surrounding_text_util.cc | 28 +++++ .../extra-patch-src-unix-uim-key_translator.h | 11 ++ .../files/extra-patch-src-unix-uim-mozc.cc | 13 +++ .../files/extra-patch-src-unix-uim-uim.gyp | 28 +++++ .../files/extra-patch-src-unix_fcitx_fcitx_mozc.cc | 21 ++++ .../files/extra-patch-unix-fcitx-eim.cc | 12 --- .../extra-patch-unix-fcitx-mozc_response_parser.cc | 41 -------- ...extra-patch-unix-fcitx-surrounding_text_util.cc | 28 ----- .../files/extra-patch-unix_fcitx_fcitx_mozc.cc | 21 ---- japanese/mozc-server/files/patch-base_base.gyp | 19 ---- japanese/mozc-server/files/patch-base_logging.cc | 11 -- japanese/mozc-server/files/patch-base_mutex.cc | 11 -- japanese/mozc-server/files/patch-base_process.cc | 11 -- .../mozc-server/files/patch-base_system_util.cc | 26 ----- japanese/mozc-server/files/patch-build_mozc.py | 71 ------------- .../mozc-server/files/patch-build_tools_util.py | 11 -- .../mozc-server/files/patch-gui-qt_libraries.gypi | 10 -- .../files/patch-gui_about_dialog_about_dialog.cc | 14 --- japanese/mozc-server/files/patch-gyp_common.gypi | 105 ------------------ .../files/patch-ipc_ipc_path_manager.cc | 11 -- japanese/mozc-server/files/patch-ipc_unix_ipc.cc | 89 ---------------- .../mozc-server/files/patch-server_mozc_server.cc | 49 --------- japanese/mozc-server/files/patch-src-base_base.gyp | 19 ++++ .../mozc-server/files/patch-src-base_logging.cc | 11 ++ japanese/mozc-server/files/patch-src-base_mutex.cc | 11 ++ .../mozc-server/files/patch-src-base_process.cc | 11 ++ .../files/patch-src-base_system_util.cc | 26 +++++ japanese/mozc-server/files/patch-src-build_mozc.py | 71 +++++++++++++ .../files/patch-src-build_tools_util.py | 11 ++ .../files/patch-src-gui-qt_libraries.gypi | 10 ++ .../patch-src-gui_about_dialog_about_dialog.cc | 14 +++ .../mozc-server/files/patch-src-gyp_common.gypi | 105 ++++++++++++++++++ .../files/patch-src-ipc_ipc_path_manager.cc | 11 ++ .../mozc-server/files/patch-src-ipc_unix_ipc.cc | 89 ++++++++++++++++ .../files/patch-src-server_mozc_server.cc | 49 +++++++++ .../files/patch-src-third_party_gyp_gyp | 8 ++ .../patch-src-third_party_gyp_pylib_gyp_common.py | 14 +++ ...src-third_party_gyp_pylib_gyp_generator_make.py | 31 ++++++ .../mozc-server/files/patch-src-unix_emacs_mozc.el | 43 ++++++++ .../files/patch-src-unix_ibus_gen_mozc_xml.py | 49 +++++++++ .../mozc-server/files/patch-src-unix_ibus_ibus.gyp | 11 ++ .../files/patch-src-unix_ibus_mozc_engine.cc | 11 ++ .../files/patch-src-unix_ibus_path_util.cc | 11 ++ .../mozc-server/files/patch-third_party_gyp_gyp | 8 -- .../patch-third_party_gyp_pylib_gyp_common.py | 14 --- ...tch-third_party_gyp_pylib_gyp_generator_make.py | 31 ------ .../mozc-server/files/patch-unix_emacs_mozc.el | 43 -------- .../files/patch-unix_ibus_gen_mozc_xml.py | 49 --------- .../mozc-server/files/patch-unix_ibus_ibus.gyp | 11 -- .../files/patch-unix_ibus_mozc_engine.cc | 11 -- .../mozc-server/files/patch-unix_ibus_path_util.cc | 11 -- 61 files changed, 914 insertions(+), 775 deletions(-) create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx.gyp create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_event_handler.h create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_translator.h create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_mozc.h create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.cc create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.h create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_response_parser.cc create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-uim-key_translator.h create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc create mode 100644 japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp create mode 100644 japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc delete mode 100644 japanese/mozc-server/files/extra-patch-unix-fcitx-eim.cc delete mode 100644 japanese/mozc-server/files/extra-patch-unix-fcitx-mozc_response_parser.cc delete mode 100644 japanese/mozc-server/files/extra-patch-unix-fcitx-surrounding_text_util.cc delete mode 100644 japanese/mozc-server/files/extra-patch-unix_fcitx_fcitx_mozc.cc delete mode 100644 japanese/mozc-server/files/patch-base_base.gyp delete mode 100644 japanese/mozc-server/files/patch-base_logging.cc delete mode 100644 japanese/mozc-server/files/patch-base_mutex.cc delete mode 100644 japanese/mozc-server/files/patch-base_process.cc delete mode 100644 japanese/mozc-server/files/patch-base_system_util.cc delete mode 100644 japanese/mozc-server/files/patch-build_mozc.py delete mode 100644 japanese/mozc-server/files/patch-build_tools_util.py delete mode 100644 japanese/mozc-server/files/patch-gui-qt_libraries.gypi delete mode 100644 japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc delete mode 100644 japanese/mozc-server/files/patch-gyp_common.gypi delete mode 100644 japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc delete mode 100644 japanese/mozc-server/files/patch-ipc_unix_ipc.cc delete mode 100644 japanese/mozc-server/files/patch-server_mozc_server.cc create mode 100644 japanese/mozc-server/files/patch-src-base_base.gyp create mode 100644 japanese/mozc-server/files/patch-src-base_logging.cc create mode 100644 japanese/mozc-server/files/patch-src-base_mutex.cc create mode 100644 japanese/mozc-server/files/patch-src-base_process.cc create mode 100644 japanese/mozc-server/files/patch-src-base_system_util.cc create mode 100644 japanese/mozc-server/files/patch-src-build_mozc.py create mode 100644 japanese/mozc-server/files/patch-src-build_tools_util.py create mode 100644 japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi create mode 100644 japanese/mozc-server/files/patch-src-gui_about_dialog_about_dialog.cc create mode 100644 japanese/mozc-server/files/patch-src-gyp_common.gypi create mode 100644 japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc create mode 100644 japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc create mode 100644 japanese/mozc-server/files/patch-src-server_mozc_server.cc create mode 100644 japanese/mozc-server/files/patch-src-third_party_gyp_gyp create mode 100644 japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_common.py create mode 100644 japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_generator_make.py create mode 100644 japanese/mozc-server/files/patch-src-unix_emacs_mozc.el create mode 100644 japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py create mode 100644 japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp create mode 100644 japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc create mode 100644 japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc delete mode 100644 japanese/mozc-server/files/patch-third_party_gyp_gyp delete mode 100644 japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py delete mode 100644 japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py delete mode 100644 japanese/mozc-server/files/patch-unix_emacs_mozc.el delete mode 100644 japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py delete mode 100644 japanese/mozc-server/files/patch-unix_ibus_ibus.gyp delete mode 100644 japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc delete mode 100644 japanese/mozc-server/files/patch-unix_ibus_path_util.cc diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile index e65ab67c62a6..5f9d6db24bed 100644 --- a/japanese/mozc-server/Makefile +++ b/japanese/mozc-server/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= mozc -PORTVERSION= 2.16.2051.102 -PORTREVISION= 3 +PORTVERSION= 2.17.2106.102 CATEGORIES= japanese MASTER_SITES= LOCAL/hrs DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -13,7 +12,7 @@ MAINTAINER= hrs@FreeBSD.org COMMENT?= Mozc Japanese Input Method, Server LICENSE= BSD3CLAUSE -LICENSE_FILE= ${WRKSRC}/third_party/gyp/LICENSE +LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ninja:${PORTSDIR}/devel/ninja \ python:${PORTSDIR}/lang/python @@ -24,6 +23,7 @@ RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils USES= compiler:c++11-lang pkgconfig iconv:wchar_t gmake \ tar:bzip2 python:build +BUILD_WRKSRC= ${WRKSRC}/src BUILD_MOZC_LIST?= mozc_server @@ -33,11 +33,11 @@ PKGNAMESUFFIX= -server LICENSE= BSD3CLAUSE NAISTL LICENSE_COMB= multi -LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/third_party/gyp/LICENSE +LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/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 +LICENSE_FILE_NAISTL= ${WRKSRC}/src/data/dictionary_oss/README.txt LICENSE_DISTFILES_NAISTL=${DISTNAME}${EXTRACT_SUFX} .elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool" USE_GNOME= glib20 gtk20 @@ -76,8 +76,8 @@ GYP_DEFINES= use_libprotobuf=1 \ 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/pylib/gyp \ + ${SETENV} BUILD_COMMAND="${BUILD_WRKSRC}/mozcmake" \ + PYTHONPATH=${BUILD_WRKSRC}/third_party/gyp/pylib/gyp \ GYP_DEFINES="${GYP_DEFINES}" \ CC_host="${CC}" \ CC_target="${CC}" \ @@ -87,31 +87,28 @@ BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \ 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 && \ +BUILD_GYP_CMD= cd ${BUILD_WRKSRC}/third_party/gyp && \ ${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 - + ${BUILD_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 + ${BUILD_WRKSRC}/unix/fcitx/gen_fcitx_mozc_i18n.sh ${REINPLACE_CMD} "s,/usr,${LOCALBASE:Q}," \ - ${WRKSRC}/unix/fcitx/mozc.conf + ${BUILD_WRKSRC}/unix/fcitx/mozc.conf .endif .if !${BUILD_MOZC_LIST:Mmozc_el} -${WRKSRC}/mozcmake: +${BUILD_WRKSRC}/mozcmake: ${PRINTF} "%s\n%s\n" "#!/bin/sh" 'exec ${BUILD_CMD} $$@' \ - > ${WRKSRC}/mozcmake - ${CHMOD} +x ${WRKSRC}/mozcmake + > ${BUILD_WRKSRC}/mozcmake + ${CHMOD} +x ${BUILD_WRKSRC}/mozcmake -post-configure: ${WRKSRC}/mozcmake +post-configure: ${BUILD_WRKSRC}/mozcmake ${BUILD_MOZC_CMD} gyp \ - --gypdir=${WRKSRC}/third_party/gyp \ + --gypdir=${BUILD_WRKSRC}/third_party/gyp \ --server_dir="${PREFIX}/bin" \ --tool_dir="${PREFIX}/libexec" \ --renderer_dir="${PREFIX}/libexec" \ @@ -143,10 +140,11 @@ SUB_FILES+= mozc post-extract-mozc_server: @for F in jigyosyo-20130628.lzh ken_all-20130628.lzh; do \ - ${LHA_CMD} xfq2w=${WRKSRC}/data/dictionary_oss ${DISTDIR}/$$F; \ + ${LHA_CMD} xfq2w=${BUILD_WRKSRC}/data/dictionary_oss \ + ${DISTDIR}/$$F; \ done - @cd ${WRKSRC}/data/dictionary_oss && \ - ${PYTHON_CMD} ${WRKSRC}/dictionary/gen_zip_code_seed.py \ + @cd ${BUILD_WRKSRC}/data/dictionary_oss && \ + ${PYTHON_CMD} ${BUILD_WRKSRC}/dictionary/gen_zip_code_seed.py \ --zip_code=ken_all.csv --jigyosyo=jigyosyo.csv \ >> dictionary09.txt @@ -158,10 +156,10 @@ do-build-mozc_server: do-install-mozc_server: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \ ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \ ${STAGEDIR}${PREFIX}/libexec ${INSTALL_SCRIPT} \ ${WRKDIR}/mozc ${STAGEDIR}/${PREFIX}/bin @@ -185,15 +183,15 @@ do-build-mozc_tool: do-install-mozc_tool: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_tool \ + ${BUILD_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 \ + ${BUILD_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 \ + ${BUILD_WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ ${STAGEDIR}${DATADIR}/icons/update_uptodate.png .endif @@ -230,24 +228,24 @@ do-build-ibus_mozc: do-install-ibus_mozc: ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/mozc_renderer \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_renderer \ ${STAGEDIR}${PREFIX}/libexec/mozc_renderer ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/ibus_mozc \ + ${BUILD_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}/gen/unix/ibus/mozc.xml \ + ${BUILD_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 \ + ${BUILD_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 \ + ${BUILD_WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ ${STAGEDIR}${DATADIR}/icons/product_icon.png .endif @@ -265,10 +263,10 @@ WRKSRC_MU= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^v//} LIB_DEPENDS+= libuim.so:${PORTSDIR}/textproc/uim RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \ mozc_tool:${PORTSDIR}/japanese/mozc-tool -GYP_OPTIONS+= --noqt -GYP_DEFINES+= use_libibus=0 \ - enable_gtk_renderer=0 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-unix-uim-key_translator.h \ + ${PATCHDIR}/extra-patch-src-unix-uim-mozc.cc \ + ${PATCHDIR}/extra-patch-src-unix-uim-uim.gyp PLIST_FILES+= lib/uim/plugin/libuim-mozc.so \ %%DATADIR%%/mozc.scm \ %%DATADIR%%/mozc-custom.scm \ @@ -277,8 +275,12 @@ PLIST_FILES+= lib/uim/plugin/libuim-mozc.so \ "@exec ${LOCALBASE}/bin/uim-module-manager --register mozc" \ "@unexec ${LOCALBASE}/bin/uim-module-manager --unregister mozc" +GYP_OPTIONS+= --noqt +GYP_DEFINES+= use_libibus=0 \ + enable_gtk_renderer=0 + post-extract-uim_mozc: - ${LN} -s ${WRKSRC_MU}/Mozc/uim ${WRKSRC}/unix + ${MV} ${WRKSRC_MU}/Mozc/uim ${BUILD_WRKSRC}/unix ${REINPLACE_CMD} -e "s,/usr/lib/mozc,${LOCALBASE}/libexec," \ ${WRKSRC_MU}/Mozc/scm/mozc-custom.scm @@ -291,7 +293,7 @@ do-build-uim_mozc: do-install-uim_mozc: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/uim/plugin ${INSTALL_PROGRAM} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/libuim-mozc.so \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/libuim-mozc.so \ ${STAGEDIR}${PREFIX}/lib/uim/plugin ${MKDIR} ${STAGEDIR}${DATADIR} cd ${WRKSRC_MU}/Mozc/scm && \ @@ -299,7 +301,7 @@ do-install-uim_mozc: ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${DATADIR}/pixmaps ${INSTALL_DATA} \ - ${WRKSRC}/data/images/product_icon_32bpp-128.png \ + ${BUILD_WRKSRC}/data/images/product_icon_32bpp-128.png \ ${STAGEDIR}${DATADIR}/pixmaps/mozc.png .endif @@ -309,10 +311,19 @@ PATCH_SITES= http://download.fcitx-im.org/fcitx-mozc/ PATCHFILES= fcitx-mozc-2.16.2037.102.2.patch .endif .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" -PATCH_DIST_STRIP=-p2 -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-unix-fcitx-eim.cc \ - ${PATCHDIR}/extra-patch-unix-fcitx-mozc_response_parser.cc \ - ${PATCHDIR}/extra-patch-unix-fcitx-surrounding_text_util.cc +PATCH_DIST_STRIP=-p1 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-unix-fcitx-eim.cc \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-mozc_response_parser.cc \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-surrounding_text_util.cc + +POST_PATCHES= ${PATCHDIR}/extra-patch-src-unix_fcitx_fcitx_mozc.cc \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-fcitx.gyp \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-fcitx_key_event_handler.h \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-fcitx_key_translator.h \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-fcitx_mozc.h \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-mozc_connection.cc \ + ${PATCHDIR}/extra-patch-src-unix-fcitx-mozc_connection.h + GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=0 @@ -340,12 +351,12 @@ PLIST_FILES+= lib/fcitx/fcitx-mozc.so \ PLIST_DIRS+= %%DATADIR%%/icon ${DATADIR_REL} post-extract-fcitx_mozc: - ${RM} ${WRKSRC}/unix/fcitx/fcitx.gyp + ${RM} ${BUILD_WRKSRC}/unix/fcitx/fcitx.gyp post-extract: post-extract-fcitx_mozc post-patch-fcitx_mozc: - cd ${PATCH_WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-unix_fcitx_fcitx_mozc.cc + cd ${PATCH_WRKSRC} && ${CAT} ${POST_PATCHES} | ${PATCH} post-patch: post-patch-fcitx_mozc @@ -358,27 +369,27 @@ do-install-fcitx_mozc: ${STAGEDIR}${PREFIX}/share/fcitx/addon \ ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod ${INSTALL_LIB} \ - ${WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \ ${STAGEDIR}${PREFIX}/lib/fcitx/fcitx-mozc.so ${INSTALL_DATA} \ - ${WRKSRC}/unix/fcitx/fcitx-mozc.conf \ + ${BUILD_WRKSRC}/unix/fcitx/fcitx-mozc.conf \ ${STAGEDIR}${PREFIX}/share/fcitx/addon/fcitx-mozc.conf ${INSTALL_DATA} \ - ${WRKSRC}/unix/fcitx/mozc.conf \ + ${BUILD_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 \ + ${BUILD_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 \ + ${BUILD_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}/gen/unix/fcitx/po/${L}.mo \ + ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/gen/unix/fcitx/po/${L}.mo \ ${STAGEDIR}${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo .endfor .endif @@ -394,19 +405,19 @@ PLIST_DIRS+= ${EMACS_VERSION_SITE_LISPDIR}/mozc post-patch-mozc_el: ${REINPLACE_CMD} "s,%%PREFIX%%,${PREFIX}," \ - ${WRKSRC}/unix/emacs/mozc.el + ${BUILD_WRKSRC}/unix/emacs/mozc.el post-patch: post-patch-mozc_el do-build-mozc_el: - cd ${WRKSRC}/unix/emacs && \ + cd ${BUILD_WRKSRC}/unix/emacs && \ ${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.elc \ + ${BUILD_WRKSRC}/unix/emacs/mozc.elc \ ${FILESDIR}/leim-list.el \ ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/ .endif diff --git a/japanese/mozc-server/distinfo b/japanese/mozc-server/distinfo index a343b80fbf76..7bd359908822 100644 --- a/japanese/mozc-server/distinfo +++ b/japanese/mozc-server/distinfo @@ -1,10 +1,10 @@ -SHA256 (mozc-2.16.2051.102.tar.bz2) = 11877306031afee3bbe39e2208340d27df21c90605c1cf48fe788ffa5cf249aa -SIZE (mozc-2.16.2051.102.tar.bz2) = 36135991 +SHA256 (mozc-2.17.2106.102.tar.bz2) = 00d2a82a8c814a6787bdb1d77bdc5dea652eb16cfbf4ae20fe33a25b285d8f39 +SIZE (mozc-2.17.2106.102.tar.bz2) = 33452163 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-2.16.2037.102.2.patch) = ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e -SIZE (fcitx-mozc-2.16.2037.102.2.patch) = 140421 SHA256 (e-kato-macuim-v0.6.16.2_GH0.tar.bz2) = 25fca78d1d76cc5c6a49f3b2f6981791ad8275abb2726334d8d40bd49498194d SIZE (e-kato-macuim-v0.6.16.2_GH0.tar.bz2) = 324551 +SHA256 (fcitx-mozc-2.16.2037.102.2.patch) = ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e +SIZE (fcitx-mozc-2.16.2037.102.2.patch) = 140421 diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc new file mode 100644 index 000000000000..38003c2f3c10 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc @@ -0,0 +1,12 @@ +--- src/unix/fcitx/eim.cc.orig 2014-08-31 06:48:00.000000000 +0900 ++++ src/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-src-unix-fcitx-fcitx.gyp b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx.gyp new file mode 100644 index 000000000000..da756a100bbb --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx.gyp @@ -0,0 +1,10 @@ +--- src/unix/fcitx/fcitx.gyp.orig 2015-07-13 04:27:48.760816000 +0900 ++++ src/unix/fcitx/fcitx.gyp 2015-07-13 04:30:04.604724000 +0900 +@@ -44,7 +44,6 @@ + '../../client/client.gyp:client', + '../../ipc/ipc.gyp:ipc', + '../../session/session_base.gyp:ime_switch_util', +- '../../session/session_base.gyp:session_protocol', + ], + 'fcitx_defines': [ + 'LOCALEDIR=" + + #include "base/port.h" +-#include "config/config.pb.h" +-#include "session/commands.pb.h" ++#include "protocol/config.pb.h" ++#include "protocol/commands.pb.h" + #include "unix/fcitx/fcitx_key_translator.h" + + namespace mozc { diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_translator.h b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_translator.h new file mode 100644 index 000000000000..bf9249f06c39 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_translator.h @@ -0,0 +1,11 @@ +--- src/unix/fcitx/fcitx_key_translator.h.bak 2015-07-13 04:37:03.714894000 +0900 ++++ src/unix/fcitx/fcitx_key_translator.h 2015-07-13 04:37:03.756571000 +0900 +@@ -38,7 +38,7 @@ + #include + + #include "base/port.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + #include + + namespace mozc { diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_mozc.h b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_mozc.h new file mode 100644 index 000000000000..f81b497bb85d --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_mozc.h @@ -0,0 +1,11 @@ +--- src/unix/fcitx/fcitx_mozc.h.bak 2015-07-13 04:37:03.716155000 +0900 ++++ src/unix/fcitx/fcitx_mozc.h 2015-07-13 04:37:03.758916000 +0900 +@@ -39,7 +39,7 @@ + + #include "base/port.h" + #include "base/run_level.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + #include "client/client_interface.h" + #include "mozc_connection.h" + diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.cc b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.cc new file mode 100644 index 000000000000..1f8050b7381b --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.cc @@ -0,0 +1,11 @@ +--- src/unix/fcitx/mozc_connection.cc.bak 2015-07-13 04:37:03.716883000 +0900 ++++ src/unix/fcitx/mozc_connection.cc 2015-07-13 04:37:03.789664000 +0900 +@@ -36,7 +36,7 @@ + #include "base/util.h" + #include "client/client.h" + #include "ipc/ipc.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + #include "session/ime_switch_util.h" + #include "unix/fcitx/fcitx_key_event_handler.h" + #include "unix/fcitx/surrounding_text_util.h" diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.h b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.h new file mode 100644 index 000000000000..ef196528c843 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.h @@ -0,0 +1,11 @@ +--- src/unix/fcitx/mozc_connection.h.bak 2015-07-13 04:37:03.717225000 +0900 ++++ src/unix/fcitx/mozc_connection.h 2015-07-13 04:37:03.761331000 +0900 +@@ -38,7 +38,7 @@ + #include + + #include "base/port.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + #include "unix/fcitx/fcitx_key_event_handler.h" + + namespace mozc { diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_response_parser.cc b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_response_parser.cc new file mode 100644 index 000000000000..77fdebbcb320 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_response_parser.cc @@ -0,0 +1,50 @@ +--- src/unix/fcitx/mozc_response_parser.cc.orig 2015-07-13 04:56:54.572997000 +0900 ++++ src/unix/fcitx/mozc_response_parser.cc 2015-07-13 04:58:15.160661000 +0900 +@@ -36,7 +36,7 @@ + #include "base/logging.h" + #include "base/process.h" + #include "base/util.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + #include "unix/fcitx/fcitx_mozc.h" + #include "unix/fcitx/surrounding_text_util.h" + #include +@@ -235,11 +235,13 @@ + } + } + ++#if 0 + static boolean FcitxMozcPaging(void* arg, boolean prev) + { + FcitxMozc* mozc = static_cast(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 > 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-src-unix-fcitx-surrounding_text_util.cc b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc new file mode 100644 index 000000000000..13746a327abb --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc @@ -0,0 +1,28 @@ +--- src/unix/fcitx/surrounding_text_util.cc.orig 2014-08-31 07:02:14.000000000 +0900 ++++ src/unix/fcitx/surrounding_text_util.cc 2014-08-31 07:03:49.000000000 +0900 +@@ -32,7 +32,9 @@ + #include + #include + #include ++#if 0 + #include ++#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/extra-patch-src-unix-uim-key_translator.h b/japanese/mozc-server/files/extra-patch-src-unix-uim-key_translator.h new file mode 100644 index 000000000000..2f94143a45d9 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-uim-key_translator.h @@ -0,0 +1,11 @@ +--- src/unix/uim/key_translator.h.orig 2015-07-13 05:02:13.505621000 +0900 ++++ src/unix/uim/key_translator.h 2015-07-13 05:02:22.697125000 +0900 +@@ -38,7 +38,7 @@ + using __gnu_cxx::hash_map; + + #include "base/port.h" +-#include "session/commands.pb.h" ++#include "protocol/commands.pb.h" + + namespace mozc { + namespace uim { diff --git a/japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc b/japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc new file mode 100644 index 000000000000..3253be97c9c4 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc @@ -0,0 +1,13 @@ +--- src/unix/uim/mozc.cc.orig 2015-07-13 05:03:12.431514000 +0900 ++++ src/unix/uim/mozc.cc 2015-07-13 05:03:30.340372000 +0900 +@@ -50,8 +50,8 @@ + + #include "base/port.h" + #include "base/util.h" +-#include "config/config.pb.h" +-#include "session/commands.pb.h" ++#include "protocol/config.pb.h" ++#include "protocol/commands.pb.h" + #include "client/client.h" + #include "unix/uim/key_translator.h" + diff --git a/japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp b/japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp new file mode 100644 index 000000000000..082f54758a04 --- /dev/null +++ b/japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp @@ -0,0 +1,28 @@ +--- src/unix/uim/uim.gyp.orig 2014-10-27 02:24:13.000000000 +0900 ++++ src/unix/uim/uim.gyp 2015-07-13 15:29:56.322735000 +0900 +@@ -31,6 +31,7 @@ + { + 'variables': { + 'relative_dir': 'unix/uim', ++ 'gen_out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(relative_dir)', + 'pkg_config_libs': [ + 'uim', + ], +@@ -39,6 +40,8 @@ + 'uim_dependencies': [ + '../../base/base.gyp:base', + '../../client/client.gyp:client', ++ '../../ipc/ipc.gyp:ipc', ++ '../../session/session_base.gyp:ime_switch_util', + ], + }, + 'targets': [ +@@ -49,7 +52,7 @@ + 'key_translator.cc', + ], + 'dependencies': [ +- '../../session/session_base.gyp:session_protocol', ++ '../../session/session_base.gyp:ime_switch_util', + ], + 'cflags': [ + '(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 > 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 deleted file mode 100644 index a995c0d93a99..000000000000 --- a/japanese/mozc-server/files/extra-patch-unix-fcitx-surrounding_text_util.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- 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 - #include - #include -+#if 0 - #include -+#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/extra-patch-unix_fcitx_fcitx_mozc.cc b/japanese/mozc-server/files/extra-patch-unix_fcitx_fcitx_mozc.cc deleted file mode 100644 index ef75da43baba..000000000000 --- a/japanese/mozc-server/files/extra-patch-unix_fcitx_fcitx_mozc.cc +++ /dev/null @@ -1,21 +0,0 @@ ---- unix/fcitx/fcitx_mozc.cc.orig 2015-02-19 10:48:37.000000000 +0900 -+++ unix/fcitx/fcitx_mozc.cc 2015-02-19 10:54:04.000000000 +0900 -@@ -439,6 +439,8 @@ - boolean ToolMenuAction(struct _FcitxUIMenu *menu, int index) - { - string args; -+ size_t pid = 0; -+ - switch(index) { - case 0: - args = "--mode=config_dialog"; -@@ -459,7 +461,8 @@ - args = "--mode=about_dialog"; - break; - } -- mozc::Process::SpawnMozcProcess("mozc_tool", args); -+ -+ mozc::Process::SpawnProcess(mozc::FileUtil::JoinPath(mozc::SystemUtil::GetToolPath(), "mozc_tool"), args, &pid); - return true; - } - 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 2fbd33920e13..000000000000 --- a/japanese/mozc-server/files/patch-base_base.gyp +++ /dev/null @@ -1,19 +0,0 @@ ---- base/base.gyp.orig 2015-02-17 18:02:46.000000000 +0900 -+++ base/base.gyp 2015-02-17 18:03:44.000000000 +0900 -@@ -154,6 +154,16 @@ - 'MOZC_SERVER_DIRECTORY="<(server_dir)"', - ], - }], -+ ['target_platform=="Linux" and tool_dir!=""', { -+ 'defines': [ -+ 'MOZC_TOOL_DIRECTORY="<(tool_dir)"', -+ ], -+ }], -+ ['target_platform=="Linux" and renderer_dir!=""', { -+ 'defines': [ -+ 'MOZC_RENDERER_DIRECTORY="<(renderer_dir)"', -+ ], -+ }], - ['target_platform=="Linux" and document_dir!=""', { - 'defines': [ - 'MOZC_DOCUMENT_DIRECTORY="<(document_dir)"', diff --git a/japanese/mozc-server/files/patch-base_logging.cc b/japanese/mozc-server/files/patch-base_logging.cc deleted file mode 100644 index c6fca634fd65..000000000000 --- a/japanese/mozc-server/files/patch-base_logging.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/logging.cc.orig 2013-07-17 11:38:04.000000000 +0900 -+++ base/logging.cc 2013-07-19 22:24:20.000000000 +0900 -@@ -111,7 +111,7 @@ - #if defined(__native_client__) - "%p", - #elif defined(OS_LINUX) -- "%lu", -+ "%p", - #elif defined(OS_MACOSX) && defined(__LP64__) - "%llu", - #else // OS_WIN or OS_MACOSX(32bit) diff --git a/japanese/mozc-server/files/patch-base_mutex.cc b/japanese/mozc-server/files/patch-base_mutex.cc deleted file mode 100644 index 5d36cf708388..000000000000 --- a/japanese/mozc-server/files/patch-base_mutex.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/mutex.cc.orig 2013-03-29 13:33:43.000000000 +0900 -+++ base/mutex.cc 2013-04-27 15:37:37.000000000 +0900 -@@ -296,7 +296,7 @@ - // PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) || defined(OS_FREEBSD) - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - #elif defined(OS_LINUX) - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); diff --git a/japanese/mozc-server/files/patch-base_process.cc b/japanese/mozc-server/files/patch-base_process.cc deleted file mode 100644 index 48b94ca9c40d..000000000000 --- a/japanese/mozc-server/files/patch-base_process.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/process.cc.orig 2013-03-29 13:33:43.000000000 +0900 -+++ base/process.cc 2013-04-24 00:17:03.000000000 +0900 -@@ -122,7 +122,7 @@ - #endif - - #ifdef OS_LINUX -- static const char kBrowserCommand[] = "/usr/bin/xdg-open"; -+ static const char kBrowserCommand[] = LOCALBASE "/bin/xdg-open"; - // xdg-open which uses kfmclient or gnome-open internally works both on KDE - // and GNOME environments. - return SpawnProcess(kBrowserCommand, url); diff --git a/japanese/mozc-server/files/patch-base_system_util.cc b/japanese/mozc-server/files/patch-base_system_util.cc deleted file mode 100644 index 9d9e875c11bb..000000000000 --- a/japanese/mozc-server/files/patch-base_system_util.cc +++ /dev/null @@ -1,26 +0,0 @@ ---- base/system_util.cc.orig 2015-02-17 17:59:05.000000000 +0900 -+++ base/system_util.cc 2015-02-17 18:01:50.000000000 +0900 -@@ -407,7 +407,11 @@ - if (server_path.empty()) { - return ""; - } -+#ifdef MOZC_RENDERER_DIRECTORY -+ return FileUtil::JoinPath(MOZC_RENDERER_DIRECTORY "/", kMozcRenderer); -+#else - return FileUtil::JoinPath(server_path, kMozcRenderer); -+#endif - } - - string SystemUtil::GetToolPath() { -@@ -416,7 +420,11 @@ - if (server_path.empty()) { - return ""; - } -+#ifdef MOZC_TOOL_DIRECTORY -+ return FileUtil::JoinPath(MOZC_TOOL_DIRECTORY "/", kMozcTool); -+#else - return FileUtil::JoinPath(server_path, kMozcTool); -+#endif - } - - string SystemUtil::GetDocumentDirectory() { diff --git a/japanese/mozc-server/files/patch-build_mozc.py b/japanese/mozc-server/files/patch-build_mozc.py deleted file mode 100644 index 39e3f46871c7..000000000000 --- a/japanese/mozc-server/files/patch-build_mozc.py +++ /dev/null @@ -1,71 +0,0 @@ ---- build_mozc.py.orig 2015-02-15 04:18:52.000000000 +0900 -+++ build_mozc.py 2015-02-19 03:40:47.000000000 +0900 -@@ -357,6 +357,11 @@ - 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('--cflags', dest='cflags') -+ parser.add_option('--cflags_cc', dest='cflags_cc') -+ parser.add_option('--include_dirs', dest='include_dirs') - AddTargetPlatformOption(parser) - - # Mac and Linux -@@ -377,6 +382,14 @@ - default='', - help='A path to the directory where the server executable' - 'is installed. This option is used only on Linux.') -+ parser.add_option('--renderer_dir', dest='renderer_dir', -+ default='', -+ help='A path to the directory where the renderer executable' -+ 'is installed. This option is used only on Linux.') -+ parser.add_option('--tool_dir', dest='tool_dir', -+ default='', -+ help='A path to the directory where the tool executable' -+ 'is installed. This option is used only on Linux.') - - # Android - parser.add_option('--android_arch', dest='android_arch', -@@ -548,7 +561,7 @@ - parser = optparse.OptionParser(usage='Usage: %prog build [options]') - AddCommonOptions(parser) - if IsLinux(): -- default_build_concurrency = GetNumberOfProcessors() * 2 -+ default_build_concurrency = 1; - parser.add_option('--jobs', '-j', dest='jobs', - default=('%d' % default_build_concurrency), - metavar='N', help='run build jobs in parallel') -@@ -707,6 +720,17 @@ - logging.info('Building GYP command line...') - gyp_options = ['--depth=.', '--include=%s/gyp/common.gypi' % SRC_DIR] - -+ localbase = options.localbase or '/usr' -+ gyp_options.extend(['-D', 'localbase=%s' % localbase]) -+ -+ ldflags = options.ldflags or '' -+ gyp_options.extend(['-D', 'ldflags=%s' % ldflags]) -+ cflags = options.cflags or '' -+ gyp_options.extend(['-D', 'cflags=%s' % cflags]) -+ cflags_cc = options.cflags_cc or '' -+ gyp_options.extend(['-D', 'cflags_cc=%s' % cflags_cc]) -+ include_dirs = options.include_dirs or '' -+ gyp_options.extend(['-D', 'include_dirs=%s' % include_dirs]) - - mozc_root = os.path.abspath(GetTopLevelSourceDirectoryName()) - gyp_options.extend(['-D', 'abs_depth=%s' % mozc_root]) -@@ -936,6 +960,14 @@ - if options.server_dir: - gyp_options.extend([ - '-D', 'server_dir=%s' % os.path.abspath(options.server_dir)]) -+ if options.tool_dir: -+ gyp_options.extend([ -+ '-D', 'tool_dir=%s' % os.path.abspath(options.tool_dir)]) -+ if options.renderer_dir: -+ gyp_options.extend([ -+ '-D', 'renderer_dir=%s' % os.path.abspath(options.renderer_dir)]) -+ -+ - - # TODO(yukawa): Use ninja on OSX. - if generator == 'ninja': diff --git a/japanese/mozc-server/files/patch-build_tools_util.py b/japanese/mozc-server/files/patch-build_tools_util.py deleted file mode 100644 index 6826911ebe10..000000000000 --- a/japanese/mozc-server/files/patch-build_tools_util.py +++ /dev/null @@ -1,11 +0,0 @@ ---- build_tools/util.py.orig 2013-04-21 03:48:52.147271754 +0900 -+++ build_tools/util.py 2013-04-21 04:07:17.415269142 +0900 -@@ -54,7 +54,7 @@ - - def IsLinux(): - """Returns true if the platform is Linux.""" -- return os.name == 'posix' and os.uname()[0] == 'Linux' -+ return os.name == 'posix' and ( os.uname()[0] == 'Linux' or os.uname()[0] == 'FreeBSD' ) - - - def GetNumberOfProcessors(): diff --git a/japanese/mozc-server/files/patch-gui-qt_libraries.gypi b/japanese/mozc-server/files/patch-gui-qt_libraries.gypi deleted file mode 100644 index 8d66ac67a60d..000000000000 --- a/japanese/mozc-server/files/patch-gui-qt_libraries.gypi +++ /dev/null @@ -1,10 +0,0 @@ ---- gui/qt_libraries.gypi.orig 2013-07-17 11:38:03.000000000 +0900 -+++ gui/qt_libraries.gypi 2013-08-18 15:57:44.000000000 +0900 -@@ -105,6 +105,7 @@ - }, { - 'libraries': [ - ' and instead of upcoming - # and . - '-Wno-deprecated', -+ '<@(cflags_cc)', -+ ], -+ 'include_dirs': [ -+ '<@(include_dirs)' -+ ], -+ 'ldflags': [ -+ '<@(ldflags)', -+ '-fstack-protector', - ], - 'conditions': [ - ['target_platform!="NaCl"', { diff --git a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc b/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc deleted file mode 100644 index 8b029cc2652f..000000000000 --- a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- ipc/ipc_path_manager.cc.orig 2013-03-29 13:33:26.000000000 +0900 -+++ ipc/ipc_path_manager.cc 2013-04-27 15:21:52.000000000 +0900 -@@ -276,7 +276,7 @@ - *ipc_name = kIPCPrefix; - #endif // OS_WIN - --#ifdef OS_LINUX -+#if defined(OS_LINUX) && !defined(OS_FREEBSD) - // On Linux, use abstract namespace which is independent of the file system. - (*ipc_name)[0] = '\0'; - #endif diff --git a/japanese/mozc-server/files/patch-ipc_unix_ipc.cc b/japanese/mozc-server/files/patch-ipc_unix_ipc.cc deleted file mode 100644 index 76192d6fd642..000000000000 --- a/japanese/mozc-server/files/patch-ipc_unix_ipc.cc +++ /dev/null @@ -1,89 +0,0 @@ ---- ipc/unix_ipc.cc.orig 2013-03-29 13:33:26.000000000 +0900 -+++ ipc/unix_ipc.cc 2013-04-27 15:23:08.000000000 +0900 -@@ -41,6 +41,9 @@ - #include - #include - #include -+#if defined(OS_MACOSX) || defined(OS_FREEBSD) -+#include -+#endif - #include - #include - -@@ -123,6 +126,29 @@ - bool IsPeerValid(int socket, pid_t *pid) { - *pid = 0; - -+#if defined(OS_MACOSX) || defined(OS_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); -+ 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(OS_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. -@@ -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'; -+#if defined(OS_MACOSX) || defined(OS_FREEBSD) -+ 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)); -+#if defined(OS_MACOSX) || defined(OS_FREEBSD) -+ 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(); -- 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); - return; - } -+ if (!IsAbstractSocket(server_address_)) { -+ // Linux does not use files for IPC. -+ ::chmod(server_address_.c_str(), 0600); -+ } - - if (::listen(socket_, num_connections) < 0) { - LOG(FATAL) << "listen() 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 deleted file mode 100644 index 55a601b1a9ba..000000000000 --- a/japanese/mozc-server/files/patch-server_mozc_server.cc +++ /dev/null @@ -1,49 +0,0 @@ ---- server/mozc_server.cc.orig 2013-03-29 13:33:26.000000000 +0900 -+++ server/mozc_server.cc 2013-04-27 15:18:29.000000000 +0900 -@@ -32,6 +32,9 @@ - #ifdef OS_WIN - #include - #endif -+#ifdef OS_FREEBSD -+#include -+#endif - - #include - #include -@@ -51,6 +54,23 @@ - mozc::SessionServer *g_session_server = NULL; - } - -+#ifdef OS_FREEBSD -+static void sig_func(int num) -+{ -+ VLOG(1) << "signal " << num << " recieved."; -+ switch (num) { -+ case SIGINT: -+ case SIGHUP: -+ case SIGTERM: -+ if (g_session_server) -+ g_session_server->Terminate(); -+ break; -+ default: -+ break; -+ } -+} -+#endif -+ - namespace mozc { - namespace { - -@@ -132,6 +152,12 @@ - return -1; - } - -+#ifdef OS_FREEBSD -+ ::signal(SIGINT, sig_func); -+ ::signal(SIGHUP, sig_func); -+ ::signal(SIGTERM, sig_func); -+#endif -+ - #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-src-base_base.gyp b/japanese/mozc-server/files/patch-src-base_base.gyp new file mode 100644 index 000000000000..2848309ba0b2 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-base_base.gyp @@ -0,0 +1,19 @@ +--- src/base/base.gyp.orig 2015-02-17 18:02:46.000000000 +0900 ++++ src/base/base.gyp 2015-02-17 18:03:44.000000000 +0900 +@@ -154,6 +154,16 @@ + 'MOZC_SERVER_DIRECTORY="<(server_dir)"', + ], + }], ++ ['target_platform=="Linux" and tool_dir!=""', { ++ 'defines': [ ++ 'MOZC_TOOL_DIRECTORY="<(tool_dir)"', ++ ], ++ }], ++ ['target_platform=="Linux" and renderer_dir!=""', { ++ 'defines': [ ++ 'MOZC_RENDERER_DIRECTORY="<(renderer_dir)"', ++ ], ++ }], + ['target_platform=="Linux" and document_dir!=""', { + 'defines': [ + 'MOZC_DOCUMENT_DIRECTORY="<(document_dir)"', diff --git a/japanese/mozc-server/files/patch-src-base_logging.cc b/japanese/mozc-server/files/patch-src-base_logging.cc new file mode 100644 index 000000000000..b7e812a4622d --- /dev/null +++ b/japanese/mozc-server/files/patch-src-base_logging.cc @@ -0,0 +1,11 @@ +--- src/base/logging.cc.orig 2013-07-17 11:38:04.000000000 +0900 ++++ src/base/logging.cc 2013-07-19 22:24:20.000000000 +0900 +@@ -111,7 +111,7 @@ + #if defined(__native_client__) + "%p", + #elif defined(OS_LINUX) +- "%lu", ++ "%p", + #elif defined(OS_MACOSX) && defined(__LP64__) + "%llu", + #else // OS_WIN or OS_MACOSX(32bit) diff --git a/japanese/mozc-server/files/patch-src-base_mutex.cc b/japanese/mozc-server/files/patch-src-base_mutex.cc new file mode 100644 index 000000000000..2fc3e7b4f43d --- /dev/null +++ b/japanese/mozc-server/files/patch-src-base_mutex.cc @@ -0,0 +1,11 @@ +--- src/base/mutex.cc.orig 2013-03-29 13:33:43.000000000 +0900 ++++ src/base/mutex.cc 2013-04-27 15:37:37.000000000 +0900 +@@ -296,7 +296,7 @@ + // PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + #elif defined(OS_LINUX) + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); diff --git a/japanese/mozc-server/files/patch-src-base_process.cc b/japanese/mozc-server/files/patch-src-base_process.cc new file mode 100644 index 000000000000..2ebdcbe34a81 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-base_process.cc @@ -0,0 +1,11 @@ +--- src/base/process.cc.orig 2013-03-29 13:33:43.000000000 +0900 ++++ src/base/process.cc 2013-04-24 00:17:03.000000000 +0900 +@@ -122,7 +122,7 @@ + #endif + + #ifdef OS_LINUX +- static const char kBrowserCommand[] = "/usr/bin/xdg-open"; ++ static const char kBrowserCommand[] = LOCALBASE "/bin/xdg-open"; + // xdg-open which uses kfmclient or gnome-open internally works both on KDE + // and GNOME environments. + return SpawnProcess(kBrowserCommand, url); diff --git a/japanese/mozc-server/files/patch-src-base_system_util.cc b/japanese/mozc-server/files/patch-src-base_system_util.cc new file mode 100644 index 000000000000..6bb75d58d190 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-base_system_util.cc @@ -0,0 +1,26 @@ +--- src/base/system_util.cc.orig 2015-02-17 17:59:05.000000000 +0900 ++++ src/base/system_util.cc 2015-02-17 18:01:50.000000000 +0900 +@@ -407,7 +407,11 @@ + if (server_path.empty()) { + return ""; + } ++#ifdef MOZC_RENDERER_DIRECTORY ++ return FileUtil::JoinPath(MOZC_RENDERER_DIRECTORY "/", kMozcRenderer); ++#else + return FileUtil::JoinPath(server_path, kMozcRenderer); ++#endif + } + + string SystemUtil::GetToolPath() { +@@ -416,7 +420,11 @@ + if (server_path.empty()) { + return ""; + } ++#ifdef MOZC_TOOL_DIRECTORY ++ return FileUtil::JoinPath(MOZC_TOOL_DIRECTORY "/", kMozcTool); ++#else + return FileUtil::JoinPath(server_path, kMozcTool); ++#endif + } + + string SystemUtil::GetDocumentDirectory() { diff --git a/japanese/mozc-server/files/patch-src-build_mozc.py b/japanese/mozc-server/files/patch-src-build_mozc.py new file mode 100644 index 000000000000..ba8aecb173bb --- /dev/null +++ b/japanese/mozc-server/files/patch-src-build_mozc.py @@ -0,0 +1,71 @@ +--- src/build_mozc.py.orig 2015-02-15 04:18:52.000000000 +0900 ++++ src/build_mozc.py 2015-02-19 03:40:47.000000000 +0900 +@@ -357,6 +357,11 @@ + 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('--cflags', dest='cflags') ++ parser.add_option('--cflags_cc', dest='cflags_cc') ++ parser.add_option('--include_dirs', dest='include_dirs') + AddTargetPlatformOption(parser) + + # Mac and Linux +@@ -377,6 +382,14 @@ + default='', + help='A path to the directory where the server executable' + 'is installed. This option is used only on Linux.') ++ parser.add_option('--renderer_dir', dest='renderer_dir', ++ default='', ++ help='A path to the directory where the renderer executable' ++ 'is installed. This option is used only on Linux.') ++ parser.add_option('--tool_dir', dest='tool_dir', ++ default='', ++ help='A path to the directory where the tool executable' ++ 'is installed. This option is used only on Linux.') + + # Android + parser.add_option('--android_arch', dest='android_arch', +@@ -548,7 +561,7 @@ + parser = optparse.OptionParser(usage='Usage: %prog build [options]') + AddCommonOptions(parser) + if IsLinux(): +- default_build_concurrency = GetNumberOfProcessors() * 2 ++ default_build_concurrency = 1; + parser.add_option('--jobs', '-j', dest='jobs', + default=('%d' % default_build_concurrency), + metavar='N', help='run build jobs in parallel') +@@ -707,6 +720,17 @@ + logging.info('Building GYP command line...') + gyp_options = ['--depth=.', '--include=%s/gyp/common.gypi' % SRC_DIR] + ++ localbase = options.localbase or '/usr' ++ gyp_options.extend(['-D', 'localbase=%s' % localbase]) ++ ++ ldflags = options.ldflags or '' ++ gyp_options.extend(['-D', 'ldflags=%s' % ldflags]) ++ cflags = options.cflags or '' ++ gyp_options.extend(['-D', 'cflags=%s' % cflags]) ++ cflags_cc = options.cflags_cc or '' ++ gyp_options.extend(['-D', 'cflags_cc=%s' % cflags_cc]) ++ include_dirs = options.include_dirs or '' ++ gyp_options.extend(['-D', 'include_dirs=%s' % include_dirs]) + + mozc_root = os.path.abspath(GetTopLevelSourceDirectoryName()) + gyp_options.extend(['-D', 'abs_depth=%s' % mozc_root]) +@@ -936,6 +960,14 @@ + if options.server_dir: + gyp_options.extend([ + '-D', 'server_dir=%s' % os.path.abspath(options.server_dir)]) ++ if options.tool_dir: ++ gyp_options.extend([ ++ '-D', 'tool_dir=%s' % os.path.abspath(options.tool_dir)]) ++ if options.renderer_dir: ++ gyp_options.extend([ ++ '-D', 'renderer_dir=%s' % os.path.abspath(options.renderer_dir)]) ++ ++ + + # TODO(yukawa): Use ninja on OSX. + if generator == 'ninja': diff --git a/japanese/mozc-server/files/patch-src-build_tools_util.py b/japanese/mozc-server/files/patch-src-build_tools_util.py new file mode 100644 index 000000000000..65f3c4dcc604 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-build_tools_util.py @@ -0,0 +1,11 @@ +--- src/build_tools/util.py.orig 2013-04-21 03:48:52.147271754 +0900 ++++ src/build_tools/util.py 2013-04-21 04:07:17.415269142 +0900 +@@ -54,7 +54,7 @@ + + def IsLinux(): + """Returns true if the platform is Linux.""" +- return os.name == 'posix' and os.uname()[0] == 'Linux' ++ return os.name == 'posix' and ( os.uname()[0] == 'Linux' or os.uname()[0] == 'FreeBSD' ) + + + def GetNumberOfProcessors(): diff --git a/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi b/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi new file mode 100644 index 000000000000..7e2a69922d9f --- /dev/null +++ b/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi @@ -0,0 +1,10 @@ +--- src/gui/qt_libraries.gypi.orig 2013-07-17 11:38:03.000000000 +0900 ++++ src/gui/qt_libraries.gypi 2013-08-18 15:57:44.000000000 +0900 +@@ -105,6 +105,7 @@ + }, { + 'libraries': [ + ' and instead of upcoming + # and . + '-Wno-deprecated', ++ '<@(cflags_cc)', ++ ], ++ 'include_dirs': [ ++ '<@(include_dirs)' ++ ], ++ 'ldflags': [ ++ '<@(ldflags)', ++ '-fstack-protector', + ], + 'conditions': [ + ['target_platform!="NaCl"', { diff --git a/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc b/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc new file mode 100644 index 000000000000..52b5064ffb95 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc @@ -0,0 +1,11 @@ +--- src/ipc/ipc_path_manager.cc.orig 2013-03-29 13:33:26.000000000 +0900 ++++ src/ipc/ipc_path_manager.cc 2013-04-27 15:21:52.000000000 +0900 +@@ -276,7 +276,7 @@ + *ipc_name = kIPCPrefix; + #endif // OS_WIN + +-#ifdef OS_LINUX ++#if defined(OS_LINUX) && !defined(OS_FREEBSD) + // On Linux, use abstract namespace which is independent of the file system. + (*ipc_name)[0] = '\0'; + #endif diff --git a/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc b/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc new file mode 100644 index 000000000000..ac358d9a5576 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc @@ -0,0 +1,89 @@ +--- src/ipc/unix_ipc.cc.orig 2013-03-29 13:33:26.000000000 +0900 ++++ src/ipc/unix_ipc.cc 2013-04-27 15:23:08.000000000 +0900 +@@ -41,6 +41,9 @@ + #include + #include + #include ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) ++#include ++#endif + #include + #include + +@@ -123,6 +126,29 @@ + bool IsPeerValid(int socket, pid_t *pid) { + *pid = 0; + ++#if defined(OS_MACOSX) || defined(OS_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); ++ 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(OS_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. +@@ -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'; ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) ++ 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)); ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) ++ 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(); +- 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); + return; + } ++ if (!IsAbstractSocket(server_address_)) { ++ // Linux does not use files for IPC. ++ ::chmod(server_address_.c_str(), 0600); ++ } + + if (::listen(socket_, num_connections) < 0) { + LOG(FATAL) << "listen() failed: " << strerror(errno); diff --git a/japanese/mozc-server/files/patch-src-server_mozc_server.cc b/japanese/mozc-server/files/patch-src-server_mozc_server.cc new file mode 100644 index 000000000000..6a5983e17837 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-server_mozc_server.cc @@ -0,0 +1,49 @@ +--- src/server/mozc_server.cc.orig 2013-03-29 13:33:26.000000000 +0900 ++++ src/server/mozc_server.cc 2013-04-27 15:18:29.000000000 +0900 +@@ -32,6 +32,9 @@ + #ifdef OS_WIN + #include + #endif ++#ifdef OS_FREEBSD ++#include ++#endif + + #include + #include +@@ -51,6 +54,23 @@ + mozc::SessionServer *g_session_server = NULL; + } + ++#ifdef OS_FREEBSD ++static void sig_func(int num) ++{ ++ VLOG(1) << "signal " << num << " recieved."; ++ switch (num) { ++ case SIGINT: ++ case SIGHUP: ++ case SIGTERM: ++ if (g_session_server) ++ g_session_server->Terminate(); ++ break; ++ default: ++ break; ++ } ++} ++#endif ++ + namespace mozc { + namespace { + +@@ -132,6 +152,12 @@ + return -1; + } + ++#ifdef OS_FREEBSD ++ ::signal(SIGINT, sig_func); ++ ::signal(SIGHUP, sig_func); ++ ::signal(SIGTERM, sig_func); ++#endif ++ + #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-src-third_party_gyp_gyp b/japanese/mozc-server/files/patch-src-third_party_gyp_gyp new file mode 100644 index 000000000000..675b00c03b07 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-third_party_gyp_gyp @@ -0,0 +1,8 @@ +--- src/third_party/gyp/gyp.orig 2014-08-31 04:28:46.000000000 +0900 ++++ src/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-src-third_party_gyp_pylib_gyp_common.py b/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_common.py new file mode 100644 index 000000000000..02d14a66bf0e --- /dev/null +++ b/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_common.py @@ -0,0 +1,14 @@ +--- src/third_party/gyp/pylib/gyp/common.py.orig 2013-04-21 03:48:44.556270889 +0900 ++++ src/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', ++ 'freebsd7': 'linux', ++ 'freebsd8': 'linux', ++ 'freebsd9': 'linux', ++ 'freebsd10': 'linux', ++ 'freebsd11': 'linux' + } + + if 'flavor' in params: diff --git a/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_generator_make.py b/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_generator_make.py new file mode 100644 index 000000000000..56af50dcc9b2 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_generator_make.py @@ -0,0 +1,31 @@ +--- src/third_party/gyp/pylib/gyp/generator/make.py.orig 2013-02-26 11:59:54.000000000 +0900 ++++ src/third_party/gyp/pylib/gyp/generator/make.py 2013-05-03 21:08:15.000000000 +0900 +@@ -259,7 +259,7 @@ + # export LINK=g++ + # + # This will allow make to invoke N linker processes as specified in -jN. +-LINK ?= %(flock)s $(builddir)/linker.lock $(CXX.target) ++LINK ?= $(CXX.target) + + CC.target ?= %(CC.target)s + CFLAGS.target ?= $(CFLAGS) +@@ -1956,6 +1956,9 @@ + srcdir_prefix = '$(srcdir)/' + + flock_command= 'flock' ++ if os.uname()[0] == 'FreeBSD': ++ flock_command= 'lockf' ++ + header_params = { + 'default_target': default_target, + 'builddir': builddir_name, +@@ -2003,7 +2006,8 @@ + build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) + make_global_settings_array = data[build_file].get('make_global_settings', []) + wrappers = {} +- wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command ++ # Disable flock for linking. ++ # wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command + for key, value in make_global_settings_array: + if key.endswith('_wrapper'): + wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value diff --git a/japanese/mozc-server/files/patch-src-unix_emacs_mozc.el b/japanese/mozc-server/files/patch-src-unix_emacs_mozc.el new file mode 100644 index 000000000000..dac728d79b7f --- /dev/null +++ b/japanese/mozc-server/files/patch-src-unix_emacs_mozc.el @@ -0,0 +1,43 @@ +--- src/unix/emacs/mozc.el.orig 2015-02-15 04:18:31.000000000 +0900 ++++ src/unix/emacs/mozc.el 2015-02-19 04:01:46.000000000 +0900 +@@ -1538,7 +1538,7 @@ + + ;;;; Communication with Mozc server through the helper process + +-(defvar mozc-helper-program-name "mozc_emacs_helper" ++(defvar mozc-helper-program-name "%%PREFIX%%/libexec/mozc_emacs_helper" + "Helper program's name or path to the helper program. + The helper program helps Emacs communicate with Mozc server, + which doesn't understand S-expression.") +@@ -1973,12 +1973,12 @@ + "Deactivate function `mozc-mode' via LEIM." + (mozc-mode nil)) + +-(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) ++;;(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) + + (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-src-unix_ibus_gen_mozc_xml.py b/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py new file mode 100644 index 000000000000..4b797fa5c7e8 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py @@ -0,0 +1,49 @@ +--- src/unix/ibus/gen_mozc_xml.py.orig 2015-02-15 04:18:31.000000000 +0900 ++++ src/unix/ibus/gen_mozc_xml.py 2015-02-22 02:00:23.000000000 +0900 +@@ -67,7 +67,7 @@ + # Information to generate part of mozc.xml for IBus 1.5 or later. + IBUS_1_5_ENGINE_COMMON_PROPS = { + 'description': '%(product_name)s (Japanese Input Method)', +- 'language': 'ja', ++ 'language': 'jpn', + 'icon': '%(ibus_mozc_icon_path)s', + 'rank': '80', + 'symbol': 'あ', +@@ -91,7 +91,7 @@ + # unix/ibus/mozc_engine.cc. + 'name': ['mozc-jp'], + 'longname': ['%(product_name)s'], +- 'layout': ['default'], ++ 'layout': ['jp'], + }, + } + +@@ -129,6 +129,7 @@ + engines: A dictionary from a property name to a list of property values of + engines. For example, {'name': ['mozc-jp', 'mozc', 'mozc-dv']}. + """ ++ print '' + print '' + for key in component: + OutputXmlElement(param_dict, key, component[key]) +@@ -203,13 +204,19 @@ + parser.add_option('--server_dir', dest='server_dir', default='', + help='The absolute directory path to be installed the ' + 'server executable.') ++ parser.add_option('--renderer_dir', dest='renderer_dir', default='', ++ help='The absolute directory path to be installed the ' ++ 'renderer executable.') ++ parser.add_option('--tool_dir', dest='tool_dir', default='', ++ help='The absolute directory path to be installed the ' ++ 'tool executable.') + parser.add_option('--pkg_config_command', dest='pkg_config_command', + default='pkg-config', + help='The path to pkg-config command.') + (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(options.tool_dir, 'mozc_tool')) + setup_arg.append('--mode=config_dialog') + if IsIBus15OrGreater(options): + # A tentative workaround against IBus 1.5 diff --git a/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp b/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp new file mode 100644 index 000000000000..6dda77eac099 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp @@ -0,0 +1,11 @@ +--- src/unix/ibus/ibus.gyp.orig 2015-02-17 18:04:40.000000000 +0900 ++++ src/unix/ibus/ibus.gyp 2015-02-17 18:04:58.000000000 +0900 +@@ -83,6 +83,8 @@ + './gen_mozc_xml.py', + '--branding=Mozc', + '--server_dir=<(server_dir)', ++ '--renderer_dir=<(renderer_dir)', ++ '--tool_dir=<(tool_dir)', + '--pkg_config_command=<(pkg_config_command)', + '--ibus_mozc_path=<(ibus_mozc_path)', + '--ibus_mozc_icon_path=<(ibus_mozc_icon_path)', diff --git a/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc b/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc new file mode 100644 index 000000000000..e42fe70fb0e2 --- /dev/null +++ b/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc @@ -0,0 +1,11 @@ +--- src/unix/ibus/mozc_engine.cc.orig 2014-08-31 03:35:19.000000000 +0900 ++++ src/unix/ibus/mozc_engine.cc 2014-08-31 04:04:15.000000000 +0900 +@@ -224,7 +224,7 @@ + } + + 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-src-unix_ibus_path_util.cc b/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc new file mode 100644 index 000000000000..be46af7f91bd --- /dev/null +++ b/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc @@ -0,0 +1,11 @@ +--- src/unix/ibus/path_util.cc.orig 2013-03-29 13:33:43.000000000 +0900 ++++ src/unix/ibus/path_util.cc 2013-04-27 15:42:28.000000000 +0900 +@@ -30,7 +30,7 @@ + #include "unix/ibus/path_util.h" + + namespace { +-const char kInstalledDirectory[] = "/usr/share/ibus-mozc"; ++const char kInstalledDirectory[] = LOCALBASE "/share/ibus-mozc/icons"; + } + + namespace mozc { diff --git a/japanese/mozc-server/files/patch-third_party_gyp_gyp b/japanese/mozc-server/files/patch-third_party_gyp_gyp deleted file mode 100644 index 9816e1eade65..000000000000 --- a/japanese/mozc-server/files/patch-third_party_gyp_gyp +++ /dev/null @@ -1,8 +0,0 @@ ---- 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-third_party_gyp_pylib_gyp_common.py b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py deleted file mode 100644 index a26890f1e33a..000000000000 --- a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py +++ /dev/null @@ -1,14 +0,0 @@ ---- 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', -+ 'freebsd7': 'linux', -+ 'freebsd8': 'linux', -+ 'freebsd9': 'linux', -+ 'freebsd10': 'linux', -+ 'freebsd11': 'linux' - } - - 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 deleted file mode 100644 index 1d391db29991..000000000000 --- a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py +++ /dev/null @@ -1,31 +0,0 @@ ---- third_party/gyp/pylib/gyp/generator/make.py.orig 2013-02-26 11:59:54.000000000 +0900 -+++ third_party/gyp/pylib/gyp/generator/make.py 2013-05-03 21:08:15.000000000 +0900 -@@ -259,7 +259,7 @@ - # export LINK=g++ - # - # This will allow make to invoke N linker processes as specified in -jN. --LINK ?= %(flock)s $(builddir)/linker.lock $(CXX.target) -+LINK ?= $(CXX.target) - - CC.target ?= %(CC.target)s - CFLAGS.target ?= $(CFLAGS) -@@ -1956,6 +1956,9 @@ - srcdir_prefix = '$(srcdir)/' - - flock_command= 'flock' -+ if os.uname()[0] == 'FreeBSD': -+ flock_command= 'lockf' -+ - header_params = { - 'default_target': default_target, - 'builddir': builddir_name, -@@ -2003,7 +2006,8 @@ - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings_array = data[build_file].get('make_global_settings', []) - wrappers = {} -- wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command -+ # Disable flock for linking. -+ # wrappers['LINK'] = '%s $(builddir)/linker.lock' % flock_command - for key, value in make_global_settings_array: - if key.endswith('_wrapper'): - wrappers[key[:-len('_wrapper')]] = '$(abspath %s)' % value diff --git a/japanese/mozc-server/files/patch-unix_emacs_mozc.el b/japanese/mozc-server/files/patch-unix_emacs_mozc.el deleted file mode 100644 index 22257b1095af..000000000000 --- a/japanese/mozc-server/files/patch-unix_emacs_mozc.el +++ /dev/null @@ -1,43 +0,0 @@ ---- unix/emacs/mozc.el.orig 2015-02-15 04:18:31.000000000 +0900 -+++ unix/emacs/mozc.el 2015-02-19 04:01:46.000000000 +0900 -@@ -1538,7 +1538,7 @@ - - ;;;; Communication with Mozc server through the helper process - --(defvar mozc-helper-program-name "mozc_emacs_helper" -+(defvar mozc-helper-program-name "%%PREFIX%%/libexec/mozc_emacs_helper" - "Helper program's name or path to the helper program. - The helper program helps Emacs communicate with Mozc server, - which doesn't understand S-expression.") -@@ -1973,12 +1973,12 @@ - "Deactivate function `mozc-mode' via LEIM." - (mozc-mode nil)) - --(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) -+;;(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) - - (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 de022f56d745..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py +++ /dev/null @@ -1,49 +0,0 @@ ---- unix/ibus/gen_mozc_xml.py.orig 2015-02-15 04:18:31.000000000 +0900 -+++ unix/ibus/gen_mozc_xml.py 2015-02-22 02:00:23.000000000 +0900 -@@ -67,7 +67,7 @@ - # Information to generate part of mozc.xml for IBus 1.5 or later. - IBUS_1_5_ENGINE_COMMON_PROPS = { - 'description': '%(product_name)s (Japanese Input Method)', -- 'language': 'ja', -+ 'language': 'jpn', - 'icon': '%(ibus_mozc_icon_path)s', - 'rank': '80', - 'symbol': 'あ', -@@ -91,7 +91,7 @@ - # unix/ibus/mozc_engine.cc. - 'name': ['mozc-jp'], - 'longname': ['%(product_name)s'], -- 'layout': ['default'], -+ 'layout': ['jp'], - }, - } - -@@ -129,6 +129,7 @@ - engines: A dictionary from a property name to a list of property values of - engines. For example, {'name': ['mozc-jp', 'mozc', 'mozc-dv']}. - """ -+ print '' - print '' - for key in component: - OutputXmlElement(param_dict, key, component[key]) -@@ -203,13 +204,19 @@ - parser.add_option('--server_dir', dest='server_dir', default='', - help='The absolute directory path to be installed the ' - 'server executable.') -+ parser.add_option('--renderer_dir', dest='renderer_dir', default='', -+ help='The absolute directory path to be installed the ' -+ 'renderer executable.') -+ parser.add_option('--tool_dir', dest='tool_dir', default='', -+ help='The absolute directory path to be installed the ' -+ 'tool executable.') - parser.add_option('--pkg_config_command', dest='pkg_config_command', - default='pkg-config', - help='The path to pkg-config command.') - (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(options.tool_dir, 'mozc_tool')) - setup_arg.append('--mode=config_dialog') - if IsIBus15OrGreater(options): - # A tentative workaround against IBus 1.5 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 b4d1ede5dee6..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp +++ /dev/null @@ -1,11 +0,0 @@ ---- unix/ibus/ibus.gyp.orig 2015-02-17 18:04:40.000000000 +0900 -+++ unix/ibus/ibus.gyp 2015-02-17 18:04:58.000000000 +0900 -@@ -83,6 +83,8 @@ - './gen_mozc_xml.py', - '--branding=Mozc', - '--server_dir=<(server_dir)', -+ '--renderer_dir=<(renderer_dir)', -+ '--tool_dir=<(tool_dir)', - '--pkg_config_command=<(pkg_config_command)', - '--ibus_mozc_path=<(ibus_mozc_path)', - '--ibus_mozc_icon_path=<(ibus_mozc_icon_path)', diff --git a/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc b/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc deleted file mode 100644 index ea78852a5b49..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 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_path_util.cc b/japanese/mozc-server/files/patch-unix_ibus_path_util.cc deleted file mode 100644 index 28185c1ca03c..000000000000 --- a/japanese/mozc-server/files/patch-unix_ibus_path_util.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- unix/ibus/path_util.cc.orig 2013-03-29 13:33:43.000000000 +0900 -+++ unix/ibus/path_util.cc 2013-04-27 15:42:28.000000000 +0900 -@@ -30,7 +30,7 @@ - #include "unix/ibus/path_util.h" - - namespace { --const char kInstalledDirectory[] = "/usr/share/ibus-mozc"; -+const char kInstalledDirectory[] = LOCALBASE "/share/ibus-mozc/icons"; - } - - namespace mozc { -- cgit