diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2001-01-16 18:27:26 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2001-01-16 18:27:26 +0000 |
commit | 6bec4838d31ffd2c7cc740a720079d622ae9c63c (patch) | |
tree | 02cdfe86d3cd1973cabc92e5afeac65a80e3a59d | |
parent | Massive style enforcement - use ^I instead of spaces for variables identation. (diff) |
Add ja-libconv, Japanese charset conversion library powered by iconv(3).
Notes
Notes:
svn path=/head/; revision=37253
-rw-r--r-- | japanese/Makefile | 1 | ||||
-rw-r--r-- | japanese/libjconv/Makefile | 28 | ||||
-rw-r--r-- | japanese/libjconv/distinfo | 1 | ||||
-rw-r--r-- | japanese/libjconv/files/Makefile | 13 | ||||
-rw-r--r-- | japanese/libjconv/files/Makefile.lib | 34 | ||||
-rw-r--r-- | japanese/libjconv/files/Makefile.prog | 12 | ||||
-rw-r--r-- | japanese/libjconv/files/patch-conv.c | 24 | ||||
-rw-r--r-- | japanese/libjconv/files/patch-info.c | 11 | ||||
-rw-r--r-- | japanese/libjconv/pkg-comment | 1 | ||||
-rw-r--r-- | japanese/libjconv/pkg-descr | 1 | ||||
-rw-r--r-- | japanese/libjconv/pkg-plist | 7 |
11 files changed, 133 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile index 1d94730a27a2..658619c5a221 100644 --- a/japanese/Makefile +++ b/japanese/Makefile @@ -140,6 +140,7 @@ SUBDIR += libicq SUBDIR += libimg SUBDIR += libjcode + SUBDIR += libjconv SUBDIR += libslang SUBDIR += linux-netscape47-communicator SUBDIR += linux-netscape47-navigator diff --git a/japanese/libjconv/Makefile b/japanese/libjconv/Makefile new file mode 100644 index 000000000000..f625e64469e3 --- /dev/null +++ b/japanese/libjconv/Makefile @@ -0,0 +1,28 @@ +# New ports collection makefile for: libjconv +# Date created: 12 Jan 2001 +# Whom: Akinori MUSHA aka knu <knu@idaemons.org> +# +# $FreeBSD$ +# + +PORTNAME= libjconv +PORTVERSION= 2.8 +CATEGORIES= japanese +MASTER_SITES= ftp://ftp.rpmlinux.com/kondara/%SUBDIR%/ \ + ftp://ftp.jp.psi.net/pub/Linux/kondara/%SUBDIR%/ \ + ftp://ftp.kddlabs.co.jp/Linux/packages/Kondara/pub/Kondara/%SUBDIR%/ \ + ftp://mirror.nucba.ac.jp/mirror/Kondara/%SUBDIR%/ \ + ftp://ftp.riken.go.jp/pub/Linux/kondara/%SUBDIR%/ +MASTER_SITE_SUBDIR= Jirai/SOURCES + +MAINTAINER= knu@FreeBSD.org + +INSTALLS_SHLIB= yes + +post-patch: + ${PERL} -i -pe 's,!!LOCALBASE!!,${LOCALBASE},' ${WRKSRC}/info.c + +post-extract: + ${CP} ${FILESDIR}/Makefile* ${WRKSRC}/ + +.include <bsd.port.mk> diff --git a/japanese/libjconv/distinfo b/japanese/libjconv/distinfo new file mode 100644 index 000000000000..fc080ca2f361 --- /dev/null +++ b/japanese/libjconv/distinfo @@ -0,0 +1 @@ +MD5 (libjconv-2.8.tar.gz) = 90eece28538e44d6bea3c48decbbc6c2 diff --git a/japanese/libjconv/files/Makefile b/japanese/libjconv/files/Makefile new file mode 100644 index 000000000000..388949b9624d --- /dev/null +++ b/japanese/libjconv/files/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +all: + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.lib + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.prog + +install: + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.lib install + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.prog install + +clean: + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.lib clean + ${MAKE} LOCALBASE=${LOCALBASE} -f Makefile.prog clean diff --git a/japanese/libjconv/files/Makefile.lib b/japanese/libjconv/files/Makefile.lib new file mode 100644 index 000000000000..72d3557e6188 --- /dev/null +++ b/japanese/libjconv/files/Makefile.lib @@ -0,0 +1,34 @@ +# $FreeBSD$ + +LIB= jconv +SHLIB_MAJOR?= 0 +SHLIB_MINOR?= 0 +CFLAGS+= -Wall -I${LOCALBASE}/include -DLOCALBASE=${LOCALBASE} +LDADD= -liconv -L${LOCALBASE}/lib +SRCS= conv.c info.c compat.c +INCS= jconv.h +NOMAN= YES +LIBDIR= ${LOCALBASE}/lib +INCDIR= ${LOCALBASE}/include +ETCDIR= ${LOCALBASE}/etc + +.include <bsd.lib.mk> + +# For FreeBSD 3.x or older +.if !target(_includeinstall) +_includeinstall: +.if defined(INCS) +.for header in ${INCS} + cd ${.CURDIR} && \ + ${INSTALL} -C -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \ + ${header} ${DESTDIR}${INCDIR} + +.endfor +.endif + +beforeinstall: _includeinstall +.endif + +afterinstall: + mkdir -p ${DESTDIR}/${ETCDIR}/libjconv + ${INSTALL} -C default.conf ${DESTDIR}/${ETCDIR}/libjconv/ diff --git a/japanese/libjconv/files/Makefile.prog b/japanese/libjconv/files/Makefile.prog new file mode 100644 index 000000000000..023771d670b8 --- /dev/null +++ b/japanese/libjconv/files/Makefile.prog @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LOCALBASE?= /usr/local + +PROG= jconv +SRCS= jconv.c +CFLAGS+= -I${LOCALBASE}/include +LDADD= -L${.CURDIR} -ljconv +NOMAN= YES +BINDIR= ${LOCALBASE}/bin + +.include <bsd.prog.mk> diff --git a/japanese/libjconv/files/patch-conv.c b/japanese/libjconv/files/patch-conv.c new file mode 100644 index 000000000000..ab5b6c041641 --- /dev/null +++ b/japanese/libjconv/files/patch-conv.c @@ -0,0 +1,24 @@ +--- conv.c.orig Sat Aug 5 05:52:38 2000 ++++ conv.c Fri Jan 12 02:31:33 2001 +@@ -130,11 +130,19 @@ + *dest_r = NULL; + *dest_len_r = 0; + *actual_codeset_r = num_src_codesets; ++ ++ if (strcasecmp(dest_codeset, "SJIS") == 0) ++ dest_codeset = "Shift_JIS"; + + for (i = 0; i < num_src_codesets; i++) { + iconv_t cd; +- DEBUG_DO(printf("jconv_alloc_conv: try %s\n", src_codesets[i])); +- cd = iconv_open(dest_codeset, src_codesets[i]); ++ const char *src_codeset = src_codesets[i]; ++ ++ if (strcasecmp(src_codeset, "SJIS") == 0) ++ src_codeset = "Shift_JIS"; ++ ++ DEBUG_DO(printf("jconv_alloc_conv: try %s\n", src_codeset)); ++ cd = iconv_open(dest_codeset, src_codeset); + if (cd == (iconv_t)-1) { + /* EMFILE, ENFILE, ENOMEM, or EINVAL */ + error_code = errno; diff --git a/japanese/libjconv/files/patch-info.c b/japanese/libjconv/files/patch-info.c new file mode 100644 index 000000000000..f4a6c2c829d3 --- /dev/null +++ b/japanese/libjconv/files/patch-info.c @@ -0,0 +1,11 @@ +--- info.c.orig Sat Aug 5 05:52:38 2000 ++++ info.c Fri Jan 12 02:12:40 2001 +@@ -13,7 +13,7 @@ + + #define DEBUG_DO(x) + +-#define JCONV_DEFAULT_CONFFILE "/etc/libjconv/default.conf" ++#define JCONV_DEFAULT_CONFFILE "!!LOCALBASE!!/etc/libjconv/default.conf" + + typedef struct { + char *name; diff --git a/japanese/libjconv/pkg-comment b/japanese/libjconv/pkg-comment new file mode 100644 index 000000000000..5677d3a7fb63 --- /dev/null +++ b/japanese/libjconv/pkg-comment @@ -0,0 +1 @@ +Japanese charset conversion library powered by iconv(3) diff --git a/japanese/libjconv/pkg-descr b/japanese/libjconv/pkg-descr new file mode 100644 index 000000000000..0bca7b9b530d --- /dev/null +++ b/japanese/libjconv/pkg-descr @@ -0,0 +1 @@ +This is a Japanese charset conversion library powered by iconv(3). diff --git a/japanese/libjconv/pkg-plist b/japanese/libjconv/pkg-plist new file mode 100644 index 000000000000..5aa0e4fdb0d3 --- /dev/null +++ b/japanese/libjconv/pkg-plist @@ -0,0 +1,7 @@ +bin/jconv +include/jconv.h +lib/libjconv.a +lib/libjconv.so +lib/libjconv.so.0 +etc/libjconv/default.conf +@dirrm etc/libjconv |