Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Apr 2004 16:03:58 +0800
From:      Hung-Te Lin <piaip@csie.ntu.edu.tw>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/65062: Update port: chinese/mldonkey-core for broken LC_CTYPE support
Message-ID:  <20040402080358.GA24562@ntucsa.csie.ntu.edu.tw>
Resent-Message-ID: <200404020810.i328A3S5085179@freefall.freebsd.org>

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

>Number:         65062
>Category:       ports
>Synopsis:       Update port: chinese/mldonkey-core for broken LC_CTYPE support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 02 00:10:03 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Hung-Te Lin
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Communication & Multimedia Lab, NTU, Taiwan
>Environment:
System: FreeBSD cml4.csie.ntu.edu.tw 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Mar 12 04:59:55 CST 2004 root@cml4.csie.ntu.edu.tw:/usr/obj/usr/src/sys/cml4 i386
>Description:
Update port: chinese/mldonkey-core for upgrading for broken LC_CTYPE

1 file (files/wrapper-prefix) is added in this patch.

This is often seen by people with LC_CTYPE=zh_TW.Big5, then they'll
have every DBCS characters showing in \xxx format (aka. escaped).
According to OCAML FAQ/Mailing list, this is painful by OCAML so
people wrote some 'stub' loaders to overcome some locale problems
like LC_NUMERIC. Focused on mldonkey, we have only to specify
LC_CTYPE so we're not touching/rebuilding the whole OCAML but to
prefix the loader (mlnet shell script) to use working LC_CTYPE.
>How-To-Repeat:
env LC_CTYPE=zh_TW.Big5 mlnet &
go download some DBCS (eg, Big5) files
and then vr, vd (view search result, download).
>Fix:
diff -Nur mldonkey-core.orig/Makefile mldonkey-core/Makefile
--- mldonkey-core.orig/Makefile	Thu Mar 11 11:34:44 2004
+++ mldonkey-core/Makefile	Fri Apr  2 16:02:31 2004
@@ -17,6 +17,16 @@
 MASTERDIR=	${.CURDIR}/../../net/mldonkey
 EXTRA_PATCHES=	${.CURDIR}/files/patch-driverControlers.ml
 
+WRAPPERPREFIX=  ${.CURDIR}/files/wrapper-prefix
+WRAPPER= 	${WRKDIR}/wrapper.sh
+
+# build our own wrapper script
+post-patch-script:
+	@${MV} -f ${WRAPPER} ${WRAPPER}.orig
+	@${CAT} ${WRAPPERPREFIX} ${WRAPPER}.orig > ${WRAPPER}
+
 .include "${MASTERDIR}/Makefile"
 
+# I know this will lead portlint to fail,
+# but we have to do so.
 PKGNAMEPREFIX:= ${PKGNAMEPREFIX}tw-
diff -Nur mldonkey-core.orig/files/wrapper-prefix mldonkey-core/files/wrapper-prefix
--- mldonkey-core.orig/files/wrapper-prefix	Thu Jan  1 08:00:00 1970
+++ mldonkey-core/files/wrapper-prefix	Fri Apr  2 15:41:55 2004
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Force printing non-quote(escaped) instead of \xxx 
+
+LC_CTYPE=en_US.ISO8859-1
+export LC_CTYPE
+
>Release-Note:
>Audit-Trail:
>Unformatted:



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