From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 30 19:10:27 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C718316ADC8 for ; Tue, 30 May 2006 19:10:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B017043D7B for ; Tue, 30 May 2006 19:10:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4UJADtc070432 for ; Tue, 30 May 2006 19:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4UJAD3Q070431; Tue, 30 May 2006 19:10:13 GMT (envelope-from gnats) Resent-Date: Tue, 30 May 2006 19:10:13 GMT Resent-Message-Id: <200605301910.k4UJAD3Q070431@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kuang-che Wu Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4CFB16AD66; Tue, 30 May 2006 19:07:04 +0000 (UTC) (envelope-from kcwu@kcwu.csie.org) Received: from kcwu.csie.org (kcwu.csie.org [203.204.141.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA14B43D55; Tue, 30 May 2006 19:07:03 +0000 (GMT) (envelope-from kcwu@kcwu.csie.org) Received: from kcwu.csie.org (fakeidkcwu@kcwu.homeip.net [127.0.0.1]) by kcwu.csie.org (8.13.6/8.13.6) with ESMTP id k4UJ6tE3041219; Wed, 31 May 2006 03:06:55 +0800 (CST) (envelope-from kcwu@kcwu.csie.org) Received: (from kcwu@localhost) by kcwu.csie.org (8.13.6/8.13.6/Submit) id k4UJ6tGk041218; Wed, 31 May 2006 03:06:55 +0800 (CST) (envelope-from kcwu) Message-Id: <200605301906.k4UJ6tGk041218@kcwu.csie.org> Date: Wed, 31 May 2006 03:06:55 +0800 (CST) From: Kuang-che Wu To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: thierry@FreeBSD.org Subject: ports/98166: [PATCH] x11/rxvt-unicode: imlocale fix for freebsd X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2006 19:10:40 -0000 >Number: 98166 >Category: ports >Synopsis: [PATCH] x11/rxvt-unicode: imlocale fix for freebsd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue May 30 19:10:12 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Kuang-che Wu >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD kcwu.csie.org 7.0-CURRENT FreeBSD 7.0-CURRENT #5: Sat May 20 19:08:06 CST 2006 >Description: rxvt-unicode assume wchar_t is unicode, but it's not true for freebsd. This patch converts the IM input charater to unicode. It requires additional patch dependancy and enlarge excutable size, so I provide a knob to disable. (2.5mb if WITH_ENCODING=all) Added file(s): - files/extra-patch-imlocale Port maintainer (thierry@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- rxvt-unicode-7.7_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode/Makefile /files/home/kcwu/work/ports/x/x11/rxvt-unicode/Makefile --- /usr/ports/x11/rxvt-unicode/Makefile Sun May 28 16:18:22 2006 +++ /files/home/kcwu/work/ports/x/x11/rxvt-unicode/Makefile Wed May 31 00:38:49 2006 @@ -7,6 +7,7 @@ PORTNAME= rxvt-unicode PORTVERSION= 7.7 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= http://dist.schmorp.de/rxvt-unicode/%SUBDIR%/ MASTER_SITE_SUBDIR= . Attic @@ -14,6 +15,10 @@ MAINTAINER= thierry@FreeBSD.org COMMENT= A clone of the terminal emulator rxvt modified to support Unicode +.if !defined(WITHOUT_IMLOCALE_FIX) +PATCH_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Encode/HanExtra.pm:${PORTSDIR}/chinese/p5-Encode-HanExtra \ + ${SITE_PERL}/${PERL_ARCH}/Encode/JIS2K.pm:${PORTSDIR}/converters/p5-Encode-JIS2K +.endif LIB_DEPENDS= Xft.2:${PORTSDIR}/x11-fonts/libXft BUILD_DEPENDS= pkg-config:${PORTSDIR}/devel/pkg-config @@ -164,6 +169,7 @@ @${ECHO_MSG} "WITHOUT_LINESPACE disable support for line-spacing" @${ECHO_MSG} "WITHOUT_MOUSEWHEEL disable support for scrolling via mouse wheel" @${ECHO_MSG} "WITHOUT_SMART_RESIZE disable smart growth/shrink behaviour" + @${ECHO_MSG} "WITHOUT_IMLOCALE_FIX disable imlocale encoding conversion fix" @${ECHO_MSG} .ifndef(WITH_ENCODING) @${ECHO_MSG} "==> You can compile in support for additional codeset groups by setting the WITH_ENCODING variable" @@ -175,6 +181,12 @@ @${ECHO_MSG} ' "all" all of the above;' @${ECHO_MSG} '==> For example, "WITH_ENCODING=kr" for korean encodings.' @${ECHO_MSG} +.endif + +.if !defined(WITHOUT_IMLOCALE_FIX) +post-patch: + @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-imlocale + @cd ${WRKSRC}/src && ./gentables .endif pre-configure: diff -ruN --exclude=CVS /usr/ports/x11/rxvt-unicode/files/extra-patch-imlocale /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/extra-patch-imlocale --- /usr/ports/x11/rxvt-unicode/files/extra-patch-imlocale Thu Jan 1 08:00:00 1970 +++ /files/home/kcwu/work/ports/x/x11/rxvt-unicode/files/extra-patch-imlocale Wed May 31 00:36:34 2006 @@ -0,0 +1,74 @@ +diff -ur src/command.C.orig src/command.C +--- src/command.C.orig Mon Feb 20 22:41:16 2006 ++++ src/command.C Sun May 21 09:36:40 2006 +@@ -301,6 +301,26 @@ + } + #endif + ++void from_imlocale_to_locale(const char *imlocale, const char *locale, wchar_t *wkbuf, int len) ++{ ++ if(!imlocale || !locale) ++ return; ++ ++ if(!strchr(imlocale,'.') || !strchr(locale,'.')) ++ return; ++ ++ codeset imcs = codeset_from_name(strchr(imlocale, '.')); ++ codeset cs = codeset_from_name(strchr(locale, '.')); ++ ++ if (imcs == CS_UNKNOWN || cs == CS_UNKNOWN) ++ return; ++ ++ for(int i=0; i ++#define ENCODING_TO_UNICODE 1 + + typedef uint32_t unicode_t; + +diff -ur src/gentables.orig src/gentables +--- src/gentables Sun May 21 08:14:15 2006 ++++ src/gentables.orig Sun May 21 08:15:08 2006 +@@ -13,7 +13,7 @@ + + my $gen; + +-$TO_UNICODE = 0; # also generate to_unicode tables ++$TO_UNICODE = 1; # also generate to_unicode tables + + sub linear { + my ($a, $l, $h, $b) = @_; --- rxvt-unicode-7.7_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: