mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
Update to 1.3.911.102.
PR: 163074 Submitted by: HATANO Tomomi <hatanou@infolab.ne.jp> Feature safe: yes
This commit is contained in:
parent
6b32c8948a
commit
97fd94da48
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286962
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= mozc-el
|
||||
PORTVERSION= 1.1.773.102
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 1.3.911.102
|
||||
CATEGORIES= japanese textproc
|
||||
MASTER_SITES= http://mozc.googlecode.com/files/
|
||||
DISTNAME= mozc-${PORTVERSION}
|
||||
@ -17,12 +16,12 @@ COMMENT= Mozc for GNU Emacs
|
||||
|
||||
BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
|
||||
${LOCALBASE}/bin/grep:${PORTSDIR}/textproc/gnugrep \
|
||||
gyp:${PORTSDIR}/devel/py-gyp-devel \
|
||||
zinnia:${PORTSDIR}/japanese/zinnia
|
||||
gyp:${PORTSDIR}/devel/py-gyp-devel
|
||||
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
|
||||
gtest.0:${PORTSDIR}/devel/googletest \
|
||||
protobuf.7:${PORTSDIR}/devel/protobuf
|
||||
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
|
||||
RUN_DEPENDS= mozc_server:${PORTSDIR}/japanese/mozc-server \
|
||||
xdg-open:${PORTSDIR}/devel/xdg-utils
|
||||
|
||||
USE_BZIP2= yes
|
||||
USE_EMACS= yes
|
||||
@ -30,14 +29,20 @@ USE_GMAKE= yes
|
||||
USE_ICONV= yes
|
||||
USE_PYTHON= yes
|
||||
|
||||
PATCHDIR= ../mozc-server/files
|
||||
|
||||
PLIST_FILES= ${EMACS_VERSION_SITE_LISPDIR}/mozc.el \
|
||||
${EMACS_VERSION_SITE_LISPDIR}/mozc.elc \
|
||||
bin/mozc_emacs_helper
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 800000
|
||||
BROKEN= does not compile on FreeBSD 7.X
|
||||
.if ${OSVERSION} < 800107
|
||||
BROKEN= Does not compile on FreeBSD 7.X
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
|
||||
BROKEN= Does not compile: segfault
|
||||
.endif
|
||||
|
||||
.if defined(WITH_DEBUG_CODE)
|
||||
@ -54,7 +59,7 @@ REPLACE_FILES= ${WRKSRC}/build_mozc.py \
|
||||
${WRKSRC}/gyp/common.gypi \
|
||||
${WRKSRC}/base/util.cc \
|
||||
${WRKSRC}/base/process.cc \
|
||||
${WRKSRC}/gui/about_dialog/about_dialog.cc
|
||||
${WRKSRC}/handwriting/zinnia_handwriting.cc
|
||||
|
||||
post-patch:
|
||||
@for FILE in ${REPLACE_FILES}; \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (mozc-1.1.773.102.tar.bz2) = 24f9f05111ac40a7f121bc3c460429c54a7308cd65a7536a69c41cfc6c6c7850
|
||||
SIZE (mozc-1.1.773.102.tar.bz2) = 36818453
|
||||
SHA256 (mozc-1.3.911.102.tar.bz2) = da27945d6732e4fc70c08534cc8d10cd23d6fba5ebc52e6b31cac5d04ba1588a
|
||||
SIZE (mozc-1.3.911.102.tar.bz2) = 39180652
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- base/iconv.cc.org 2010-11-06 10:43:30.936188326 +0900
|
||||
+++ base/iconv.cc 2010-11-06 11:22:34.282186490 +0900
|
||||
@@ -52,7 +52,11 @@
|
||||
size_t olen_org = olen;
|
||||
iconv(ic, 0, &ilen, 0, &olen); // reset iconv state
|
||||
while (ilen != 0) {
|
||||
+#ifdef __FreeBSD__
|
||||
+ if (iconv(ic, (const char **)(&ibuf), &ilen, &obuf, &olen)
|
||||
+#else
|
||||
if (iconv(ic, reinterpret_cast<char **>(&ibuf), &ilen, &obuf, &olen)
|
||||
+#endif
|
||||
== static_cast<size_t>(-1)) {
|
||||
return;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
--- base/mutex.h.org 2010-11-06 10:44:01.433194789 +0900
|
||||
+++ base/mutex.h 2010-11-06 10:44:28.939186472 +0900
|
||||
@@ -82,11 +82,11 @@
|
||||
// PTHREAD_MUTEX_RECURSIVE_NP and PTHREAD_MUTEX_RECURSIVE seem to be
|
||||
// variants. For example, Mac OS X 10.4 had
|
||||
// PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not
|
||||
-#ifdef OS_MACOSX
|
||||
+#if defined(OS_MACOSX) || defined(__FreeBSD__)
|
||||
#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE
|
||||
#endif
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if defined(OS_LINUX) && !defined(__FreeBSD__)
|
||||
#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE_NP
|
||||
#endif
|
||||
|
@ -1,22 +0,0 @@
|
||||
--- base/process.cc.org 2010-11-06 10:44:33.530187843 +0900
|
||||
+++ base/process.cc 2010-11-06 10:45:08.765186704 +0900
|
||||
@@ -194,13 +194,18 @@
|
||||
return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW);
|
||||
#endif
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if defined(OS_LINUX) && !defined(__FreeBSD__)
|
||||
static const char kBrowserCommand[] = "/usr/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
|
@ -1,17 +0,0 @@
|
||||
--- base/util.cc.org 2010-11-06 10:45:14.448193623 +0900
|
||||
+++ base/util.cc 2010-11-06 10:46:11.717188704 +0900
|
||||
@@ -1629,9 +1629,13 @@
|
||||
return MacUtil::GetServerDirectory();
|
||||
#endif // OS_MACOSX
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if defined(OS_LINUX) && !defined(__FreeBSD__)
|
||||
return "/usr/lib/mozc";
|
||||
#endif // OS_LINUX
|
||||
+
|
||||
+#ifdef __FreeBSD__
|
||||
+ return "@@LOCALBASE@@/bin";
|
||||
+#endif
|
||||
}
|
||||
|
||||
string Util::GetServerPath() {
|
@ -1,11 +0,0 @@
|
||||
--- build_mozc.py.org 2010-11-06 10:46:16.225188464 +0900
|
||||
+++ build_mozc.py 2010-11-06 10:46:35.213186660 +0900
|
||||
@@ -69,7 +69,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] == 'Linux' or os.uname()[0] == 'FreeBSD' )
|
||||
|
||||
|
||||
# TODO(yukawa): Move this function to util.py (b/2715400)
|
@ -1,11 +0,0 @@
|
||||
--- build_tools/mozc_version.py.org 2010-11-06 10:46:40.900188220 +0900
|
||||
+++ build_tools/mozc_version.py 2010-11-06 10:47:03.466651555 +0900
|
||||
@@ -55,7 +55,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] == 'Linux' or os.uname()[0] == 'FreeBSD' )
|
||||
|
||||
|
||||
def CalculateRevisionForPlatform(revision):
|
@ -1,14 +0,0 @@
|
||||
--- gui/about_dialog/about_dialog.cc.org 2010-11-06 10:47:08.291193501 +0900
|
||||
+++ gui/about_dialog/about_dialog.cc 2010-11-06 10:48:08.940188276 +0900
|
||||
@@ -106,7 +106,11 @@
|
||||
SetLabelText(label_terms);
|
||||
SetLabelText(label_credits);
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ product_image_.reset(new QImage("@@LOCALBASE@@/share/mozc-tool/icons/product_logo.png"));
|
||||
+#else
|
||||
product_image_.reset(new QImage(":/product_logo.png"));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void AboutDialog::paintEvent(QPaintEvent *event) {
|
@ -1,23 +0,0 @@
|
||||
--- gyp/common.gypi.orig 2011-07-19 14:42:19.000000000 +0900
|
||||
+++ gyp/common.gypi 2011-07-30 12:56:54.000000000 +0900
|
||||
@@ -447,7 +447,6 @@
|
||||
'cflags': [
|
||||
'<@(gcc_cflags)',
|
||||
'<@(warning_cflags)',
|
||||
- '-Wno-array-bounds', # Probably GCC's bug 43949 causes trouble.
|
||||
'-fPIC',
|
||||
'-fno-exceptions',
|
||||
],
|
||||
@@ -456,6 +455,12 @@
|
||||
# <unordered_map> and <unordered_set>.
|
||||
'-Wno-deprecated',
|
||||
],
|
||||
+ 'include_dirs': [
|
||||
+ '@@LOCALBASE@@/include'
|
||||
+ ],
|
||||
+ 'ldflags': [
|
||||
+ '-L@@LOCALBASE@@/lib'
|
||||
+ ],
|
||||
'conditions': [
|
||||
['use_libgtest==0', {
|
||||
'include_dirs': [
|
@ -1,11 +0,0 @@
|
||||
--- ipc/ipc_path_manager.cc.org 2010-11-06 10:50:41.620188667 +0900
|
||||
+++ ipc/ipc_path_manager.cc 2010-11-06 10:51:04.912186952 +0900
|
||||
@@ -265,7 +265,7 @@
|
||||
*ipc_name = kIPCPrefix;
|
||||
#endif // OS_WINDOWS
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if defined(OS_LINUX) && !defined(__FreeBSD__)
|
||||
// On Linux, use abstract namespace which is independent of the file system.
|
||||
(*ipc_name)[0] = '\0';
|
||||
#endif
|
@ -1,65 +0,0 @@
|
||||
--- ipc/unix_ipc.cc.orig 2011-07-19 14:42:19.000000000 +0900
|
||||
+++ ipc/unix_ipc.cc 2011-07-30 12:38:28.000000000 +0900
|
||||
@@ -41,7 +41,7 @@
|
||||
#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/wait.h>
|
||||
@@ -124,7 +124,7 @@
|
||||
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);
|
||||
@@ -146,7 +146,7 @@
|
||||
*pid = 0;
|
||||
#endif
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#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.
|
||||
@@ -309,7 +309,7 @@
|
||||
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
|
||||
@@ -429,21 +429,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
|
||||
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);
|
||||
- }
|
||||
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);
|
||||
return;
|
||||
}
|
||||
+ if (!IsAbstractSocket(server_address_)) {
|
||||
+ // Linux does not use files for IPC.
|
||||
+ ::chmod(server_address_.c_str(), 0600);
|
||||
+ }
|
||||
|
||||
if (::listen(socket_, num_connections) < 0) {
|
||||
LOG(FATAL) << "listen() failed: " << strerror(errno);
|
@ -1,49 +0,0 @@
|
||||
--- server/mozc_server.cc.org 2010-11-06 10:54:20.721190331 +0900
|
||||
+++ server/mozc_server.cc 2010-11-06 10:55:39.283188573 +0900
|
||||
@@ -30,6 +30,9 @@
|
||||
#ifdef OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
|
||||
#include "base/base.h"
|
||||
#include "base/process.h"
|
||||
@@ -46,6 +49,23 @@
|
||||
mozc::SessionServer *g_session_server = NULL;
|
||||
}
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+static void sig_func(int num)
|
||||
+{
|
||||
+ VLOG(1) << "signal " << num << " recieved.";
|
||||
+ switch (num) {
|
||||
+ case SIGINT:
|
||||
+ case SIGHUP:
|
||||
+ case SIGTERM:
|
||||
+ if (g_session_server)
|
||||
+ g_session_server->Terminate();
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace mozc {
|
||||
namespace {
|
||||
|
||||
@@ -122,6 +142,12 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ ::signal(SIGINT, sig_func);
|
||||
+ ::signal(SIGHUP, sig_func);
|
||||
+ ::signal(SIGTERM, sig_func);
|
||||
+#endif
|
||||
+
|
||||
// Create a new thread.
|
||||
// We can't call Loop() as Loop() doesn't make a thread.
|
||||
// We have to make a thread here so that ShutdownSessionCallback()
|
@ -1,35 +0,0 @@
|
||||
--- unix/ibus/gen_mozc_xml.py.org 2010-11-06 10:55:42.821186000 +0900
|
||||
+++ unix/ibus/gen_mozc_xml.py 2010-11-06 10:56:59.661189967 +0900
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
import optparse
|
||||
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'.
|
||||
@@ -64,6 +65,24 @@
|
||||
'rank': '0',
|
||||
}
|
||||
|
||||
+if os.uname()[0] == 'FreeBSD':
|
||||
+ IBUS_COMPONENT_PROPS = {
|
||||
+ 'name': 'com.google.IBus.Mozc',
|
||||
+ 'description': '%s Component',
|
||||
+ 'exec': '@@LOCALBASE@@/libexec/ibus-engine-mozc --ibus',
|
||||
+ 'version': '0.0.0.0',
|
||||
+ 'author': 'Google Inc.',
|
||||
+ 'license': 'New BSD',
|
||||
+ 'homepage': 'http://code.google.com/p/mozc/',
|
||||
+ 'textdomain': 'ibus-mozc',
|
||||
+ }
|
||||
+ IBUS_ENGINE_COMMON_PROPS = {
|
||||
+ 'description': '%s (Japanese Input Method)',
|
||||
+ 'language': 'ja',
|
||||
+ 'icon': '@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png',
|
||||
+ 'rank': '0',
|
||||
+ }
|
||||
+
|
||||
# A dictionary from --platform to engines that are used in the platform. The
|
||||
# information is used to generate <engines> part of mozc.xml.
|
||||
IBUS_ENGINES_PROPS = {
|
@ -1,24 +0,0 @@
|
||||
--- unix/ibus/mozc.xml.org 2010-11-06 10:57:06.006187725 +0900
|
||||
+++ unix/ibus/mozc.xml 2010-11-06 10:57:28.462186463 +0900
|
||||
@@ -0,0 +1,21 @@
|
||||
+<component>
|
||||
+ <name>com.google.IBus.Mozc</name>
|
||||
+ <description>Mozc Component</description>
|
||||
+ <exec>@@LOCALBASE@@/libexec/ibus-engine-mozc --ibus</exec>
|
||||
+ <version>0.0.0.0</version>
|
||||
+ <author>Google Inc.</author>
|
||||
+ <license>New BSD</license>
|
||||
+ <homepage>http://code.google.com/p/mozc/</homepage>
|
||||
+ <textdomain>ibus-mozc</textdomain>
|
||||
+ <engines>
|
||||
+ <engine>
|
||||
+ <rank>0</rank>
|
||||
+ <description>Mozc (Japanese Input Method)</description>
|
||||
+ <language>ja</language>
|
||||
+ <icon>@@LOCALBASE@@/share/ibus-mozc/icons/product_logo.png</icon>
|
||||
+ <layout>jp</layout>
|
||||
+ <name>mozc-jp</name>
|
||||
+ <longname>Mozc</longname>
|
||||
+ </engine>
|
||||
+ </engines>
|
||||
+</component>
|
@ -1,25 +0,0 @@
|
||||
--- unix/ibus/path_util.cc.org 2010-11-06 10:57:33.500187940 +0900
|
||||
+++ unix/ibus/path_util.cc 2010-11-06 10:58:12.395186886 +0900
|
||||
@@ -30,14 +30,22 @@
|
||||
#include "unix/ibus/path_util.h"
|
||||
|
||||
namespace {
|
||||
+#ifdef __FreeBSD__
|
||||
+const char kInstalledDirectory[] = "@@LOCALBASE@@/share/ibus-mozc";
|
||||
+#else
|
||||
const char kInstalledDirectory[] = "/usr/share/ibus-mozc";
|
||||
+#endif
|
||||
}
|
||||
|
||||
namespace mozc {
|
||||
namespace ibus {
|
||||
|
||||
string GetIconPath(const string &icon_file) {
|
||||
+#ifdef __FreeBSD__
|
||||
+ return string("@@LOCALBASE@@/share/ibus-mozc/icons/") + icon_file;
|
||||
+#else
|
||||
return kInstalledDirectory + string("/") + icon_file;
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace ibus
|
@ -1,11 +0,0 @@
|
||||
--- unix/scim/scim.gyp.org 2010-11-06 10:58:16.438187044 +0900
|
||||
+++ unix/scim/scim.gyp 2010-11-06 10:58:34.829186459 +0900
|
||||
@@ -44,7 +44,7 @@
|
||||
'../../session/session.gyp:session',
|
||||
],
|
||||
'scim_defines': [
|
||||
- 'SCIM_ICONDIR="<!@(pkg-config --variable=icondir scim)"',
|
||||
+ 'SCIM_ICONDIR="@@LOCALBASE@@/share/scim-mozc/icons/"',
|
||||
]
|
||||
},
|
||||
'targets': [
|
Loading…
Reference in New Issue
Block a user