pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod/scim-bridge * adjust short option as descr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/538872bc7acb
branches:  trunk
changeset: 567846:538872bc7acb
user:      obache <obache%pkgsrc.org@localhost>
date:      Thu Nov 26 12:30:12 2009 +0000

description:
* adjust short option as described in long option and source code (patch-af)
* fixes unportable, broken socket connect/bind (patch-ae, patch-ag)

Bump PKGREVISION.

diffstat:

 inputmethod/scim-bridge/Makefile         |   3 +-
 inputmethod/scim-bridge/distinfo         |   5 +++-
 inputmethod/scim-bridge/patches/patch-ae |  33 ++++++++++++++++++++++++++++++++
 inputmethod/scim-bridge/patches/patch-af |  13 ++++++++++++
 inputmethod/scim-bridge/patches/patch-ag |  24 +++++++++++++++++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)

diffs (111 lines):

diff -r c3cb3d0eba1c -r 538872bc7acb inputmethod/scim-bridge/Makefile
--- a/inputmethod/scim-bridge/Makefile  Thu Nov 26 00:48:58 2009 +0000
+++ b/inputmethod/scim-bridge/Makefile  Thu Nov 26 12:30:12 2009 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2009/11/24 11:49:44 obache Exp $
+# $NetBSD: Makefile,v 1.2 2009/11/26 12:30:12 obache Exp $
 #
 
 DISTNAME=      scim-bridge-0.4.16
+PKGREVISION=   1
 CATEGORIES=    inputmethod
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=scim/}
 
diff -r c3cb3d0eba1c -r 538872bc7acb inputmethod/scim-bridge/distinfo
--- a/inputmethod/scim-bridge/distinfo  Thu Nov 26 00:48:58 2009 +0000
+++ b/inputmethod/scim-bridge/distinfo  Thu Nov 26 12:30:12 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/11/24 11:49:44 obache Exp $
+$NetBSD: distinfo,v 1.2 2009/11/26 12:30:12 obache Exp $
 
 SHA1 (scim-bridge-0.4.16.tar.gz) = 6a7a714592dbecc9a1f44794f37319bafe2bdfae
 RMD160 (scim-bridge-0.4.16.tar.gz) = 37aed056fb880358b013f104f08b2e58c3de4188
@@ -7,3 +7,6 @@
 SHA1 (patch-ab) = 7c103b3da298e8ed72e84c239a3fc4617a647ce5
 SHA1 (patch-ac) = e7dd5f64e3fcd9cdc03199d041fefb09fce9ff8f
 SHA1 (patch-ad) = cc87a5c24af8c066482d164b2805602ed90e2acb
+SHA1 (patch-ae) = 2e8f264da95760b90d40355202fe21b81e0f12c8
+SHA1 (patch-af) = 3db943f7180838a475d4a0c2fca9c52d6dc3cd43
+SHA1 (patch-ag) = 45915bc63fd6228fe2033336fe3313f7ce639ef6
diff -r c3cb3d0eba1c -r 538872bc7acb inputmethod/scim-bridge/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/scim-bridge/patches/patch-ae  Thu Nov 26 12:30:12 2009 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-ae,v 1.1 2009/11/26 12:30:12 obache Exp $
+
+--- agent/scim-bridge-agent-accept-listener.cpp.orig   2009-04-19 03:42:18.000000000 +0000
++++ agent/scim-bridge-agent-accept-listener.cpp
+@@ -30,6 +30,10 @@
+ #include <sys/types.h>
+ #include <sys/un.h>
+ 
++#ifndef SUN_LEN
++#define SUN_LEN(x) (sizeof(*(x)) - sizeof((x)->sun_path +  strlen ((x)->sun_path))
++#endif
++
+ #include "scim-bridge-output.h"
+ #include "scim-bridge-path.h"
+ 
+@@ -111,7 +115,7 @@ retval_t ScimBridgeAgentAcceptListenerIm
+     const int MAX_TRIAL = 5;
+     for (int i = 0; i < MAX_TRIAL; ++i) {
+         scim_bridge_pdebugln (8, "Pinging for the another agent process...");
+-        if (connect (socket_fd, (struct sockaddr*)&socket_addr, sizeof (socket_addr.sun_family) + strlen (socket_addr.sun_path))) {
++        if (connect (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr))) {
+             if (i == MAX_TRIAL - 1) {
+                 scim_bridge_pdebugln (6, "It seems like there is no other agent for the old socket.");
+                 break;
+@@ -163,7 +167,7 @@ retval_t ScimBridgeAgentAcceptListenerIm
+         return RETVAL_FAILED;
+     }
+     
+-    if (bind (socket_fd, (struct sockaddr*)&socket_addr, strlen (socket_addr.sun_path) + sizeof (socket_addr.sun_family)) != 0) {
++    if (bind (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr)) != 0) {
+         scim_bridge_perrorln ("Cannot bind the socket: %s", strerror (errno));
+         close (socket_fd);
+         socket_fd = -1;
diff -r c3cb3d0eba1c -r 538872bc7acb inputmethod/scim-bridge/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/scim-bridge/patches/patch-af  Thu Nov 26 12:30:12 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2009/11/26 12:30:12 obache Exp $
+
+--- agent/scim-bridge-agent-application.cpp.orig       2009-01-18 02:04:20.000000000 +0900
++++ agent/scim-bridge-agent-application.cpp
+@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
+         {0, 0, NULL, 0}
+     };
+ 
+-    char short_options[] = "vhqdls:b:";
++    char short_options[] = "vhql:sn";
+ 
+     unsigned int tmp_uint;
+ 
diff -r c3cb3d0eba1c -r 538872bc7acb inputmethod/scim-bridge/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/scim-bridge/patches/patch-ag  Thu Nov 26 12:30:12 2009 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-ag,v 1.1 2009/11/26 12:30:12 obache Exp $
+
+--- client-common/scim-bridge-client.c.orig    2008-11-02 06:44:34.000000000 +0000
++++ client-common/scim-bridge-client.c
+@@ -29,6 +29,10 @@
+ #include <sys/un.h>
+ #include <sys/wait.h>
+ 
++#ifndef SUN_LEN
++#define SUN_LEN(x) (sizeof(*(x)) - sizeof((x)->sun_path +  strlen ((x)->sun_path))
++#endif
++
+ #include "scim-bridge-client.h"
+ #include "scim-bridge-client-imcontext.h"
+ #include "scim-bridge-client-protected.h"
+@@ -1052,7 +1056,7 @@ retval_t scim_bridge_client_open_messeng
+         socket_addr.sun_family = AF_UNIX;
+         strcpy (socket_addr.sun_path, scim_bridge_path_get_socket ());
+ 
+-        if (connect (socket_fd, (struct sockaddr*)&socket_addr, sizeof (socket_addr.sun_family) + strlen (socket_addr.sun_path))) {
++        if (connect (socket_fd, (struct sockaddr*)&socket_addr, SUN_LEN(&socket_addr))) {
+             if (i == 5 && launch_agent ()) {
+                 scim_bridge_perrorln ("Cannot launch the agent");
+                 return RETVAL_FAILED;



Home | Main Index | Thread Index | Old Index