aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--japanese/fcitx-mozc/Makefile12
-rw-r--r--japanese/ibus-mozc/Makefile12
-rw-r--r--japanese/mozc-el/Makefile16
-rw-r--r--japanese/mozc-el/pkg-message2
-rw-r--r--japanese/mozc-server/Makefile309
-rw-r--r--japanese/mozc-server/distinfo6
-rw-r--r--japanese/mozc-server/files/leim-list.el30
-rw-r--r--japanese/mozc-server/files/patch-base_base.gyp12
-rw-r--r--japanese/mozc-server/files/patch-base_iconv.cc6
-rw-r--r--japanese/mozc-server/files/patch-base_logging.cc11
-rw-r--r--japanese/mozc-server/files/patch-base_mutex.cc6
-rw-r--r--japanese/mozc-server/files/patch-base_process.cc23
-rw-r--r--japanese/mozc-server/files/patch-build_mozc.py49
-rw-r--r--japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc8
-rw-r--r--japanese/mozc-server/files/patch-gyp_common.gypi39
-rw-r--r--japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc18
-rw-r--r--japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc6
-rw-r--r--japanese/mozc-server/files/patch-ipc_unix_ipc.cc14
-rw-r--r--japanese/mozc-server/files/patch-server_mozc_server.cc10
-rw-r--r--japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py23
-rw-r--r--japanese/mozc-server/files/patch-unix_emacs_mozc.el55
-rw-r--r--japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py198
-rw-r--r--japanese/mozc-server/files/patch-unix_ibus_ibus.gyp10
-rw-r--r--japanese/mozc-server/files/patch-unix_ibus_mozc.xml24
-rw-r--r--japanese/mozc-server/files/patch-unix_ibus_path_util.cc24
-rw-r--r--japanese/mozc-tool/Makefile1
26 files changed, 593 insertions, 331 deletions
diff --git a/japanese/fcitx-mozc/Makefile b/japanese/fcitx-mozc/Makefile
index 8b803259a8bd..9bc70fb0e4e1 100644
--- a/japanese/fcitx-mozc/Makefile
+++ b/japanese/fcitx-mozc/Makefile
@@ -1,12 +1,8 @@
-# New ports collection makefile for: fcitx-mozc
-# Date created: 22 May 2012
-# Whom: Daichi GOTO <daichi@freebsd.org>
-#
+# Created by: Daichi GOTO <daichi@freebsd.org>
# $FreeBSD$
-#
PKGNAMEPREFIX= ja-fcitx-
-PKGNAMESUFFIX=
+
COMMENT= Mozc engine for Fcitx
DATADIR= ${PREFIX}/share/fcitx/${PORTNAME}
@@ -17,8 +13,4 @@ BROKEN= fails to build
BUILD_MOZC_LIST= fcitx_mozc
-post-install:
- @${CAT} ${PKGMESSAGE}
- @${ECHO_CMD} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
-
.include "${MASTERDIR}/Makefile"
diff --git a/japanese/ibus-mozc/Makefile b/japanese/ibus-mozc/Makefile
index d407f59364c9..3b388aaea35a 100644
--- a/japanese/ibus-mozc/Makefile
+++ b/japanese/ibus-mozc/Makefile
@@ -1,12 +1,8 @@
-# New ports collection makefile for: ibus-mozc
-# Date created: 22 May 2010
-# Whom: Daichi GOTO <daichi@freebsd.org>
-#
+# Created by: Daichi GOTO <daichi@freebsd.org>
# $FreeBSD$
-#
PKGNAMEPREFIX= ja-ibus-
-PKGNAMESUFFIX=
+
COMMENT= Mozc engine for IBus
DATADIR= ${PREFIX}/share/ibus-${PORTNAME}
@@ -15,8 +11,4 @@ PKGMESSAGE= ${.CURDIR}/pkg-message
BUILD_MOZC_LIST= ibus_mozc
-post-install:
- @${CAT} ${PKGMESSAGE}
- @${ECHO_CMD} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
-
.include "${MASTERDIR}/Makefile"
diff --git a/japanese/mozc-el/Makefile b/japanese/mozc-el/Makefile
index dff288a42a89..43c416f3e2c4 100644
--- a/japanese/mozc-el/Makefile
+++ b/japanese/mozc-el/Makefile
@@ -1,23 +1,13 @@
-# New ports collection makefile for: mozc-el
-# Date created: 26 June 2010
-# Whom: TAKANO, Yuji
-#
+# Created by: TAKANO, Yuji
# $FreeBSD$
-#
PKGNAMESUFFIX= -el-${EMACS_PORT_NAME}
-COMMENT= Mozc for GNU Emacs
+
+COMMENT= Emacs input method for Mozc
MASTERDIR= ${.CURDIR}/../../japanese/mozc-server
PKGMESSAGE= ${.CURDIR}/pkg-message
BUILD_MOZC_LIST=mozc_el
-USE_EMACS= yes
-CATEGORIES= editors elisp
-
-post-install:
- @${CAT} ${PKGMESSAGE}
- @${ECHO_CMD} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
-
.include "${MASTERDIR}/Makefile"
diff --git a/japanese/mozc-el/pkg-message b/japanese/mozc-el/pkg-message
index 28c70fcd2f1a..0f7281b2231f 100644
--- a/japanese/mozc-el/pkg-message
+++ b/japanese/mozc-el/pkg-message
@@ -1,7 +1,7 @@
+
To activate mozc, you will need to add the following lines to
your ~/.emacs:
-(require 'mozc)
(set-language-environment "Japanese")
(setq default-input-method "japanese-mozc")
(global-set-key (kbd "C-o") 'toggle-input-method)
diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile
index 5adba7e5c232..467faa56a76f 100644
--- a/japanese/mozc-server/Makefile
+++ b/japanese/mozc-server/Makefile
@@ -3,16 +3,20 @@
PORTNAME= mozc
PORTVERSION= 1.10.1390.102
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= japanese
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
-PKGNAMEPREFIX?= ja-
-PKGNAMESUFFIX?= -server
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= daichi@FreeBSD.org
-COMMENT?= Mozc server for IBus and others
+COMMENT?= Mozc Japanese Input Method, Server
-LIB_DEPENDS= protobuf:${PORTSDIR}/devel/protobuf
+LICENSE= BSD
+LICENSE_FILE= ${WRKSRC}/third_party/gyp/LICENSE
+
+LIB_DEPENDS= protobuf:${PORTSDIR}/devel/protobuf \
+ zinnia:${PORTSDIR}/japanese/zinnia
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
USES= pkgconfig iconv
@@ -25,12 +29,25 @@ MAKE_JOBS_SAFE= yes
BUILD_MOZC_LIST?= mozc_server
-GYP_OPTIONS=
-.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || \
- ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" || \
- ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || \
- ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
-GYP_OPTIONS= --noqt
+.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
+PKGNAMEPREFIX= ja-
+PKGNAMESUFFIX= -server
+
+LICENSE= BSD NAISTL
+LICENSE_COMB= multi
+LICENSE_FILE_BSD= ${WRKSRC}/third_party/gyp/LICENSE
+LICENSE_DISTFILES_BSD= ${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_DISTFILES_NAISTL=${DISTNAME}${EXTRACT_SUFX}
+.elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
+USE_GNOME= glib20 gtk20
+USE_QT4= corelib gui
+.elif ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc"
+USE_GNOME= glib20 gtk20
+.elif ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
+USE_EMACS= yes
.endif
.include <bsd.port.pre.mk>
@@ -43,132 +60,154 @@ BROKEN= Does not compile on FreeBSD 7.X
BROKEN= Does not compile: segfault
.endif
-LOCALBASE_REPLACE_FILES= \
- gyp/common.gypi \
- unix/ibus/gen_mozc_xml.py \
- unix/ibus/mozc.xml \
- unix/ibus/path_util.cc \
- base/base.gyp \
- base/util.cc \
- base/process.cc \
- gui/about_dialog/about_dialog.cc \
- handwriting/zinnia_handwriting.cc \
- third_party/gyp/pylib/gyp/generator/make.py
-SSL_REINPLACE_STR=
-.for V in OPENSSL_CFLAGS OPENSSLLIB OPENSSLINC OPENSSL_LDFLAGS
-SSL_REINPLACE_STR+= -e "s,%%${V}%%,${${V}:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g},"
-.endfor
-LOCALBASE_PTN= ${LOCALBASE:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g}
-
-BUILD_MODE= Release
-BUILD_CMD= ${SETENV} ${MAKE_ENV} ${GMAKE}
+GYP_DEFINES= use_libprotobuf=1 \
+ channel_dev=0 \
+ enable_unittest=0
+BUILD_MODE= Release
+BUILD_CMD= ${SETENV} ${MAKE_ENV} PATH=/bin:/usr/bin:${PATH} ${GMAKE}
BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \
${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \
PYTHONPATH=${WRKSRC}/third_party/gyp/local/lib/python${PYTHON_VER}/site-packages \
+ ${DEBUG} \
+ GYP_DEFINES="${GYP_DEFINES}" \
+ CC_host="${CC}" \
+ CXX_host="${CXX}" \
+ LD_host="${CXX}" \
+ AR_host="${AR}" \
${PYTHON_CMD} build_mozc.py
-BUILD_GYP_CMD= cd ${WRKSRC}/third_party/gyp && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP}
+BUILD_MOZC_CMD_BUILD= ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} ${_MAKE_JOBS}
+BUILD_GYP_CMD= cd ${WRKSRC}/third_party/gyp && \
+ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP}
post-patch:
- cd ${WRKSRC} && \
- ${REINPLACE_CMD} "s,@@LOCALBASE@@,${LOCALBASE_PTN},g" \
- ${LOCALBASE_REPLACE_FILES}
- cd ${WRKSRC} && \
- ${REINPLACE_CMD} ${SSL_REINPLACE_STR} base/base.gyp
- ${MKDIR} -p ${WRKSRC}/mozc_build_tools/linux
- ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/
+ ${MKDIR} ${WRKSRC}/mozc_build_tools/linux
+ ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/
.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
- cd ${WRKSRC} && \
- ${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \
- unix/fcitx/gen_fcitx_mozc_i18n.sh
- cd ${WRKSRC} && \
- ${REINPLACE_CMD} "s,/usr,${LOCALBASE_PTN}," \
- unix/fcitx/mozc.conf
+ ${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \
+ ${WRKSRC}/unix/fcitx/gen_fcitx_mozc_i18n.sh
+ ${REINPLACE_CMD} "s,/usr,${LOCALBASE:Q}," \
+ ${WRKSRC}/unix/fcitx/mozc.conf
.endif
-pre-build:
- ${PRINTF} "%s\n%s\n" "#!/bin/sh" 'exec ${BUILD_CMD} $$@' > ${WRKSRC}/mozcmake
+${WRKSRC}/mozcmake:
+ ${PRINTF} "%s\n%s\n" "#!/bin/sh" 'exec ${BUILD_CMD} $$@' \
+ > ${WRKSRC}/mozcmake
${CHMOD} +x ${WRKSRC}/mozcmake
- ${BUILD_GYP_CMD} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}
+
+post-configure: ${WRKSRC}/mozcmake
+ ${BUILD_GYP_CMD} ${PYDISTUTILS_CONFIGURE_TARGET} \
+ ${PYDISTUTILS_CONFIGUREARGS}
${BUILD_GYP_CMD} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}
- ${BUILD_GYP_CMD} ${PYDISTUTILS_INSTALL_TARGET} --prefix=${WRKSRC}/third_party/gyp/local
+ ${BUILD_GYP_CMD} ${PYDISTUTILS_INSTALL_TARGET} \
+ --prefix=${WRKSRC}/third_party/gyp/local
${BUILD_MOZC_CMD} gyp \
- --gypdir=${WRKSRC}/third_party/gyp/local/bin \
- --server_dir="${PREFIX}/bin" --channel_dev=0 \
- ${GYP_OPTIONS}
- ${BUILD_MOZC_CMD} build_tools -c ${BUILD_MODE}
+ --gypdir=${WRKSRC}/third_party/gyp/local/bin \
+ --server_dir="${PREFIX}/bin" \
+ --localbase="${LOCALBASE}" \
+ --ldflags="${LDFLAGS} -fstack-protector -L${LOCALBASE}/lib" \
+ --include_dirs="${LOCALBASE}/include" \
+ --openssl_cflags="${OPENSSL_CFLAGS}" \
+ --openssl_ldflags="${OPENSSL_LDFLAGS}" \
+ --openssl_inc="-I${OPENSSLINC}" \
+ --openssl_lib="-lssl -lcrypto -L${OPENSSLLIB}" \
+ ${GYP_OPTIONS}
+
+pre-build:
+ ${BUILD_MOZC_CMD} build_tools -c ${BUILD_MODE} ${_MAKE_JOBS}
# mozc_server
-.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
-BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20 \
- gtk:${PORTSDIR}/x11-toolkits/gtk20
+.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || defined(makesum)
+GYP_OPTIONS+= --noqt
+GYP_DEFINES+= use_libibus=0 \
+ enable_gtk_renderer=0
+
+MASTER_SITES+= LOCAL/kuriyama:zipcode
+DISTFILES+= \
+ ken_all-20130228.lzh:zipcode \
+ jigyosyo-20130228.lzh:zipcode
+
+EXTRACT_DEPENDS+= lha:${PORTSDIR}/archivers/lha
+
PLIST_FILES+= bin/mozc_server
+post-extract-mozc_server:
+ @for F in jigyosyo-20130228.lzh ken_all-20130228.lzh; do \
+ ${LHA_CMD} xfqw=${WRKSRC}/data/dictionary_oss ${DISTDIR}/$$F; \
+ done
+ @cd ${WRKSRC}/data/dictionary_oss && \
+ ${PYTHON_CMD} ${WRKSRC}/dictionary/gen_zip_code_seed.py \
+ --zip_code=ken_all.csv --jigyosyo=jigyosyo.csv \
+ >> dictionary09.txt
+
+post-extract: post-extract-mozc_server
+
do-build-mozc_server:
- ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} -j ${MAKE_JOBS_NUMBER} \
- server/server.gyp:mozc_server
+ ${BUILD_MOZC_CMD_BUILD} server/server.gyp:mozc_server
do-install-mozc_server:
- @${INSTALL_PROGRAM} \
+ ${INSTALL_PROGRAM} \
${WRKSRC}/out_linux/${BUILD_MODE}/mozc_server \
${PREFIX}/bin
.endif
# mozc_tool
.if ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
-LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia
-BUILD_DEPENDS+= gtk:${PORTSDIR}/x11-toolkits/gtk20
-USE_QT4+= corelib gui
+GYP_DEFINES+= use_libibus=0 \
+ enable_gtk_renderer=1
+
RUN_DEPENDS+= ${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model:${PORTSDIR}/japanese/tegaki-zinnia-japanese
PLIST_FILES+= bin/mozc_tool \
- ${DATADIR_REL}/icons/product_logo.png \
- ${DATADIR_REL}/icons/update_uptodate.png
-PLIST_DIRS+= ${DATADIR_REL}/icons ${DATADIR_REL}
+ %%DATADIR%%/icons/product_logo.png \
+ %%DATADIR%%/icons/update_uptodate.png
+PLIST_DIRS+= %%DATADIR%%/icons ${DATADIR_REL}
do-build-mozc_tool:
- ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} -j ${MAKE_JOBS_NUMBER} \
- gui/gui.gyp:mozc_tool
+ ${BUILD_MOZC_CMD_BUILD} gui/gui.gyp:mozc_tool
do-install-mozc_tool:
- @${INSTALL_PROGRAM} \
+ ${INSTALL_PROGRAM} \
${WRKSRC}/out_linux/${BUILD_MODE}/mozc_tool \
${PREFIX}/bin
@${MKDIR} ${DATADIR}/icons
- @${INSTALL_DATA} \
+ ${INSTALL_DATA} \
${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \
${DATADIR}/icons/product_logo.png
- @${INSTALL_DATA} \
+ ${INSTALL_DATA} \
${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \
${DATADIR}/icons/update_uptodate.png
.endif
# ibus_mozc
.if ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc"
-LIB_DEPENDS+= ibus-1.0.401:${PORTSDIR}/textproc/ibus \
- xcb-xfixes.0:${PORTSDIR}/x11/libxcb \
- zinnia.0:${PORTSDIR}/japanese/zinnia
+GYP_OPTIONS+= --noqt
+GYP_DEFINES+= use_libibus=1 \
+ enable_gtk_renderer=1
+
+LIB_DEPENDS+= ibus-1.0:${PORTSDIR}/textproc/ibus \
+ xcb-xfixes:${PORTSDIR}/x11/libxcb
RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_tool:${PORTSDIR}/japanese/mozc-tool \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions \
- ${PYTHON_SITELIBDIR}/gtk-2.0/pynotify/_pynotify.so:${PORTSDIR}/devel/py-notify
+ ${PYTHON_SITELIBDIR}/gtk-2.0/pynotify/__init__.py:${PORTSDIR}/devel/py-notify
PLIST_FILES+= bin/mozc_renderer \
libexec/ibus-engine-mozc \
- ${DATADIR_REL}/icons/alpha_full.png \
- ${DATADIR_REL}/icons/alpha_half.png \
- ${DATADIR_REL}/icons/dictionary.png \
- ${DATADIR_REL}/icons/direct.png \
- ${DATADIR_REL}/icons/hiragana.png \
- ${DATADIR_REL}/icons/katakana_full.png \
- ${DATADIR_REL}/icons/katakana_half.png \
- ${DATADIR_REL}/icons/product_logo.png \
- ${DATADIR_REL}/icons/properties.png \
- ${DATADIR_REL}/icons/tool.png \
- share/ibus/component/mozc.xml
-PLIST_DIRS+= ${DATADIR_REL}/icons ${DATADIR_REL}
+ %%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 -c ${BUILD_MODE} -j ${MAKE_JOBS_NUMBER} \
+ ${BUILD_MOZC_CMD_BUILD} \
unix/ibus/ibus.gyp:ibus_mozc \
renderer/renderer.gyp:mozc_renderer
@@ -180,29 +219,33 @@ do-install-ibus_mozc:
${WRKSRC}/out_linux/${BUILD_MODE}/ibus_mozc \
${PREFIX}/libexec/ibus-engine-mozc
${INSTALL_DATA} \
- ${WRKSRC}/unix/ibus/mozc.xml \
+ ${WRKSRC}/out_linux/${BUILD_MODE}/obj/gen/unix/ibus/mozc.xml \
${PREFIX}/share/ibus/component/mozc.xml
- ${MKDIR} ${DATADIR}/icons
+ @${MKDIR} ${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 \
${DATADIR}/icons/${F:S/^ui-//}.png
.endfor
- @${INSTALL_DATA} \
+ ${INSTALL_DATA} \
${WRKSRC}/data/images/unix/ime_product_icon_opensource-32.png \
- ${DATADIR}/icons/product_logo.png
+ ${DATADIR}/icons/product_icon.png
.endif
# fcitx_mozc
-.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
+.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || make(makesum)
PATCH_SITES= http://fcitx.googlecode.com/files/
-PATCHFILES= fcitx-mozc-${PORTVERSION}.2.patch
+PATCHFILES= fcitx-${DISTNAME}.2.patch
+.endif
+.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
PATCH_DIST_STRIP=-p2
-LIB_DEPENDS+= fcitx-config.4:${PORTSDIR}/chinese/fcitx \
- zinnia.0:${PORTSDIR}/japanese/zinnia
-BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20
+GYP_OPTIONS+= --noqt
+GYP_DEFINES+= use_libibus=0 \
+ enable_gtk_renderer=0
+
+LIB_DEPENDS+= fcitx-core:${PORTSDIR}/chinese/fcitx
RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_tool:${PORTSDIR}/japanese/mozc-tool \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions
@@ -210,27 +253,26 @@ RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
PLIST_FILES+= lib/fcitx/fcitx-mozc.so \
share/fcitx/addon/fcitx-mozc.conf \
share/fcitx/inputmethod/mozc.conf \
- ${DATADIR_REL}/icon/mozc.png \
- ${DATADIR_REL}/icon/mozc-alpha_full.png \
- ${DATADIR_REL}/icon/mozc-alpha_half.png \
- ${DATADIR_REL}/icon/mozc-direct.png \
- ${DATADIR_REL}/icon/mozc-hiragana.png \
- ${DATADIR_REL}/icon/mozc-katakana_full.png \
- ${DATADIR_REL}/icon/mozc-katakana_half.png \
- ${DATADIR_REL}/icon/mozc-dictionary.png \
- ${DATADIR_REL}/icon/mozc-properties.png \
- ${DATADIR_REL}/icon/mozc-tool.png \
+ %%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_REL}/icon ${DATADIR_REL}
+PLIST_DIRS+= %%DATADIR%%/icon ${DATADIR_REL}
do-build-fcitx_mozc:
- ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} -j ${MAKE_JOBS_NUMBER} \
- unix/fcitx/fcitx.gyp:fcitx-mozc
+ ${BUILD_MOZC_CMD_BUILD} unix/fcitx/fcitx.gyp:fcitx-mozc
do-install-fcitx_mozc:
- ${MKDIR} \
+ @${MKDIR} \
${PREFIX}/lib/fcitx \
${PREFIX}/share/fcitx/addon \
${PREFIX}/share/fcitx/inputmethod
@@ -243,18 +285,18 @@ do-install-fcitx_mozc:
${INSTALL_DATA} \
${WRKSRC}/unix/fcitx/mozc.conf \
${PREFIX}/share/fcitx/inputmethod/mozc.conf
- ${MKDIR} ${DATADIR}/icon
+ @${MKDIR} ${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} \
+ ${INSTALL_DATA} \
${WRKSRC}/data/images/unix/${F}.png \
- ${DATADIR}/icon/${F:S/^ui-/mozc-/}.png
+ ${DATADIR}/icon/${F:S,^ui-,mozc-,}.png
.endfor
- @${INSTALL_DATA} \
+ ${INSTALL_DATA} \
${WRKSRC}/data/images/product_icon_32bpp-128.png \
${DATADIR}/icon/mozc.png
.for L in ja zh_CN zh_TW
- @${INSTALL_DATA} \
+ ${INSTALL_DATA} \
${WRKSRC}/out_linux/${BUILD_MODE}/obj/gen/unix/fcitx/po/${L}.mo \
${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo
.endfor
@@ -262,37 +304,48 @@ do-install-fcitx_mozc:
# mozc_el
.if ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
-LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia
-BUILD_DEPENDS+= emacs:${PORTSDIR}/editors/emacs \
- glib:${PORTSDIR}/devel/glib20 \
- gtk:${PORTSDIR}/x11-toolkits/gtk20
+GYP_OPTIONS+= --noqt
+GYP_DEFINES+= use_libibus=0 \
+ enable_gtk_renderer=0
+
+CATEGORIES+= elisp
RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions
PLIST_FILES+= bin/mozc_emacs_helper \
- ${EMACS_VERSION_SITE_LISPDIR}/mozc.el \
- ${EMACS_VERSION_SITE_LISPDIR}/mozc.elc
+ ${EMACS_VERSION_SITE_LISPDIR}/mozc/mozc.el \
+ ${EMACS_VERSION_SITE_LISPDIR}/mozc/mozc.elc \
+ ${EMACS_VERSION_SITE_LISPDIR}/mozc/leim-list.el
+PLIST_DIRS+= ${EMACS_VERSION_SITE_LISPDIR}/mozc
do-build-mozc_el:
- ${BUILD_MOZC_CMD} build -c ${BUILD_MODE} -j ${MAKE_JOBS_NUMBER} \
- unix/emacs/emacs.gyp:mozc_emacs_helper
- @cd ${WRKSRC}/unix/emacs && \
+ ${BUILD_MOZC_CMD_BUILD} unix/emacs/emacs.gyp:mozc_emacs_helper
+ cd ${WRKSRC}/unix/emacs && \
${EMACS_CMD} -batch -q -no-site-file -no-init-file \
-f batch-byte-compile mozc.el
do-install-mozc_el:
- @${INSTALL_PROGRAM} \
+ ${INSTALL_PROGRAM} \
${WRKSRC}/out_linux/${BUILD_MODE}/mozc_emacs_helper \
${PREFIX}/bin/
- @${INSTALL_DATA} \
+ @${MKDIR} ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc
+ ${INSTALL_DATA} \
${WRKSRC}/unix/emacs/mozc.el \
- ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/
- @${INSTALL_DATA} \
+ ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/
+ ${INSTALL_DATA} \
${WRKSRC}/unix/emacs/mozc.elc \
- ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/
+ ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/
+ ${INSTALL_DATA} \
+ ${FILESDIR}/leim-list.el \
+ ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc/
.endif
do-build: ${BUILD_MOZC_LIST:S/^/do-build-/}
do-install: ${BUILD_MOZC_LIST:S/^/do-install-/}
+.if defined(PKGMESSAGE) && exists(${PKGMESSAGE})
+post-install:
+ @${CAT} ${PKGMESSAGE}
+.endif
+
.include <bsd.port.post.mk>
diff --git a/japanese/mozc-server/distinfo b/japanese/mozc-server/distinfo
index e6b740b469f4..88a387eae2fb 100644
--- a/japanese/mozc-server/distinfo
+++ b/japanese/mozc-server/distinfo
@@ -1,4 +1,8 @@
SHA256 (mozc-1.10.1390.102.tar.bz2) = 72a8ed6657daa1c03b1efe50c262a69be2ab66d45747a47df6e54996b6d5ee39
-SIZE(mozc-1.10.1390.102.tar.bz2) = 57879881
+SIZE (mozc-1.10.1390.102.tar.bz2) = 57879881
+SHA256 (ken_all-20130228.lzh) = ea7d8c01634821faa6ed1beacb72959e70a357e4e61ee913caa23e502b164681
+SIZE (ken_all-20130228.lzh) = 1736171
+SHA256 (jigyosyo-20130228.lzh) = 04f809b7c61355140b810d6b6b1c68ec575ada8c5ef87d27d56d632d1a0e35dd
+SIZE (jigyosyo-20130228.lzh) = 832542
SHA256 (fcitx-mozc-1.10.1390.102.2.patch) = 8702225049052ace5c4fa60998606cc7e08bc86966054f6f61b293277cffdcea
SIZE (fcitx-mozc-1.10.1390.102.2.patch) = 130658
diff --git a/japanese/mozc-server/files/leim-list.el b/japanese/mozc-server/files/leim-list.el
new file mode 100644
index 000000000000..bb15f3cfb8f4
--- /dev/null
+++ b/japanese/mozc-server/files/leim-list.el
@@ -0,0 +1,30 @@
+;; leim-list.el --- Mozc setup for leim API
+;; $FreeBSD$$
+;;
+;; Copyright (c) 2013 Hiroki Sato <hrs@FreeBSD.org>. All rights reserved.
+;;
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;; 1. Redistributions of source code must retain the above copyright
+;; notice, this list of conditions and the following disclaimer.
+;; 2. Redistributions in binary form must reproduce the above copyright
+;; notice, this list of conditions and the following disclaimer in the
+;; documentation and/or other materials provided with the distribution.
+;;
+
+(autoload 'mozc-mode "mozc.el" "Activate Mozc." t)
+(autoload 'mozc-leim-activate "mozc.el" "Activate Mozc." t)
+
+(defcustom mozc-leim-title "[Mozc]"
+ "Mode line string shown when mozc-mode is enabled.
+This indicator is not shown when you don't use LEIM."
+ :type '(choice (const :tag "No indicator" nil)
+ (string :tag "Show an indicator"))
+ :group 'mozc)
+
+(register-input-method
+ "japanese-mozc" "Japanese" 'mozc-leim-activate
+ mozc-leim-title
+ "Japanese input method with Mozc/Google Japanese Input."
+ 'its-select-hiragana)
diff --git a/japanese/mozc-server/files/patch-base_base.gyp b/japanese/mozc-server/files/patch-base_base.gyp
index 5b85404f4a72..d3f893ed4fe2 100644
--- a/japanese/mozc-server/files/patch-base_base.gyp
+++ b/japanese/mozc-server/files/patch-base_base.gyp
@@ -1,27 +1,27 @@
---- base/base.gyp.orig 2013-04-21 03:48:45.178270244 +0900
-+++ base/base.gyp 2013-04-21 04:16:38.943269499 +0900
+--- base/base.gyp.orig 2013-03-29 13:33:43.000000000 +0900
++++ base/base.gyp 2013-04-23 23:49:53.000000000 +0900
@@ -265,20 +265,20 @@
['OS=="linux" and target_platform!="Android" and '
'not (target_platform=="NaCl" and _toolset=="target")', {
'cflags': [
- '<!@(<(pkg_config_command) --cflags-only-other openssl)',
-+ '%%OPENSSL_CFLAGS%%',
++ '<(openssl_cflags)',
],
'defines': [
'HAVE_OPENSSL=1',
],
'include_dirs': [
- '<!@(<(pkg_config_command) --cflags-only-I openssl)',
-+ '-I%%OPENSSLINC%%/openssl',
++ '<(openssl_inc)',
],
'link_settings': {
'ldflags': [
- '<!@(<(pkg_config_command) --libs-only-L openssl)',
-+ '%%OPENSSL_LDFLAGS%% -L%%OPENSSLLIB%%',
++ '<(openssl_ldflags)',
],
'libraries': [
- '<!@(<(pkg_config_command) --libs-only-l openssl)',
-+ '-lssl',
++ '<(openssl_lib)',
],
},
}],
diff --git a/japanese/mozc-server/files/patch-base_iconv.cc b/japanese/mozc-server/files/patch-base_iconv.cc
index 4fb4d60f6688..4ac94c3a2f40 100644
--- a/japanese/mozc-server/files/patch-base_iconv.cc
+++ b/japanese/mozc-server/files/patch-base_iconv.cc
@@ -1,10 +1,10 @@
---- base/iconv.cc.orig 2013-04-21 03:48:45.174270168 +0900
-+++ base/iconv.cc 2013-04-21 04:16:39.946269033 +0900
+--- base/iconv.cc.orig 2013-03-29 13:33:43.000000000 +0900
++++ base/iconv.cc 2013-04-27 15:36:30.000000000 +0900
@@ -53,7 +53,11 @@
size_t olen_org = olen;
iconv(ic, 0, &ilen, 0, &olen); // reset iconv state
while (ilen != 0) {
-+#ifdef __FreeBSD__
++#ifdef OS_FREEBSD
+ if (iconv(ic, (const char **)(&ibuf), &ilen, &obuf, &olen)
+#else
if (iconv(ic, reinterpret_cast<char **>(&ibuf), &ilen, &obuf, &olen)
diff --git a/japanese/mozc-server/files/patch-base_logging.cc b/japanese/mozc-server/files/patch-base_logging.cc
new file mode 100644
index 000000000000..e8791332356f
--- /dev/null
+++ b/japanese/mozc-server/files/patch-base_logging.cc
@@ -0,0 +1,11 @@
+--- base/logging.cc.orig 2013-04-26 10:49:33.000000000 +0900
++++ base/logging.cc 2013-04-26 10:53:18.000000000 +0900
+@@ -111,7 +111,7 @@
+ #if defined(__native_client__)
+ "%p",
+ #elif defined(OS_LINUX)
+- "%lu",
++ "%p",
+ #else // = OS_WIN or OS_MACOSX
+ "%u",
+ #endif
diff --git a/japanese/mozc-server/files/patch-base_mutex.cc b/japanese/mozc-server/files/patch-base_mutex.cc
index a11517f467a9..5d36cf708388 100644
--- a/japanese/mozc-server/files/patch-base_mutex.cc
+++ b/japanese/mozc-server/files/patch-base_mutex.cc
@@ -1,11 +1,11 @@
---- base/mutex.cc.orig 2013-04-21 03:48:45.170269862 +0900
-+++ base/mutex.cc 2013-04-21 04:16:39.083269637 +0900
+--- 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(__FreeBSD__)
++#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
index 5990af6eb29d..48b94ca9c40d 100644
--- a/japanese/mozc-server/files/patch-base_process.cc
+++ b/japanese/mozc-server/files/patch-base_process.cc
@@ -1,22 +1,11 @@
---- base/process.cc.orig 2013-04-21 03:48:45.176269982 +0900
-+++ base/process.cc 2013-04-21 04:16:40.382269441 +0900
-@@ -121,13 +121,18 @@
- return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW);
+--- 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
-+#if defined(OS_LINUX) && !defined(__FreeBSD__)
- static const char kBrowserCommand[] = "/usr/bin/xdg-open";
+ #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);
- #endif // LINUX
-
-+#ifdef __FreeBSD__
-+ static const char kBrowserCommand[] = "@@LOCALBASE@@/bin/xdg-open";
-+ return SpawnProcess(kBrowserCommand, url);
-+#endif
-+
- #ifdef OS_MACOSX
- return MacProcess::OpenBrowserForMac(url);
- #endif // OS_MACOSX
diff --git a/japanese/mozc-server/files/patch-build_mozc.py b/japanese/mozc-server/files/patch-build_mozc.py
new file mode 100644
index 000000000000..8cbae3d0f42d
--- /dev/null
+++ b/japanese/mozc-server/files/patch-build_mozc.py
@@ -0,0 +1,49 @@
+--- build_mozc.py.orig 2013-03-29 13:33:25.000000000 +0900
++++ build_mozc.py 2013-05-02 00:54:37.000000000 +0900
+@@ -332,6 +332,14 @@
+ help='use rsync to copy files instead of builtin function')
+ AddTargetPlatformOption(parser)
+
++ parser.add_option('--localbase', dest='localbase')
++ parser.add_option('--ldflags', dest='ldflags')
++ parser.add_option('--include_dirs', dest='include_dirs')
++ parser.add_option('--openssl_cflags', dest='openssl_cflags')
++ parser.add_option('--openssl_ldflags', dest='openssl_ldflags')
++ parser.add_option('--openssl_lib', dest='openssl_lib')
++ parser.add_option('--openssl_inc', dest='openssl_inc')
++
+ parser.add_option('--mac_dir', dest='mac_dir',
+ help='A path to the root directory of third party '
+ 'libraries for Mac build which will be passed to gyp '
+@@ -506,7 +514,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')
+@@ -709,7 +717,22 @@
+ command_line.extend(['-D', 'enable_unittest=0'])
+ break
+
++ localbase = options.localbase or '/usr'
++ command_line.extend(['-D', 'localbase=%s' % localbase])
+
++ ldflags = options.ldflags or ''
++ command_line.extend(['-D', 'ldflags=%s' % ldflags])
++ include_dirs = options.include_dirs or ''
++ command_line.extend(['-D', 'include_dirs=%s' % include_dirs])
++
++ openssl_cflags = options.openssl_cflags or ''
++ command_line.extend(['-D', 'openssl_cflags=%s' % openssl_cflags])
++ openssl_ldflags = options.openssl_cflags or ''
++ command_line.extend(['-D', 'openssl_ldflags=%s' % openssl_ldflags])
++ openssl_inc = options.openssl_inc or ''
++ command_line.extend(['-D', 'openssl_inc=%s' % openssl_inc])
++ openssl_lib = options.openssl_lib or ''
++ command_line.extend(['-D', 'openssl_lib=%s' % openssl_lib])
+
+ mac_dir = options.mac_dir or '../mac'
+ if not os.path.isabs(mac_dir):
diff --git a/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc b/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc
index 18b83b3ec86f..ad375ba47ea0 100644
--- a/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc
+++ b/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc
@@ -1,11 +1,11 @@
---- gui/about_dialog/about_dialog.cc.orig 2013-04-21 03:48:45.446269666 +0900
-+++ gui/about_dialog/about_dialog.cc 2013-04-21 04:15:03.065269472 +0900
+--- gui/about_dialog/about_dialog.cc.orig 2013-03-29 13:33:58.000000000 +0900
++++ 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 __FreeBSD__
-+ product_image_.reset(new QImage("@@LOCALBASE@@/share/mozc-tool/icons/product_logo.png"));
++#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
diff --git a/japanese/mozc-server/files/patch-gyp_common.gypi b/japanese/mozc-server/files/patch-gyp_common.gypi
index 946877e4b7b1..a0705b4c36f0 100644
--- a/japanese/mozc-server/files/patch-gyp_common.gypi
+++ b/japanese/mozc-server/files/patch-gyp_common.gypi
@@ -1,32 +1,25 @@
---- gyp/common.gypi.orig 2013-04-21 03:48:45.395416165 +0900
-+++ gyp/common.gypi 2013-04-21 08:31:10.191270448 +0900
-@@ -58,7 +58,7 @@
- # warning_cflags will be shared with Mac and Linux.
- 'warning_cflags': [
- '-Wall',
-- '-Werror',
-+# '-Werror',
- '-Wno-char-subscripts',
- '-Wno-sign-compare',
- '-Wno-deprecated-declarations',
-@@ -194,7 +194,7 @@
- # - http://code.google.com/p/protobuf/issues/detail?id=128
- # - http://code.google.com/p/protobuf/issues/detail?id=370
- # for the background information.
-- 'use_libprotobuf%': 0,
-+ 'use_libprotobuf%': 1,
-
- # use_libzinnia represents if zinnia library is used or not.
- # This option is only for Linux.
-@@ -735,6 +735,12 @@
+--- gyp/common.gypi.orig 2013-03-29 13:33:42.000000000 +0900
++++ gyp/common.gypi 2013-04-28 17:38:16.000000000 +0900
+@@ -723,7 +723,9 @@
+ ['OS=="linux"', {
+ 'defines': [
+ 'OS_LINUX',
++ 'OS_FREEBSD',
+ 'MOZC_SERVER_DIRECTORY="<@(server_dir)"',
++ 'LOCALBASE="<@(localbase)"',
+ ],
+ 'cflags': [
+ '<@(warning_cflags)',
+@@ -735,6 +737,13 @@
# <unordered_map> and <unordered_set>.
'-Wno-deprecated',
],
+ 'include_dirs': [
-+ '@@LOCALBASE@@/include'
++ '<@(include_dirs)'
+ ],
+ 'ldflags': [
-+ '-L@@LOCALBASE@@/lib'
++ '<@(ldflags)',
++ '-fstack-protector',
+ ],
'conditions': [
['target_platform=="ChromeOS"', {
diff --git a/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc b/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc
index 6d92dc1837ff..22fb9c119b6b 100644
--- a/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc
+++ b/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc
@@ -1,19 +1,11 @@
---- handwriting/zinnia_handwriting.cc.orig 2013-04-21 03:48:52.166271231 +0900
-+++ handwriting/zinnia_handwriting.cc 2013-04-21 04:20:14.073270179 +0900
-@@ -49,10 +49,16 @@
- const char kModelFile[] = "handwriting-light-ja.model";
- return FileUtil::JoinPath(MacUtil::GetResourcesDirectory(), kModelFile);
+--- handwriting/zinnia_handwriting.cc.orig 2013-03-29 13:33:25.000000000 +0900
++++ handwriting/zinnia_handwriting.cc 2013-04-27 15:15:30.000000000 +0900
+@@ -51,7 +51,7 @@
#elif defined(USE_LIBZINNIA)
-+#if defined(__FreeBSD__)
-+ const char kModelFile[] =
-+ "@@LOCALBASE@@/share/tegaki/models/zinnia/handwriting-ja.model";
-+ return kModelFile;
-+#else
// On Linux, use the model for tegaki-zinnia.
const char kModelFile[] =
- "/usr/share/tegaki/models/zinnia/handwriting-ja.model";
+- "/usr/share/tegaki/models/zinnia/handwriting-ja.model";
++ LOCALBASE "/share/tegaki/models/zinnia/handwriting-ja.model";
return kModelFile;
-+#endif
#else
const char kModelFile[] = "handwriting-ja.model";
- return FileUtil::JoinPath(SystemUtil::GetServerDirectory(), kModelFile);
diff --git a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc b/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc
index 542f221f0eb0..8b029cc2652f 100644
--- a/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc
+++ b/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc
@@ -1,11 +1,11 @@
---- ipc/ipc_path_manager.cc.orig 2013-04-21 03:48:45.259273192 +0900
-+++ ipc/ipc_path_manager.cc 2013-04-21 04:20:12.800269260 +0900
+--- 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(__FreeBSD__)
++#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
index 81be7b6270c0..76192d6fd642 100644
--- a/japanese/mozc-server/files/patch-ipc_unix_ipc.cc
+++ b/japanese/mozc-server/files/patch-ipc_unix_ipc.cc
@@ -1,10 +1,10 @@
---- ipc/unix_ipc.cc.orig 2013-04-21 03:48:45.257269513 +0900
-+++ ipc/unix_ipc.cc 2013-04-21 08:33:27.207272333 +0900
+--- 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 <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
-+#if defined(OS_MACOSX) || defined(__FreeBSD__)
++#if defined(OS_MACOSX) || defined(OS_FREEBSD)
+#include <sys/ucred.h>
+#endif
#include <sys/wait.h>
@@ -14,7 +14,7 @@
bool IsPeerValid(int socket, pid_t *pid) {
*pid = 0;
-+#if defined(OS_MACOSX) || defined(__FreeBSD__)
++#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);
@@ -36,7 +36,7 @@
+ *pid = 0;
+#endif
+
-+#if defined(OS_LINUX) && !defined(__FreeBSD__)
++#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.
@@ -52,7 +52,7 @@
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(__FreeBSD__)
++#if defined(OS_MACOSX) || defined(OS_FREEBSD)
+ address.sun_len = SUN_LEN(&address);
+ const size_t sun_len = sizeof(address);
+#else
@@ -65,7 +65,7 @@
SO_REUSEADDR,
reinterpret_cast<char *>(&on),
sizeof(on));
-+#if defined(OS_MACOSX) || defined(__FreeBSD__)
++#if defined(OS_MACOSX) || defined(OS_FREEBSD)
+ addr.sun_len = SUN_LEN(&addr);
+ const size_t sun_len = sizeof(addr);
+#else
diff --git a/japanese/mozc-server/files/patch-server_mozc_server.cc b/japanese/mozc-server/files/patch-server_mozc_server.cc
index 543604f7df33..55a601b1a9ba 100644
--- a/japanese/mozc-server/files/patch-server_mozc_server.cc
+++ b/japanese/mozc-server/files/patch-server_mozc_server.cc
@@ -1,10 +1,10 @@
---- server/mozc_server.cc.orig 2013-04-21 03:48:44.841269792 +0900
-+++ server/mozc_server.cc 2013-04-21 04:14:37.821269328 +0900
+--- 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 <windows.h>
#endif
-+#ifdef __FreeBSD__
++#ifdef OS_FREEBSD
+#include <signal.h>
+#endif
@@ -14,7 +14,7 @@
mozc::SessionServer *g_session_server = NULL;
}
-+#ifdef __FreeBSD__
++#ifdef OS_FREEBSD
+static void sig_func(int num)
+{
+ VLOG(1) << "signal " << num << " recieved.";
@@ -38,7 +38,7 @@
return -1;
}
-+#ifdef __FreeBSD__
++#ifdef OS_FREEBSD
+ ::signal(SIGINT, sig_func);
+ ::signal(SIGHUP, sig_func);
+ ::signal(SIGTERM, sig_func);
diff --git a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py
index 62427e26104b..1d391db29991 100644
--- a/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py
+++ b/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py
@@ -1,5 +1,14 @@
---- third_party/gyp/pylib/gyp/generator/make.py.orig 2013-04-21 03:48:44.552270209 +0900
-+++ third_party/gyp/pylib/gyp/generator/make.py 2013-04-21 04:16:32.828269137 +0900
+--- 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)/'
@@ -10,3 +19,13 @@
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
new file mode 100644
index 000000000000..33364d71c148
--- /dev/null
+++ b/japanese/mozc-server/files/patch-unix_emacs_mozc.el
@@ -0,0 +1,55 @@
+--- unix/emacs/mozc.el.orig 2013-03-29 13:33:43.000000000 +0900
++++ unix/emacs/mozc.el 2013-05-05 17:27:24.000000000 +0900
+@@ -1755,29 +1755,36 @@
+
+ (require 'mule)
+
+-(defun mozc-leim-activate (input-method)
++(defun mozc-leim-activate (&rest input-method)
+ "Activate mozc-mode via LEIM.
+ INPUT-METHOD is not used."
+- (setq inactivate-current-input-method-function 'mozc-leim-inactivate)
++ (set
++ (if (boundp 'deactivate-current-input-method-function)
++ 'deactivate-current-input-method-function
++ 'inactivate-current-input-method-function)
++ 'mozc-leim-deactivate)
+ (mozc-mode t))
+
+-(defun mozc-leim-inactivate ()
+- "Inactivate mozc-mode via LEIM."
++(defun mozc-leim-deactivate ()
++ "Deactivate mozc-mode via LEIM."
+ (mozc-mode nil))
+
+-(defcustom mozc-leim-title "[Mozc]"
+- "Mode line string shown when mozc-mode is enabled.
+-This indicator is not shown when you don't use LEIM."
+- :type '(choice (const :tag "No indicator" nil)
+- (string :tag "Show an indicator"))
+- :group 'mozc)
++;; Defined in leim-list.el
+
+-(register-input-method
+- "japanese-mozc"
+- "Japanese"
+- 'mozc-leim-activate
+- mozc-leim-title
+- "Japanese input method with Mozc/Google Japanese Input.")
++;; (defcustom mozc-leim-title "[Mozc]"
++;; "Mode line string shown when mozc-mode is enabled.
++;; This indicator is not shown when you don't use LEIM."
++;; :type '(choice (const :tag "No indicator" nil)
++;; (string :tag "Show an indicator"))
++;; :group 'mozc)
++
++;;
++;; (register-input-method
++;; "japanese-mozc"
++;; "Japanese"
++;; 'mozc-leim-activate
++;; mozc-leim-title
++;; "Japanese input method with Mozc/Google Japanese Input.")
+
+
+
diff --git a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py b/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py
index 4919e6da85a2..f747b3c76402 100644
--- a/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py
+++ b/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py
@@ -1,43 +1,163 @@
---- unix/ibus/gen_mozc_xml.py.orig 2013-04-21 03:48:44.433270458 +0900
-+++ unix/ibus/gen_mozc_xml.py 2013-04-21 04:12:50.384269164 +0900
-@@ -41,6 +41,7 @@
- import os
- import subprocess
- import sys
-+import os
-
- # Information to generate <component> part of mozc.xml. %s will be replaced with
+--- unix/ibus/gen_mozc_xml.py.orig 2013-03-29 13:33:43.000000000 +0900
++++ unix/ibus/gen_mozc_xml.py 2013-04-28 20:40:28.000000000 +0900
+@@ -46,10 +46,10 @@
# a product name, 'Mozc' or 'Google Japanese Input'.
-@@ -75,6 +76,32 @@
+ IBUS_COMPONENT_PROPS = {
+ 'name': 'com.google.IBus.Mozc',
+- 'description': '%s Component',
++ 'description': '%(product_name)s Component',
+ # TODO(yusukes): Support Linux distributions other than Gentoo/ChromeOS.
+ # For example, Ubuntu uses /usr/lib/ibus-mozc/.
+- 'exec': '/usr/libexec/ibus-engine-mozc --ibus',
++ 'exec': '%(localbase)s/libexec/ibus-engine-mozc --ibus',
+ # TODO(mazda): Generate the version number.
+ 'version': '0.0.0.0',
+ 'author': 'Google Inc.',
+@@ -60,17 +60,17 @@
+
+ # Information to generate <engines> part of mozc.xml.
+ IBUS_ENGINE_COMMON_PROPS = {
+- 'description': '%s (Japanese Input Method)',
++ 'description': '%(product_name)s (Japanese Input Method)',
+ 'language': 'ja',
+- 'icon': '/usr/share/ibus-mozc/product_icon.png',
++ 'icon': '%(localbase)s/share/ibus-mozc/icons/product_icon.png',
+ 'rank': '80',
+ }
+
+ # Information to generate <engines> part of mozc.xml for IBus 1.5 or later.
+ IBUS_1_5_ENGINE_COMMON_PROPS = {
+- 'description': '%s (Japanese Input Method)',
++ 'description': '%(product_name)s (Japanese Input Method)',
+ 'language': 'ja',
+- 'icon': '/usr/share/ibus-mozc/product_icon.png',
++ 'icon': '%(localbase)s/share/ibus-mozc/icons/product_icon.png',
+ 'rank': '80',
'symbol': '&#x3042;',
}
+@@ -83,7 +83,7 @@
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
+ # unix/ibus/mozc_engine.cc.
+ 'name': ['mozc-jp'],
+- 'longname': ['%s'],
++ 'longname': ['%(product_name)s'],
+ 'layout': ['jp'],
+ },
+ # On Linux (IBus >= 1.5), we use special label 'default' for the keyboard
+@@ -92,7 +92,7 @@
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
+ # unix/ibus/mozc_engine.cc.
+ 'name': ['mozc-jp'],
+- 'longname': ['%s'],
++ 'longname': ['%(product_name)s'],
+ 'layout': ['default'],
+ },
+ # On Chrome/Chromium OS, we provide three engines.
+@@ -100,8 +100,8 @@
+ # DO NOT change the engine name 'mozc-jp'. The names is referenced by
+ # unix/ibus/mozc_engine.cc.
+ 'name': ['mozc-jp', 'mozc', 'mozc-dv'],
+- 'longname': ['%s (Japanese keyboard layout)', '%s (US keyboard layout)',
+- '%s (US Dvorak keyboard layout)'],
++ 'longname': ['%(product_name)s (Japanese keyboard layout)', '%(product_name)s (US keyboard layout)',
++ '%(product_name)s (US Dvorak keyboard layout)'],
+ 'layout': ['jp', 'us', 'us(dvorak)'],
+ },
+ }
+@@ -123,18 +123,11 @@
+ #endif // %s"""
+
+
+-def EmbedProductName(product_name, format_string):
+- if format_string.find('%s') != -1:
+- return format_string % product_name
+- return format_string
+-
+-
+-def OutputXmlElement(product_name, element_name, value):
+- print ' <%s>%s</%s>' % (element_name, EmbedProductName(product_name, value),
+- element_name)
++def OutputXmlElement(element_name, value):
++ print ' <%s>%s</%s>' % (element_name, value, element_name)
+
+
+-def OutputXml(product_name, component, engine_common, engines, setup_arg):
++def OutputXml(product_name, component, engine_common, engines, setup_arg, localbase):
+ """Outputs a XML data for ibus-daemon.
+
+ Args:
+@@ -148,27 +141,25 @@
+ """
+ print '<component>'
+ for key in component:
+- OutputXmlElement(product_name, key, component[key])
++ OutputXmlElement(key, component[key] % locals())
+ print '<engines>'
+ for i in range(len(engines['name'])):
+ print '<engine>'
+ for key in engine_common:
+- OutputXmlElement(product_name, key, engine_common[key])
++ OutputXmlElement(key, engine_common[key] % locals())
+ if setup_arg:
+- OutputXmlElement(product_name, 'setup', ' '.join(setup_arg))
++ OutputXmlElement('setup', ' '.join(setup_arg))
+ for key in engines:
+- OutputXmlElement(product_name, key, engines[key][i])
++ OutputXmlElement(key, engines[key][i] % locals())
+ print '</engine>'
+ print '</engines>'
+ print '</component>'
+
+
+-def OutputCppVariable(product_name, prefix, variable_name, value):
+- print 'const char k%s%s[] = "%s";' % (prefix, variable_name.capitalize(),
+- EmbedProductName(product_name, value))
+-
++def OutputCppVariable(prefix, variable_name, value):
++ print 'const char k%s%s[] = "%s";' % (prefix, variable_name.capitalize(), value)
+
+-def OutputCpp(product_name, component, engine_common, engines):
++def OutputCpp(product_name, component, engine_common, engines, localbase):
+ """Outputs a C++ header file for mozc/unix/ibus/main.cc.
+
+ Args:
+@@ -180,13 +171,13 @@
+ guard_name = 'MOZC_UNIX_IBUS_MAIN_H_'
+ print CPP_HEADER % (guard_name, guard_name)
+ for key in component:
+- OutputCppVariable(product_name, 'Component', key, component[key])
++ OutputCppVariable('Component', key, component[key] % locals())
+ for key in engine_common:
+- OutputCppVariable(product_name, 'Engine', key, engine_common[key])
++ OutputCppVariable('Engine', key, engine_common[key] % locals())
+ for key in engines:
+ print 'const char* kEngine%sArray[] = {' % key.capitalize()
+ for i in range(len(engines[key])):
+- print '"%s",' % EmbedProductName(product_name, engines[key][i])
++ print '"%s",' % engines[key][i] % locals()
+ print '};'
+ print 'const size_t kEngineArrayLen = %s;' % len(engines['name'])
+ print CPP_FOOTER % guard_name
+@@ -222,6 +213,7 @@
+ parser.add_option('--pkg_config_command', dest='pkg_config_command',
+ default='pkg-config',
+ help='The path to pkg-config command.')
++ parser.add_option('--localbase', dest='localbase')
+ (options, unused_args) = parser.parse_args()
+
+ setup_arg = []
+@@ -238,12 +230,12 @@
+ if options.output_cpp:
+ OutputCpp(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS,
+ common_props,
+- IBUS_ENGINES_PROPS[platform])
++ IBUS_ENGINES_PROPS[platform], options.localbase)
+ else:
+ OutputXml(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS,
+ common_props,
+ IBUS_ENGINES_PROPS[platform],
+- setup_arg)
++ setup_arg, options.localbase)
+ return 0
-+# Override for FreeBSD
-+if os.uname()[0] == 'FreeBSD':
-+ IBUS_COMPONENT_PROPS = {
-+ 'name': 'com.google.IBus.Mozc',
-+ 'description': '%s Component',
-+ 'exec': '@@LOCALBASE@@/libexec/ibus-engine-mozc --ibus',
-+ 'version': '0.0.0.0',
-+ 'author': 'Google Inc.',
-+ 'license': 'New BSD',
-+ 'homepage': 'http://code.google.com/p/mozc/',
-+ 'textdomain': 'ibus-mozc',
-+ }
-+ IBUS_ENGINE_COMMON_PROPS = {
-+ 'description': '%s (Japanese Input Method)',
-+ 'language': 'ja',
-+ 'icon': '@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png',
-+ 'rank': '0',
-+ }
-+ IBUS_1_5_ENGINE_COMMON_PROPS = {
-+ 'description': '%s (Japanese Input Method)',
-+ 'language': 'ja',
-+ 'icon': '@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png',
-+ 'rank': '80',
-+ 'symbol': '&#x3042;',
-+ }
-+
- # A dictionary from --platform to engines that are used in the platform. The
- # information is used to generate <engines> part of mozc.xml.
- IBUS_ENGINES_PROPS = {
+ if __name__ == '__main__':
diff --git a/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp b/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp
new file mode 100644
index 000000000000..bb3682b3ff15
--- /dev/null
+++ b/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp
@@ -0,0 +1,10 @@
+--- unix/ibus/ibus.gyp.orig 2013-04-27 19:26:29.000000000 +0900
++++ unix/ibus/ibus.gyp 2013-04-27 19:27:05.000000000 +0900
+@@ -134,6 +134,7 @@
+ '--platform=Linux',
+ '--branding=Mozc',
+ '--server_dir=<(server_dir)',
++ '--localbase=<(localbase)',
+ '--pkg_config_command=<(pkg_config_command)',
+ ],
+ }],
diff --git a/japanese/mozc-server/files/patch-unix_ibus_mozc.xml b/japanese/mozc-server/files/patch-unix_ibus_mozc.xml
deleted file mode 100644
index d2a8fb6683ec..000000000000
--- a/japanese/mozc-server/files/patch-unix_ibus_mozc.xml
+++ /dev/null
@@ -1,24 +0,0 @@
---- unix/ibus/mozc.xml.orig 1970-01-01 09:00:00.000000000 +0900
-+++ unix/ibus/mozc.xml 2011-12-04 16:04:42.283606000 +0900
-@@ -0,0 +1,21 @@
-+<component>
-+ <name>com.google.IBus.Mozc</name>
-+ <description>Mozc Component</description>
-+ <exec>@@LOCALBASE@@/libexec/ibus-engine-mozc --ibus</exec>
-+ <version>0.0.0.0</version>
-+ <author>Google Inc.</author>
-+ <license>New BSD</license>
-+ <homepage>http://code.google.com/p/mozc/</homepage>
-+ <textdomain>ibus-mozc</textdomain>
-+ <engines>
-+ <engine>
-+ <rank>0</rank>
-+ <description>Mozc (Japanese Input Method)</description>
-+ <language>ja</language>
-+ <icon>@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png</icon>
-+ <layout>jp</layout>
-+ <name>mozc-jp</name>
-+ <longname>Mozc</longname>
-+ </engine>
-+ </engines>
-+</component>
diff --git a/japanese/mozc-server/files/patch-unix_ibus_path_util.cc b/japanese/mozc-server/files/patch-unix_ibus_path_util.cc
index d488733b794b..28185c1ca03c 100644
--- a/japanese/mozc-server/files/patch-unix_ibus_path_util.cc
+++ b/japanese/mozc-server/files/patch-unix_ibus_path_util.cc
@@ -1,25 +1,11 @@
---- unix/ibus/path_util.cc.orig 2013-04-21 03:48:44.435272531 +0900
-+++ unix/ibus/path_util.cc 2013-04-21 04:12:51.235269303 +0900
-@@ -30,14 +30,22 @@
+--- 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 {
-+#ifdef __FreeBSD__
-+const char kInstalledDirectory[] = "@@LOCALBASE@@/share/ibus-mozc";
-+#else
- const char kInstalledDirectory[] = "/usr/share/ibus-mozc";
-+#endif
+-const char kInstalledDirectory[] = "/usr/share/ibus-mozc";
++const char kInstalledDirectory[] = LOCALBASE "/share/ibus-mozc/icons";
}
namespace mozc {
- namespace ibus {
-
- string GetIconPath(const string &icon_file) {
-+#ifdef __FreeBSD__
-+ return string("@@LOCALBASE@@/share/ibus-mozc/icons/") + icon_file;
-+#else
- return kInstalledDirectory + string("/") + icon_file;
-+#endif
- }
-
- } // namespace ibus
diff --git a/japanese/mozc-tool/Makefile b/japanese/mozc-tool/Makefile
index dfbed866abee..0a611407365c 100644
--- a/japanese/mozc-tool/Makefile
+++ b/japanese/mozc-tool/Makefile
@@ -6,6 +6,7 @@
#
PKGNAMESUFFIX= -tool
+
COMMENT= Mozc tool for IBus, SCIM, and others
DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}