Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jul 2015 21:12:04 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r391682 - in head/japanese: . ibus-mozc/files mozc-server mozc-server/files uim-mozc uim-mozc/files
Message-ID:  <201507092112.t69LC4dR090849@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Thu Jul  9 21:12:03 2015
New Revision: 391682
URL: https://svnweb.freebsd.org/changeset/ports/391682

Log:
  - Add japanese/uim-mozc, uim plugin for mozc input method[*].
  - Fix XML file for ibus engine.
  - Fix stop_server() in mozc startup script.
  
  PR:			199258 [*]
  Based on work by:	Koichiro IWAO [*]

Added:
  head/japanese/uim-mozc/
  head/japanese/uim-mozc/Makefile   (contents, props changed)
  head/japanese/uim-mozc/files/
  head/japanese/uim-mozc/files/pkg-message.in   (contents, props changed)
Modified:
  head/japanese/Makefile
  head/japanese/ibus-mozc/files/pkg-message.in
  head/japanese/mozc-server/Makefile
  head/japanese/mozc-server/distinfo
  head/japanese/mozc-server/files/mozc.in
  head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py

Modified: head/japanese/Makefile
==============================================================================
--- head/japanese/Makefile	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/Makefile	Thu Jul  9 21:12:03 2015	(r391682)
@@ -274,6 +274,7 @@
     SUBDIR += today
     SUBDIR += tomoe
     SUBDIR += uim-anthy
+    SUBDIR += uim-mozc
     SUBDIR += uim-tomoe-gtk
     SUBDIR += vera-fpw
     SUBDIR += vftool

Modified: head/japanese/ibus-mozc/files/pkg-message.in
==============================================================================
--- head/japanese/ibus-mozc/files/pkg-message.in	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/ibus-mozc/files/pkg-message.in	Thu Jul  9 21:12:03 2015	(r391682)
@@ -6,3 +6,6 @@ export QT_IM_MODULE=xim
 export XMODIFIERS=@im=ibus
 %%PREFIX%%/bin/mozc start
 ibus-daemon -r --daemonize --xim
+
+Note that textproc/ibus-qt with IBUS option is required to
+make QT_IM_MODULE=ibus work.

Modified: head/japanese/mozc-server/Makefile
==============================================================================
--- head/japanese/mozc-server/Makefile	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/mozc-server/Makefile	Thu Jul  9 21:12:03 2015	(r391682)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mozc
 PORTVERSION=	2.16.2051.102
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	japanese
 MASTER_SITES=	LOCAL/hrs
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
@@ -27,7 +27,7 @@ USES=		compiler:c++11-lang pkgconfig ico
 
 BUILD_MOZC_LIST?=	mozc_server
 
-.if   ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
+.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
 PKGNAMEPREFIX=	ja-
 PKGNAMESUFFIX=	-server
 
@@ -124,7 +124,7 @@ post-configure: ${WRKSRC}/mozcmake
 .endif
 
 # mozc_server
-.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || defined(makesum)
+.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || make(makesum)
 GYP_OPTIONS+=	--noqt
 GYP_DEFINES+=	use_libibus=0 \
 		enable_gtk_renderer=0
@@ -251,6 +251,58 @@ do-install-ibus_mozc:
 	    ${STAGEDIR}${DATADIR}/icons/product_icon.png
 .endif
 
