Subject: pkg/30448: inputmethod/anthy fixed tool bug and update optional dictionary
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <yamajun@ofug.net>
List: pkgsrc-bugs
Date: 06/06/2005 17:07:00
>Number: 30448
>Category: pkg
>Synopsis: inputmethod/anthy fixed tool bug and update optional dictionary
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 06 17:07:00 +0000 2005
>Originator: Yamashiro Jun
>Release: NetBSD 3.99.3
>Organization:
Okinawa FreeBSD Users Group
>Environment:
NetBSD yamajun.mydomain 3.99.3 NetBSD 3.99.3 (YAMAJUN) #5: Tue May 3 18:52:25 JST 2005 yamajun@yamajun.mydomain:/sys/arch/i386/compile/YAMAJUN i386
>Description:
1. Fix /usr/pkg/bin/anthy-dic-tool bug.
anthy-dic-tool (dictionary management tool) has a bug with NetBSD's libc.
It made a broken kana-kanji dictionary.
Note to maintainer:
This patch was committed into development version.
Please remove patches/patch-ab when update to new version.
2. Update optional kana-kanji dictionary(okinawa-20050410 to 20050607).
>How-To-Repeat:
Input some Japanese dictionary data to anthy-dic-tool,
and dump dictionary to file.
input examples(in Japanese):
http://lists.sourceforge.jp/mailman/archives/pkgsrc-wip-discuss/2005-May/000051.html
http://lists.sourceforge.jp/mailman/archives/anthy-dev/2005-May/002035.html
>Fix:
Apply this patch.
# cd /usr/pkgsrc/inputmethod/anthy
# patch -p1 < this_mail
# make
...
diff -Nru anthy.orig/Makefile anthy/Makefile
--- anthy.orig/Makefile 2005-06-06 23:27:53.000000000 +0900
+++ anthy/Makefile 2005-06-07 00:33:58.000000000 +0900
@@ -2,6 +2,7 @@
.include "../../inputmethod/anthy/Makefile.common"
+PKGREVISION= 1
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAINTAINER= taya@NetBSD.org
@@ -39,8 +40,8 @@
.endif
.if !empty(PKG_OPTIONS:Mokinawa_dict)
-DISTFILES+= okinawa-20050410.t
-SITES_okinawa-20050410.t+= http://www.ofug.net/~yamajun/files/
+DISTFILES+= okinawa-20050607.t
+SITES_okinawa-20050607.t+= http://www.ofug.net/~yamajun/files/
.endif
post-patch:
@@ -50,8 +51,8 @@
ed -s ${WRKSRC}/mkanthydic/Makefile.in
.endif
.if !empty(PKG_OPTIONS:Mokinawa_dict)
- ${CP} ${DISTDIR}/okinawa-20050410.t ${WRKSRC}/mkanthydic
- @printf '/^EXTRA_DICS\ns/$$/ okinawa-20050410.t/\nwq\n' | \
+ ${CP} ${DISTDIR}/okinawa-20050607.t ${WRKSRC}/mkanthydic
+ @printf '/^EXTRA_DICS\ns/$$/ okinawa-20050607.t/\nwq\n' | \
ed -s ${WRKSRC}/mkanthydic/Makefile.in
.endif
diff -Nru anthy.orig/distinfo anthy/distinfo
--- anthy.orig/distinfo 2005-06-06 23:27:53.000000000 +0900
+++ anthy/distinfo 2005-06-07 00:30:35.000000000 +0900
@@ -6,7 +6,8 @@
SHA1 (2ch.t) = 2160d7b0079e2c1a14093da968f34e7f8dbc07c2
RMD160 (2ch.t) = b05902485829eebb4e09c554f095275f5278dd8b
Size (2ch.t) = 142157 bytes
-SHA1 (okinawa-20050410.t) = dd519410a4865b1fe9894d3b504fbd20f11a8d03
-RMD160 (okinawa-20050410.t) = e584074accf91a839329a7c856857d4b8a2560c1
-Size (okinawa-20050410.t) = 150102 bytes
+SHA1 (okinawa-20050607.t) = 50f9524e5f11240cbc486c32eb86fcc1a3075e6f
+RMD160 (okinawa-20050607.t) = 6ee9adeaddb0c62c6a4741761d14932603ee7a81
+Size (okinawa-20050607.t) = 150145 bytes
SHA1 (patch-aa) = 79816563a3d1ff853bc1edcbfee7e22ae2e26991
+SHA1 (patch-ab) = 6f828049eee54de01037130e6706b138f5aec504
diff -Nru anthy.orig/patches/patch-ab anthy/patches/patch-ab
--- anthy.orig/patches/patch-ab 1970-01-01 09:00:00.000000000 +0900
+++ anthy/patches/patch-ab 2005-06-07 00:30:28.000000000 +0900
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- src-util/dic-tool.c.orig 2005-06-06 23:44:37.000000000 +0900
++++ src-util/dic-tool.c 2005-06-06 23:47:25.000000000 +0900
+@@ -16,7 +16,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
+
+ #include <dicutil.h>
+ #include <config.h>
+@@ -287,24 +286,11 @@
+ find_head(char *yomi, char *freq, char *w)
+ {
+ char buf[256];
+- char *p;
+- int i;
+ do {
+ if (!read_line(buf, 256, fp_in)) {
+ return -1;
+ }
+- } while (sscanf(buf, "%s %s %s",yomi, freq, w) != 3);
+- /* 単語はspaceを含みうるので、切り直し */
+- p = buf;
+- for (i = 0; i < 2; i++) {
+- while (!isspace(p[0]) ||
+- isspace(p[1])) {
+- p++;
+- }
+- p++;
+- }
+- /* pは3つめのトークンの先頭*/
+- strncpy(w, p, 256);
++ } while (sscanf(buf, "%s %s %[^\n]", yomi, freq, w) != 3);
+ return 0;
+ }
+