Hi, Currently canna installs formatted English manuals (generated with groff) and formatted Japanese/EUC-JP manuals (generated with jgroff).
Here's a diff that installs unformatted English manuals, unformatted Japanese/UTF-8 manuals, and formatted Japanese/EUC-JP manuals (generated with nkf+mandoc). You can view the formatted pages in kterm the same way as before: PAGER=jless LESSCHARSET=euc man -M /usr/local/man/ja_JP.EUC ... And the unformatted pages in a UTF-8 xterm with: man -M /usr/local/man/ja ... ok? Index: Makefile =================================================================== RCS file: /cvs/ports/japanese/canna/Makefile,v retrieving revision 1.39 diff -u -p -r1.39 Makefile --- Makefile 14 May 2017 19:53:58 -0000 1.39 +++ Makefile 11 Apr 2018 05:34:45 -0000 @@ -10,9 +10,9 @@ PKGNAME-main= cannalib-3.5b2 PKGNAME-dict= cannadict-3.5b2 PKGNAME-server= cannaserver-3.5b2 -REVISION-main = 5 +REVISION-main = 6 REVISION-dict = 0 -REVISION-server = 7 +REVISION-server = 8 SHARED_LIBS= RKC 1.0 \ RKC16 1.0 \ @@ -30,9 +30,6 @@ PATCH_DIST_STRIP= -p1 MAINTAINER= Marc Espie <es...@openbsd.org> -BUILD_DEPENDS= japanese/groff \ - textproc/groff - HOMEPAGE = http://www.nec.co.jp/canna/ PERMIT_PACKAGE_FTP= Yes @@ -40,6 +37,8 @@ PERMIT_PACKAGE_CDROM= No Fee MULTI_PACKAGES=-main -dict -server +BUILD_DEPENDS= japanese/nkf + PREFIX-dict= ${VARBASE}/dict LIB_DEPENDS-server= japanese/canna WANTLIB-server= c canna @@ -61,5 +60,16 @@ MAKE_FLAGS= LIBRKC_VERSION=$(LIBRKC_VERS COPTS="${COPTS}" NO_TEST= Yes + +EUCMAN = ${PREFIX}/man/ja_JP.EUC + +post-install: + ${INSTALL_DATA_DIR} ${EUCMAN}/cat1 ${EUCMAN}/cat3 + for manual in ${PREFIX}/man/ja/man1/*.1; do \ + LC_CTYPE=en_US.UTF-8 mandoc $${manual} | nkf -e > ${EUCMAN}/cat1/$$(basename $${manual} .1).0 ; \ + done + for manual in ${PREFIX}/man/ja/man3/*.3; do \ + LC_CTYPE=en_US.UTF-8 mandoc $${manual} | nkf -e > ${EUCMAN}/cat3/$$(basename $${manual} .3).0 ; \ + done .include <bsd.port.mk> Index: patches/patch-Canna_conf =================================================================== RCS file: /cvs/ports/japanese/canna/patches/patch-Canna_conf,v retrieving revision 1.4 diff -u -p -r1.4 patch-Canna_conf --- patches/patch-Canna_conf 29 Aug 2008 15:01:29 -0000 1.4 +++ patches/patch-Canna_conf 11 Apr 2018 05:34:45 -0000 @@ -1,6 +1,7 @@ $OpenBSD: patch-Canna_conf,v 1.4 2008/08/29 15:01:29 espie Exp $ ---- Canna.conf.orig Thu Nov 28 11:27:01 1996 -+++ Canna.conf Fri Aug 29 16:52:05 2008 +Index: Canna.conf +--- Canna.conf.orig ++++ Canna.conf @@ -129,19 +129,19 @@ */ @@ -78,7 +79,7 @@ $OpenBSD: patch-Canna_conf,v 1.4 2008/08 + DEPCANNALIB16 = $(CANNASRC)/libcanna16.so.$(LIBcanna16_VERSION) # else DEPCANNALIB16 = $(CANNASRC)/libcanna16.a -@@ -323,15 +328,34 @@ clean:: @@\ +@@ -323,15 +328,33 @@ clean:: @@\ #endif +#define JNeqnCmd jneqn -Tnippon @@ -101,48 +102,42 @@ $OpenBSD: patch-Canna_conf,v 1.4 2008/08 #define InstallManPageLong(file,destdir,dest) @@\ -ConvertPathName(file.tmp,file.$(MANSRCSUFF)) @@\ -install.man:: file.tmp @@\ -- MakeDir($(DESTDIR)destdir/man$(MANSUFFIX)) @@\ -- $(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(MANSUFFIX)/dest.$(MANSUFFIX) @@\ -- $(RM) file.tmp @@\ +ConvertPathName(file.jtmp,file.jmn) @@\ +ConvertPathName(file.tmp,file.man) @@\ +install.man:: file.tmp file.jtmp @@\ -+ MakeDir($(DESTDIR)destdir/ja_JP.EUC/cat$(MANSUFFIX)) @@\ -+ MakeDir($(DESTDIR)destdir/cat$(MANSUFFIX)) @@\ -+ cat file.tmp | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\ -+ $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/cat$(MANSUFFIX)/dest.0 @@\ -+ cat file.jtmp | $(JNEQN) | $(JTBL) | $(JNROFF) $(MANMACROS) | $(JCOL) > file.j0; \ @@\ -+ $(INSTALL) -c $(INSTMANFLAGS) file.j0 $(DESTDIR)destdir/ja_JP.EUC/cat$(MANSUFFIX)/dest.0 @@\ -+ $(RM) file.tmp file.jtmp file.0 file.j0 @@\ ++ MakeDir($(DESTDIR)destdir/ja/man$(MANSUFFIX)) @@\ + MakeDir($(DESTDIR)destdir/man$(MANSUFFIX)) @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(MANSUFFIX)/dest.$(MANSUFFIX) @@\ +- $(RM) file.tmp @@\ ++ nkf -w file.jtmp > file.j$(MANSUFFIX); \ @@\ ++ $(INSTALL) -c $(INSTMANFLAGS) file.j$(MANSUFFIX) $(DESTDIR)destdir/ja/man$(MANSUFFIX)/dest.$(MANSUFFIX) @@\ ++ $(RM) file.tmp file.jtmp file.j$(MANSUFFIX) @@\ clean:: @@\ - $(RM) file.tmp -+ $(RM) file.tmp file.jtmp file.0 file.j0 ++ $(RM) file.tmp file.jtmp file.j$(MANSUFFIX) #ifdef InstallManPage -@@ -345,11 +369,16 @@ InstallManPageLong(file,destdir,file) +@@ -345,11 +368,15 @@ InstallManPageLong(file,destdir,file) #endif #define InstallLibManPageLong(file,destdir,dest) @@\ -ConvertPathName(file.tmp,file.$(MANSRCSUFF)) @@\ -install.man:: file.tmp @@\ -- MakeDir($(DESTDIR)destdir/man$(LIBMANSUFFIX)) @@\ -- $(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(LIBMANSUFFIX)/dest.$(LIBMANSUFFIX) @@\ -- $(RM) file.tmp @@\ +ConvertPathName(file.jtmp,file.jmn) @@\ +ConvertPathName(file.tmp,file.man) @@\ +install.man:: file.tmp file.jtmp @@\ -+ MakeDir($(DESTDIR)destdir/ja_JP.EUC/cat$(LIBMANSUFFIX)) @@\ -+ MakeDir($(DESTDIR)destdir/cat$(LIBMANSUFFIX)) @@\ -+ cat file.tmp | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\ -+ $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/cat$(LIBMANSUFFIX)/dest.0 @@\ -+ cat file.jtmp | $(JNEQN) | $(JTBL) | $(JNROFF) $(MANMACROS) | $(JCOL) > file.j0; \ @@\ -+ $(INSTALL) -c $(INSTMANFLAGS) file.j0 $(DESTDIR)destdir/ja_JP.EUC/cat$(LIBMANSUFFIX)/dest.0 @@\ -+ $(RM) file.tmp file.jtmp file.0 file.j0 @@\ ++ MakeDir($(DESTDIR)destdir/ja/man$(LIBMANSUFFIX)) @@\ + MakeDir($(DESTDIR)destdir/man$(LIBMANSUFFIX)) @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.tmp $(DESTDIR)destdir/man$(LIBMANSUFFIX)/dest.$(LIBMANSUFFIX) @@\ +- $(RM) file.tmp @@\ ++ nkf -w file.jtmp > file.j$(LIBMANSUFFIX); \ @@\ ++ $(INSTALL) -c $(INSTMANFLAGS) file.j$(LIBMANSUFFIX) $(DESTDIR)destdir/ja/man$(LIBMANSUFFIX)/dest.$(LIBMANSUFFIX) @@\ ++ $(RM) file.tmp file.jtmp file.j$(LIBMANSUFFIX) @@\ clean:: @@\ - $(RM) file.tmp -+ $(RM) file.tmp file.jtmp file.0 file.j0 ++ $(RM) file.tmp file.jtmp file.j$(LIBMANSUFFIX) #ifdef InstallLibManPage -@@ -364,11 +393,14 @@ InstallLibManPageLong(file,destdir,file) +@@ -364,11 +391,14 @@ InstallLibManPageLong(file,destdir,file) #define InstallLibManPageAliases(file,destdir,aliases) @@\ install.man:: @@\ - @(TMP=/tmp/tmp.$$$$; \ @@\ @@ -152,19 +147,19 @@ $OpenBSD: patch-Canna_conf,v 1.4 2008/08 - $(INSTALL) -c $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/man$(LIBMANSUFFIX)/$$i.$(LIBMANSUFFIX)); \ @@\ - done; \ @@\ - $(RM) $${TMP}) -+ cd $(DESTDIR)/destdir/cat$(LIBMANSUFFIX); \ @@\ ++ cd $(DESTDIR)/destdir/man$(LIBMANSUFFIX); \ @@\ + for i in aliases; do \ @@\ -+ $(RM) $$i.0; \ @@\ -+ $(LN) file.0 $$i.0; \ @@\ ++ $(RM) $$i.$(LIBMANSUFFIX); \ @@\ ++ $(LN) file.$(LIBMANSUFFIX) $$i.$(LIBMANSUFFIX); \ @@\ + done; \ @@\ -+ cd $(DESTDIR)/destdir/ja_JP.EUC/cat$(LIBMANSUFFIX); \ @@\ ++ cd $(DESTDIR)/destdir/ja/man$(LIBMANSUFFIX); \ @@\ + for i in aliases; do \ @@\ -+ $(RM) $$i.0; \ @@\ -+ $(LN) file.0 $$i.0; \ @@\ ++ $(RM) $$i.$(LIBMANSUFFIX); \ @@\ ++ $(LN) file.$(LIBMANSUFFIX) $$i.$(LIBMANSUFFIX); \ @@\ + done #ifndef MakeDirectoriesLong #define MakeDirectoriesLong(step,dirs,owner,group) @@\ -@@ -456,2 +488,11 @@ dst:: Canna.conf @@\ +@@ -456,2 +486,11 @@ dst:: Canna.conf @@\ echo "#endif") > $@ #endif + Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/japanese/canna/pkg/PLIST-main,v retrieving revision 1.2 diff -u -p -r1.2 PLIST-main --- pkg/PLIST-main 19 Mar 2015 20:25:26 -0000 1.2 +++ pkg/PLIST-main 11 Apr 2018 05:34:45 -0000 @@ -63,48 +63,90 @@ lib/sample/tut.canna lib/sample/unix.canna lib/sample/vje.canna lib/sample/wx2+.canna -@man man/cat3/RkCloseRoma.0 -@man man/cat3/RkCvtEuc.0 -@man man/cat3/RkCvtHan.0 -@man man/cat3/RkCvtHira.0 -@man man/cat3/RkCvtKana.0 -@man man/cat3/RkCvtRoma.0 -@man man/cat3/RkCvtZen.0 -@man man/cat3/RkDefineDic.0 -@man man/cat3/RkDeleteDic.0 -@man man/cat3/RkEndBun.0 -@man man/cat3/RkEnlarge.0 -@man man/cat3/RkFinalize.0 -@man man/cat3/RkGetDicList.0 -@man man/cat3/RkGetKanji.0 -@man man/cat3/RkGetLex.0 -@man man/cat3/RkGetStat.0 -@man man/cat3/RkGetYomi.0 -@man man/cat3/RkGoto.0 -@man man/cat3/RkInitialize.0 -@man man/cat3/RkIntro.0 -@man man/cat3/RkLeft.0 -@man man/cat3/RkMapPhonogram.0 -@man man/cat3/RkMapRoma.0 -@man man/cat3/RkMountD.0 -@man man/cat3/RkNext.0 -@man man/cat3/RkNfer.0 -@man man/cat3/RkOpenRoma.0 -@man man/cat3/RkPrev.0 -@man man/cat3/RkRemountDic.0 -@man man/cat3/RkResize.0 -@man man/cat3/RkRgnBun.0 -@man man/cat3/RkRight.0 -@man man/cat3/RkShorten.0 -@man man/cat3/RkStoreYomi.0 -@man man/cat3/RkUnmountDic.0 -@man man/cat3/RkXfer.0 -@man man/cat3/XKanjiControl.0 -@man man/cat3/XLookupKanjiString.0 -@man man/cat3/cannalib.0 -@man man/cat3/jrKanjiControl.0 -@man man/cat3/jrKanjiString.0 -@man man/cat3/uilib.0 +@man man/man3/RkCloseRoma.3 +@man man/man3/RkCvtEuc.3 +@man man/man3/RkCvtHan.3 +@man man/man3/RkCvtHira.3 +@man man/man3/RkCvtKana.3 +@man man/man3/RkCvtRoma.3 +@man man/man3/RkCvtZen.3 +@man man/man3/RkDefineDic.3 +@man man/man3/RkDeleteDic.3 +@man man/man3/RkEndBun.3 +@man man/man3/RkEnlarge.3 +@man man/man3/RkFinalize.3 +@man man/man3/RkGetDicList.3 +@man man/man3/RkGetKanji.3 +@man man/man3/RkGetLex.3 +@man man/man3/RkGetStat.3 +@man man/man3/RkGetYomi.3 +@man man/man3/RkGoto.3 +@man man/man3/RkInitialize.3 +@man man/man3/RkIntro.3 +@man man/man3/RkLeft.3 +@man man/man3/RkMapPhonogram.3 +@man man/man3/RkMapRoma.3 +@man man/man3/RkMountD.3 +@man man/man3/RkNext.3 +@man man/man3/RkNfer.3 +@man man/man3/RkOpenRoma.3 +@man man/man3/RkPrev.3 +@man man/man3/RkRemountDic.3 +@man man/man3/RkResize.3 +@man man/man3/RkRgnBun.3 +@man man/man3/RkRight.3 +@man man/man3/RkShorten.3 +@man man/man3/RkStoreYomi.3 +@man man/man3/RkUnmountDic.3 +@man man/man3/RkXfer.3 +@man man/man3/XKanjiControl.3 +@man man/man3/XLookupKanjiString.3 +@man man/man3/cannalib.3 +@man man/man3/jrKanjiControl.3 +@man man/man3/jrKanjiString.3 +@man man/man3/uilib.3 +@man man/ja/man3/RkCloseRoma.3 +@man man/ja/man3/RkCvtEuc.3 +@man man/ja/man3/RkCvtHan.3 +@man man/ja/man3/RkCvtHira.3 +@man man/ja/man3/RkCvtKana.3 +@man man/ja/man3/RkCvtRoma.3 +@man man/ja/man3/RkCvtZen.3 +@man man/ja/man3/RkDefineDic.3 +@man man/ja/man3/RkDeleteDic.3 +@man man/ja/man3/RkEndBun.3 +@man man/ja/man3/RkEnlarge.3 +@man man/ja/man3/RkFinalize.3 +@man man/ja/man3/RkGetDicList.3 +@man man/ja/man3/RkGetKanji.3 +@man man/ja/man3/RkGetLex.3 +@man man/ja/man3/RkGetStat.3 +@man man/ja/man3/RkGetYomi.3 +@man man/ja/man3/RkGoto.3 +@man man/ja/man3/RkInitialize.3 +@man man/ja/man3/RkIntro.3 +@man man/ja/man3/RkLeft.3 +@man man/ja/man3/RkMapPhonogram.3 +@man man/ja/man3/RkMapRoma.3 +@man man/ja/man3/RkMountD.3 +@man man/ja/man3/RkNext.3 +@man man/ja/man3/RkNfer.3 +@man man/ja/man3/RkOpenRoma.3 +@man man/ja/man3/RkPrev.3 +@man man/ja/man3/RkRemountDic.3 +@man man/ja/man3/RkResize.3 +@man man/ja/man3/RkRgnBun.3 +@man man/ja/man3/RkRight.3 +@man man/ja/man3/RkShorten.3 +@man man/ja/man3/RkStoreYomi.3 +@man man/ja/man3/RkUnmountDic.3 +@man man/ja/man3/RkXfer.3 +@man man/ja/man3/XKanjiControl.3 +@man man/ja/man3/XLookupKanjiString.3 +@man man/ja/man3/cannalib.3 +@man man/ja/man3/jrKanjiControl.3 +@man man/ja/man3/jrKanjiString.3 +@man man/ja/man3/uilib.3 @man man/ja_JP.EUC/cat3/RkCloseRoma.0 @man man/ja_JP.EUC/cat3/RkCvtEuc.0 @man man/ja_JP.EUC/cat3/RkCvtHan.0 Index: pkg/PLIST-server =================================================================== RCS file: /cvs/ports/japanese/canna/pkg/PLIST-server,v retrieving revision 1.5 diff -u -p -r1.5 PLIST-server --- pkg/PLIST-server 19 Mar 2015 20:25:26 -0000 1.5 +++ pkg/PLIST-server 11 Apr 2018 05:34:45 -0000 @@ -36,27 +36,48 @@ bin/rmdic @bin bin/splitword bin/syncdic @bin bin/wtoc -@man man/cat1/addwords.0 -@man man/cat1/cannacheck.0 -@man man/cat1/cannakill.0 -@man man/cat1/cannaserver.0 -@man man/cat1/cannastat.0 -@man man/cat1/catdic.0 -@man man/cat1/cpdic.0 -@man man/cat1/cshost.0 -@man man/cat1/ctow.0 -@man man/cat1/delwords.0 -@man man/cat1/dicar.0 -@man man/cat1/dpbindic.0 -@man man/cat1/dpromdic.0 -@man man/cat1/lsdic.0 -@man man/cat1/mkbindic.0 -@man man/cat1/mkdic.0 -@man man/cat1/mkromdic.0 -@man man/cat1/mvdic.0 -@man man/cat1/rmdic.0 -@man man/cat1/splitword.0 -@man man/cat1/wtoc.0 +@man man/man1/addwords.1 +@man man/man1/cannacheck.1 +@man man/man1/cannakill.1 +@man man/man1/cannaserver.1 +@man man/man1/cannastat.1 +@man man/man1/catdic.1 +@man man/man1/cpdic.1 +@man man/man1/cshost.1 +@man man/man1/ctow.1 +@man man/man1/delwords.1 +@man man/man1/dicar.1 +@man man/man1/dpbindic.1 +@man man/man1/dpromdic.1 +@man man/man1/lsdic.1 +@man man/man1/mkbindic.1 +@man man/man1/mkdic.1 +@man man/man1/mkromdic.1 +@man man/man1/mvdic.1 +@man man/man1/rmdic.1 +@man man/man1/splitword.1 +@man man/man1/wtoc.1 +@man man/ja/man1/addwords.1 +@man man/ja/man1/cannacheck.1 +@man man/ja/man1/cannakill.1 +@man man/ja/man1/cannaserver.1 +@man man/ja/man1/cannastat.1 +@man man/ja/man1/catdic.1 +@man man/ja/man1/cpdic.1 +@man man/ja/man1/cshost.1 +@man man/ja/man1/ctow.1 +@man man/ja/man1/delwords.1 +@man man/ja/man1/dicar.1 +@man man/ja/man1/dpbindic.1 +@man man/ja/man1/dpromdic.1 +@man man/ja/man1/lsdic.1 +@man man/ja/man1/mkbindic.1 +@man man/ja/man1/mkdic.1 +@man man/ja/man1/mkromdic.1 +@man man/ja/man1/mvdic.1 +@man man/ja/man1/rmdic.1 +@man man/ja/man1/splitword.1 +@man man/ja/man1/wtoc.1 @man man/ja_JP.EUC/cat1/addwords.0 @man man/ja_JP.EUC/cat1/cannacheck.0 @man man/ja_JP.EUC/cat1/cannakill.0