Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2005 16:49:33 +0400 (MSD)
From:      Sergey Akifyev <asa@agava.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/83720: add russian ICQ fixes to net/gaim
Message-ID:  <20050719124933.720D0C9887C@agava.mipt.ru>
Resent-Message-ID: <200507191300.j6JD0YCS011903@freefall.freebsd.org>

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

>Number:         83720
>Category:       ports
>Synopsis:       add russian ICQ fixes to net/gaim
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 19 13:00:34 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Akifyev
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
AGAVA Software Company
>Environment:
not important

>Description:
GAIM ICQ protocol support never really worked with Russian language.
The problem is that many localized ICQ clients doesn't have anything
to to with standards. They always used encoding they want to send/receive.

The bug is not in GAIM itself, but GAIM never tried to work around the
the situation. The attached port fix enables an option to patch
ICQ protocol source against the problem. It may seem a bit hacky, but
it works.

>How-To-Repeat:
>Fix:

--- gaim.diff begins here ---
diff -ruN gaim.orig/Makefile gaim/Makefile
--- gaim.orig/Makefile	Tue Jul 19 16:32:39 2005
+++ gaim/Makefile	Tue Jul 19 16:36:45 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	gaim
 PORTVERSION=	1.4.0
+PORTREVISION=	1
 CATEGORIES?=	net
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -40,9 +41,14 @@
 		GNUTLS "GNUTLS encryption support" off \
 		NSS "Mozilla NSS encryption support" on \
 		PERL "Perl scripting" off \
-		TCLTK "Tcl/Tk scripting" off
+		TCLTK "Tcl/Tk scripting" off \
+		GAIM_RUSSIAN "Russian ICQ fixes" off
 
 .include <bsd.port.pre.mk>
+
+.if defined(WITH_GAIM_RUSSIAN)
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-oscar.c
+.endif
 
 .if ${HAVE_GNOME:Mevolutiondataserver}!=""
 USE_GNOME+=	evolutiondataserver
diff -ruN gaim.orig/files/extra-patch-oscar.c gaim/files/extra-patch-oscar.c
--- gaim.orig/files/extra-patch-oscar.c	Thu Jan  1 03:00:00 1970
+++ gaim/files/extra-patch-oscar.c	Tue Jul 19 16:39:26 2005
@@ -0,0 +1,27 @@
+--- src/protocols/oscar/oscar.c.orig	Sat Jul  2 20:13:14 2005
++++ src/protocols/oscar/oscar.c	Tue Jul 19 16:34:50 2005
+@@ -464,12 +464,12 @@
+ 		if ((sourcesn != NULL) && isdigit(sourcesn[0]))
+ 			charsetstr1 = gaim_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
+ 		else
+-			charsetstr1 = "ISO-8859-1";
++			charsetstr1 = "cp1251";
+ 		charsetstr2 = "UTF-8";
+ 	} else if (charset == AIM_CHARSET_ASCII) {
+ 		/* Should just be "ASCII" */
+-		charsetstr1 = "ASCII";
+-		charsetstr2 = gaim_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
++		charsetstr1 = "utf-8";
++		charsetstr2 = "cp1251";
+ 	} else if (charset == 0x000d) {
+ 		/* Mobile AIM client on a Nokia 3100 and an LG VX6000 */
+ 		charsetstr1 = "ISO-8859-1";
+@@ -484,6 +484,8 @@
+ 	if (ret == NULL)
+ 		ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, charsetstr2, TRUE);
+ 	if (ret == NULL)
++		ret = gaim_plugin_oscar_convert_to_utf8(data, datalen, "koi8-r", TRUE);
++	if (ret == NULL)
+ 		ret = g_strdup(_("(There was an error receiving this message.  The buddy you are speaking to most likely has a buggy client.)"));
+ 
+ 	return ret;
--- gaim.diff ends here ---


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



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