+# uim_mozc
+.if ${BUILD_MOZC_LIST:Muim_mozc} == "uim_mozc" || make(makesum)
+#USE_GITHUB=	yes	# XXX
+GH_ACCOUNT=	e-kato
+GH_PROJECT=	macuim
+GH_TAGNAME=	v0.6.16.2
+DISTFILES+=	${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}_GH0${EXTRACT_SUFX}:gh
+EXTRACT_ONLY+=	${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME}_GH0${EXTRACT_SUFX}
+MASTER_SITES+=	https://codeload.github.com/${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/:gh
+WRKSRC_MU=	${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^v//}
+
+LIB_DEPENDS+=	libuim.so:${PORTSDIR}/textproc/uim
+RUN_DEPENDS+=	mozc_server:${PORTSDIR}/japanese/mozc-server \
+		mozc_tool:${PORTSDIR}/japanese/mozc-tool
+GYP_OPTIONS+=	--noqt
+GYP_DEFINES+=	use_libibus=0 \
+		enable_gtk_renderer=0
+
+PLIST_FILES+=	lib/uim/plugin/libuim-mozc.so \
+		%%DATADIR%%/mozc.scm \
+		%%DATADIR%%/mozc-custom.scm \
+		%%DATADIR%%/mozc-key-custom.scm \
+		%%DATADIR%%/pixmaps/mozc.png \
+		"@exec ${LOCALBASE}/bin/uim-module-manager --register mozc" \
+		"@unexec ${LOCALBASE}/bin/uim-module-manager --unregister mozc"
+
+post-extract-uim_mozc:
+	${LN} -s ${WRKSRC_MU}/Mozc/uim ${WRKSRC}/unix
+	${REINPLACE_CMD} -e "s,/usr/lib/mozc,${LOCALBASE}/libexec," \
+	    ${WRKSRC_MU}/Mozc/scm/mozc-custom.scm
+
+post-extract: post-extract-uim_mozc
+
+do-build-uim_mozc:
+	${BUILD_MOZC_CMD_BUILD} \
+	    unix/uim/uim.gyp:uim-mozc
+
+do-install-uim_mozc:
+	${MKDIR} ${STAGEDIR}${PREFIX}/lib/uim/plugin
+	${INSTALL_PROGRAM} \
+	    ${WRKSRC}/out_linux/${BUILD_MODE}/libuim-mozc.so \
+	    ${STAGEDIR}${PREFIX}/lib/uim/plugin
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC_MU}/Mozc/scm && \
+	    ${INSTALL_DATA} mozc.scm mozc-custom.scm mozc-key-custom.scm \
+	    ${STAGEDIR}${DATADIR}
+	${MKDIR} ${STAGEDIR}${DATADIR}/pixmaps
+	${INSTALL_DATA} \
+	    ${WRKSRC}/data/images/product_icon_32bpp-128.png \
+	    ${STAGEDIR}${DATADIR}/pixmaps/mozc.png
+.endif
+
 # fcitx_mozc
 .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || make(makesum)
 PATCH_SITES=	http://download.fcitx-im.org/fcitx-mozc/
@@ -261,7 +313,6 @@ PATCH_DIST_STRIP=-p2
 EXTRA_PATCHES=	${PATCHDIR}/extra-patch-unix-fcitx-eim.cc \
 		${PATCHDIR}/extra-patch-unix-fcitx-mozc_response_parser.cc \
 		${PATCHDIR}/extra-patch-unix-fcitx-surrounding_text_util.cc
-
 GYP_OPTIONS+=	--noqt
 GYP_DEFINES+=	use_libibus=0 \
 		enable_gtk_renderer=0

Modified: head/japanese/mozc-server/distinfo
==============================================================================
--- head/japanese/mozc-server/distinfo	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/mozc-server/distinfo	Thu Jul  9 21:12:03 2015	(r391682)
@@ -6,3 +6,5 @@ SHA256 (jigyosyo-20130628.lzh) = d7b796d
 SIZE (jigyosyo-20130628.lzh) = 823590
 SHA256 (fcitx-mozc-2.16.2037.102.2.patch) = ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e
 SIZE (fcitx-mozc-2.16.2037.102.2.patch) = 140421
+SHA256 (e-kato-macuim-v0.6.16.2_GH0.tar.bz2) = 25fca78d1d76cc5c6a49f3b2f6981791ad8275abb2726334d8d40bd49498194d
+SIZE (e-kato-macuim-v0.6.16.2_GH0.tar.bz2) = 324551

