Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2007 11:37:53 GMT
From:      Wei-Hao Syu <whsyu@ntu.edu.tw>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/118481: big5-2003 in libiconv
Message-ID:  <200712071137.lB7Bbrmw046411@www.freebsd.org>
Resent-Message-ID: <200712071140.lB7Be1Px021823@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118481
>Category:       ports
>Synopsis:       big5-2003 in libiconv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 07 11:40:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Wei-Hao Syu
>Release:        7.0
>Organization:
>Environment:
FreeBSD harmony.tpe.arcadyan.com.tw 7.0-BETA4 FreeBSD 7.0-BETA4 #16: Wed Dec  5 12:31:33 CST 2007     root@harmony.tpe.arcadyan.com.tw:/usr/obj/usr/src/sys/ARCADYAN  amd64
>Description:
The default big5 encoding in converters/libiconv is big5-1984, this patch adds an option to set default big5 encoding to big5-2003
>How-To-Repeat:

>Fix:
apply this patch to Makefile.

--- Makefile.orig       2007-12-06 16:34:29.000000000 +0800
+++ Makefile    2007-12-06 18:34:18.000000000 +0800
@@ -29,8 +29,8 @@
 MAN3=          iconv.3 iconv_open.3 iconv_close.3 iconvctl.3
 
 OPTIONS=       EXTRA_ENCODINGS "Include extra character sets" on \
-               EXTRA_PATCHES   "Apply patches to fix CP932 add EUCJP-MS" off
-
+               EXTRA_PATCHES   "Apply patches to fix CP932 add EUCJP-MS" off \
+               BIG5_2003       "BIG5-2003 as default BIG5 encoding" off
 .ifdef USE_ICONV
 .error USE_ICONV is defined as an environment variable, or in the arguments \
        to "make".  Please unset it and restart the build.
@@ -53,4 +53,17 @@
 post-patch:
        @${REINPLACE_CMD} -e 's:ei_ksc5601:ei_euc_kr:g' ${WRKSRC}/lib/aliases.h
 
+.if defined(WITH_BIG5_2003)
+       @${REINPLACE_CMD} -e 's: big5_mbtowc: big5_2003_mbtowc:g' \
+                         -e 's: big5_wctomb: big5_2003_wctomb:g' \
+                         ${WRKSRC}/lib/ces_big5.h
+
+       @${REINPLACE_CMD} -e '/ces_big5.h/p'    \
+                         -e '/big5_2003.h/ s:^://:g'   \
+                         ${WRKSRC}/lib/converters.h
+
+       @${REINPLACE_CMD} -e '1,/ces_big5.h/ s:ces_big5.h:big5_2003.h:g' \
+                         ${WRKSRC}/lib/converters.h
+.endif
+
 .include <bsd.port.post.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712071137.lB7Bbrmw046411>