From lichray@gmail.com  Mon May 14 03:17:23 2012
Return-Path: <lichray@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9B712106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 May 2012 03:17:23 +0000 (UTC)
	(envelope-from lichray@gmail.com)
Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 549738FC15
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 May 2012 03:17:23 +0000 (UTC)
Received: by yenl8 with SMTP id l8so4954268yen.13
        for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 May 2012 20:17:22 -0700 (PDT)
Received: by 10.50.169.73 with SMTP id ac9mr3350624igc.29.1336965442436;
        Sun, 13 May 2012 20:17:22 -0700 (PDT)
Received: from localhost (c-98-228-191-105.hsd1.il.comcast.net. [98.228.191.105])
        by mx.google.com with ESMTPS id a10sm9502871igj.10.2012.05.13.20.17.20
        (version=SSLv3 cipher=OTHER);
        Sun, 13 May 2012 20:17:21 -0700 (PDT)
Message-Id: <4fb07941.aa22320a.4927.0a5a@mx.google.com>
Date: Sun, 13 May 2012 20:17:21 -0700 (PDT)
From: Zhihao Yuan <lichray@gmail.com>
Reply-To: Zhihao Yuan <lichray@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Add the support to fcitx-mozc in japanese/mozc-server
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         167860
>Category:       ports
>Synopsis:       [PATCH] Add the support to fcitx-mozc in japanese/mozc-server
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    daichi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 14 03:20:02 UTC 2012
>Closed-Date:    Tue May 22 05:28:16 UTC 2012
>Last-Modified:  Tue May 22 05:30:07 UTC 2012
>Originator:     Zhihao Yuan
>Release:        FreeBSD 8.3-STABLE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD elitebook.hp 8.3-STABLE FreeBSD 8.3-STABLE #1 r235265: Fri May 11 07:06:26 CDT 2012 lichray@elitebook.hp:/usr/obj/usr/src/sys/HOUKAGO amd64


	
>Description:
	
	This patch adds the fcitx-mozc support to mozc-server. Fcitx is featured input method framework.
	https://code.google.com/p/fcitx/

	A new slave port, "japanese/fcitx-mozc" is needed (ports/166711).
	 * It has been a long time since I submit the PR above, so I have to separate the PR into two to notify the japanese/mozc-server maintainer.
>How-To-Repeat:
	
>Fix:

	

--- mozc-server_2.patch begins here ---
diff -ruN --exclude=CVS ../mozc-server.orig/Makefile ./Makefile
--- ../mozc-server.orig/Makefile	2012-05-01 23:16:50.000000000 -0500
+++ ./Makefile	2012-05-04 15:57:23.303055512 -0500
@@ -7,12 +7,16 @@
 
 PORTNAME=	mozc
 PORTVERSION=	1.5.1053.102
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	japanese
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 PKGNAMEPREFIX?=	ja-
 PKGNAMESUFFIX?=	-server
 
+PATCH_SITES?=	http://fcitx.googlecode.com/files/
+PATCHFILES?=	fcitx-mozc-${PORTVERSION}-1.patch
+PATCH_DIST_STRIP?=-p2
+
 MAINTAINER=	daichi@FreeBSD.org
 COMMENT?=	Mozc server for IBus, SCIM and others
 
@@ -57,8 +61,7 @@
 BUILD_MODE=	Release
 .endif
 
-LOCALBASE_REPLACE_FILES= \
-		build_mozc.py \
+LOCALBASE_REPLACE_FILES=	\
 		gyp/common.gypi \
 		unix/ibus/gen_mozc_xml.py \
 		unix/ibus/mozc.xml \
@@ -78,7 +81,7 @@
 BUILD_MOZC_CMD=	cd ${BUILD_WRKSRC} && \
 		${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \
 		PYTHONPATH=${WRKSRC}/third_party/gyp/local/lib/python${PYTHON_VER}/site-packages \
-		MOZC_SERVER_DIRECTORY="${PREFIX}/bin" GYP_DEFINES="use_libprotobuf=1" \
+		GYP_DEFINES="use_libprotobuf=1" \
 		${PYTHON_CMD} build_mozc.py
 BUILD_GYP_CMD=	cd ${WRKSRC}/third_party/gyp && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP}
 
@@ -95,7 +98,8 @@
 	${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_MOZC_CMD} gyp --gypdir=${WRKSRC}/third_party/gyp/local/bin --channel_dev=0
