Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2013 03:11:58 +0000 (UTC)
From:      Daichi GOTO <daichi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r316305 - in head/japanese: fcitx-mozc mozc-el mozc-server mozc-server/files
Message-ID:  <201304230311.r3N3BwX5024566@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: daichi
Date: Tue Apr 23 03:11:57 2013
New Revision: 316305
URL: http://svnweb.freebsd.org/changeset/ports/316305

Log:
  update to 1.10.1390.102

Deleted:
  head/japanese/mozc-server/files/patch-base_mutex.h
Modified:
  head/japanese/fcitx-mozc/Makefile
  head/japanese/mozc-el/Makefile
  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-build_tools_util.py
  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_common.py
  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_mozc_engine.cc
  head/japanese/mozc-server/files/patch-unix_ibus_path_util.cc

Modified: head/japanese/fcitx-mozc/Makefile
==============================================================================
--- head/japanese/fcitx-mozc/Makefile	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/fcitx-mozc/Makefile	Tue Apr 23 03:11:57 2013	(r316305)
@@ -13,6 +13,8 @@ DATADIR=	${PREFIX}/share/fcitx/${PORTNAM
 MASTERDIR=	${.CURDIR}/../../japanese/mozc-server
 PKGMESSAGE=	${.CURDIR}/pkg-message
 
+BROKEN=		fails to build
+
 BUILD_MOZC_LIST=	fcitx_mozc
 
 post-install:

Modified: head/japanese/mozc-el/Makefile
==============================================================================
--- head/japanese/mozc-el/Makefile	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-el/Makefile	Tue Apr 23 03:11:57 2013	(r316305)
@@ -11,7 +11,9 @@ COMMENT=	Mozc for GNU Emacs
 MASTERDIR=	${.CURDIR}/../../japanese/mozc-server
 PKGMESSAGE=	${.CURDIR}/pkg-message
 
-BUILD_MOZC_LIST=	mozc_el
+BUILD_MOZC_LIST=mozc_el
+
+BROKEN=		fails to build
 
 post-install:
 	@${CAT} ${PKGMESSAGE}

Modified: head/japanese/mozc-server/Makefile
==============================================================================
--- head/japanese/mozc-server/Makefile	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/Makefile	Tue Apr 23 03:11:57 2013	(r316305)
@@ -6,8 +6,8 @@
 #
 
 PORTNAME=	mozc
-PORTVERSION=	1.6.1187.102
-PORTREVISION=	3
+PORTVERSION=	1.10.1390.102
+PORTREVISION=	0
 CATEGORIES=	japanese
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 PKGNAMEPREFIX?=	ja-
@@ -16,10 +16,7 @@ PKGNAMESUFFIX?=	-server
 MAINTAINER=	daichi@FreeBSD.org
 COMMENT?=	Mozc server for IBus and others
 
-LIB_DEPENDS=	curl.6:${PORTSDIR}/ftp/curl \
-		gtest.0:${PORTSDIR}/devel/googletest \
-		protobuf:${PORTSDIR}/devel/protobuf \
-		zinnia.0:${PORTSDIR}/japanese/zinnia
+LIB_DEPENDS=	protobuf:${PORTSDIR}/devel/protobuf
 RUN_DEPENDS=	xdg-open:${PORTSDIR}/devel/xdg-utils
 
 USE_BZIP2=	yes
@@ -29,22 +26,16 @@ USE_PYTHON=	yes
 USE_OPENSSL=	yes
 USE_PKGCONFIG=	build
 
-BROKEN=	fails to build
-
 MAKE_JOBS_SAFE=	yes
 
 BUILD_MOZC_LIST?=	mozc_server
 
-.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
-USE_GNOME+=	glib20 gtk20
-.elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
-USE_QT4+=	gui dbus qmake_build moc_build uic_build rcc_build
-.elif ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc"
-USE_GNOME+=	glib20 gtk20 pygtk2
-.elif ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
-USE_GNOME+=	glib20 gtk20
-.elif ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
-USE_EMACS=	yes
+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
 .endif
 
 .include <bsd.port.pre.mk>
@@ -57,12 +48,6 @@ BROKEN=		Does not compile on FreeBSD 7.X
 BROKEN=		Does not compile: segfault
 .endif
 
-.if defined(WITH_DEBUG_CODE)
-BUILD_MODE=	Debug
-.else
-BUILD_MODE=	Release
-.endif
-
 LOCALBASE_REPLACE_FILES=	\
 		gyp/common.gypi \
 		unix/ibus/gen_mozc_xml.py \
@@ -80,13 +65,11 @@ SSL_REINPLACE_STR+=	-e "s,%%${V}%%,${${V
 .endfor
 LOCALBASE_PTN=	${LOCALBASE:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g}
 
-GYP_DEFINES="use_libprotobuf=1"
-
+BUILD_MODE=	Release 
 BUILD_CMD=	${SETENV} ${MAKE_ENV} ${GMAKE}
 BUILD_MOZC_CMD=	cd ${BUILD_WRKSRC} && \
 		${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \
 		PYTHONPATH=${WRKSRC}/third_party/gyp/local/lib/python${PYTHON_VER}/site-packages \
-		GYP_DEFINES=${GYP_DEFINES} \
 		${PYTHON_CMD} build_mozc.py
 BUILD_GYP_CMD=	cd ${WRKSRC}/third_party/gyp && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP}
 
@@ -96,6 +79,8 @@ post-patch:
 		${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/ 
 .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
 	cd ${WRKSRC} && \
 		${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \
@@ -111,12 +96,16 @@ pre-build:
 	${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 \
-		--server_dir="${PREFIX}/bin" --channel_dev=0
+	${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}
 
 # mozc_server
 .if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
+BUILD_DEPENDS+=	glib:${PORTSDIR}/devel/glib20 \
+		gtk:${PORTSDIR}/x11-toolkits/gtk20
 PLIST_FILES+=	bin/mozc_server
 
 do-build-mozc_server:
@@ -131,6 +120,9 @@ do-install-mozc_server:
 
 # 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
 RUN_DEPENDS+=	${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model:${PORTSDIR}/japanese/tegaki-zinnia-japanese
 
 PLIST_FILES+=	bin/mozc_tool \
@@ -158,7 +150,8 @@ do-install-mozc_tool:
 # 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
+		xcb-xfixes.0:${PORTSDIR}/x11/libxcb \
+		zinnia.0:${PORTSDIR}/japanese/zinnia
 RUN_DEPENDS+=	mozc_server:${PORTSDIR}/japanese/mozc-server \
 		mozc_tool:${PORTSDIR}/japanese/mozc-tool \
 		mozc_server_start:${PORTSDIR}/japanese/mozc-additions \
@@ -204,10 +197,12 @@ do-install-ibus_mozc:
 # fcitx_mozc
 .if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
 PATCH_SITES=	http://fcitx.googlecode.com/files/
-PATCHFILES=	fcitx-mozc-${PORTVERSION}.1.patch
+PATCHFILES=	fcitx-mozc-${PORTVERSION}.2.patch
 PATCH_DIST_STRIP=-p2
 
-LIB_DEPENDS+=	fcitx-config.4:${PORTSDIR}/chinese/fcitx
+LIB_DEPENDS+=	fcitx-config.4:${PORTSDIR}/chinese/fcitx \
+		zinnia.0:${PORTSDIR}/japanese/zinnia
+BUILD_DEPENDS+=	glib:${PORTSDIR}/devel/glib20
 RUN_DEPENDS+=	mozc_server:${PORTSDIR}/japanese/mozc-server \
 		mozc_tool:${PORTSDIR}/japanese/mozc-tool \
 		mozc_server_start:${PORTSDIR}/japanese/mozc-additions
@@ -267,7 +262,11 @@ do-install-fcitx_mozc:
 
 # mozc_el
 .if ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
+USE_EMACS=	yes
 CATEGORIES+=	editors elisp
+LIB_DEPENDS+=	zinnia.0:${PORTSDIR}/japanese/zinnia
+BUILD_DEPENDS+=	glib:${PORTSDIR}/devel/glib20 \
+		gtk:${PORTSDIR}/x11-toolkits/gtk20
 RUN_DEPENDS+=	mozc_server:${PORTSDIR}/japanese/mozc-server \
 		mozc_server_start:${PORTSDIR}/japanese/mozc-additions
 

Modified: head/japanese/mozc-server/distinfo
==============================================================================
--- head/japanese/mozc-server/distinfo	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/distinfo	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,4 +1,4 @@
-SHA256 (mozc-1.6.1187.102.tar.bz2) = 2a9b54275400c768e14156e7654e9b9a4ca27353573627607c70d221c0e2db65
-SIZE (mozc-1.6.1187.102.tar.bz2) = 54828375
-SHA256 (fcitx-mozc-1.6.1187.102.1.patch) = 1c7549481516ed747c0ea289ebd3317c85be98fd0c4448433c48d21c270e6e75
-SIZE (fcitx-mozc-1.6.1187.102.1.patch) = 96920
+SHA256 (mozc-1.10.1390.102.tar.bz2) = 72a8ed6657daa1c03b1efe50c262a69be2ab66d45747a47df6e54996b6d5ee39
+SIZE(mozc-1.10.1390.102.tar.bz2) = 57879881
+SHA256 (fcitx-mozc-1.10.1390.102.2.patch) = 8702225049052ace5c4fa60998606cc7e08bc86966054f6f61b293277cffdcea
+SIZE (fcitx-mozc-1.10.1390.102.2.patch) = 130658

Modified: head/japanese/mozc-server/files/patch-base_base.gyp
==============================================================================
--- head/japanese/mozc-server/files/patch-base_base.gyp	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-base_base.gyp	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,8 +1,8 @@
---- base/base.gyp.orig	2012-09-07 10:21:29.099021913 +0900
-+++ base/base.gyp	2012-09-12 12:53:34.737234489 +0900
-@@ -262,20 +262,20 @@
-         }],
-         ['OS=="linux" and target_platform!="Android"', {
+--- base/base.gyp.orig	2013-04-21 03:48:45.178270244 +0900
++++ base/base.gyp	2013-04-21 04:16:38.943269499 +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%%',

Modified: head/japanese/mozc-server/files/patch-base_iconv.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-base_iconv.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-base_iconv.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,5 +1,5 @@
---- base/iconv.cc.orig	2012-09-07 10:21:29.102021368 +0900
-+++ base/iconv.cc	2012-09-07 10:38:00.914022679 +0900
+--- base/iconv.cc.orig	2013-04-21 03:48:45.174270168 +0900
++++ base/iconv.cc	2013-04-21 04:16:39.946269033 +0900
 @@ -53,7 +53,11 @@
    size_t olen_org = olen;
    iconv(ic, 0, &ilen, 0, &olen);  // reset iconv state

Modified: head/japanese/mozc-server/files/patch-base_mutex.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-base_mutex.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-base_mutex.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,5 +1,5 @@
---- base/mutex.cc.orig	2012-09-07 10:21:29.105022147 +0900
-+++ base/mutex.cc	2012-09-07 11:37:36.899021514 +0900
+--- base/mutex.cc.orig	2013-04-21 03:48:45.170269862 +0900
++++ base/mutex.cc	2013-04-21 04:16:39.083269637 +0900
 @@ -296,7 +296,7 @@
    // PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not
    pthread_mutexattr_t attr;

Modified: head/japanese/mozc-server/files/patch-base_process.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-base_process.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-base_process.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,6 +1,6 @@
---- base/process.cc.orig	2012-09-07 10:21:29.100021069 +0900
-+++ base/process.cc	2012-09-07 10:38:01.060021966 +0900
-@@ -120,13 +120,18 @@
+--- 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);
  #endif
  

Modified: head/japanese/mozc-server/files/patch-build_tools_util.py
==============================================================================
--- head/japanese/mozc-server/files/patch-build_tools_util.py	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-build_tools_util.py	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,5 +1,5 @@
---- build_tools/util.py.orig	2012-09-07 10:21:29.190021513 +0900
-+++ build_tools/util.py	2012-09-07 10:30:26.180021509 +0900
+--- build_tools/util.py.orig	2013-04-21 03:48:52.147271754 +0900
++++ build_tools/util.py	2013-04-21 04:07:17.415269142 +0900
 @@ -54,7 +54,7 @@
  
  def IsLinux():

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 Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-gui_about_dialog_about_dialog.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,6 +1,6 @@
---- gui/about_dialog/about_dialog.cc.orig	2012-09-07 10:21:29.218021887 +0900
-+++ gui/about_dialog/about_dialog.cc	2012-01-29 13:49:18.542805000 +0900
-@@ -119,7 +119,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
+@@ -121,7 +121,11 @@
    SetLabelText(label_terms);
    SetLabelText(label_credits);
  

Modified: head/japanese/mozc-server/files/patch-gyp_common.gypi
==============================================================================
--- head/japanese/mozc-server/files/patch-gyp_common.gypi	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-gyp_common.gypi	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,5 +1,5 @@
---- gyp/common.gypi.orig	2012-09-07 10:21:29.209021370 +0900
-+++ gyp/common.gypi	2012-09-07 10:30:44.919021522 +0900
+--- 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': [
@@ -9,7 +9,16 @@
        '-Wno-char-subscripts',
        '-Wno-sign-compare',
        '-Wno-deprecated-declarations',
-@@ -752,6 +752,12 @@
+@@ -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 @@
            # <unordered_map> and <unordered_set>.
            '-Wno-deprecated',
          ],

Modified: head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-handwriting_zinnia_handwriting.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,8 +1,8 @@
---- handwriting/zinnia_handwriting.cc.orig	2012-09-07 10:21:29.209021370 +0900
-+++ handwriting/zinnia_handwriting.cc	2012-09-07 10:38:01.976021756 +0900
-@@ -50,10 +50,16 @@
+--- 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 Util::JoinPath(MacUtil::GetResourcesDirectory(), kModelFile);
+   return FileUtil::JoinPath(MacUtil::GetResourcesDirectory(), kModelFile);
  #elif defined(USE_LIBZINNIA)
 +#if defined(__FreeBSD__)
 +  const char kModelFile[] =
@@ -16,4 +16,4 @@
 +#endif
  #else
    const char kModelFile[] = "handwriting-ja.model";
-   return Util::JoinPath(Util::GetServerDirectory(), kModelFile);
+   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 Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-ipc_ipc_path_manager.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,8 +1,8 @@
---- ipc/ipc_path_manager.cc.orig	2012-09-07 10:21:32.692021977 +0900
-+++ ipc/ipc_path_manager.cc	2012-05-01 12:46:21.263693000 +0900
-@@ -284,7 +284,7 @@
+--- 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
+@@ -276,7 +276,7 @@
    *ipc_name = kIPCPrefix;
- #endif  // OS_WINDOWS
+ #endif  // OS_WIN
  
 -#ifdef OS_LINUX
 +#if defined(OS_LINUX) && !defined(__FreeBSD__)

Modified: head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-ipc_unix_ipc.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,56 +1,80 @@
---- ipc/unix_ipc.cc.orig	2012-09-07 10:21:32.692021977 +0900
-+++ ipc/unix_ipc.cc	2012-09-07 10:38:01.136021395 +0900
-@@ -41,7 +41,7 @@
+--- 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
+@@ -41,6 +41,9 @@
  #include <sys/time.h>
  #include <sys/types.h>
  #include <sys/un.h>
--#ifdef OS_MACOSX
 +#if defined(OS_MACOSX) || defined(__FreeBSD__)
- #include <sys/ucred.h>
- #endif
++#include <sys/ucred.h>
++#endif
  #include <sys/wait.h>
-@@ -125,7 +125,7 @@
+ #include <unistd.h>
+ 
+@@ -123,6 +126,29 @@
  bool IsPeerValid(int socket, pid_t *pid) {
    *pid = 0;
  
--#ifdef OS_MACOSX
 +#if defined(OS_MACOSX) || defined(__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);
-@@ -147,7 +147,7 @@
-   *pid = 0;
- #endif
- 
--#ifdef OS_LINUX
++  // If the OS is MAC, we should validate the peer by using LOCAL_PEERCRED.
++  struct xucred peer_cred;
++  socklen_t peer_cred_len = sizeof(struct xucred);
++  if (::getsockopt(socket, 0, LOCAL_PEERCRED,
++                   &peer_cred, &peer_cred_len) < 0) {
++    LOG(ERROR) << "cannot get peer credential.  NOT a Unix socket?";
++    return false;
++  }
++  if (peer_cred.cr_version != XUCRED_VERSION) {
++    LOG(WARNING) << "credential version mismatch.";
++    return false;
++  }
++  if (peer_cred.cr_uid != ::geteuid()) {
++    LOG(WARNING) << "uid mismatch." << peer_cred.cr_uid << "!=" << ::geteuid();
++    return false;
++  }
++
++  // MacOS doesn't have cr_pid;
++  *pid = 0;
++#endif
++
 +#if defined(OS_LINUX) && !defined(__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.
-@@ -310,7 +310,7 @@
+@@ -144,6 +170,7 @@
+ 
+   *pid = peer_cred.pid;
+ #endif  // __arm__
++#endif
+ 
+   return true;
+ }
+@@ -278,7 +305,12 @@
      address.sun_family = AF_UNIX;
      ::memcpy(address.sun_path, server_address.data(), server_address_length);
      address.sun_path[server_address_length] = '\0';
--#ifdef OS_MACOSX
 +#if defined(OS_MACOSX) || defined(__FreeBSD__)
-     address.sun_len = SUN_LEN(&address);
-     const size_t sun_len = sizeof(address);
- #else
-@@ -435,21 +435,21 @@
++    address.sun_len = SUN_LEN(&address);
++    const size_t sun_len = sizeof(address);
++#else
+     const size_t sun_len = sizeof(address.sun_family) + server_address_length;
++#endif
+     pid_t pid = 0;
+     if (::connect(socket_,
+                   reinterpret_cast<const sockaddr*>(&address),
+@@ -398,16 +430,21 @@
                 SO_REUSEADDR,
                 reinterpret_cast<char *>(&on),
                 sizeof(on));
--#ifdef OS_MACOSX
 +#if defined(OS_MACOSX) || defined(__FreeBSD__)
-   addr.sun_len = SUN_LEN(&addr);
-   const size_t sun_len = sizeof(addr);
- #else
++  addr.sun_len = SUN_LEN(&addr);
++  const size_t sun_len = sizeof(addr);
++#else
    const size_t sun_len = sizeof(addr.sun_family) + server_address_.size();
- #endif
 -  if (!IsAbstractSocket(server_address_)) {
 -    // Linux does not use files for IPC.
 -    ::chmod(server_address_.c_str(), 0600);
 -  }
++#endif
    if (::bind(socket_, reinterpret_cast<sockaddr *>(&addr), sun_len) != 0) {
      // The UNIX domain socket file (server_address_) already exists?
      LOG(FATAL) << "bind() failed: " << strerror(errno);

Modified: head/japanese/mozc-server/files/patch-server_mozc_server.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-server_mozc_server.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-server_mozc_server.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,15 +1,15 @@
---- server/mozc_server.cc.orig	2012-09-07 10:21:29.170020927 +0900
-+++ server/mozc_server.cc	2012-09-07 10:30:28.034021395 +0900
+--- 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
 @@ -32,6 +32,9 @@
- #ifdef OS_WINDOWS
+ #ifdef OS_WIN
  #include <windows.h>
  #endif
 +#ifdef __FreeBSD__
 +#include <signal.h>
 +#endif
  
- #include "base/base.h"
- #include "base/crash_report_util.h"
+ #include <cstddef>
+ #include <string>
 @@ -51,6 +54,23 @@
  mozc::SessionServer *g_session_server = NULL;
  }
@@ -44,6 +44,6 @@
 +    ::signal(SIGTERM, sig_func);
 +#endif
 +
- #if defined(OS_WINDOWS)
+ #if defined(OS_WIN)
      // On Windows, ShutdownSessionCallback is not called intentionally in order
      // to avoid crashes oritinates from it. See b/2696087.

Modified: head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py
==============================================================================
--- head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_common.py	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,17 +1,14 @@
---- third_party/gyp/pylib/gyp/common.py.orig	2012-09-07 10:21:29.147021135 +0900
-+++ third_party/gyp/pylib/gyp/common.py	2012-09-17 17:14:43.781601968 +0900
-@@ -362,9 +362,11 @@
+--- third_party/gyp/pylib/gyp/common.py.orig	2013-04-21 03:48:44.556270889 +0900
++++ third_party/gyp/pylib/gyp/common.py	2013-04-21 04:16:32.525269583 +0900
+@@ -382,6 +382,11 @@
+     'cygwin': 'win',
      'win32': 'win',
      'darwin': 'mac',
-     'sunos5': 'solaris',
--    'freebsd7': 'freebsd',
--    'freebsd8': 'freebsd',
--    'freebsd9': 'freebsd',
 +    'freebsd7': 'linux',
 +    'freebsd8': 'linux',
 +    'freebsd9': 'linux',
 +    'freebsd10': 'linux',
-+    'freebsd11': 'linux',
++    'freebsd11': 'linux'
    }
-   flavor = flavors.get(sys.platform, 'linux')
-   return params.get('flavor', flavor)
+ 
+   if 'flavor' in params:

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 Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-third_party_gyp_pylib_gyp_generator_make.py	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,6 +1,6 @@
---- third_party/gyp/pylib/gyp/generator/make.py.orig	2012-09-07 10:21:29.146021648 +0900
-+++ third_party/gyp/pylib/gyp/generator/make.py	2012-09-17 17:15:20.613807429 +0900
-@@ -1963,6 +1963,9 @@
+--- 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
+@@ -1956,6 +1956,9 @@
      srcdir_prefix = '$(srcdir)/'
  
    flock_command= 'flock'

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	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-unix_ibus_gen_mozc_xml.py	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,17 +1,18 @@
---- unix/ibus/gen_mozc_xml.py.orig	2012-09-07 10:21:29.111022215 +0900
-+++ unix/ibus/gen_mozc_xml.py	2012-09-07 10:30:26.421021738 +0900
-@@ -40,6 +40,7 @@
- import optparse
+--- 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
  # a product name, 'Mozc' or 'Google Japanese Input'.
-@@ -65,6 +66,24 @@
-     'rank': '80',
+@@ -75,6 +76,32 @@
+     'symbol': '&#x3042;',
  }
  
++# Override for FreeBSD
 +if os.uname()[0] == 'FreeBSD':
 +  IBUS_COMPONENT_PROPS = {
 +    'name': 'com.google.IBus.Mozc',
@@ -29,6 +30,13 @@
 +    '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.

Modified: head/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-unix_ibus_mozc_engine.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,6 +1,6 @@
---- unix/ibus/mozc_engine.cc.orig	2012-09-07 10:21:29.111022215 +0900
-+++ unix/ibus/mozc_engine.cc	2012-09-07 10:30:26.452021649 +0900
-@@ -756,7 +756,7 @@
+--- unix/ibus/mozc_engine.cc.orig	2013-04-21 03:48:44.433270458 +0900
++++ unix/ibus/mozc_engine.cc	2013-04-21 04:12:50.609270610 +0900
+@@ -758,7 +758,7 @@
        //     on size_t, not uint32.
        string selection_text;
        const uint32 selection_start = min(cursor_pos, anchor_pos);

Modified: head/japanese/mozc-server/files/patch-unix_ibus_path_util.cc
==============================================================================
--- head/japanese/mozc-server/files/patch-unix_ibus_path_util.cc	Tue Apr 23 02:34:34 2013	(r316304)
+++ head/japanese/mozc-server/files/patch-unix_ibus_path_util.cc	Tue Apr 23 03:11:57 2013	(r316305)
@@ -1,5 +1,5 @@
---- unix/ibus/path_util.cc.orig	2012-09-07 10:21:29.112021454 +0900
-+++ unix/ibus/path_util.cc	2012-01-29 13:49:15.994806000 +0900
+--- 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 @@
  #include "unix/ibus/path_util.h"
  



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