# New ports collection makefile for:	chinese/libiconv
# Date created:				Sep 07 2004
# Whom:					Rong-En Fan <rafan@infor.org>
#
# $FreeBSD$
#

CATEGORIES=	chinese

MAINTAINER=	rafan@infor.org
COMMENT=	Replace Big5 table with Big5-2003 in libiconv

MASTERDIR=	${.CURDIR}/../../converters/libiconv

PATCH_SITES+=	http://www.csie.ntu.edu.tw/~r92030/project/big5/
PATCHFILES+=	big5uni.txt \
		patch-tools-cjk_tab_to_h.c

CONFLICTS=	libiconv-*

MD5_FILE=	${.CURDIR}/distinfo

PKGCATEGORY=	chinese

pre-build:
	@cd ${WRKSRC}/tools && make cjk_tab_to_h
	@${WRKSRC}/tools/cjk_tab_to_h BIG5 big5 < \
		${DISTDIR}/big5uni.txt | \
		${SED} -e 's/f9fa/f9dd/; s/f9fb/f9df/; s/f9fc/f9e3/; s/f9fd/f9e5/' > ${WRKSRC}/lib/big5.h

.include "${MASTERDIR}/Makefile"
