Index: head/japanese/mozc-server/Makefile =================================================================== --- head/japanese/mozc-server/Makefile (revision 430242) +++ head/japanese/mozc-server/Makefile (revision 430243) @@ -1,414 +1,403 @@ # Created by: Daichi GOTO # $FreeBSD$ PORTNAME= mozc -PORTVERSION= 2.17.2322.102 -PORTREVISION= 3 +PORTVERSION= 2.20.2677.102.01 +DISTVERSIONPREFIX= v CATEGORIES= japanese MAINTAINER= hrs@FreeBSD.org COMMENT?= Mozc Japanese Input Method, Server LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ninja:devel/ninja \ gyp:devel/py-gyp EXTRACT_DEPENDS=${PYTHON_CMD}:${PYTHON_PORTSDIR} -LIB_DEPENDS= libprotobuf.so:devel/protobuf \ +LIB_DEPENDS= libprotobuf.so.11:devel/protobuf \ libzinnia.so:japanese/zinnia RUN_DEPENDS= xdg-open:devel/xdg-utils USE_GITHUB= yes -GH_TUPLE= google:${PORTNAME}:9b4c9e0 \ +GH_TUPLE= hrs-allbsd:${PORTNAME}:${DISTVERSIONPREFIX}${DISTVERSION} \ hiroyuki-komatsu:japanese-usage-dictionary:e5b3425:udic -USES= compiler:c++11-lang pkgconfig iconv:wchar_t gmake \ +USES= compiler:c++11-lang pkgconfig gmake \ tar:bzip2 python:2.7,build shebangfix SHEBANG_FILES= src/build_mozc.py BUILD_WRKSRC= ${WRKSRC}/src BUILD_MOZC_LIST?= mozc_server .if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" PKGNAMEPREFIX= ja- PKGNAMESUFFIX= -server LICENSE= BSD3CLAUSE NAISTL LICENSE_COMB= multi 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}/src/data/dictionary_oss/README.txt LICENSE_DISTFILES_NAISTL=${DISTNAME}${EXTRACT_SUFX} .elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool" USE_GNOME= glib20 gtk20 -USE_QT4= corelib gui qmake_build moc_build rcc_build uic_build +USE_QT5= core gui widgets .elif ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" +USES+= gettext-runtime USE_XORG= xcb -USE_GNOME= glib20 gtk20 +USE_GNOME= cairo gdkpixbuf2 glib20 gtk20 +LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 .elif ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el" USE_EMACS= yes .elif ${BUILD_MOZC_LIST:Mfcitx_mozc} USES+= gettext-tools .endif # Use GCC only when the stock clang does not have libc++.so. .if exists(/usr/bin/clang) && exists(/usr/lib/libc++.so) _CCTYPE= clang .else USE_GCC= yes _CCTYPE= gcc .endif .include .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" BROKEN= Does not compile: segfault .endif GYP_DEFINES= use_libprotobuf=1 \ channel_dev=0 \ 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" 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" \ GYP_DEFINES="${GYP_DEFINES}" \ PYTHONPATH=${PYTHON_SITELIBDIR}/gyp \ CC_host="${CC}" \ CC_target="${CC}" \ CXX_host="${CXX}" \ CXX_target="${CXX}" \ LD_host="${CXX}" \ AR_host="${AR}" \ ${PYTHON_CMD} build_mozc.py BUILD_MOZC_CMD_BUILD= ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} ${_MAKE_JOBS} BUILD_GYP_CMD= ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/gyp post-patch: - ${REINPLACE_CMD} 's,-liconv,${ICONV_LIB},g' \ - ${BUILD_WRKSRC}/gui/qt_libraries.gypi ${FIND} ${BUILD_WRKSRC} \( -name '*.gyp' -o -name '*.gypi' \) -exec \ ${REINPLACE_CMD} "s,'python','${PYTHON_CMD}',g" {} \; .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" ${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \ ${BUILD_WRKSRC}/unix/fcitx/gen_fcitx_mozc_i18n.sh ${REINPLACE_CMD} "s,/usr,${LOCALBASE:Q}," \ ${BUILD_WRKSRC}/unix/fcitx/mozc.conf .endif .if !${BUILD_MOZC_LIST:Mmozc_el} ${BUILD_WRKSRC}/mozcmake: ${PRINTF} "%s\n\n%s\n" "#!/bin/sh" 'exec ${BUILD_CMD} "$$@"' \ > ${BUILD_WRKSRC}/mozcmake ${CHMOD} +x ${BUILD_WRKSRC}/mozcmake post-configure: ${BUILD_WRKSRC}/mozcmake ${BUILD_MOZC_CMD} gyp \ --gypdir=${LOCALBASE}/bin \ --server_dir="${PREFIX}/bin" \ --tool_dir="${PREFIX}/libexec" \ --renderer_dir="${PREFIX}/libexec" \ --localbase="${LOCALBASE}" \ --ldflags="${LDFLAGS} -fstack-protector -L${LOCALBASE}/lib" \ --cflags="${CFLAGS:Q}" \ --cflags_cc="${CXXFLAGS:Q}" \ --include_dirs="${LOCALBASE}/include" \ ${GYP_OPTIONS} .endif # mozc_server .if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || make(makesum) GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=0 MASTER_SITES+= LOCAL/kuriyama:zipcode DISTFILES+= \ - ken_all-20160428.zip:zipcode \ - jigyosyo-20160428.zip:zipcode + ken_all-20161031.zip:zipcode \ + jigyosyo-20161031.zip:zipcode PLIST_FILES+= bin/mozc \ bin/mozc_server \ libexec/mozc_emacs_helper SUB_FILES+= mozc post-extract-mozc_server: @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 \ + cd ${BUILD_WRKSRC}/data/dictionary_oss && \ + ${SETENV} PYTHONPATH=${BUILD_WRKSRC} \ + ${PYTHON_CMD} ${BUILD_WRKSRC}/dictionary/gen_zip_code_seed.py \ + --zip_code=ken_all.csv --jigyosyo=jigyosyo.csv \ >> dictionary09.txt ${MV} ${WRKSRC_udic}/usage_dict.txt \ ${BUILD_WRKSRC}/third_party/japanese_usage_dictionary post-extract: post-extract-mozc_server do-build-mozc_server: ${BUILD_MOZC_CMD_BUILD} server/server.gyp:mozc_server ${BUILD_MOZC_CMD_BUILD} unix/emacs/emacs.gyp:mozc_emacs_helper do-install-mozc_server: ${INSTALL_PROGRAM} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \ ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \ ${STAGEDIR}${PREFIX}/libexec ${INSTALL_SCRIPT} \ ${WRKDIR}/mozc ${STAGEDIR}/${PREFIX}/bin .endif # mozc_tool .if ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool" GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=1 RUN_DEPENDS+= ${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model:japanese/tegaki-zinnia-japanese PLIST_FILES+= libexec/mozc_tool \ bin/mozc_tool \ %%DATADIR%%/icons/product_logo.png \ %%DATADIR%%/icons/update_uptodate.png SUB_FILES+= mozc_tool do-build-mozc_tool: ${BUILD_MOZC_CMD_BUILD} gui/gui.gyp:mozc_tool do-install-mozc_tool: ${INSTALL_PROGRAM} \ ${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} \ ${BUILD_WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ ${STAGEDIR}${DATADIR}/icons/product_logo.png ${INSTALL_DATA} \ ${BUILD_WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ ${STAGEDIR}${DATADIR}/icons/update_uptodate.png .endif # ibus_mozc .if ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=1 \ enable_gtk_renderer=1 LIB_DEPENDS+= libibus-1.0.so:textproc/ibus RUN_DEPENDS+= mozc_server:japanese/mozc-server \ mozc_tool:japanese/mozc-tool \ ${PYTHON_SITELIBDIR}/gtk-2.0/pynotify/__init__.py:devel/py-notify PLIST_FILES+= libexec/mozc_renderer \ libexec/ibus-engine-mozc \ %%DATADIR%%/icons/alpha_full.png \ %%DATADIR%%/icons/alpha_half.png \ %%DATADIR%%/icons/dictionary.png \ %%DATADIR%%/icons/direct.png \ %%DATADIR%%/icons/hiragana.png \ %%DATADIR%%/icons/katakana_full.png \ %%DATADIR%%/icons/katakana_half.png \ %%DATADIR%%/icons/product_icon.png \ %%DATADIR%%/icons/properties.png \ %%DATADIR%%/icons/tool.png \ share/ibus/component/mozc.xml PLIST_DIRS+= %%DATADIR%%/icons ${DATADIR_REL} do-build-ibus_mozc: ${BUILD_MOZC_CMD_BUILD} \ unix/ibus/ibus.gyp:ibus_mozc \ renderer/renderer.gyp:mozc_renderer do-install-ibus_mozc: ${INSTALL_PROGRAM} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/mozc_renderer \ ${STAGEDIR}${PREFIX}/libexec/mozc_renderer ${INSTALL_PROGRAM} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/ibus_mozc \ ${STAGEDIR}${PREFIX}/libexec/ibus-engine-mozc ${MKDIR} ${STAGEDIR}${PREFIX}/share/ibus/component ${INSTALL_DATA} \ ${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} \ ${BUILD_WRKSRC}/data/images/unix/${F}.png \ ${STAGEDIR}${DATADIR}/icons/${F:S/^ui-//}.png .endfor ${INSTALL_DATA} \ ${BUILD_WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \ ${STAGEDIR}${DATADIR}/icons/product_icon.png .endif # uim_mozc .if ${BUILD_MOZC_LIST:Muim_mozc} == "uim_mozc" || make(makesum) GH_TUPLE+= e-kato:macuim:v0.6.16.2.1:MU 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-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 \ %%DATADIR%%/mozc-key-custom.scm \ %%DATADIR%%/pixmaps/mozc.png \ "@postexec ${LOCALBASE}/bin/uim-module-manager --register mozc" \ "@preunexec ${LOCALBASE}/bin/uim-module-manager --unregister mozc" GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=0 post-extract-uim_mozc: ${MV} ${WRKSRC_MU}/Mozc/uim ${BUILD_WRKSRC}/unix ${REINPLACE_CMD} -e "s,/usr/lib/mozc,${LOCALBASE}/libexec," \ ${WRKSRC_MU}/Mozc/scm/mozc-custom.scm post-extract: post-extract-uim_mozc do-build-uim_mozc: ${BUILD_MOZC_CMD_BUILD} \ unix/uim/uim.gyp:uim-mozc do-install-uim_mozc: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/uim/plugin ${INSTALL_PROGRAM} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/libuim-mozc.so \ ${STAGEDIR}${PREFIX}/lib/uim/plugin ${MKDIR} ${STAGEDIR}${DATADIR} cd ${WRKSRC_MU}/Mozc/scm && \ ${INSTALL_DATA} mozc.scm mozc-custom.scm mozc-key-custom.scm \ ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${DATADIR}/pixmaps ${INSTALL_DATA} \ ${BUILD_WRKSRC}/data/images/product_icon_32bpp-128.png \ ${STAGEDIR}${DATADIR}/pixmaps/mozc.png .endif # 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.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-surrounding_text_util.cc - GYP_OPTIONS+= --noqt GYP_DEFINES+= use_libibus=0 \ enable_gtk_renderer=0 LIB_DEPENDS+= libfcitx-core.so:chinese/fcitx RUN_DEPENDS+= mozc_server:japanese/mozc-server \ mozc_tool:japanese/mozc-tool PLIST_FILES+= lib/fcitx/fcitx-mozc.so \ share/fcitx/addon/fcitx-mozc.conf \ share/fcitx/inputmethod/mozc.conf \ %%DATADIR%%/icon/mozc.png \ %%DATADIR%%/icon/mozc-alpha_full.png \ %%DATADIR%%/icon/mozc-alpha_half.png \ %%DATADIR%%/icon/mozc-direct.png \ %%DATADIR%%/icon/mozc-hiragana.png \ %%DATADIR%%/icon/mozc-katakana_full.png \ %%DATADIR%%/icon/mozc-katakana_half.png \ %%DATADIR%%/icon/mozc-dictionary.png \ %%DATADIR%%/icon/mozc-properties.png \ %%DATADIR%%/icon/mozc-tool.png \ share/locale/ja/LC_MESSAGES/fcitx-mozc.mo \ share/locale/zh_CN/LC_MESSAGES/fcitx-mozc.mo \ share/locale/zh_TW/LC_MESSAGES/fcitx-mozc.mo PLIST_DIRS+= %%DATADIR%%/icon ${DATADIR_REL} - -post-extract-fcitx_mozc: - ${RM} ${BUILD_WRKSRC}/unix/fcitx/fcitx.gyp - -post-extract: post-extract-fcitx_mozc do-build-fcitx_mozc: ${BUILD_MOZC_CMD_BUILD} unix/fcitx/fcitx.gyp:fcitx-mozc do-install-fcitx_mozc: @${MKDIR} \ ${STAGEDIR}${PREFIX}/lib/fcitx \ ${STAGEDIR}${PREFIX}/share/fcitx/addon \ ${STAGEDIR}${PREFIX}/share/fcitx/inputmethod ${INSTALL_LIB} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \ ${STAGEDIR}${PREFIX}/lib/fcitx/fcitx-mozc.so ${INSTALL_DATA} \ ${BUILD_WRKSRC}/unix/fcitx/fcitx-mozc.conf \ ${STAGEDIR}${PREFIX}/share/fcitx/addon/fcitx-mozc.conf ${INSTALL_DATA} \ ${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} \ ${BUILD_WRKSRC}/data/images/unix/${F}.png \ ${STAGEDIR}${DATADIR}/icon/${F:S,^ui-,mozc-,}.png .endfor ${INSTALL_DATA} \ ${BUILD_WRKSRC}/data/images/product_icon_32bpp-128.png \ ${STAGEDIR}${DATADIR}/icon/mozc.png .for L in ja zh_CN zh_TW ${INSTALL_DATA} \ ${BUILD_WRKSRC}/out_linux/${BUILD_MODE}/gen/unix/fcitx/po/${L}.mo \ ${STAGEDIR}${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo .endfor .endif # mozc_el .if ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el" 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 post-patch-mozc_el: ${REINPLACE_CMD} "s,%%PREFIX%%,${PREFIX}," \ ${BUILD_WRKSRC}/unix/emacs/mozc.el 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 && \ ${GZIP_CMD} 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/ .endif do-build: ${BUILD_MOZC_LIST:S/^/do-build-/} do-install: ${BUILD_MOZC_LIST:S/^/do-install-/} .include Index: head/japanese/mozc-server/distinfo =================================================================== --- head/japanese/mozc-server/distinfo (revision 430242) +++ head/japanese/mozc-server/distinfo (revision 430243) @@ -1,13 +1,11 @@ -TIMESTAMP = 1481723411 -SHA256 (ken_all-20160428.zip) = dd732957ca98dcad8c68aaa89447d77bd9201f26a19241f2531cb3f4ba2296f0 -SIZE (ken_all-20160428.zip) = 1684351 -SHA256 (jigyosyo-20160428.zip) = b95ed393343ed85363e8e7e14725af5e0b0586e60289a386fdba288e0e36f040 -SIZE (jigyosyo-20160428.zip) = 752471 -SHA256 (google-mozc-2.17.2322.102-9b4c9e0_GH0.tar.gz) = b7f57c4bfbff9a7e657de4f8213bac2f8d3cc454076463ddc66e32ebcf7bf795 -SIZE (google-mozc-2.17.2322.102-9b4c9e0_GH0.tar.gz) = 57248995 +TIMESTAMP = 1483252889 +SHA256 (ken_all-20161031.zip) = a363eefa9867c497b12bf5a603f64426af7bd938733c2925dd2747150d2cdd42 +SIZE (ken_all-20161031.zip) = 1685061 +SHA256 (jigyosyo-20161031.zip) = 1a8d9cf30421a5bdfbccb6e3d9fc4f141895821ac0275425a60ad858e38c2a43 +SIZE (jigyosyo-20161031.zip) = 754418 +SHA256 (hrs-allbsd-mozc-v2.20.2677.102.01_GH0.tar.gz) = 31e254b21d17c3e070252ae33686e7c3960a05521fac7a60ac7e9bf1a5be1505 +SIZE (hrs-allbsd-mozc-v2.20.2677.102.01_GH0.tar.gz) = 37574885 SHA256 (hiroyuki-komatsu-japanese-usage-dictionary-e5b3425_GH0.tar.gz) = 2af954cd844c6a3113449d7dca37e36b769ecb2b49d3a54318a3bdee1a75af56 SIZE (hiroyuki-komatsu-japanese-usage-dictionary-e5b3425_GH0.tar.gz) = 71050 SHA256 (e-kato-macuim-v0.6.16.2.1_GH0.tar.gz) = ae999a2f02379bd049484a22684c37be5eb1f4db9763fa79885c4981502336e9 SIZE (e-kato-macuim-v0.6.16.2.1_GH0.tar.gz) = 324549 -SHA256 (fcitx-mozc-2.17.2313.102.1.patch) = 52a7ed450f075eca3f4d468390ef59f9a439e0ac74327639802a7f11caa1a2c2 -SIZE (fcitx-mozc-2.17.2313.102.1.patch) = 140531 Index: head/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc (nonexistent) @@ -1,89 +0,0 @@ ---- 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); Property changes on: head/japanese/mozc-server/files/patch-src-ipc_unix_ipc.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc =================================================================== --- head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc (revision 430242) +++ head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc (nonexistent) @@ -1,28 +0,0 @@ ---- 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)) { Property changes on: head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-surrounding_text_util.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base_base.gyp =================================================================== --- head/japanese/mozc-server/files/patch-src-base_base.gyp (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base_base.gyp (nonexistent) @@ -1,19 +0,0 @@ ---- 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)"', Property changes on: head/japanese/mozc-server/files/patch-src-base_base.gyp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc =================================================================== --- head/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc (revision 430242) +++ head/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc (nonexistent) @@ -1,21 +0,0 @@ ---- 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; -+ size_t pid = 0; -+ - switch(index) { - case 0: - args = "--mode=config_dialog"; -@@ -460,7 +462,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; - } - Property changes on: head/japanese/mozc-server/files/extra-patch-src-unix_fcitx_fcitx_mozc.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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 Property changes on: head/japanese/mozc-server/files/patch-src-ipc_ipc_path_manager.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp =================================================================== --- head/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp (revision 430242) +++ head/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp (nonexistent) @@ -1,11 +0,0 @@ ---- 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)', Property changes on: head/japanese/mozc-server/files/patch-src-unix_ibus_ibus.gyp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-gui_about_dialog_about_dialog.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-gui_about_dialog_about_dialog.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-gui_about_dialog_about_dialog.cc (nonexistent) @@ -1,14 +0,0 @@ ---- src/gui/about_dialog/about_dialog.cc.orig 2013-03-29 13:33:58.000000000 +0900 -+++ src/gui/about_dialog/about_dialog.cc 2013-04-27 15:16:49.000000000 +0900 -@@ -121,7 +121,11 @@ - SetLabelText(label_terms); - SetLabelText(label_credits); - -+#ifdef OS_FREEBSD -+ product_image_.reset(new QImage(LOCALBASE "/share/mozc-tool/icons/product_logo.png")); -+#else - product_image_.reset(new QImage(":/product_logo.png")); -+#endif - } - - void AboutDialog::paintEvent(QPaintEvent *event) { Property changes on: head/japanese/mozc-server/files/patch-src-gui_about_dialog_about_dialog.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-build_tools_util.py =================================================================== --- head/japanese/mozc-server/files/patch-src-build_tools_util.py (revision 430242) +++ head/japanese/mozc-server/files/patch-src-build_tools_util.py (nonexistent) @@ -1,11 +0,0 @@ ---- 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(): Property changes on: head/japanese/mozc-server/files/patch-src-build_tools_util.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base_logging.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-base_logging.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base_logging.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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) Property changes on: head/japanese/mozc-server/files/patch-src-base_logging.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi =================================================================== --- head/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi (revision 430242) +++ head/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi (nonexistent) @@ -1,11 +0,0 @@ ---- 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': [ Property changes on: head/japanese/mozc-server/files/patch-src-gui-qt_libraries.gypi ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py =================================================================== --- head/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py (revision 430242) +++ head/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py (nonexistent) @@ -1,40 +0,0 @@ ---- 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']}. - """ -+ print '' - print '' - for key in component: - OutputXmlElement(param_dict, key, component[key]) -@@ -164,13 +165,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') - - 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', - } Property changes on: head/japanese/mozc-server/files/patch-src-unix_ibus_gen_mozc_xml.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base_process.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-base_process.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base_process.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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 - - #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 - // and GNOME environments. - return SpawnProcess(kBrowserCommand, url); Property changes on: head/japanese/mozc-server/files/patch-src-base_process.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-server_mozc_server.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-server_mozc_server.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-server_mozc_server.cc (nonexistent) @@ -1,49 +0,0 @@ ---- 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. Property changes on: head/japanese/mozc-server/files/patch-src-server_mozc_server.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc =================================================================== --- head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc (revision 430242) +++ head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc (nonexistent) @@ -1,12 +0,0 @@ ---- 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")); - Property changes on: head/japanese/mozc-server/files/extra-patch-src-unix-fcitx-eim.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-gyp_common.gypi =================================================================== --- head/japanese/mozc-server/files/patch-src-gyp_common.gypi (revision 430242) +++ head/japanese/mozc-server/files/patch-src-gyp_common.gypi (nonexistent) @@ -1,150 +0,0 @@ ---- 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 - # or not. -- 'compiler_target': 'clang', -+ 'compiler_target': '<(compiler_target)', - 'compiler_target_version_int': 304, # Clang 3.4 or higher -- 'compiler_host': 'clang', -+ 'compiler_host': '<(compiler_host)', - 'compiler_host_version_int': 304, # Clang 3.4 or higher - 'enable_gtk_renderer%': 1, - }, { # else -@@ -208,6 +208,14 @@ - # installed. This option is only for Linux. - 'server_dir%': '/usr/lib/mozc', - -+ # renderer_dir represents the directory where mozc_renderer is -+ # installed. This option is only for Linux. -+ 'renderer_dir%': '/usr/lib/mozc', -+ -+ # tool_dir represents the directory where mozc_tool is -+ # installed. This option is only for Linux. -+ 'tool_dir%': '/usr/lib/mozc', -+ - # 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', -@@ -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', -+ '<@(cflags)', - ], - 'cflags_cc': [ - '-Wno-covered-switch-default', - '-Wno-unnamed-type-template-args', - '-Wno-c++11-narrowing', -- '-std=gnu++0x', -+ '-std=c++11', -+ '<@(cflags_cc)', - ], - }], -- ['compiler_target=="clang" or compiler_target=="gcc"', { -+ ['compiler_host=="gcc"', { - 'cflags_cc': [ -- '-std=gnu++0x', -+ '-std=gnu++11', -+ '<@(cflags_cc)', - ], - }], - ], -@@ -553,17 +564,20 @@ - ['compiler_host=="clang"', { - 'cflags': [ - '-Wtype-limits', -+ '<@(cflags)', - ], - 'cflags_cc': [ - '-Wno-covered-switch-default', - '-Wno-unnamed-type-template-args', - '-Wno-c++11-narrowing', -- '-std=gnu++0x', -+ '-std=c++11', -+ '<@(cflags_cc)', - ], - }], -- ['compiler_host=="clang" or compiler_host=="gcc"', { -+ ['compiler_host=="gcc"', { - 'cflags_cc': [ -- '-std=gnu++0x', -+ '-std=gnu++11', -+ '<@(cflags_cc)', - ], - }], - ], -@@ -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_cc': [ - # We use deprecated and instead of upcoming - # and . - '-Wno-deprecated', -+ '<@(cflags_cc)', - ], -+ 'include_dirs': [ -+ '<@(include_dirs)', -+ ], -+ 'ldflags': [ -+ '<@(ldflags)', -+ '-fstack-protector', -+ ], - 'conditions': [ - ['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'], Property changes on: head/japanese/mozc-server/files/patch-src-gyp_common.gypi ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc (nonexistent) @@ -1,12 +0,0 @@ ---- src/rewriter/calculator/calculator.cc.orig 2016-03-13 11:22:55.000000000 +0900 -+++ src/rewriter/calculator/calculator.cc 2016-05-24 02:06:47.310077000 +0900 -@@ -44,6 +44,9 @@ - #include - #include - #include -+#if defined(__GNUC__) && !defined(__clang__) -+#include -+#endif - - #include "base/compiler_specific.h" - #include "base/logging.h" Property changes on: head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-build_mozc.py =================================================================== --- head/japanese/mozc-server/files/patch-src-build_mozc.py (revision 430242) +++ head/japanese/mozc-server/files/patch-src-build_mozc.py (nonexistent) @@ -1,74 +0,0 @@ ---- 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') -+ 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 -@@ -368,6 +373,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', -@@ -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 = 1; -+ 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] - -+ 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]) -@@ -876,6 +905,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)]) -+ -+ - - if generator == 'ninja': - gyp_options.extend(['--generator-output=.']) Property changes on: head/japanese/mozc-server/files/patch-src-build_mozc.py ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base-flags.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-base-flags.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base-flags.cc (nonexistent) @@ -1,80 +0,0 @@ ---- src/base/flags.cc.orig 2016-03-13 11:22:55.000000000 +0900 -+++ src/base/flags.cc 2016-05-24 02:06:01.861439000 +0900 -@@ -36,6 +36,9 @@ - #include - #include - #include -+#if defined(__GNUC__) && !defined(__clang__) -+#include -+#endif - - #include "base/port.h" - #include "base/singleton.h" -@@ -78,6 +81,59 @@ - // function, compiler may warn of "unused function". - template struct StrToNumberImpl; - -+#if defined(__GNUC__) && !defined(__clang__) -+static int stoi(const std::string& s) { -+ std::istringstream str(s); -+ int i; -+ str >> i; -+ return i; -+} -+static long stol(const std::string& s) { -+ std::istringstream str(s); -+ long i; -+ str >> i; -+ return i; -+} -+static long long stoll(const std::string& s) { -+ std::istringstream str(s); -+ long long i; -+ str >> i; -+ return i; -+} -+static unsigned long stoul(const std::string& s) { -+ std::istringstream str(s); -+ unsigned long i; -+ str >> i; -+ return i; -+} -+static unsigned long long stoull(const std::string& s) { -+ std::istringstream str(s); -+ unsigned long long i; -+ str >> i; -+ return i; -+} -+template <> struct StrToNumberImpl { -+ static int Do(const string &s) { return stoi(s); } -+}; -+ -+template <> struct StrToNumberImpl { // NOLINT -+ static long Do(const string &s) { return stol(s); } // NOLINT -+}; -+ -+template <> struct StrToNumberImpl { // NOLINT -+ static long long Do(const string &s) { return stoll(s); } // NOLINT -+}; -+ -+template <> struct StrToNumberImpl { // NOLINT -+ static unsigned long Do(const string &s) { return stoul(s); } // NOLINT -+}; -+ -+template <> struct StrToNumberImpl { // NOLINT -+ static unsigned long long Do(const string &s) { // NOLINT -+ return stoull(s); -+ } -+}; -+#else - template <> struct StrToNumberImpl { - static int Do(const string &s) { return std::stoi(s); } - }; -@@ -99,6 +155,7 @@ - return std::stoull(s); - } - }; -+#endif - - template inline T StrToNumber(const string &s) { - return StrToNumberImpl::Do(s); Property changes on: head/japanese/mozc-server/files/patch-src-base-flags.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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 { Property changes on: head/japanese/mozc-server/files/patch-src-unix_ibus_path_util.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base_mutex.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-base_mutex.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base_mutex.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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); Property changes on: head/japanese/mozc-server/files/patch-src-base_mutex.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc (nonexistent) @@ -1,11 +0,0 @@ ---- 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) Property changes on: head/japanese/mozc-server/files/patch-src-unix_ibus_mozc_engine.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mozc-server/files/patch-src-base_system_util.cc =================================================================== --- head/japanese/mozc-server/files/patch-src-base_system_util.cc (revision 430242) +++ head/japanese/mozc-server/files/patch-src-base_system_util.cc (nonexistent) @@ -1,26 +0,0 @@ ---- 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() { Property changes on: head/japanese/mozc-server/files/patch-src-base_system_util.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property