diff options
author | hrs <hrs@FreeBSD.org> | 2014-03-14 22:01:40 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-03-14 22:01:40 +0800 |
commit | 119c0b32f9946a4932fcff2d503c636aa237ad3e (patch) | |
tree | 215e06cef0405d54ca8ffcb3f4a0f41fdb25f08d /japanese/onew | |
parent | e84196fc499d80df5cf11fc954f1afdd82aaf5f7 (diff) | |
download | freebsd-ports-gnome-119c0b32f9946a4932fcff2d503c636aa237ad3e.tar.gz freebsd-ports-gnome-119c0b32f9946a4932fcff2d503c636aa237ad3e.tar.zst freebsd-ports-gnome-119c0b32f9946a4932fcff2d503c636aa237ad3e.zip |
- Fix build.
- STAGEDIR support.
Diffstat (limited to 'japanese/onew')
-rw-r--r-- | japanese/onew/Makefile | 28 | ||||
-rw-r--r-- | japanese/onew/files/patch-ONEW_CONF.default | 17 | ||||
-rw-r--r-- | japanese/onew/files/patch-dialogue-jisyo.c | 51 | ||||
-rw-r--r-- | japanese/onew/files/patch-interface-oui.c | 169 | ||||
-rw-r--r-- | japanese/onew/files/patch-interface-ouimessage.c | 116 | ||||
-rw-r--r-- | japanese/onew/files/patch-onew.h | 35 |
6 files changed, 401 insertions, 15 deletions
diff --git a/japanese/onew/Makefile b/japanese/onew/Makefile index 5040a9f4e9dd..4d95033d0185 100644 --- a/japanese/onew/Makefile +++ b/japanese/onew/Makefile @@ -12,8 +12,10 @@ DISTNAME= jvim2.0r+${PORTNAME}${PORTVERSION} MAINTAINER= hrs@FreeBSD.org COMMENT= A library for Japanese Input Methods +USE_GCC= any WRKSRC= ${WRKDIR}/${PORTNAME} ALL_TARGET= +CFLAGS+= -I${WRKSRC} PORTDOCS= README.ONEW OPTIONS_DEFINE= CANNA CANNA_FREEWNN CANNA_WNN6 CANNA_WNN7 FREEWNN WNN6 WNN7 @@ -26,21 +28,20 @@ FREEWNN_DESC= Build FreeWnn-backend library WNN6_DESC= Build Wnn6-backend library WNN7_DESC= Build Wnn7-backend library -LIB_DEPENDS.CANNA= canna.1:${PORTSDIR}/japanese/canna-lib -BUILD_DEPENDS.CANNA_FREEWNN= ${BUILD_DEPENDS.FREEWNN} -BUILD_DEPENDS.CANNA_WNN6= ${BUILD_DEPENDS.WNN6} -BUILD_DEPENDS.CANNA_WNN7= ${BUILD_DEPENDS.WNN7} +CANNA_LIB_DEPENDS= libcanna.so:${PORTSDIR}/japanese/canna-lib +CANNA_FREEWNN_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS} +CANNA_WNN6_BUILD_DEPENDS= ${WNN6_BUILD_DEPENDS} +CANNA_WNN7_BUILD_DEPENDS= ${WNN7_BUILD_DEPENDS} RK_DIR.CANNA_WNN6= ${RKDIR.WNN6} RK_DIR.CANNA_WNN7= ${RKDIR.WNN7} -BUILD_DEPENDS.FREEWNN= ${LOCALBASE}/lib/libjd.a:${PORTSDIR}/japanese/FreeWnn-lib -BUILD_DEPENDS.WNN6= ${BUILD_DEPENDS.FREEWNN} +FREEWNN_BUILD_DEPENDS= ${LOCALBASE}/lib/libjd.a:${PORTSDIR}/japanese/FreeWnn-lib +WNN6_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS} RK_DIR.WNN6= ${LOCALBASE}/lib/wnn/ja_JP/rk.wnn6 -BUILD_DEPENDS.WNN7= ${BUILD_DEPENDS.FREEWNN} +WNN7_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS} RK_DIR.WNN7= ${LOCALBASE}/lib/wnn/ja_JP/rk.wnn7 -NO_STAGE= yes .include <bsd.port.options.mk> .for I in ${OPTIONS_DEFINE:NDOCS} @@ -48,8 +49,6 @@ NO_STAGE= yes INPUT_METHOD+= ${I:S/_/+/g:L} SUB_FILES+= ONEW_CONF-for-${I:S/_/+/g:L} PLIST_FILES+= lib/libonew-${I:S/_/+/g:L}.a -LIB_DEPENDS+= ${LIB_DEPENDS.${I}} -BUILD_DEPENDS+= ${BUILD_DEPENDS.${I}} RK_DIR+= ${RK_DIR.${I}} .endif .endfor @@ -59,17 +58,16 @@ pre-build: apply-slist do-build: .for I in ${INPUT_METHOD} ${INSTALL_DATA} ${WRKDIR}/ONEW_CONF-for-${I} ${WRKSRC}/ONEW_CONF - cd ${WRKSRC} && ${MAKE} clean && ${MAKE} + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET} ${INSTALL_DATA} ${WRKSRC}/libonew.a ${WRKDIR}/libonew-${I}.a .endfor do-install: .for I in ${INPUT_METHOD} - ${INSTALL_DATA} ${WRKDIR}/libonew-${I}.a ${PREFIX}/lib/libonew-${I}.a + ${INSTALL_DATA} ${WRKDIR}/libonew-${I}.a \ + ${STAGEDIR}${PREFIX}/lib/libonew-${I}.a .endfor -.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.ONEW ${DOCSDIR} -.endif + ${INSTALL_DATA} ${WRKSRC}/README.ONEW ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> diff --git a/japanese/onew/files/patch-ONEW_CONF.default b/japanese/onew/files/patch-ONEW_CONF.default new file mode 100644 index 000000000000..066b0d1915d7 --- /dev/null +++ b/japanese/onew/files/patch-ONEW_CONF.default @@ -0,0 +1,17 @@ +--- ONEW_CONF.default.orig 2013-11-03 22:07:32.000000000 +0900 ++++ ONEW_CONF.default 2013-11-03 22:08:20.000000000 +0900 +@@ -136,12 +136,12 @@ + ##SYSDEPEND = $(SYSTYPE) $(SELECT) + + #$@!z(J compiler $@%3%s%Q%$%i$NA*Br(J +-CC = cc ++CC ?= cc + #CC = gcc + #CC = /usr/ucb/cc + #CC = /usr/5bin/cc + +-CFLAGS = -O ++CFLAGS ?= -O + + #$@!z(J ranlib $@$,I,MW$J>l9g$KDj5A$7$F$M(J + RANLIB = ranlib diff --git a/japanese/onew/files/patch-dialogue-jisyo.c b/japanese/onew/files/patch-dialogue-jisyo.c new file mode 100644 index 000000000000..566246f78b06 --- /dev/null +++ b/japanese/onew/files/patch-dialogue-jisyo.c @@ -0,0 +1,51 @@ +--- dialogue/jisyo.c.orig 2013-11-03 22:38:25.000000000 +0900 ++++ dialogue/jisyo.c 2013-11-03 22:43:05.000000000 +0900 +@@ -1,3 +1,4 @@ ++#include <string.h> + #include "onew.h" + + int OM_JisyoMode; +@@ -6,8 +7,10 @@ + int OM_JisyoGetKanjiFlush; + int OM_JisyoMassyou; + +-extern Uchar ONEW_DicYomi[]; ++extern char ONEW_DicYomi[]; ++void odmJisyo_massyou(void); + ++int + odmStart_touroku(yomi) + char *yomi; + { +@@ -20,6 +23,7 @@ + return 1; + } + ++int + odmAbort_touroku(){ + if( OM_JisyoGetYomi || OM_JisyoGetTsuduri || OM_JisyoGetKanjiFlush ){ + Onew_putmsg(1,ONEW_msg_tourokuABORT); +@@ -32,6 +36,7 @@ + return 0; + } + ++int + odmJisyo_sousa(){ + int com; + +@@ -50,6 +55,7 @@ + return 0; + } + ++void + odmJisyo_massyou() + { + OM_JisyoMassyou = 1; +@@ -59,6 +65,7 @@ + OM_JisyoMassyou = 0; + } + ++void + odmJisyo_touroku() + { int i,max; + int com; diff --git a/japanese/onew/files/patch-interface-oui.c b/japanese/onew/files/patch-interface-oui.c new file mode 100644 index 000000000000..70a75291baaf --- /dev/null +++ b/japanese/onew/files/patch-interface-oui.c @@ -0,0 +1,169 @@ +--- interface/oui.c.orig 1995-06-22 11:30:49.000000000 +0900 ++++ interface/oui.c 2013-11-03 22:36:39.000000000 +0900 +@@ -3,18 +3,34 @@ + ************************************************************************/ + + #include <stdio.h> ++#include <stdarg.h> + char *getenv(); + ++extern int ONEW_GETCHAR(); ++extern int ONEW_PEEKCHAR(); ++extern int ONEW_GOT_2BCHAR(); ++extern int ONEW_DISP_ROMKANMODE(); ++extern int ONEW_DISP_KANAHALVES(); ++extern int ONEW_KANAKAN(); ++extern int ONEW_DISP_KANAKANB(); ++extern int ONEW_KAKUTEI(); ++extern int ONEW_BEEP(); ++extern int ONEW_MESSAGE(); ++extern int ONEW_MESSAGE_COLS(); ++ + static FILE *ouiFp; + static int uin; + static int uilev; +-ouiTrace(prim,fmt,a,b,c,d,e,f,g) +- char *fmt; +- FILE *prim; +-{ char *logf; ++void ++ouiTrace(char *prim, char *fmt, ...) ++{ ++ va_list list; ++ char *logf; + ++ va_start(list, fmt); + if( ouiFp == NULL ){ +- if( logf = getenv("ONEW_UIFLOG") ) ++ logf = getenv("ONEW_UIFLOG"); ++ if( logf ) + ouiFp = fopen(logf,"w"); + if( ouiFp == NULL ) + ouiFp = (FILE*)-1; +@@ -23,11 +39,15 @@ + return; + fprintf(ouiFp,"%4d ",++uin); + fprintf(ouiFp,"%-16s ",prim); +- if(fmt) fprintf(ouiFp,fmt,a,b,c,d,e,f,g); ++ ++ if(fmt) vfprintf(ouiFp,fmt,list); + fprintf(ouiFp,"\n"); ++ va_end(list); + } +-Onew_ouiTrace(prim,fmt,a,b,c,d,e,f,g){ ouiTrace(prim,fmt,a,b,c,d,e,f,g); } ++void ++Onew_ouiTrace(char *prim, char *fmt, va_list ap) { ouiTrace(prim, fmt, ap); } + ++int + ouiGETCHAR() + { int ch; + +@@ -37,6 +57,7 @@ + /*if( ch == '\n' ) LASTMSG[0] = 0;*/ + return ch; + } ++int + ouiPEEKCHAR(msecp) + int *msecp; + { int ch; +@@ -47,35 +68,41 @@ + ouiTrace("PEEKCHAR","(%x)",ch); + return ch; + } ++int + ouiGOT_2BCHAR(buf,hi,lo) + char *buf; + { + ouiTrace("GOT_2BCHAR",0); + return ONEW_GOT_2BCHAR(buf,hi,lo); + } ++int + ouiDISP_ROMKANMODE(mode,help,modeflags) + char *mode,*help; + { + ouiTrace("DISP_ROMKANMODE","%-6s[%04x]",mode,modeflags); + return ONEW_DISP_ROMKANMODE(mode,help,modeflags); + } ++int + ouiDISP_KANAHALVES(str) + char *str; + { + ouiTrace("DISP_KANAHALVES","(%s)",str); + return ONEW_DISP_KANAHALVES(str); + } ++int + ouiKANAKAN(kkchar) + { + ouiTrace("KANAKAN","%x",kkchar); + return ONEW_KANAKAN(kkchar); + } ++int + ouiDISP_KANAKANB(so,left,cur,right) + char *left,*cur,*right; + { + ouiTrace("DISP_KANAKANB","%d",so); + return ONEW_DISP_KANAKANB(so,left,cur,right); + } ++int + ouiKAKUTEI(kakutei_start_char) + { + ouiTrace("KAKUTEI","%x",kakutei_start_char); +@@ -85,11 +112,13 @@ + * ONEW_KAKUTEI: returns true if the character is consumed for kakutei + */ + ++int + ouiBEEP(waitsec) + { + ouiTrace("BEEP",0); + return ONEW_BEEP(waitsec); + } ++int + ouiMESSAGE_COLS() + { int cols; + +@@ -97,29 +126,36 @@ + ouiTrace("MESSAGE_COLS","%d",cols); + return cols; + } +-ouiMESSAGE(so,fmt,a,b,c,d,e,f,g) +- char *fmt; +- char *a,*b,*c,*d,*e,*f,*g; ++int ++ouiMESSAGE(int so, char *fmt, ...) + { char msg[512]; ++ va_list list; ++ int ret; + +- sprintf(msg,fmt,a,b,c,d,e,f,g); ++ va_start(list, fmt); ++ sprintf(msg,fmt,list); + ouiTrace("MESSAGE","<%s>",msg); +- return ONEW_MESSAGE(so,fmt,a,b,c,d,e,f,g); ++ ret = ONEW_MESSAGE(so, fmt, list); ++ va_end(list); ++ ++ return (ret); + } + + + /* + * + */ +-Onew_disp_kanahalf(ch) ++void Onew_disp_kanahalves(char *); ++void ++Onew_disp_kanahalf(int ch) + { char buf[128]; + + buf[0] = ch; + buf[1] = 0; + Onew_disp_kanahalves(buf); + } +-Onew_disp_kanahalves(str) +- char *str; ++void ++Onew_disp_kanahalves(char *str) + { + if( *str == 0 ) + ouiDISP_KANAHALVES(" "); diff --git a/japanese/onew/files/patch-interface-ouimessage.c b/japanese/onew/files/patch-interface-ouimessage.c new file mode 100644 index 000000000000..d46c61ea744d --- /dev/null +++ b/japanese/onew/files/patch-interface-ouimessage.c @@ -0,0 +1,116 @@ +--- interface/ouimessage.c.orig 1994-06-04 19:37:36.000000000 +0900 ++++ interface/ouimessage.c 2013-11-03 22:34:46.000000000 +0900 +@@ -1,12 +1,14 @@ + /* + * MESSAGE OUTPUT TO APPLICATION USER INTERFACE + */ ++#include <stdio.h> ++#include <string.h> ++#include <stdarg.h> ++#include "onew.h" ++ + char *Onew_RK_smode(); + char *romkan_help(); + +-typedef char Linebuff[1024]; +-typedef char Mssgbuff[1024]; +- + static Linebuff LASTMSG; + static Linebuff LASTMODE; + static Linebuff LASTHELP; +@@ -16,8 +18,8 @@ + static int ONEW_msg_overw; + static int ONEW_msg_retain; + +-Onew_putmode(mode,help) +- char *mode,*help; ++void ++Onew_putmode(char *mode, char *help) + { int modeflags,xmodef; + char xmode[128]; + char xhelp[512]; +@@ -48,21 +50,30 @@ + } + } + +-Onew_putmsg_sys(so,fmt,a,b,c,d,e,f,g) +- char *fmt,*a,*b,*c,*d,*e,*f,*g; ++void ++Onew_putmsg_sys(int so, char *fmt, ...) + { ++ va_list list; ++ ++ va_start(list, fmt); + ONEW_msg_overw = 1; +- Onew_putmsg(so,fmt,a,b,c,d,e,f,g); ++ Onew_putmsg(so, fmt, list); ++ va_end(list); + } +-Onew_putmsg_retain(so,fmt,a,b,c,d,e,f,g) +- char *fmt,*a,*b,*c,*d,*e,*f,*g; ++void ++Onew_putmsg_retain(int so, char *fmt, ...) + { ++ va_list list; ++ ++ va_start(list, fmt); + ONEW_msg_retain = 1; +- Onew_putmsg(so,fmt,a,b,c,d,e,f,g); ++ Onew_putmsg(so, fmt, list); ++ va_end(list); + } + ++void + Onew_putmodef(mode,fmt,a,b,c,d,e,f,g) +- char *fmt,*a,*b,*c,*d,*e,*f,*g; ++ char *mode,*fmt,*a,*b,*c,*d,*e,*f,*g; + { char help[1024]; + + sprintf(help,fmt,a,b,c,d,e,f,g); +@@ -71,6 +82,7 @@ + + static Linebuff PUSHEDMODE; + static Linebuff PUSHEDHELP; ++void + Onew_pushmode(mode) + char *mode; + { +@@ -79,25 +91,28 @@ + strcpy(PUSHEDHELP,LASTHELP); + Onew_putmode(mode,""); + } ++void + Onew_popmode() + { + ONEW_modedepth--; + Onew_putmode(PUSHEDMODE,PUSHEDHELP); + } + ++void + Onew_curmsg(msg) + char *msg; + { + strcpy(LASTMSG,msg); + } +-Onew_putmsg(so,F,a,b,c,d,e,f,g) +- char *F; +- char *a,*b,*c,*d,*e,*f,*g; ++void ++Onew_putmsg(int so, char *F, ...) + { Mssgbuff tmsg,msg; + char *mp; + int maxcol = ouiMESSAGE_COLS(); ++ va_list list; + +- sprintf(tmsg,F,a,b,c,d,e,f,g); ++ va_start(list, F); ++ sprintf(tmsg,F,list); + + /* sprintf(msg,"%s%*s",so?" ":"",-maxcol,tmsg); */ + sprintf(msg,"%*s",-maxcol,tmsg); +@@ -117,4 +132,5 @@ + ouiMESSAGE(so,"%s",msg); + strcpy(LASTMSG,msg); + } ++ va_end(list); + } diff --git a/japanese/onew/files/patch-onew.h b/japanese/onew/files/patch-onew.h new file mode 100644 index 000000000000..a2be7c59f2f9 --- /dev/null +++ b/japanese/onew/files/patch-onew.h @@ -0,0 +1,35 @@ +--- onew.h.orig 1994-06-24 10:27:13.000000000 +0900 ++++ onew.h 2013-11-03 22:44:02.000000000 +0900 +@@ -21,7 +21,7 @@ + + #define LINESIZE 1024 + typedef unsigned char Uchar; +-typedef Uchar Linebuff[LINESIZE]; ++typedef char Linebuff[LINESIZE]; + typedef char Mssgbuff[LINESIZE]; + typedef char Pathname[LINESIZE]; + +@@ -272,3 +272,23 @@ + #define JVIM_RARROW 0xffffff83 + #define JVIM_HENKAN 0xffffff9f + ++int ouiGETCHAR(void); ++int ouiPEEKCHAR(int *); ++int ouiGOT_2BCHAR(char *, int, int); ++int ouiDISP_ROMKANMODE(char *, char *, int); ++int ouiDISP_KANAHALVES(char *); ++int ouiKANAKAN(int); ++int ouiDISP_KANAKANB(char *, char *, char *, char *); ++int ouiKAKUTEI(int); ++int ouiBEEP(int); ++int ouiMESSAGE_COLS(void); ++int ouiMESSAGE(int, char *, ...); ++int Onew_modef(char **, char *, char **, char *); ++void Onew_putmsg(int, char *, ...); ++void Onew_putmsg_sys(int, char *, ...); ++void Onew_putmsg_retain(int, char *, ...); ++void Onew_putmode(char *, char *); ++ ++int ONEW_getch0(int); ++ ++int oeiJisyoTouroku(int, char *, char *, char *); |