+	${BUILD_MOZC_CMD} gyp --gypdir=${WRKSRC}/third_party/gyp/local/bin \
+		--server_dir="${PREFIX}/bin" --channel_dev=0
 	${BUILD_MOZC_CMD} build_tools -c ${BUILD_MODE}
 
 # mozc_server
@@ -227,6 +231,66 @@
 		${DATADIR}/icons/scim-mozc.png
 .endif
 
+# fcitx_mozc
+.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
+LIB_DEPENDS+=	fcitx-config.4:${PORTSDIR}/chinese/fcitx
+RUN_DEPENDS+=	mozc_server:${PORTSDIR}/japanese/mozc-server \
+		mozc_tool:${PORTSDIR}/japanese/mozc-tool \
+		mozc_server_start:${PORTSDIR}/japanese/mozc-additions
+
+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 \
+		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}
+
+do-build-fcitx_mozc:
+	${BUILD_MOZC_CMD} build -c ${BUILD_MODE} unix/fcitx/fcitx.gyp:fcitx-mozc
+
+do-install-fcitx_mozc:
+# uncomment the following line for `port test`
+	#${MKDIR} \
+		${PREFIX}/lib/fcitx \
+		${PREFIX}/share/fcitx/addon \
+		${PREFIX}/share/fcitx/inputmethod
+	${INSTALL_LIB} \
+		${WRKSRC}/out_linux/${BUILD_MODE}/fcitx-mozc.so \
+		${PREFIX}/lib/fcitx/fcitx-mozc.so
+	${INSTALL_DATA} \
+		${WRKSRC}/unix/fcitx/fcitx-mozc.conf \
+		${PREFIX}/share/fcitx/addon/fcitx-mozc.conf
+	${INSTALL_DATA} \
+		${WRKSRC}/unix/fcitx/mozc.conf \
+		${PREFIX}/share/fcitx/inputmethod/mozc.conf
+	${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} \
+		${WRKSRC}/data/images/unix/${F}.png \
+		${DATADIR}/icon/${F:S/^ui-/mozc-/}.png
+.endfor
+	@${INSTALL_DATA} \
+		${WRKSRC}/data/images/product_icon_32bpp-128.png \
+		${DATADIR}/icon/mozc.png
+.for L in ja zh_CN zh_TW
+	@${INSTALL_DATA} \
+		${WRKSRC}/out_linux/${BUILD_MODE}/obj/gen/unix/fcitx/po/${L}.mo \
+		${PREFIX}/share/locale/${L}/LC_MESSAGES/fcitx-mozc.mo
+.endfor
+.endif
+
 # mozc-el
 .if ${BUILD_MOZC_LIST:Mmozc-el} == "mozc-el"
 CATEGORIES+=	editors elisp
diff -ruN --exclude=CVS ../mozc-server.orig/distinfo ./distinfo
--- ../mozc-server.orig/distinfo	2012-05-01 00:53:34.000000000 -0500
+++ ./distinfo	2012-05-04 15:16:03.106351447 -0500
@@ -1,2 +1,4 @@
 SHA256 (mozc-1.5.1053.102.tar.bz2) = c0b8e2f8db312fb530387c0ac9c67dae8bc723bf02765e54816353b1e8dc11e3
 SIZE (mozc-1.5.1053.102.tar.bz2) = 52230135
