mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-14 07:43:06 +00:00
Add a new port scim-mozc:
- Mozc engine for SCIM Feature safe: yes
This commit is contained in:
parent
2d40fb4735
commit
51d50fe463
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=257015
@ -313,6 +313,7 @@
|
||||
SUBDIR += scim-honoka
|
||||
SUBDIR += scim-honoka-plugin-romkan
|
||||
SUBDIR += scim-honoka-plugin-wnn
|
||||
SUBDIR += scim-mozc
|
||||
SUBDIR += scim-prime
|
||||
SUBDIR += scim-skk
|
||||
SUBDIR += scim-tables
|
||||
|
77
japanese/scim-mozc/Makefile
Normal file
77
japanese/scim-mozc/Makefile
Normal file
@ -0,0 +1,77 @@
|
||||
# New ports collection makefile for: scim-mozc
|
||||
# Date created: 26 June 2010
|
||||
# Whom: Daichi GOTO <daichi@freebsd.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= scim-mozc
|
||||
PORTVERSION= 0.11.383.102
|
||||
CATEGORIES= japanese
|
||||
MASTER_SITES= http://people.freebsd.org/~daichi/distfiles/
|
||||
DISTNAME= mozc-${PORTVERSION}
|
||||
DISTFILES= ${DISTNAME}.tar.bz2
|
||||
|
||||
MAINTAINER= daichi@freebsd.org
|
||||
COMMENT= Mozc engine for SCIM
|
||||
|
||||
BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
|
||||
gyp:${PORTSDIR}/devel/py-gyp-devel \
|
||||
scim:${PORTSDIR}/textproc/scim
|
||||
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
|
||||
gtest.0:${PORTSDIR}/devel/googletest \
|
||||
protobuf.6:${PORTSDIR}/devel/protobuf
|
||||
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 \
|
||||
scim:${PORTSDIR}/textproc/scim \
|
||||
xdg-open:${PORTSDIR}/devel/xdg-utils
|
||||
|
||||
USE_ICONV= yes
|
||||
USE_GNOME= pygtk2
|
||||
USE_GMAKE= yes
|
||||
USE_PYTHON= yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 800107
|
||||
BROKEN= Does not compile on FreeBSD 7.X
|
||||
.endif
|
||||
|
||||
REPLACE_FILES= ${WRKSRC}/build_mozc.py \
|
||||
${WRKSRC}/gyp/common.gypi \
|
||||
${WRKSRC}/base/util.cc \
|
||||
${WRKSRC}/base/process.cc \
|
||||
${WRKSRC}/unix/scim/scim.gyp \
|
||||
${WRKSRC}/unix/scim/scim_mozc.cc
|
||||
|
||||
post-patch:
|
||||
@for FILE in ${REPLACE_FILES}; \
|
||||
do \
|
||||
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
|
||||
$${FILE}; \
|
||||
done;
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC}/; \
|
||||
${PYTHON_CMD} build_mozc.py gyp --gypdir=${LOCALBASE}/bin; \
|
||||
${SED} -i .bak -e "s/sed/gsed/g" Makefile; \
|
||||
${PYTHON_CMD} build_mozc.py build_tools -c Release; \
|
||||
${PYTHON_CMD} build_mozc.py build -c Release \
|
||||
unix/scim/scim.gyp:scim_mozc \
|
||||
unix/scim/scim.gyp:scim_mozc_setup
|
||||
|
||||
do-install:
|
||||
@${INSTALL} -o 0 -g 0 -m 555 \
|
||||
${WRKSRC}/out/Release/lib.target/libscim_mozc.so \
|
||||
${LOCALBASE}/lib/scim-1.0/1.4.0/IMEngine/mozc.so
|
||||
@${INSTALL} -o 0 -g 0 -m 555 \
|
||||
${WRKSRC}/out/Release/lib.target/libscim_mozc_setup.so \
|
||||
${LOCALBASE}/lib/scim-1.0/1.4.0/SetupUI/mozc_setup.so
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
japanese/scim-mozc/distinfo
Normal file
3
japanese/scim-mozc/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (mozc-0.11.383.102.tar.bz2) = 42e7b57f617b470528dc00be28ccaf28
|
||||
SHA256 (mozc-0.11.383.102.tar.bz2) = 69e8a4daf2165d9e2918af1e7a1a26262099ab453578d8c7456301aa8df047a2
|
||||
SIZE (mozc-0.11.383.102.tar.bz2) = 34539981
|
11
japanese/scim-mozc/files/patch-src_base_iconv.cc
Normal file
11
japanese/scim-mozc/files/patch-src_base_iconv.cc
Normal file
@ -0,0 +1,11 @@
|
||||
--- base/iconv.cc.org 2010-06-17 15:59:08.032915669 +0900
|
||||
+++ base/iconv.cc 2010-06-26 14:52:20.086054034 +0900
|
||||
@@ -52,7 +52,7 @@
|
||||
size_t olen_org = olen;
|
||||
iconv(ic, 0, &ilen, 0, &olen); // reset iconv state
|
||||
while (ilen != 0) {
|
||||
- if (iconv(ic, reinterpret_cast<char **>(&ibuf), &ilen, &obuf, &olen)
|
||||
+ if (iconv(ic, (const char **)(&ibuf), &ilen, &obuf, &olen)
|
||||
== static_cast<size_t>(-1)) {
|
||||
return;
|
||||
}
|
11
japanese/scim-mozc/files/patch-src_base_mutex.h
Normal file
11
japanese/scim-mozc/files/patch-src_base_mutex.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- base/mutex.h.org 2010-06-17 15:59:08.032915669 +0900
|
||||
+++ base/mutex.h 2010-06-26 14:42:34.171132724 +0900
|
||||
@@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef OS_LINUX
|
||||
-#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE_NP
|
||||
+#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE
|
||||
#endif
|
||||
|
||||
pthread_mutexattr_t attr;
|
11
japanese/scim-mozc/files/patch-src_base_process.cc
Normal file
11
japanese/scim-mozc/files/patch-src_base_process.cc
Normal file
@ -0,0 +1,11 @@
|
||||
--- base/process.cc.org 2010-06-17 15:59:08.038677016 +0900
|
||||
+++ base/process.cc 2010-06-26 15:14:15.207482874 +0900
|
||||
@@ -195,7 +195,7 @@
|
||||
#endif
|
||||
|
||||
#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);
|
11
japanese/scim-mozc/files/patch-src_base_util.cc
Normal file
11
japanese/scim-mozc/files/patch-src_base_util.cc
Normal file
@ -0,0 +1,11 @@
|
||||
--- base/util.cc.org 2010-06-17 15:59:08.035797879 +0900
|
||||
+++ base/util.cc 2010-06-26 15:18:24.444371641 +0900
|
||||
@@ -1493,7 +1493,7 @@
|
||||
#endif // OS_MACOSX
|
||||
|
||||
#ifdef OS_LINUX
|
||||
- return "/usr/lib/mozc";
|
||||
+ return "@@LOCALBASE@@/bin";
|
||||
#endif // OS_LINUX
|
||||
}
|
||||
|
20
japanese/scim-mozc/files/patch-src_build_mozc.py
Normal file
20
japanese/scim-mozc/files/patch-src_build_mozc.py
Normal file
@ -0,0 +1,20 @@
|
||||
--- build_mozc.py.org 2010-06-17 15:59:08.104932923 +0900
|
||||
+++ build_mozc.py 2010-06-26 14:43:42.504687128 +0900
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
def IsLinux():
|
||||
"""Returns true if the platform is Linux."""
|
||||
- return os.name == 'posix' and os.uname()[0] == 'Linux'
|
||||
+ return os.name == 'posix' and os.uname()[0] == 'FreeBSD'
|
||||
|
||||
|
||||
def GetGeneratorName():
|
||||
@@ -403,7 +403,7 @@
|
||||
(unused_gyp_file_name, target_name) = ParseTarget(target)
|
||||
target_names.append(target_name)
|
||||
|
||||
- make_command = os.getenv('BUILD_COMMAND', 'make')
|
||||
+ make_command = os.getenv('BUILD_COMMAND', 'gmake')
|
||||
# flags for building in Chrome OS chroot environment
|
||||
envvars = [
|
||||
'CFLAGS',
|
15
japanese/scim-mozc/files/patch-src_gyp_common.gypi
Normal file
15
japanese/scim-mozc/files/patch-src_gyp_common.gypi
Normal file
@ -0,0 +1,15 @@
|
||||
--- gyp/common.gypi.org 2010-06-17 15:59:08.053080522 +0900
|
||||
+++ gyp/common.gypi 2010-06-26 14:48:00.645671527 +0900
|
||||
@@ -371,6 +371,12 @@
|
||||
'-lz',
|
||||
'<@(extra_linux_libs)',
|
||||
],
|
||||
+ 'include_dirs': [
|
||||
+ '@@LOCALBASE@@/include'
|
||||
+ ],
|
||||
+ 'ldflags': [
|
||||
+ '-L@@LOCALBASE@@/lib'
|
||||
+ ],
|
||||
'conditions': [
|
||||
['chromeos==1', {
|
||||
'defines': [
|
29
japanese/scim-mozc/files/patch-src_ipc_unix_ipc.cc
Normal file
29
japanese/scim-mozc/files/patch-src_ipc_unix_ipc.cc
Normal file
@ -0,0 +1,29 @@
|
||||
--- ipc/unix_ipc.cc.org 2010-06-17 15:59:08.061722403 +0900
|
||||
+++ ipc/unix_ipc.cc 2010-06-26 14:57:03.788901462 +0900
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
-#ifdef OS_MACOSX
|
||||
+#if defined(__FreeBSD__) || defined(OS_MACOSX)
|
||||
#include <sys/ucred.h>
|
||||
#endif
|
||||
#include <sys/wait.h>
|
||||
@@ -124,7 +124,7 @@
|
||||
bool IsPeerValid(int socket, pid_t *pid) {
|
||||
*pid = 0;
|
||||
|
||||
-#ifdef OS_MACOSX
|
||||
+#if defined(__FreeBSD__) || defined(OS_MACOSX)
|
||||
// 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);
|
||||
@@ -146,7 +146,7 @@
|
||||
*pid = 0;
|
||||
#endif
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if !defined(__FreeBSD__) && defined(OS_LINUX)
|
||||
// On ARM Linux, we do nothing and just return true since the platform (at
|
||||
// least the qemu emulator) doesn't support the getsockopt(sock, SOL_SOCKET,
|
||||
// SO_PEERCRED) system call.
|
38
japanese/scim-mozc/files/patch-src_unix_scim_scim.gyp
Normal file
38
japanese/scim-mozc/files/patch-src_unix_scim_scim.gyp
Normal file
@ -0,0 +1,38 @@
|
||||
--- unix/scim/scim.gyp.org 2010-06-17 15:59:08.047320852 +0900
|
||||
+++ unix/scim/scim.gyp 2010-06-26 18:03:23.532337010 +0900
|
||||
@@ -43,17 +43,15 @@
|
||||
# on Ubuntu Hardy. Until it becomes necessary, we will not invoke
|
||||
# pkg-config here.
|
||||
'scim_include_dirs': [
|
||||
- '/usr/include/atk-1.0',
|
||||
- '/usr/include/cairo',
|
||||
- '/usr/include/freetype2',
|
||||
- '/usr/include/glib-2.0',
|
||||
- '/usr/include/gtk-2.0',
|
||||
- '/usr/include/libpng12',
|
||||
- '/usr/include/pango-1.0',
|
||||
- '/usr/include/pixman-1',
|
||||
- '/usr/include/scim-1.0',
|
||||
- '/usr/lib/glib-2.0/include',
|
||||
- '/usr/lib/gtk-2.0/include',
|
||||
+ '@@LOCALBASE@@/include/atk-1.0',
|
||||
+ '@@LOCALBASE@@/include/cairo',
|
||||
+ '@@LOCALBASE@@/include/freetype2',
|
||||
+ '@@LOCALBASE@@/include/glib-2.0',
|
||||
+ '@@LOCALBASE@@/include/gtk-2.0',
|
||||
+ '@@LOCALBASE@@/include/libpng',
|
||||
+ '@@LOCALBASE@@/include/pango-1.0',
|
||||
+ '@@LOCALBASE@@/include/pixman-1',
|
||||
+ '@@LOCALBASE@@/include/scim-1.0',
|
||||
],
|
||||
# The libraries come from "pkg-config --libs-only-l scim gtk+-2.0".
|
||||
'scim_libraries': [
|
||||
@@ -74,7 +72,7 @@
|
||||
'-fPIC',
|
||||
],
|
||||
'scim_defines': [
|
||||
- 'SCIM_ICONDIR="/usr/share/scim/icons"',
|
||||
+ 'SCIM_ICONDIR="@@LOCALBASE@@/share/mozc-additions/icons/"',
|
||||
]
|
||||
},
|
||||
'targets': [
|
17
japanese/scim-mozc/files/patch-src_unix_scim_scim_mozc.cc
Normal file
17
japanese/scim-mozc/files/patch-src_unix_scim_scim_mozc.cc
Normal file
@ -0,0 +1,17 @@
|
||||
--- unix/scim/scim_mozc.cc.org 2010-06-17 15:59:08.050201385 +0900
|
||||
+++ unix/scim/scim_mozc.cc 2010-06-26 18:09:40.056488264 +0900
|
||||
@@ -45,11 +45,11 @@
|
||||
const char kConfigName[] = "/Panel/Gtk/LookupTableVertical";
|
||||
|
||||
const char kPropTool[] = "/Mozc/Tool";
|
||||
-const char kPropToolIcon[] = SCIM_ICONDIR "/scim-mozc-tool.png";
|
||||
+const char kPropToolIcon[] = SCIM_ICONDIR "/product_icon.png";
|
||||
const char kPropToolDictionary[] = "/Mozc/Tool/dictionary";
|
||||
-const char kPropToolDictionaryIcon[] = SCIM_ICONDIR "/scim-mozc-dictionary.png";
|
||||
+const char kPropToolDictionaryIcon[] = SCIM_ICONDIR "/toolicon_setting.png";
|
||||
const char kPropToolProperty[] = "/Mozc/Tool/property";
|
||||
-const char kPropToolPropertyIcon[] = SCIM_ICONDIR "/scim-mozc-property.png";
|
||||
+const char kPropToolPropertyIcon[] = SCIM_ICONDIR "/toolicon_setting.png";
|
||||
|
||||
const char kPropCompositionModeIcon[] = "/Mozc/CompositionMode";
|
||||
|
5
japanese/scim-mozc/pkg-descr
Normal file
5
japanese/scim-mozc/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Mozc is a Japanese Input Method Editor (IME) designed for multi-platform
|
||||
such as Chromium OS, Windows, Mac and Linux. This open-source project
|
||||
originates from Google Japanese Input.
|
||||
|
||||
WWW: http://code.google.com/p/mozc/
|
25
japanese/scim-mozc/pkg-message
Normal file
25
japanese/scim-mozc/pkg-message
Normal file
@ -0,0 +1,25 @@
|
||||
scim-mozc installation finished. To use scim-mozc, please do the following:
|
||||
|
||||
If you are using bash or zsh, please add following lines to your $HOME/.bashrc or
|
||||
$HOME/.zshrc:
|
||||
|
||||
mozc_server_start
|
||||
export GTK_IM_MODULE=scim
|
||||
export XMODIFIERS=@im=SCIM
|
||||
scim -d
|
||||
|
||||
If you are using tcsh, please add following lines to your $HOME/.cshrc:
|
||||
|
||||
mozc_server_start
|
||||
setenv GTK_IM_MODULE scim
|
||||
setenv XMODIFIERS @im=SCIM
|
||||
scim -d
|
||||
|
||||
If you are using KDE4, you may create a shell script in $HOME/.kde4/env,
|
||||
and add following lines:
|
||||
|
||||
#!/bin/sh
|
||||
mozc_server_start
|
||||
export GTK_IM_MODULE=scim
|
||||
export XMODIFIERS=@im=SCIM
|
||||
scim -d
|
2
japanese/scim-mozc/pkg-plist
Normal file
2
japanese/scim-mozc/pkg-plist
Normal file
@ -0,0 +1,2 @@
|
||||
lib/scim-1.0/1.4.0/IMEngine/mozc.so
|
||||
lib/scim-1.0/1.4.0/SetupUI/mozc_setup.so
|
Loading…
Reference in New Issue
Block a user