Modified: head/japanese/mozc-server/files/mozc.in
==============================================================================
--- head/japanese/mozc-server/files/mozc.in	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/mozc-server/files/mozc.in	Thu Jul  9 21:12:03 2015	(r391682)
@@ -37,10 +37,11 @@ stop_server()
 {
 	if [ -r "${MOZCDIR}/mozc_server.pid" ]; then
 		pkill -F "${MOZCDIR}/mozc_server.pid"
+	else
+		for p in $(pgrep -U $(id -u) mozc_server); do
+			kill $p
+		done
 	fi
-	for p in $(pgrep -U $(id -u) mozc_server); do
-		kill $p
-	done
 }
 
 case $1 in

Modified: head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py
==============================================================================
--- head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py	Thu Jul  9 20:54:36 2015	(r391681)
+++ head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py	Thu Jul  9 21:12:03 2015	(r391682)
@@ -1,6 +1,32 @@
---- unix/ibus/gen_mozc_xml.py.orig	2015-02-17 18:05:39.000000000 +0900
-+++ unix/ibus/gen_mozc_xml.py	2015-02-17 18:06:30.000000000 +0900
-@@ -203,13 +203,19 @@
+--- unix/ibus/gen_mozc_xml.py.orig	2015-02-15 04:18:31.000000000 +0900
++++ unix/ibus/gen_mozc_xml.py	2015-02-22 02:00:23.000000000 +0900
+@@ -67,7 +67,7 @@
+ # Information to generate <engines> part of mozc.xml for IBus 1.5 or later.
+ IBUS_1_5_ENGINE_COMMON_PROPS = {
+     'description': '%(product_name)s (Japanese Input Method)',
+-    'language': 'ja',
++    'language': 'jpn',
+     'icon': '%(ibus_mozc_icon_path)s',
+     'rank': '80',
+     'symbol': '&#x3042;',
+@@ -91,7 +91,7 @@
+         # unix/ibus/mozc_engine.cc.
+         'name': ['mozc-jp'],
+         'longname': ['%(product_name)s'],
+-        'layout': ['default'],
++        'layout': ['jp'],
+     },
+ }
+ 
+@@ -129,6 +129,7 @@
+     engines: A dictionary from a property name to a list of property values of
+         engines. For example, {'name': ['mozc-jp', 'mozc', 'mozc-dv']}.
+   """
++  print '<?xml version="1.0" encoding="utf-8"?>'
+   print '<component>'
+   for key in component:
+     OutputXmlElement(param_dict, key, component[key])
+@@ -203,13 +204,19 @@
    parser.add_option('--server_dir', dest='server_dir', default='',
                      help='The absolute directory path to be installed the '
                      'server executable.')

Added: head/japanese/uim-mozc/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/uim-mozc/Makefile	Thu Jul  9 21:12:03 2015	(r391682)
@@ -0,0 +1,16 @@
+# Created by: Koichiro IWAO <meta+ports@vmeta.jp>
+# $FreeBSD$
+
+PKGNAMEPREFIX=	ja-uim-
+
+COMMENT=	Mozc engine for uim
+
+MASTERDIR=	${.CURDIR}/../../japanese/mozc-server
+FILESDIR=	${.CURDIR}/files
+DATADIR=	${PREFIX}/share/uim
+SUB_FILES=	pkg-message
+PKGMESSAGE=	${WRKDIR}/pkg-message
+
+BUILD_MOZC_LIST=uim_mozc
+
+.include "${MASTERDIR}/Makefile"

Added: head/japanese/uim-mozc/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/uim-mozc/files/pkg-message.in	Thu Jul  9 21:12:03 2015	(r391682)
@@ -0,0 +1,9 @@
+To activate uim-mozc, please add the following into ~/.xinitrc,
+~/.xsession, or ~/.kde4/env (for KDE4):
+
+export GTK_IM_MODULE=uim
+export QT_IM_MODULE=uim
+export XMODIFIERS=@im=uim
+export XIM=uim
+%%PREFIX%%/bin/mozc start
+uim-xim &



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507092112.t69LC4dR090849>