aboutsummaryrefslogtreecommitdiff
path: root/japanese/Wnn7-lib
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2008-12-29 17:22:53 +0000
committerHiroki Sato <hrs@FreeBSD.org>2008-12-29 17:22:53 +0000
commit4f42ac237a9d0b483490adb59e273ef15ab95563 (patch)
tree60bd798ca57798f7ed4292233cba17809d63e45d /japanese/Wnn7-lib
parent6448e6c85d3de29c585111837315507a5045745e (diff)
downloadports-4f42ac237a9d0b483490adb59e273ef15ab95563.tar.gz
ports-4f42ac237a9d0b483490adb59e273ef15ab95563.zip
- Fix off-by-one error in sockaddr_un length calculation[*].
- Style clean-ups. Spotted by: Yoshihiko Sarumaru[*]
Notes
Notes: svn path=/head/; revision=224952
Diffstat (limited to 'japanese/Wnn7-lib')
-rw-r--r--japanese/Wnn7-lib/Makefile25
-rw-r--r--japanese/Wnn7-lib/files/patch-README14
-rw-r--r--japanese/Wnn7-lib/files/patch-Wnn_jlib_js.c24
-rw-r--r--japanese/Wnn7-lib/pkg-descr26
-rw-r--r--japanese/Wnn7-lib/pkg-plist3
5 files changed, 52 insertions, 40 deletions
diff --git a/japanese/Wnn7-lib/Makefile b/japanese/Wnn7-lib/Makefile
index 0f43ceb80e2c..25c259b4cb7c 100644
--- a/japanese/Wnn7-lib/Makefile
+++ b/japanese/Wnn7-lib/Makefile
@@ -7,20 +7,19 @@
PORTNAME= Wnn7-lib
PORTVERSION= 2001.10.17
+PORTREVISION= 1
CATEGORIES= japanese
MASTER_SITES= ftp://ftp.omronsoft.co.jp/pub/Wnn7/sdk_source/
DISTNAME= Wnn7SDK
EXTRACT_SUFX= .tgz
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Include files and a library of Wnn7
-
-BUILD_DEPENDS= imake:${PORTSDIR}/devel/imake
-
-WRKSRC= ${WRKDIR}/src
-DOCDIR= ${PREFIX}/share/doc/ja-Wnn7-lib
+MAINTAINER= hrs@FreeBSD.org
+COMMENT= Wnn7 client library
+USE_IMAKE= yes
USE_LDCONFIG= yes
+WRKSRC= ${WRKDIR}/src
+PORTDOCS= README
.include <bsd.port.pre.mk>
@@ -32,12 +31,14 @@ post-patch:
# Warning: we cannot use USE_IMAKE.
do-build:
- ( cd ${WRKSRC} ; make World -f Makefile.ini )
+ cd ${WRKSRC} && make World -f Makefile.ini
post-install:
- @${MKDIR} ${PREFIX}/include/wnn7/wnn
- @${INSTALL_DATA} ${WRKSRC}/Wnn/include/*.h ${PREFIX}/include/wnn7/wnn
- @${MKDIR} ${DOCDIR}
- @${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
+ ${MKDIR} ${PREFIX}/include/wnn7/wnn
+ ${INSTALL_DATA} ${WRKSRC}/Wnn/include/*.h ${PREFIX}/include/wnn7/wnn
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
.include <bsd.port.post.mk>
diff --git a/japanese/Wnn7-lib/files/patch-README b/japanese/Wnn7-lib/files/patch-README
new file mode 100644
index 000000000000..cc593a9cf278
--- /dev/null
+++ b/japanese/Wnn7-lib/files/patch-README
@@ -0,0 +1,14 @@
+--- README.orig 2008-12-30 02:10:05.000000000 +0900
++++ README 2008-12-30 02:09:54.000000000 +0900
+@@ -129,6 +129,11 @@
+
+ Comments on Modifications:
+
++2008/12/29: hrs@FreeBSD.org
++ Add SUN_LEN() macro to fix calculation of length of sockaddr_un when
++ sun_len is included in the structure. This fixes the mangled unix
++ domain socket name issue; "/tmp/jd_sockV" is used instead of
++ "/tmp/jd_sockV7".
+
+
+ ***************************************************************************
diff --git a/japanese/Wnn7-lib/files/patch-Wnn_jlib_js.c b/japanese/Wnn7-lib/files/patch-Wnn_jlib_js.c
index ab5c21ff0217..939c5ec5f780 100644
--- a/japanese/Wnn7-lib/files/patch-Wnn_jlib_js.c
+++ b/japanese/Wnn7-lib/files/patch-Wnn_jlib_js.c
@@ -1,5 +1,5 @@
---- Wnn/jlib/js.c.orig 2007-11-11 17:46:58.000000000 +0900
-+++ Wnn/jlib/js.c 2007-11-11 17:47:59.000000000 +0900
+--- Wnn/jlib/js.c.orig 2001-10-17 10:37:17.000000000 +0900
++++ Wnn/jlib/js.c 2008-12-30 01:41:03.000000000 +0900
@@ -159,9 +159,9 @@
*/
@@ -21,3 +21,23 @@
typedef struct _host_address {
int address_len;
char *address;
+@@ -358,14 +356,17 @@
+ /* find socket name from table by lang */
+ sock_name = UNIX_SOCKET_NAME; /* Jserver */
+ strcpy(saddr.sun_path, sock_name);
+-#if ((defined AIXV3) || (defined FREEBSD))
++#if ((defined AIXV3))
+ strcat(saddr.sun_path, "=");
+ #endif
+
+ if ((sd = socket(AF_UNIX,SOCK_STREAM, 0)) == ERROR) {
+ return -1;
+ }
+- if (connect(sd,(struct sockaddr *)&saddr,strlen(saddr.sun_path)+sizeof(saddr.sun_family)) == ERROR) {
++#if !defined(SUN_LEN)
++# define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
++#endif
++ if (connect(sd,(struct sockaddr *)&saddr, SUN_LEN(&saddr)) == ERROR) {
+ close(sd);
+ return -1;
+ }
diff --git a/japanese/Wnn7-lib/pkg-descr b/japanese/Wnn7-lib/pkg-descr
index 62561c22991c..12bfc7ea5c7f 100644
--- a/japanese/Wnn7-lib/pkg-descr
+++ b/japanese/Wnn7-lib/pkg-descr
@@ -1,26 +1,4 @@
-This port has include files (e.g. wnn/commonhd.h) and a library file
-(e.g. libwnn.a) to build Wnn7 clients. The files are compiled from
-sources Wnn7SDK.tgz which you can get in
+This port is Wnn7 client library including header and library files
+for Wnn7 client development.
WWW: http://www.omronsoft.co.jp/
-
-The license of the sources is in
-
-/usr/local/share/doc/ja-Wnn7-lib/README
-
-By the way, you must buy the server of Wnn7, whose name is jserver,
-from Omron Software Co., Ltd.
-
-+------------------------------------------+
-| URL: http://www.omronsoft.co.jp |
-| E-mail: wnn-info@omronsoft.co.jp |
-| TEL: +81-44-246-6006 |
-| FAX: +81-44-246-6011 |
-+------------------------------------------+
-
-Wnn7 is one of Japanese input methods. 'Wnn7 Personal'
-supports Japanese method only. However, FreeWnn (which is free)
-supports Chinese and Korean ones, too.
-
-- S. Taoka
-taoka@FreeBSD.org
diff --git a/japanese/Wnn7-lib/pkg-plist b/japanese/Wnn7-lib/pkg-plist
index 931d3c471bad..cefabb53c272 100644
--- a/japanese/Wnn7-lib/pkg-plist
+++ b/japanese/Wnn7-lib/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
include/wnn7/wnn/commonhd.h
include/wnn7/wnn/config.h
include/wnn7/wnn/copyright.h
@@ -22,5 +23,3 @@ include/wnn7/wnn/wnnerror.h
lib/libwnn7.a
lib/libwnn7.so
lib/libwnn7.so.1
-share/doc/ja-Wnn7-lib/README
-@dirrm share/doc/ja-Wnn7-lib