+SHA256 (fcitx-mozc-1.5.1053.102-1.patch) = 93ebe5ccf42520212ee81b2eac0b5d8727e211a2fbdef244e44d38576d6c54e6
+SIZE (fcitx-mozc-1.5.1053.102-1.patch) = 96547
diff -ruN --exclude=CVS ../mozc-server.orig/files/patch-unix_fcitx_gen__fcitx__mozc__i18n.sh ./files/patch-unix_fcitx_gen__fcitx__mozc__i18n.sh
--- ../mozc-server.orig/files/patch-unix_fcitx_gen__fcitx__mozc__i18n.sh	1969-12-31 18:00:00.000000000 -0600
+++ ./files/patch-unix_fcitx_gen__fcitx__mozc__i18n.sh	2012-05-04 15:26:37.626878773 -0500
@@ -0,0 +1,11 @@
+--- unix/fcitx/gen_fcitx_mozc_i18n.sh.orig	2012-04-06 15:59:51.874875110 -0500
++++ unix/fcitx/gen_fcitx_mozc_i18n.sh	2012-04-06 16:00:48.621198949 -0500
+@@ -7,5 +7,5 @@ mkdir -p "$1"
+ 
+ for pofile in *.po
+ do
+-  msgfmt "$pofile" -o "$1/${pofile/po/mo}"
+-done
+\ No newline at end of file
++  msgfmt "$pofile" -o "$1/${pofile%po}mo"
++done
--- mozc-server_2.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->daichi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon May 14 03:20:13 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167860 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/167860: commit references a PR
Date: Tue, 22 May 2012 05:19:55 +0000 (UTC)

 daichi      2012-05-22 05:19:41 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese/mozc-server Makefile 
     japanese/mozc-server/files patch-base_base.gyp 
   Added files:
     japanese/mozc-server/files patch-unix_fcitx_eim.cc 
                                patch-unix_fcitx_fcitx-mozc.conf 
                                patch-unix_fcitx_fcitx-mozc.desc 
                                patch-unix_fcitx_fcitx.gyp 
                                patch-unix_fcitx_fcitx_config.h 
                                patch-unix_fcitx_fcitx_key_translator.cc 
                                patch-unix_fcitx_fcitx_key_translator.h 
                                patch-unix_fcitx_fcitx_mozc.cc 
                                patch-unix_fcitx_fcitx_mozc.h 
                                patch-unix_fcitx_gen_fcitx_mozc_i18n.sh 
                                patch-unix_fcitx_mozc.conf 
                                patch-unix_fcitx_mozc_connection.cc 
                                patch-unix_fcitx_mozc_connection.h 
                                patch-unix_fcitx_mozc_response_parser.cc 
                                patch-unix_fcitx_mozc_response_parser.h 
                                patch-unix_fcitx_po_Messages.sh 
                                patch-unix_fcitx_po_fcitx-mozc.pot 
                                patch-unix_fcitx_po_ja.po 
                                patch-unix_fcitx_po_zh_CN.po 
                                patch-unix_fcitx_po_zh_TW.po 
   Log:
   Added fcitx-mozc support
   
   PR:             167860, 166711
   Submitted by:   Zhihao Yuan <lichray@gmail.com>
   
   Revision  Changes    Path
   1.30      +63 -4     ports/japanese/mozc-server/Makefile
   1.2       +2 -2      ports/japanese/mozc-server/files/patch-base_base.gyp
   1.1       +141 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_eim.cc (new)
   1.1       +13 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx-mozc.conf (new)
   1.1       +10 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx-mozc.desc (new)
   1.1       +110 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx.gyp (new)
   1.1       +32 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx_config.h (new)
   1.1       +584 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx_key_translator.cc (new)
   1.1       +117 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx_key_translator.h (new)
   1.1       +525 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx_mozc.cc (new)
   1.1       +153 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_fcitx_mozc.h (new)
   1.1       +14 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_gen_fcitx_mozc_i18n.sh (new)
   1.1       +10 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_mozc.conf (new)
   1.1       +177 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_mozc_connection.cc (new)
   1.1       +139 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_mozc_connection.h (new)
   1.1       +284 -0    ports/japanese/mozc-server/files/patch-unix_fcitx_mozc_response_parser.cc (new)
   1.1       +96 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_mozc_response_parser.h (new)
   1.1       +36 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_po_Messages.sh (new)
   1.1       +81 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_po_fcitx-mozc.pot (new)
   1.1       +84 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_po_ja.po (new)
   1.1       +82 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_po_zh_CN.po (new)
   1.1       +85 -0     ports/japanese/mozc-server/files/patch-unix_fcitx_po_zh_TW.po (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: daichi 
State-Changed-When: Tue May 22 05:28:03 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167860 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/167860: commit references a PR
Date: Tue, 22 May 2012 05:26:11 +0000 (UTC)

 daichi      2012-05-22 05:26:02 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese             Makefile 
   Added files:
     japanese/fcitx-mozc  Makefile 
   Log:
   Add fcitx-mozc , mozc engine for Fcitx.
   
   PR:             ports/167860
   Submitted by:   Daichi GOTO <daichi@freebsd.org>
   
   Revision  Changes    Path
   1.799     +1 -0      ports/japanese/Makefile
   1.1       +17 -0     ports/japanese/fcitx-mozc/Makefile (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
