From owner-svn-ports-head@FreeBSD.ORG Tue May 14 19:46:25 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F9C575C; Tue, 14 May 2013 19:46:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 90E6F7A8; Tue, 14 May 2013 19:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4EJkPMm067211; Tue, 14 May 2013 19:46:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4EJkLMV067179; Tue, 14 May 2013 19:46:21 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201305141946.r4EJkLMV067179@svn.freebsd.org> From: Hiroki Sato Date: Tue, 14 May 2013 19:46:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r318195 - in head/japanese: fcitx-mozc ibus-mozc mozc-el mozc-server mozc-server/files mozc-tool X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2013 19:46:25 -0000 Author: hrs Date: Tue May 14 19:46:20 2013 New Revision: 318195 URL: http://svnweb.freebsd.org/changeset/ports/318195 Log: - Add Japan Post zip code dictionary. - Add LICENSE. - Fix malformed BUILD_DEPENDS and remove unnecessary dependencies. Use USE_* in a consistent manner. - Fix inconsistency toolchain usage in build_tools and the others. Hardcoded g++ was always used only for the former even if both gcc and clang were available. - Enable -Werror. - Fix SSP issue on i386 platform. - Let cpp(1) to replace LOCALBASE instead of patching and sed(1). - Use GYP_DEFINES for build variables instead of patching. - Separate the stages of configuration and build from each other. - Add options for localbase and openssl-related configuration to gyp instead of patching. - Fix makesum target. - Fix whitespaces to make portlint happy. - Disable serialization for linking. It is not needed. - Remove hardcoded mozc.xml. - Respect DISABLE_MAKE_JOBS=yes. Do not calculate the factor using the number of CPUs. - Remove a confusing message after pkg-message. - Rename a deprecated function (inactivate-current-input-method-function) in mozc.el in a compatible fashion with the older emacsen [1]. - Add leim-list.el for registration of mozc-mode via LEIM API. "(require 'mozc)" is no longer needed. - Fix a build problem when binutils is installed and ${LOCALBASE}/bin comes first in $PATH [2]. Submitted by: Tadaaki Nagao [1] Reported by: Kenichi Niioka [2] PR: ports/178250 Approved by: maintainer timeout (2 weeks) Added: head/japanese/mozc-server/files/leim-list.el (contents, props changed) head/japanese/mozc-server/files/patch-base_logging.cc (contents, props changed) head/japanese/mozc-server/files/patch-build_mozc.py (contents, props changed) head/japanese/mozc-server/files/patch-unix_emacs_mozc.el (contents, props changed) head/japanese/mozc-server/files/patch-unix_ibus_ibus.gyp (contents, props changed) Deleted: head/japanese/mozc-server/files/patch-unix_ibus_mozc.xml Modified: head/japanese/fcitx-mozc/Makefile head/japanese/ibus-mozc/Makefile head/japanese/mozc-el/Makefile head/japanese/mozc-el/pkg-message head/japanese/mozc-server/Makefile head/japanese/mozc-server/distinfo head/japanese/mozc-server/files/patch-base_base.gyp head/japanese/mozc-server/files/patch-base_iconv.cc head/japanese/mozc-server/files/patch-base_mutex.cc head/japanese/mozc-server/files/patch-base_process.cc head/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc head/japanese/mozc-server/files/patch-gyp_common.gypi head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc head/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc head/japanese/mozc-server/files/patch-server_mozc_server.cc head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py head/japanese/mozc-server/files/patch-unix_ibus_path_util.cc head/japanese/mozc-tool/Makefile Modified: head/japanese/fcitx-mozc/Makefile ============================================================================== --- head/japanese/fcitx-mozc/Makefile Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/fcitx-mozc/Makefile Tue May 14 19:46:20 2013 (r318195) @@ -1,12 +1,8 @@ -# New ports collection makefile for: fcitx-mozc -# Date created: 22 May 2012 -# Whom: Daichi GOTO -# +# Created by: Daichi GOTO # $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" Modified: head/japanese/ibus-mozc/Makefile ============================================================================== --- head/japanese/ibus-mozc/Makefile Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/ibus-mozc/Makefile Tue May 14 19:46:20 2013 (r318195) @@ -1,12 +1,8 @@ -# New ports collection makefile for: ibus-mozc -# Date created: 22 May 2010 -# Whom: Daichi GOTO -# +# Created by: Daichi GOTO # $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" Modified: head/japanese/mozc-el/Makefile ============================================================================== --- head/japanese/mozc-el/Makefile Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-el/Makefile Tue May 14 19:46:20 2013 (r318195) @@ -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" Modified: head/japanese/mozc-el/pkg-message ============================================================================== --- head/japanese/mozc-el/pkg-message Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-el/pkg-message Tue May 14 19:46:20 2013 (r318195) @@ -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) Modified: head/japanese/mozc-server/Makefile ============================================================================== --- head/japanese/mozc-server/Makefile Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/Makefile Tue May 14 19:46:20 2013 (r318195) @@ -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 @@ -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}/ja 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 Modified: head/japanese/mozc-server/distinfo ============================================================================== --- head/japanese/mozc-server/distinfo Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/distinfo Tue May 14 19:46:20 2013 (r318195) @@ -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 Added: head/japanese/mozc-server/files/leim-list.el ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/mozc-server/files/leim-list.el Tue May 14 19:46:20 2013 (r318195) @@ -0,0 +1,30 @@ +;; leim-list.el --- Mozc setup for leim API +;; $FreeBSD$$ +;; +;; Copyright (c) 2013 Hiroki Sato . 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) Modified: head/japanese/mozc-server/files/patch-base_base.gyp ============================================================================== --- head/japanese/mozc-server/files/patch-base_base.gyp Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-base_base.gyp Tue May 14 19:46:20 2013 (r318195) @@ -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': [ - '(&ibuf), &ilen, &obuf, &olen) Added: head/japanese/mozc-server/files/patch-base_logging.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/mozc-server/files/patch-base_logging.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 Modified: head/japanese/mozc-server/files/patch-base_mutex.cc ============================================================================== --- head/japanese/mozc-server/files/patch-base_mutex.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-base_mutex.cc Tue May 14 19:46:20 2013 (r318195) @@ -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); Modified: head/japanese/mozc-server/files/patch-base_process.cc ============================================================================== --- head/japanese/mozc-server/files/patch-base_process.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-base_process.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 Added: head/japanese/mozc-server/files/patch-build_mozc.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/mozc-server/files/patch-build_mozc.py Tue May 14 19:46:20 2013 (r318195) @@ -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): Modified: head/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc ============================================================================== --- head/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 Modified: head/japanese/mozc-server/files/patch-gyp_common.gypi ============================================================================== --- head/japanese/mozc-server/files/patch-gyp_common.gypi Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-gyp_common.gypi Tue May 14 19:46:20 2013 (r318195) @@ -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 @@ # and . '-Wno-deprecated', ], + 'include_dirs': [ -+ '@@LOCALBASE@@/include' ++ '<@(include_dirs)' + ], + 'ldflags': [ -+ '-L@@LOCALBASE@@/lib' ++ '<@(ldflags)', ++ '-fstack-protector', + ], 'conditions': [ ['target_platform=="ChromeOS"', { Modified: head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc ============================================================================== --- head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc Tue May 14 19:46:20 2013 (r318195) @@ -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); Modified: head/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc ============================================================================== --- head/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 Modified: head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc ============================================================================== --- head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 #include #include -+#if defined(OS_MACOSX) || defined(__FreeBSD__) ++#if defined(OS_MACOSX) || defined(OS_FREEBSD) +#include +#endif #include @@ -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(&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 Modified: head/japanese/mozc-server/files/patch-server_mozc_server.cc ============================================================================== --- head/japanese/mozc-server/files/patch-server_mozc_server.cc Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-server_mozc_server.cc Tue May 14 19:46:20 2013 (r318195) @@ -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 #endif -+#ifdef __FreeBSD__ ++#ifdef OS_FREEBSD +#include +#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); Modified: head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py ============================================================================== --- head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py Tue May 14 19:38:52 2013 (r318194) +++ head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py Tue May 14 19:46:20 2013 (r318195) @@ -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 Added: head/japanese/mozc-server/files/patch-unix_emacs_mozc.el ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/mozc-server/files/patch-unix_emacs_mozc.el Tue May 14 19:46:20 2013 (r318195) @@ -0,0 +1,55 @@ +--- unix/emacs/mozc.el.orig 2013-03-29 13:33:43.000000000 +0900 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***