diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2016-05-16 17:43:22 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2016-05-16 17:43:22 +0000 |
commit | 196453bfe438e95d4554a395653f65fd213c6cff (patch) | |
tree | 2dbeadf4eb748c943569385298a0aa2bbe178035 /japanese | |
parent | Remove expired ports: (diff) |
Update japanese/mozc-server to 2.17.2322.102. Changes include:
- Use Github as the source.
- Depend on devel/py-gyp and japanese/zinnia because bundled versions have
been removed from the original distfile.
- devel/py-gyp-devel has been updated to snapshot as of 20160504 and
renamed with devel/py-gyp. Take maintainership[*].
- Install mozc.el.gz instead of mozc.el.
Approved by: maintainer [*]
Notes
Notes:
svn path=/head/; revision=415345
Diffstat (limited to 'japanese')
23 files changed, 176 insertions, 333 deletions
diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile index 422970f3d368..36e0218934da 100644 --- a/japanese/mozc-server/Makefile +++ b/japanese/mozc-server/Makefile @@ -2,11 +2,14 @@ # $FreeBSD$ PORTNAME= mozc -PORTVERSION= 2.17.2106.102 +PORTVERSION= 2.17.2322.102 CATEGORIES= japanese -MASTER_SITES= LOCAL/hrs -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} -EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} +MASTER_SITES= https://codeload.github.com/google/${PORTNAME}/tar.gz/9b4c9e0?dummy=/:main \ + https://codeload.github.com/hiroyuki-komatsu/japanese-usage-dictionary/tar.gz/e5b3425?dummy=/:udic +DISTFILES= google-${PORTNAME}-9b4c9e0_GH0.tar.gz:main \ + hiroyuki-komatsu-japanese-usage-dictionary-e5b3425.tar.gz:udic +EXTRACT_ONLY= google-${PORTNAME}-9b4c9e0_GH0.tar.gz \ + hiroyuki-komatsu-japanese-usage-dictionary-e5b3425.tar.gz MAINTAINER= hrs@FreeBSD.org COMMENT?= Mozc Japanese Input Method, Server @@ -15,7 +18,8 @@ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ninja:devel/ninja \ - python:lang/python + python:lang/python \ + gyp:devel/py-gyp EXTRACT_DEPENDS=${PYTHON_CMD}:${PYTHON_PORTSDIR} LIB_DEPENDS= libprotobuf.so:devel/protobuf \ libzinnia.so:japanese/zinnia @@ -23,6 +27,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils USES= compiler:c++11-lang pkgconfig iconv:wchar_t gmake \ tar:bzip2 python:build +WRKSRC= ${WRKDIR}/${PORTNAME}-9b4c9e0 BUILD_WRKSRC= ${WRKSRC}/src BUILD_MOZC_LIST?= mozc_server @@ -70,6 +75,7 @@ GYP_DEFINES= use_libprotobuf=1 \ enable_unittest=0 \ compiler_host="${_CCTYPE}" \ compiler_target="${_CCTYPE}" \ + use_libzinnia=1 \ 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" @@ -77,8 +83,8 @@ BUILD_MODE= Release BUILD_CMD= ${SETENV} ${MAKE_ENV} PATH=/bin:/usr/bin:${PATH} ${MAKE_CMD} BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \ ${SETENV} BUILD_COMMAND="${BUILD_WRKSRC}/mozcmake" \ - PYTHONPATH=${BUILD_WRKSRC}/third_party/gyp/pylib/gyp \ GYP_DEFINES="${GYP_DEFINES}" \ + PYTHONPATH=${PYTHON_SITELIBDIR}/gyp \ CC_host="${CC}" \ CC_target="${CC}" \ CXX_host="${CXX}" \ @@ -87,8 +93,7 @@ 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 ${BUILD_WRKSRC}/third_party/gyp && \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} +BUILD_GYP_CMD= ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/gyp post-patch: ${REINPLACE_CMD} 's,-liconv,${ICONV_LIB},g' \ @@ -108,7 +113,7 @@ ${BUILD_WRKSRC}/mozcmake: post-configure: ${BUILD_WRKSRC}/mozcmake ${BUILD_MOZC_CMD} gyp \ - --gypdir=${BUILD_WRKSRC}/third_party/gyp \ + --gypdir=${LOCALBASE}/bin \ --server_dir="${PREFIX}/bin" \ --tool_dir="${PREFIX}/libexec" \ --renderer_dir="${PREFIX}/libexec" \ @@ -128,10 +133,8 @@ GYP_DEFINES+= use_libibus=0 \ MASTER_SITES+= LOCAL/kuriyama:zipcode DISTFILES+= \ - ken_all-20130628.lzh:zipcode \ - jigyosyo-20130628.lzh:zipcode - -EXTRACT_DEPENDS+= lha:archivers/lha + ken_all-20160428.zip:zipcode \ + jigyosyo-20160428.zip:zipcode PLIST_FILES+= bin/mozc \ bin/mozc_server \ @@ -139,14 +142,16 @@ PLIST_FILES+= bin/mozc \ SUB_FILES+= mozc post-extract-mozc_server: - @for F in jigyosyo-20130628.lzh ken_all-20130628.lzh; do \ - ${LHA_CMD} xfq2w=${BUILD_WRKSRC}/data/dictionary_oss \ + @for F in ${DISTFILES:M*\:zipcode:C/\:zipcode//}; do \ + ${UNZIP_NATIVE_CMD} -L -d ${BUILD_WRKSRC}/data/dictionary_oss \ ${DISTDIR}/$$F; \ done @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 + ${MV} ${WRKDIR}/japanese-usage-dictionary-e5b3425/usage_dict.txt \ + ${BUILD_WRKSRC}/third_party/japanese_usage_dictionary post-extract: post-extract-mozc_server @@ -251,18 +256,20 @@ do-install-ibus_mozc: # uim_mozc .if ${BUILD_MOZC_LIST:Muim_mozc} == "uim_mozc" || make(makesum) -USE_GITHUB= nodefault # XXX -GH_ACCOUNT= e-kato:MU -GH_PROJECT= macuim:MU -GH_TAGNAME= v0.6.16.2:MU -EXTRACT_ONLY+= ${DISTFILE_MU} +#USE_GITHUB= yes # XXX +GH_ACCOUNT= e-kato +GH_PROJECT= macuim +GH_TAGNAME= v0.6.16.2.1 +DISTFILES+= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}_GH0${EXTRACT_SUFX}:gh_uim +EXTRACT_ONLY+= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}_GH0${EXTRACT_SUFX} +MASTER_SITES+= https://codeload.github.com/${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/:gh_uim +WRKSRC_MU= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^v//} LIB_DEPENDS+= libuim.so:textproc/uim RUN_DEPENDS+= mozc_server:japanese/mozc-server \ mozc_tool:japanese/mozc-tool -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-unix-uim-key_translator.h \ - ${PATCHDIR}/extra-patch-src-unix-uim-mozc.cc \ +EXTRA_PATCHES= ${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 \ @@ -305,22 +312,13 @@ do-install-uim_mozc: # fcitx_mozc .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || make(makesum) PATCH_SITES= http://download.fcitx-im.org/fcitx-mozc/ -PATCHFILES= fcitx-mozc-2.16.2037.102.2.patch +PATCHFILES= fcitx-mozc-2.17.2313.102.1.patch .endif .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" 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 @@ -352,11 +350,6 @@ post-extract-fcitx_mozc: post-extract: post-extract-fcitx_mozc -post-patch-fcitx_mozc: - cd ${PATCH_WRKSRC} && ${CAT} ${POST_PATCHES} | ${PATCH} - -post-patch: post-patch-fcitx_mozc - do-build-fcitx_mozc: ${BUILD_MOZC_CMD_BUILD} unix/fcitx/fcitx.gyp:fcitx-mozc @@ -397,6 +390,7 @@ CATEGORIES+= elisp RUN_DEPENDS+= mozc_server:japanese/mozc-server PLIST_FILES+= ${EMACS_VERSION_SITE_LISPDIR}/mozc/mozc.elc \ + ${EMACS_VERSION_SITE_LISPDIR}/mozc/mozc.el.gz \ ${EMACS_VERSION_SITE_LISPDIR}/mozc/leim-list.el PLIST_DIRS+= ${EMACS_VERSION_SITE_LISPDIR}/mozc @@ -409,11 +403,13 @@ post-patch: post-patch-mozc_el do-build-mozc_el: cd ${BUILD_WRKSRC}/unix/emacs && \ ${EMACS_CMD} -batch -q -no-site-file -no-init-file \ - -f batch-byte-compile mozc.el + -f batch-byte-compile mozc.el && \ + ${GZIP_CMD} -9 mozc.el do-install-mozc_el: @${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc ${INSTALL_DATA} \ + ${BUILD_WRKSRC}/unix/emacs/mozc.el.gz \ ${BUILD_WRKSRC}/unix/emacs/mozc.elc \ ${FILESDIR}/leim-list.el \ ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/ diff --git a/japanese/mozc-server/distinfo b/japanese/mozc-server/distinfo index 5d7a49168f92..839bd8d3508a 100644 --- a/japanese/mozc-server/distinfo +++ b/japanese/mozc-server/distinfo @@ -1,10 +1,12 @@ -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 (e-kato-macuim-v0.6.16.2_GH0.tar.gz) = 25fca78d1d76cc5c6a49f3b2f6981791ad8275abb2726334d8d40bd49498194d -SIZE (e-kato-macuim-v0.6.16.2_GH0.tar.gz) = 324551 -SHA256 (fcitx-mozc-2.16.2037.102.2.patch) = ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e -SIZE (fcitx-mozc-2.16.2037.102.2.patch) = 140421 +SHA256 (google-mozc-9b4c9e0_GH0.tar.gz) = b7f57c4bfbff9a7e657de4f8213bac2f8d3cc454076463ddc66e32ebcf7bf795 +SIZE (google-mozc-9b4c9e0_GH0.tar.gz) = 57248995 +SHA256 (hiroyuki-komatsu-japanese-usage-dictionary-e5b3425.tar.gz) = 2af954cd844c6a3113449d7dca37e36b769ecb2b49d3a54318a3bdee1a75af56 +SIZE (hiroyuki-komatsu-japanese-usage-dictionary-e5b3425.tar.gz) = 71050 +SHA256 (ken_all-20160428.zip) = dd732957ca98dcad8c68aaa89447d77bd9201f26a19241f2531cb3f4ba2296f0 +SIZE (ken_all-20160428.zip) = 1684351 +SHA256 (jigyosyo-20160428.zip) = b95ed393343ed85363e8e7e14725af5e0b0586e60289a386fdba288e0e36f040 +SIZE (jigyosyo-20160428.zip) = 752471 +SHA256 (e-kato-macuim-v0.6.16.2.1_GH0.tar.bz2) = ae999a2f02379bd049484a22684c37be5eb1f4db9763fa79885c4981502336e9 +SIZE (e-kato-macuim-v0.6.16.2.1_GH0.tar.bz2) = 324549 +SHA256 (fcitx-mozc-2.17.2313.102.1.patch) = 52a7ed450f075eca3f4d468390ef59f9a439e0ac74327639802a7f11caa1a2c2 +SIZE (fcitx-mozc-2.17.2313.102.1.patch) = 140531 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 deleted file mode 100644 index da756a100bbb..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx.gyp +++ /dev/null @@ -1,10 +0,0 @@ ---- 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="<!@(fcitx4-config --prefix)/share/locale/"', diff --git a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_event_handler.h b/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_event_handler.h deleted file mode 100644 index abad18297eb1..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_event_handler.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/unix/fcitx/fcitx_key_event_handler.h.bak 2015-07-13 04:37:03.713712000 +0900 -+++ src/unix/fcitx/fcitx_key_event_handler.h 2015-07-13 04:37:03.754663000 +0900 -@@ -35,8 +35,8 @@ - #include <memory> - - #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 deleted file mode 100644 index bf9249f06c39..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_key_translator.h +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 <fcitx-config/hotkey.h> - - #include "base/port.h" --#include "session/commands.pb.h" -+#include "protocol/commands.pb.h" - #include <fcitx/ime.h> - - 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 deleted file mode 100644 index f81b497bb85d..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-fcitx_mozc.h +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 deleted file mode 100644 index 1f8050b7381b..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 deleted file mode 100644 index ef196528c843..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_connection.h +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 <fcitx/instance.h> - - #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 deleted file mode 100644 index 77fdebbcb320..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-fcitx-mozc_response_parser.cc +++ /dev/null @@ -1,50 +0,0 @@ ---- 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 <fcitx/candidate.h> -@@ -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-src-unix-uim-key_translator.h b/japanese/mozc-server/files/extra-patch-src-unix-uim-key_translator.h deleted file mode 100644 index 2f94143a45d9..000000000000 --- a/japanese/mozc-server/files/extra-patch-src-unix-uim-key_translator.h +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 index 3253be97c9c4..2fced9df6401 100644 --- a/japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc +++ b/japanese/mozc-server/files/extra-patch-src-unix-uim-mozc.cc @@ -1,13 +1,19 @@ ---- 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 @@ +--- src/unix/uim/mozc.cc.orig 2016-05-11 00:39:29.009401000 +0900 ++++ src/unix/uim/mozc.cc 2016-05-11 00:40:58.320083000 +0900 +@@ -48,6 +48,7 @@ + # include "plugin.h" + #endif ++#include "base/init_mozc.h" #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" + #include "protocol/config.pb.h" +@@ -1196,7 +1197,7 @@ + argv[0] = (char *)name; + argv[1] = NULL; + +- InitGoogle((const char *)argv[0], &argc, (char ***)&argv, true); ++ mozc::InitMozc((const char *)argv[0], &argc, (char ***)&argv, true); + mozc::uim::install_keymap(); + } 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 index 700f2890e971..ad49d67e1974 100644 --- a/japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp +++ b/japanese/mozc-server/files/extra-patch-src-unix-uim-uim.gyp @@ -1,5 +1,5 @@ ---- src/unix/uim/uim.gyp.orig 2014-10-27 02:24:13.000000000 +0900 -+++ src/unix/uim/uim.gyp 2015-09-26 06:34:58.683557000 +0900 +--- src/unix/uim/uim.gyp.orig 2015-07-15 10:04:31.000000000 +0900 ++++ src/unix/uim/uim.gyp 2016-05-11 00:37:33.495056000 +0900 @@ -31,6 +31,7 @@ { 'variables': { @@ -17,13 +17,3 @@ ], }, 'targets': [ -@@ -49,7 +52,8 @@ - 'key_translator.cc', - ], - 'dependencies': [ -- '../../session/session_base.gyp:session_protocol', -+ '../../protocol/protocol.gyp:commands_proto', -+ '../../session/session_base.gyp:ime_switch_util', - ], - 'cflags': [ - '<!@(pkg-config --cflags <@(pkg_config_libs))', diff --git a/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc b/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc index dac1d2f2ee33..50a4537472c7 100644 --- a/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc +++ b/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc @@ -1,6 +1,6 @@ ---- src/unix/fcitx/fcitx_mozc.cc.orig 2015-02-19 10:48:37.000000000 +0900 -+++ src/unix/fcitx/fcitx_mozc.cc 2015-02-19 10:54:04.000000000 +0900 -@@ -439,6 +439,8 @@ +--- src/unix/fcitx/fcitx_mozc.cc.orig 2016-05-14 21:54:58.149355000 +0900 ++++ src/unix/fcitx/fcitx_mozc.cc 2016-05-14 21:54:58.170065000 +0900 +@@ -440,6 +440,8 @@ boolean ToolMenuAction(struct _FcitxUIMenu *menu, int index) { string args; @@ -9,7 +9,7 @@ switch(index) { case 0: args = "--mode=config_dialog"; -@@ -459,7 +461,8 @@ +@@ -460,7 +462,8 @@ args = "--mode=about_dialog"; break; } diff --git a/japanese/mozc-server/files/patch-src-base_process.cc b/japanese/mozc-server/files/patch-src-base_process.cc index 2ebdcbe34a81..3a0f568fd803 100644 --- a/japanese/mozc-server/files/patch-src-base_process.cc +++ b/japanese/mozc-server/files/patch-src-base_process.cc @@ -1,9 +1,9 @@ ---- 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 @@ +--- src/base/process.cc.orig 2016-03-13 11:22:55.000000000 +0900 ++++ src/base/process.cc 2016-05-10 21:54:57.488770000 +0900 +@@ -126,7 +126,7 @@ #endif - #ifdef OS_LINUX + #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL) - 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 diff --git a/japanese/mozc-server/files/patch-src-build_mozc.py b/japanese/mozc-server/files/patch-src-build_mozc.py index ba8aecb173bb..4bc456d860da 100644 --- a/japanese/mozc-server/files/patch-src-build_mozc.py +++ b/japanese/mozc-server/files/patch-src-build_mozc.py @@ -1,6 +1,6 @@ ---- 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 @@ +--- src/build_mozc.py.orig 2016-03-13 11:22:55.000000000 +0900 ++++ src/build_mozc.py 2016-05-11 00:18:16.131052000 +0900 +@@ -354,6 +354,11 @@ parser.add_option('--version_file', dest='version_file', help='use the specified version template file', default='mozc_version_template.txt') @@ -12,7 +12,7 @@ AddTargetPlatformOption(parser) # Mac and Linux -@@ -377,6 +382,14 @@ +@@ -368,6 +373,14 @@ default='', help='A path to the directory where the server executable' 'is installed. This option is used only on Linux.') @@ -27,16 +27,19 @@ # Android parser.add_option('--android_arch', dest='android_arch', -@@ -548,7 +561,7 @@ +@@ -522,6 +535,11 @@ + """Parses command line options for the build command.""" parser = optparse.OptionParser(usage='Usage: %prog build [options]') AddCommonOptions(parser) - if IsLinux(): -- default_build_concurrency = GetNumberOfProcessors() * 2 ++ if IsLinux(): + 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 @@ ++ parser.add_option('--jobs', '-j', dest='jobs', ++ default=('%d' % default_build_concurrency), ++ metavar='N', help='run build jobs in parallel') + parser.add_option('--configuration', '-c', dest='configuration', + default='Debug', help='specify the build configuration.') + +@@ -672,6 +690,17 @@ logging.info('Building GYP command line...') gyp_options = ['--depth=.', '--include=%s/gyp/common.gypi' % SRC_DIR] @@ -54,7 +57,7 @@ mozc_root = os.path.abspath(GetTopLevelSourceDirectoryName()) gyp_options.extend(['-D', 'abs_depth=%s' % mozc_root]) -@@ -936,6 +960,14 @@ +@@ -876,6 +905,14 @@ if options.server_dir: gyp_options.extend([ '-D', 'server_dir=%s' % os.path.abspath(options.server_dir)]) @@ -67,5 +70,5 @@ + + - # TODO(yukawa): Use ninja on OSX. if generator == 'ninja': + gyp_options.extend(['--generator-output=.']) diff --git a/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi b/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi index 7e2a69922d9f..1ab956a9cefc 100644 --- a/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi +++ b/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi @@ -1,10 +1,11 @@ ---- 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 @@ - }, { +--- src/gui/qt_libraries.gypi.orig 2016-05-14 21:36:24.268182000 +0900 ++++ src/gui/qt_libraries.gypi 2016-05-14 21:36:59.852298000 +0900 +@@ -84,7 +84,7 @@ + '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', + ] + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'conditions': [ + ['qt_dir', { 'libraries': [ - '<!@(<(pkg_config_command) --libs QtGui QtCore)', -+ '-liconv -L<(localbase)/lib', - ], - }], - ], diff --git a/japanese/mozc-server/files/patch-src-gyp_common.gypi b/japanese/mozc-server/files/patch-src-gyp_common.gypi index d639e0e1b1f1..64edadcbeffe 100644 --- a/japanese/mozc-server/files/patch-src-gyp_common.gypi +++ b/japanese/mozc-server/files/patch-src-gyp_common.gypi @@ -1,5 +1,14 @@ ---- src/gyp/common.gypi.orig 2015-06-07 16:16:23.000000000 +0900 -+++ src/gyp/common.gypi 2015-07-13 04:02:55.631402000 +0900 +--- src/gyp/common.gypi.orig 2016-03-13 11:22:55.000000000 +0900 ++++ src/gyp/common.gypi 2016-05-11 00:09:18.009062000 +0900 +@@ -109,7 +109,7 @@ + ], + # Libraries for GNU/Linux environment. + 'linux_ldflags': [ +- '-pthread', ++ '-lpthread', + ], + + # Extra defines @@ -161,9 +161,9 @@ ['target_platform=="Linux"', { # enable_gtk_renderer represents if mozc_renderer is supported on Linux @@ -27,7 +36,25 @@ # Represents the directory where the source code of protobuf is # extracted. This value is ignored when 'use_libprotobuf' is 1. 'protobuf_root': '<(third_party_dir)/protobuf', -@@ -641,17 +649,20 @@ +@@ -415,7 +423,7 @@ + }, + }, + 'conditions': [ +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'cflags': [ + '<@(debug_extra_cflags)', + ], +@@ -481,7 +489,7 @@ + }, + }, + 'conditions': [ +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'cflags': [ + '<@(release_extra_cflags)', + ], +@@ -533,17 +541,20 @@ ['compiler_target=="clang"', { 'cflags': [ '-Wtype-limits', @@ -51,7 +78,7 @@ ], }], ], -@@ -661,17 +672,20 @@ +@@ -553,17 +564,20 @@ ['compiler_host=="clang"', { 'cflags': [ '-Wtype-limits', @@ -75,31 +102,49 @@ ], }], ], -@@ -764,16 +778,27 @@ - ['OS=="linux"', { - 'defines': [ - 'OS_LINUX', -+ 'OS_FREEBSD', -+ 'LOCALBASE="<@(localbase)"', +@@ -578,7 +592,7 @@ + ['channel_dev==1', { + 'defines': ['CHANNEL_DEV'], + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { + 'ldflags': [ + '<@(linux_ldflags)', ], +@@ -694,21 +708,34 @@ + }, + }, + }], +- ['OS=="linux"', { ++ ['OS=="linux" or OS=="freebsd"', { 'cflags': [ '<@(warning_cflags)', '-fPIC', '-fno-exceptions', -+ '<@(cflags)', ++ '<@(cflags)', ], 'cflags_cc': [ # We use deprecated <hash_map> and <hash_set> instead of upcoming # <unordered_map> and <unordered_set>. '-Wno-deprecated', -+ '<@(cflags_cc)', -+ ], ++ '<@(cflags_cc)', + ], + 'include_dirs': [ -+ '<@(include_dirs)' -+ ], ++ '<@(include_dirs)', ++ ], + 'ldflags': [ + '<@(ldflags)', -+ '-fstack-protector', - ], ++ '-fstack-protector', ++ ], 'conditions': [ - ['target_platform!="NaCl"', { + ['target_platform=="Linux"', { + # OS_LINUX is defined always (target and host). +- 'defines': ['OS_LINUX',], ++ 'defines': [ ++ 'OS_LINUX', ++ 'OS_FREEBSD', ++ 'LOCALBASE="<@(localbase)"', ++ ], + }], + ['target_platform=="Android"', { + 'defines': ['NO_USAGE_REWRITER'], diff --git a/japanese/mozc-server/files/patch-src-session-session_base.gyp b/japanese/mozc-server/files/patch-src-session-session_base.gyp deleted file mode 100644 index 53beda468ae8..000000000000 --- a/japanese/mozc-server/files/patch-src-session-session_base.gyp +++ /dev/null @@ -1,10 +0,0 @@ ---- src/session/session_base.gyp.orig 2015-09-09 23:49:24.267933000 +0900 -+++ src/session/session_base.gyp 2015-09-09 23:50:12.347558000 +0900 -@@ -101,6 +101,7 @@ - '../composer/composer.gyp:key_event_util', - '../composer/composer.gyp:key_parser', - '../config/config.gyp:config_handler', -+ '../protocol/protocol.gyp:commands_proto', - '../protocol/protocol.gyp:config_proto', - 'keymap', - ], diff --git a/japanese/mozc-server/files/patch-src-third_party_gyp_gyp b/japanese/mozc-server/files/patch-src-third_party_gyp_gyp deleted file mode 100644 index 675b00c03b07..000000000000 --- a/japanese/mozc-server/files/patch-src-third_party_gyp_gyp +++ /dev/null @@ -1,8 +0,0 @@ ---- 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 deleted file mode 100644 index 02d14a66bf0e..000000000000 --- a/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_common.py +++ /dev/null @@ -1,14 +0,0 @@ ---- 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 deleted file mode 100644 index 56af50dcc9b2..000000000000 --- a/japanese/mozc-server/files/patch-src-third_party_gyp_pylib_gyp_generator_make.py +++ /dev/null @@ -1,31 +0,0 @@ ---- 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_ibus_gen_mozc_xml.py b/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py index 4b797fa5c7e8..eed3c1b84dec 100644 --- 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 @@ -1,24 +1,6 @@ ---- 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 <engines> 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 @@ +--- src/unix/ibus/gen_mozc_xml.py.orig 2016-03-13 11:22:55.000000000 +0900 ++++ src/unix/ibus/gen_mozc_xml.py 2016-05-10 23:43:06.273350000 +0900 +@@ -90,6 +90,7 @@ engines: A dictionary from a property name to a list of property values of engines. For example, {'name': ['mozc-jp', 'mozc', 'mozc-dv']}. """ @@ -26,7 +8,7 @@ print '<component>' for key in component: OutputXmlElement(param_dict, key, component[key]) -@@ -203,13 +204,19 @@ +@@ -164,13 +165,19 @@ parser.add_option('--server_dir', dest='server_dir', default='', help='The absolute directory path to be installed the ' 'server executable.') @@ -45,5 +27,14 @@ - 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 + + param_dict = { +@@ -181,7 +188,7 @@ + + engine_common_props = { + 'description': '%(product_name)s (Japanese Input Method)', +- 'language': 'ja', ++ 'language': 'jpn', + 'icon': '%(ibus_mozc_icon_path)s', + 'rank': '80', + } diff --git a/japanese/mozc-server/pkg-descr b/japanese/mozc-server/pkg-descr index a30e9243751e..fac004ed8220 100644 --- a/japanese/mozc-server/pkg-descr +++ b/japanese/mozc-server/pkg-descr @@ -2,4 +2,4 @@ Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux. This open-source project originates from Google Japanese Input. -WWW: http://code.google.com/p/mozc/ +WWW: https://github.com/google/mozc |