* PKGREVISION = 2 * To compile with ja-freewnn-lib-1.11alpha22, small patches added for mainly with adding include directive: --- +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> ---- the patches are listed below. patch-cmd_kinput2.c patch-lib_Canna.c patch-lib_ConvCtrl.c patch-lib_KIProto.c patch-lib_XimpProto.c patch-lib_ctext.c patch-lib_wnnlib.cdiff -r1.20 -r1.21 pkgsrc/inputmethod/kinput2/Makefile
(mef)
@@ -1,33 +1,34 @@ | @@ -1,33 +1,34 @@ | |||
1 | # $NetBSD: Makefile,v 1.20 2010/07/11 02:58:16 obache Exp $ | 1 | # $NetBSD: Makefile,v 1.21 2011/09/13 07:28:48 mef Exp $ | |
2 | 2 | |||
3 | DISTNAME= kinput2-v3.1 | 3 | DISTNAME= kinput2-v3.1 | |
4 | PKGNAME= kinput2-3.1 | 4 | PKGNAME= kinput2-3.1 | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= japanese inputmethod | 6 | CATEGORIES= japanese inputmethod | |
7 | MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/ | 7 | MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/ | |
8 | 8 | |||
9 | MAINTAINER= tech-pkg-ja@jp.NetBSD.org | 9 | MAINTAINER= tech-pkg-ja@jp.NetBSD.org | |
10 | COMMENT= Input server of Japanese text | 10 | COMMENT= Input server of Japanese text | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | MAKE_JOBS_SAFE= NO | 14 | MAKE_JOBS_SAFE= NO | |
15 | USE_IMAKE= YES | 15 | USE_IMAKE= YES | |
16 | 16 | |||
17 | PLIST_SRC= ${PKGDIR}/PLIST-common | 17 | PLIST_SRC= ${PKGDIR}/PLIST-common | |
18 | 18 | |||
19 | .include "options.mk" | 19 | .include "options.mk" | |
20 | 20 | |||
21 | MAKE_ENV+= PORT_IMAKE_DEFINES=${KINPUT2_DEFS:Q} | 21 | MAKE_ENV+= PORT_IMAKE_DEFINES=${KINPUT2_DEFS:Q} | |
22 | 22 | |||
23 | pre-configure: | 23 | pre-configure: | |
24 | ${MV} -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org | 24 | ${MV} -f ${WRKSRC}/Kinput2.conf ${WRKSRC}/Kinput2.conf.org | |
25 | ${CP} ${FILESDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf | 25 | ${CP} ${FILESDIR}/Kinput2.conf ${WRKSRC}/Kinput2.conf | |
26 | 26 | |||
27 | do-configure: | 27 | do-configure: | |
28 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} | 28 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} | |
29 | 29 | |||
30 | .include "../../x11/libXaw/buildlink3.mk" | 30 | .include "../../x11/libXaw/buildlink3.mk" | |
31 | .include "../../x11/libXp/buildlink3.mk" | 31 | .include "../../x11/libXp/buildlink3.mk" | |
32 | .include "../../x11/libXpm/buildlink3.mk" | |||
32 | .include "../../x11/libXt/buildlink3.mk" | 33 | .include "../../x11/libXt/buildlink3.mk" | |
33 | .include "../../mk/bsd.pkg.mk" | 34 | .include "../../mk/bsd.pkg.mk" |
@@ -1,8 +1,16 @@ | @@ -1,8 +1,16 @@ | |||
1 | $NetBSD: distinfo,v 1.5 2010/02/15 13:41:17 obache Exp $ | 1 | $NetBSD: distinfo,v 1.6 2011/09/13 07:28:48 mef Exp $ | |
2 | 2 | |||
3 | SHA1 (kinput2-v3.1.tar.gz) = 48050f70e7c0cc67193ea260f8d7f6e822a02ca3 | 3 | SHA1 (kinput2-v3.1.tar.gz) = 48050f70e7c0cc67193ea260f8d7f6e822a02ca3 | |
4 | RMD160 (kinput2-v3.1.tar.gz) = c56684769859bbee5f8238cd1af061796ff931e8 | 4 | RMD160 (kinput2-v3.1.tar.gz) = c56684769859bbee5f8238cd1af061796ff931e8 | |
5 | Size (kinput2-v3.1.tar.gz) = 512177 bytes | 5 | Size (kinput2-v3.1.tar.gz) = 512177 bytes | |
6 | SHA1 (patch-aa) = debe271517550c47610a7ac128432e6e567fb6d7 | 6 | SHA1 (patch-Imakefile) = 2ec731b5ff7ef4cac3497c60b179e0f1ce0a4a05 | |
7 | SHA1 (patch-aa) = 3eaca25000c756d71fcafbb09a8ad8fd15142437 | |||
7 | SHA1 (patch-ab) = a084421f399e753f25040fd0cba6d43a391fc15b | 8 | SHA1 (patch-ab) = a084421f399e753f25040fd0cba6d43a391fc15b | |
8 | SHA1 (patch-ac) = cd71af4a86102c1aedb84f64cda29ad5df2b7789 | 9 | SHA1 (patch-ac) = 83d74ddffa6ddb870b3de1755a94e1258e06f793 | |
10 | SHA1 (patch-cmd_kinput2.c) = 5f8bcada8ee247d536d6cbb1ac0404de4e55b90d | |||
11 | SHA1 (patch-lib_Canna.c) = 75af9e02e84281c02c7d36bc237e6c05afbb8c80 | |||
12 | SHA1 (patch-lib_ConvCtrl.c) = bd5dcd286bf1f1ac8153a2f51c54930d4173de56 | |||
13 | SHA1 (patch-lib_KIProto.c) = 8545746a50b85986cd2a727667d30ca054860962 | |||
14 | SHA1 (patch-lib_XimpProto.c) = 9931af45d19aea41916b1cdec933d0fea34769a6 | |||
15 | SHA1 (patch-lib_ctext.c) = 97093817ebf73ddc1d9ddcfb068b0c96c93e1f8e | |||
16 | SHA1 (patch-lib_wnnlib.c) = 0b5e66372294f27dcbaf0b4a53da50a739b362f3 |
@@ -1,12 +1,18 @@ | @@ -1,12 +1,18 @@ | |||
1 | $NetBSD: patch-aa,v 1.2 2010/02/15 13:41:18 obache Exp $ | 1 | $NetBSD: patch-aa,v 1.3 2011/09/13 07:28:48 mef Exp $ | |
2 | 2 | |||
3 | --- include/wnnlib.h.orig 2002-10-03 09:35:27.000000000 +0000 | 3 | --- include/wnnlib.h.orig 2002-10-03 09:35:27.000000000 +0000 | |
4 | +++ include/wnnlib.h | 4 | +++ include/wnnlib.h | |
5 | @@ -28,6 +28,7 @@ | 5 | @@ -107,11 +107,11 @@ typedef struct { | |
6 | #ifndef _wnnlib_h | 6 | #ifdef __STDC__ | |
7 | #define _wnnlib_h | 7 | extern struct wnn_buf *jcOpen(char *server, char *envname, | |
8 | 8 | int override, char *rcfile, | ||
9 | +#include <config.h> | 9 | - void (*error)(), int (*confirm)(), | |
10 | #include <commonhd.h> | 10 | + int (*error)(const char *), int (*confirm)(const char *), | |
11 | #include <jllib.h> | 11 | int timeout); | |
12 | #include <wnnerror.h> | 12 | extern struct wnn_buf *jcOpen2(char *server, char *envname, | |
13 | int override, char *rcfile4, char *rcfile6, | |||
14 | - void (*error)(), int (*confirm)(), | |||
15 | + int (*error)(const char *), int (*confirm)(const char *), | |||
16 | int timeout); | |||
17 | extern int jcClose(struct wnn_buf *wnn); | |||
18 | extern int jcIsConnect(struct wnn_buf *wnn); |
@@ -1,44 +1,61 @@ | @@ -1,44 +1,61 @@ | |||
1 | $NetBSD: patch-ac,v 1.2 2010/02/15 13:41:18 obache Exp $ | 1 | $NetBSD: patch-ac,v 1.3 2011/09/13 07:28:48 mef Exp $ | |
2 | 2 | |||
3 | Avoid to conflict with getline(3) in IEEE Std 1003.1-2008. | 3 | Avoid to conflict with getline(3) in IEEE Std 1003.1-2008. | |
4 | 4 | |||
5 | --- lib/cconv.c.orig 2002-10-03 09:35:28.000000000 +0000 | 5 | --- lib/cconv.c.orig 2002-10-03 09:35:28.000000000 +0000 | |
6 | +++ lib/cconv.c | 6 | +++ lib/cconv.c | |
7 | @@ -790,7 +790,7 @@ static wchar *promptsave(wchar *); | 7 | @@ -604,6 +604,7 @@ static char *rcsid = "$Id: cconv.c,v 10. | |
8 | #endif | |||
9 | ||||
10 | #include <stdio.h> | |||
11 | +#include <stdlib.h> | |||
12 | #include <X11/Xlib.h> | |||
13 | #include <X11/keysym.h> | |||
14 | #include <X11/Xutil.h> | |||
15 | @@ -790,7 +791,7 @@ static wchar *promptsave(wchar *); | |||
8 | static int parseLine(uchar *, uchar **, int); | 16 | static int parseLine(uchar *, uchar **, int); | |
9 | static FILE *openfile(char *); | 17 | static FILE *openfile(char *); | |
10 | static int doinclude(uchar *, Files *, void (*)()); | 18 | static int doinclude(uchar *, Files *, void (*)()); | |
11 | -static uchar *getline(uchar *, int, Files *, void (*)()); | 19 | -static uchar *getline(uchar *, int, Files *, void (*)()); | |
12 | +static uchar *get_line(uchar *, int, Files *, void (*)()); | 20 | +static uchar *get_line(uchar *, int, Files *, void (*)()); | |
13 | static int readRuleFile(ccRule, char *); | 21 | static int readRuleFile(ccRule, char *); | |
14 | static int registMode(ccRule, int, uchar **); | 22 | static int registMode(ccRule, int, uchar **); | |
15 | static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *, | 23 | static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *, | |
16 | @@ -1035,8 +1035,8 @@ void (*efunc)(); | 24 | @@ -1035,8 +1036,8 @@ void (*efunc)(); | |
17 | return 0; | 25 | return 0; | |
18 | } | 26 | } | |
19 | 27 | |||
20 | -/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ | 28 | -/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ | |
21 | -static uchar *getline(line, linesize, files, efunc) | 29 | -static uchar *getline(line, linesize, files, efunc) | |
22 | +/* get_line -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ | 30 | +/* get_line -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ | |
23 | +static uchar *get_line(line, linesize, files, efunc) | 31 | +static uchar *get_line(line, linesize, files, efunc) | |
24 | uchar *line; | 32 | uchar *line; | |
25 | int linesize; | 33 | int linesize; | |
26 | Files *files; | 34 | Files *files; | |
27 | @@ -1100,7 +1100,7 @@ char *file; | 35 | @@ -1100,7 +1101,7 @@ char *file; | |
28 | rule->nmode = 0; | 36 | rule->nmode = 0; | |
29 | rule->initialmode = -1; | 37 | rule->initialmode = -1; | |
30 | 38 | |||
31 | - while (getline(line, sizeof(line), &files, efunc)) { | 39 | - while (getline(line, sizeof(line), &files, efunc)) { | |
32 | + while (get_line(line, sizeof(line), &files, efunc)) { | 40 | + while (get_line(line, sizeof(line), &files, efunc)) { | |
33 | (void)Strcpy(tmp, line); | 41 | (void)Strcpy(tmp, line); | |
34 | if ((argc = parseLine(tmp, argv, 20)) == 0) | 42 | if ((argc = parseLine(tmp, argv, 20)) == 0) | |
35 | continue; | 43 | continue; | |
36 | @@ -1269,7 +1269,7 @@ uchar **av; | 44 | @@ -1269,7 +1270,7 @@ uchar **av; | |
37 | cdbuf.cdbuf = NULL; | 45 | cdbuf.cdbuf = NULL; | |
38 | 46 | |||
39 | /* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */ | 47 | /* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */ | |
40 | - while (getline(line, sizeof(line), files, efunc)) { | 48 | - while (getline(line, sizeof(line), files, efunc)) { | |
41 | + while (get_line(line, sizeof(line), files, efunc)) { | 49 | + while (get_line(line, sizeof(line), files, efunc)) { | |
42 | /* '#' $B$G;O$^$k9T$O%3%a%s%H(B */ | 50 | /* '#' $B$G;O$^$k9T$O%3%a%s%H(B */ | |
43 | if (*line == '\0' || *line == '\n' || *line == '#') | 51 | if (*line == '\0' || *line == '\n' || *line == '#') | |
44 | continue; | 52 | continue; | |
53 | @@ -1282,7 +1283,7 @@ uchar **av; | |||
54 | } | |||
55 | ||||
56 | /* $B%k!<%k$N%9%H%"(B */ | |||
57 | - cdp->key = inkey; | |||
58 | + cdp->key = (ulong *) inkey; | |||
59 | cdp->mask = modmask; | |||
60 | cdp->context = *context ? wstrsave(srec, wrev(context)) : 0; | |||
61 | cdp->result = *result ? wstrsave(srec, result) : 0; |
$NetBSD: patch-cmd_kinput2.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- cmd/kinput2.c.orig 2002-10-03 09:35:26.000000000 +0000
+++ cmd/kinput2.c
@@ -26,6 +26,8 @@ static char *rcsid = "$Id: kinput2.c,v 1
#include <stdio.h>
#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
$NetBSD: patch-lib_Canna.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/Canna.c.orig 2002-10-03 09:35:27.000000000 +0000
+++ lib/Canna.c
@@ -58,6 +58,7 @@ static char *rcsid = "$Id: Canna.c,v 1.5
#if XtSpecificationRelease > 4
#include <X11/Xfuncs.h>
#endif
+#include <stdlib.h>
#include "CannaP.h"
#include "DebugPrint.h"
$NetBSD: patch-lib_ConvCtrl.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/ConvCtrl.c.orig 2002-10-03 09:35:27.000000000 +0000
+++ lib/ConvCtrl.c
@@ -21,6 +21,7 @@ static char *rcsid = "$Id: ConvCtrl.c,v
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <X11/Xmu/CharSet.h>
+#include <stdio.h>
#include "ConvCtrlP.h"
#include "InputConv.h"
#include "ConvDisp.h"
$NetBSD: patch-lib_KIProto.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/KIProto.c.orig 2002-10-03 09:35:28.000000000 +0000
+++ lib/KIProto.c
@@ -23,6 +23,7 @@ static char *rcsid = "$Id: KIProto.c,v 1
#include <X11/Xatom.h>
#include <X11/Xmu/Atoms.h>
#include <X11/Xmu/CharSet.h>
+#include <stdio.h>
#include "KIProtoP.h"
#include "ConvMgr.h"
#include "OverConv.h"
$NetBSD: patch-lib_XimpProto.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/XimpProto.c.orig 2002-10-03 09:35:28.000000000 +0000
+++ lib/XimpProto.c
@@ -28,6 +28,7 @@ static char *rcsid = "$Id: XimpProto.c,v
#include <X11/Xatom.h>
#include <X11/Xmu/Atoms.h>
#include <X11/Xmu/CharSet.h>
+#include <stdio.h>
#include "XIMProto.h"
#include "XimpProtoP.h"
#include "ConvMgr.h"
$NetBSD: patch-lib_ctext.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/ctext.c.orig 2002-10-03 09:35:28.000000000 +0000
+++ lib/ctext.c
@@ -72,4 +72,6 @@ static char *rcsid = "$Id: ctext.c,v 2.6
#endif
+#include <string.h>
+
typedef unsigned short wchar;
$NetBSD: patch-lib_wnnlib.c,v 1.1 2011/09/13 07:28:48 mef Exp $
To compile with ja-freewnn-lib-1.11alpah22
--- lib/wnnlib.c.orig 2002-10-03 18:35:28.000000000 +0900
+++ lib/wnnlib.c 2011-05-08 23:37:11.000000000 +0900
@@ -282,7 +282,7 @@
*
* struct wnn_buf jcOpen(char *servername, char *envname,
* char *rcfilename, int override,
- * void (*errmsgfunc)(), int (*confirmfunc)(),
+ * int (*errmsgfunc)(const char *), int (*confirmfunc)(const char *),
* int timeout)
* jl_open $B$"$k$$$O(B jl_open_lang $B$KBP1~$7$?(B wnnlib $B$N%$%s%?%U%'!<(B
* $B%9$G!"$3$N4X?t$NCf$G<B:]$K(B jl_open $B$"$k$$$O(B jl_open_lang $B$r8F(B
@@ -581,6 +581,7 @@
#include "wnnlib.h"
#include "WStr.h"
#include <string.h>
+#include <stdlib.h>
#include <pwd.h>
#include <X11/Xos.h>
@@ -1367,7 +1368,7 @@
/* $BJQ49J8;zNs$ND9$5$N%A%'%C%/(B */
clp = buf->clauseInfo + cl;
- len = jl_kanji_len(buf->wnn, cl);
+ len = jl_kanji_len(buf->wnn, cl, -1);
diff = len - ((clp + 1)->dispp - clp->dispp);
newlen = (buf->displayEnd - buf->displayBuf) + diff;
if (newlen > buf->bufferSize) {
@@ -3449,8 +3450,8 @@
char *envname;
int override;
char *rcfile;
-void (*errmsg)();
-int (*confirm)();
+int (*errmsg)(const char *);
+int (*confirm)(const char *);
int timeout;
{
return jcOpen2(server, envname, override, rcfile, rcfile, errmsg, confirm, timeout);
@@ -3463,8 +3464,8 @@
int override;
char *rcfile4; /* wnnenvrc for Wnn4 */
char *rcfile6; /* wnnenvrc for Wnn6 */
-void (*errmsg)();
-int (*confirm)();
+int (*errmsg)(const char *);
+int (*confirm)(const char *);
int timeout;
{
struct wnn_buf *wnnbuf;