From a0f41bae3e826fcf0cb939df7722a0ac8b9c8ec2 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 28 Feb 2005 01:22:25 +0000 Subject: [PATCH] update to a much more recent version that can handle utf8 as well. --- japanese/nkf/Makefile | 32 +++------ japanese/nkf/distinfo | 8 +-- japanese/nkf/files/Makefile | 3 - japanese/nkf/files/nkf.1 | 131 ------------------------------------ japanese/nkf/pkg/PLIST | 3 +- 5 files changed, 15 insertions(+), 162 deletions(-) delete mode 100644 japanese/nkf/files/Makefile delete mode 100644 japanese/nkf/files/nkf.1 diff --git a/japanese/nkf/Makefile b/japanese/nkf/Makefile index 5bff69d73f8..47dbf8b20bb 100644 --- a/japanese/nkf/Makefile +++ b/japanese/nkf/Makefile @@ -1,18 +1,16 @@ -# very loosely based on FreeBSD 2.2.7 -# $OpenBSD: Makefile,v 1.14 2005/02/22 13:52:25 alek Exp $ +# $OpenBSD: Makefile,v 1.15 2005/02/28 01:22:25 espie Exp $ NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} COMMENT= "Network Kanji code conversion Filter" -VERSION= 1.92 -DISTNAME= nkf-${VERSION} +VERSION= 2.04 +DISTNAME= nkf204 PKGNAME= ja-nkf-${VERSION} CATEGORIES= japanese textproc -DISTFILES= nkf192.shar -HOMEPAGE= http://www.ie.u-ryukyu.ac.jp/~kono/nkf/ -MASTER_SITES= http://www.ie.u-ryukyu.ac.jp/~kono/nkf/dist/ +HOMEPAGE= http://www01.tcp-ip.or.jp/~furukawa/nkf_utf8/ +MASTER_SITES= ${HOMEPAGE} MAINTAINER= Marc Espie @@ -23,24 +21,14 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes WANTLIB= c -WRKDIST=${WRKDIR} -WRKSRC=${WRKDIR}/NKF +WRKSRC= ${WRKDIST}/NKF.mod +CONFIGURE_STYLE= perl -CONFIGURE_STYLE=perl +post-build: + cd ${WRKDIST} && ${CC} -o nkf ${CFLAGS} nkf.c utf8tbl.c -pre-extract: - @mkdir -p ${WRKSRC} - -pre-build: - cd ${WRKDIST} && ${CC} ${CFLAGS} -o nkf nkf.c - -# original english man page was rather difficult to follow -post-install: +post-install: ${INSTALL_PROGRAM} ${WRKDIST}/nkf ${PREFIX}/bin ${INSTALL_MAN} ${WRKDIST}/nkf.1 ${PREFIX}/man/man1 - ${INSTALL_MAN} ${WRKDIST}/nkf.doc ${PREFIX}/man/ja_JP.EUC/cat1/nkf.0 - -do-regress: - cd ${WRKSRC} && perl nkf_test.pl .include diff --git a/japanese/nkf/distinfo b/japanese/nkf/distinfo index 9d0501d8f6a..8f2b835049a 100644 --- a/japanese/nkf/distinfo +++ b/japanese/nkf/distinfo @@ -1,4 +1,4 @@ -MD5 (nkf192.shar) = 2e560387657d5d7c725875e548394b0f -RMD160 (nkf192.shar) = 6fb282a664dfc2ad0a35d75baa320916d56c5742 -SHA1 (nkf192.shar) = a5d80bfd821a5358ac7c3830eb40f28ac2441f40 -SIZE (nkf192.shar) = 126349 +MD5 (nkf204.tar.gz) = e1e0624a81dbc8a6f4516307704f5f8a +RMD160 (nkf204.tar.gz) = a5a83c0957d8d7cf59691ac0df6b170c91d11bb5 +SHA1 (nkf204.tar.gz) = fec166bdb30ac6d9b7272776b56648ed14fb6eac +SIZE (nkf204.tar.gz) = 107085 diff --git a/japanese/nkf/files/Makefile b/japanese/nkf/files/Makefile deleted file mode 100644 index 20eeabfcf42..00000000000 --- a/japanese/nkf/files/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# stub Makefile for nkf - -nkf: nkf.c diff --git a/japanese/nkf/files/nkf.1 b/japanese/nkf/files/nkf.1 deleted file mode 100644 index 2ff3074187b..00000000000 --- a/japanese/nkf/files/nkf.1 +++ /dev/null @@ -1,131 +0,0 @@ -.\" -.Dd August 20, 1996 -.Dt NKF 1 -.Sh NAME -.Nm nkf -.Nd Network Kanji code conversion Filter v1.6.2 -.Sh SYNOPSIS -.Nm nkf -.Op Fl blrtTuvxXZ -.Op Fl ejs -.Op Fl BEJS -.Op Fl m Op Ar BQ -.Op Fl f Ar n -.Op Fl io Ar c -.Sh DESCRIPTION -.Nm Nkf -is yet another kanji encoding converter between networks, hosts and terminals. -It converts any input kanji encoding to a designated kanji encoding, -such as 7-bit JIS, MS-kanji (shifted-JIS) or EUC. -.Pp -One of the most unique features of -.Nm nkf -is the guess of the input kanji encoding. -It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS) and EUC -automatically, so users don't need to know the kanji encoding used for input. - -By default X0201 kana is converted into X0208 kana. For -X0201 kana, SO/SI, SSO and -ESC-(-I methods are supported. For automatic encoding detection, -.Nm nkf -assumes no X0201 kana in MS-Kanji. To accept X0201 in MS-Kanji, use -.Fl X , -.Fl x -or -.Fl S . -.Pp -The following options are available: -.Bl -tag -width indent -.It Fl b -buffered output (default). -.It Fl u -unbuffered output. -.It Fl t -no operation. -.It Fl j -output 7-bit JIS code (default). -.It Fl s -output MS-kanji (shifted-JIS) code. -.It Fl e -output EUC (AT&T) code. -.It Fl i Ar c -output an -ESC $ -.Ar c -sequence to designate JIS-kanji -(Default is B). -.It Fl o Ar c -output an -ESC ( -.Ar c -sequence to designate single-byte roman characters -(Default is B). -.It Fl r -{de/en}crypt ROT13/47. -.It Fl v -display Version. -.It Fl T -Text mode output (MS-DOS). -.It Fl m -MIME ISO-2022-JP/ISO8859-1 decoding. To see ISO8859-1 (Latin-1) -.Fl l -is necessary. -.It Fl m Ar B -Decode MIME base64 encoded stream. Remove header or other parts before -conversion. -.It Fl m Ar Q -Decode MIME quoted stream. '_' inside quotes is converted to space. -.It Fl l -Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP. -.Fl s , -.Fl e and -.Fl x -are not compatible with this option. -.It Fl f Ar n -Folding on length -.Ar n -in a line (default 60). -.It Fl X -Allow X0201 kana in MS-Kanji. -X0201 is converted into X0208 by default. -.It Fl x -Try to preseve X0208 kana. -Assume X0201 kana in MS-Kanji. And -do not convert X0201 kana to X0208. -In JIS output, ESC-(-I is used. In EUC output, SSO is used. -.It Fl Z -Convert X0208 alphabet to ASCII. -.It Fl S -Assume MS-Kanji and X0201 kana input. It also accepts JIS. -AT&T EUC is recognized as X0201 kana. Without the -.Fl x -flag, X0201 kana is converted into X0208. -.It Fl J -Assume JIS input. It also accepts Japanese EUC. -This is the default. This flag does not exclude MS-Kanji. -.It Fl E -Assume AT&T EUC input. It also accept JIS. -Same as -.Fl J , -present for symetry. -.It Fl B -Assume broken JIS-Kanji, where ESC has been lost. Useful when your site is -using old B-News Nihongo patch. -.El -.Sh AUTHOR -Itaru Ichikawa -.Sh EDITOR -a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe) -.Pp -kono@ie.u-ryukyu.ac.jp (Shinji KONO) -.Sh SEE ALSO -.%T "Understanding Japanese information processing" -by Ken Lunde (O'Reilly associates) -for a comprehensive description of japanese text encoding systems. -.Sh BUGS -.Nm Nkf -cannot handle some inputs that contain mixed kanji encoding. -.Pp -Automatic code detection -becomes very weak with \-x, \-X and \-S. - diff --git a/japanese/nkf/pkg/PLIST b/japanese/nkf/pkg/PLIST index d4bf06c8459..8576f198592 100644 --- a/japanese/nkf/pkg/PLIST +++ b/japanese/nkf/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.5 2004/09/15 00:56:29 espie Exp $ +@comment $OpenBSD: PLIST,v 1.6 2005/02/28 01:22:25 espie Exp $ bin/nkf ${P5ARCH}/ ${P5ARCH}/NKF.pm @@ -6,6 +6,5 @@ ${P5ARCH}/auto/ ${P5ARCH}/auto/NKF/ ${P5ARCH}/auto/NKF/NKF.bs ${P5ARCH}/auto/NKF/NKF.so -@man man/ja_JP.EUC/cat1/nkf.0 @man man/man1/nkf.1 @man man/man3p/NKF.3p