Bug 68112 - [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar protocol
Summary: [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar pro...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-19 14:20 UTC by Andrey Slusar
Modified: 2004-07-17 12:03 UTC (History)
0 users

See Also:


Attachments
ru-gaim.port (4.00 KB, text/plain)
2004-06-19 14:20 UTC, Andrey Slusar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Slusar 2004-06-19 14:20:25 UTC
	Gaim with underclared charsets support for oscar protocol
	Original gaim (net/gaim) for oscar protocol supporting only ISO-8859-1 charset.
	Patch in files/patch-oscar.c adding change undeclared charsets for oscar protocol
Comment 1 Andrey Slusar 2004-06-20 02:04:44 UTC
>Submitter-Id:	current-users
>Originator:	Andrey Slusar
>Organization:	Santinel
>Confidential:	no 
>Synopsis:	ports/68112 [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar protocol
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		change-request
>Release:	FreeBSD 5.2-CURRENT i386
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Jun 18 00:59:25 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
	Previous shar contains mistake. Correct shar in section Fix
>How-To-Repeat:
	
>Fix:

--- ru-gaim.port begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/russian/gaim/
#	/usr/ports/russian/gaim/Makefile
#	/usr/ports/russian/gaim/files
#	/usr/ports/russian/gaim/files/patch-oscar.c
#
echo c - /usr/ports/russian/gaim/
mkdir -p /usr/ports/russian/gaim/ > /dev/null 2>&1
echo x - /usr/ports/russian/gaim/Makefile
sed 's/^X//' >/usr/ports/russian/gaim/Makefile << 'END-of-/usr/ports/russian/gaim/Makefile'
X# New ports collection makefile for:	ru-gaim
X# Date created:				19 Jun 2004
X# Whom:					Andrey Slusar <vasallia@ukr.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	gaim
XCATEGORIES=	russian
X
XMAINTAINER=	vasallia@ukr.net
XCOMMENT=	Gaim with underclared charsets support for oscar protocol
X
XMASTERDIR=	${.CURDIR}/../../net/gaim
X
XCONFLICTS=	gaim-[0-9]*
X
X.include "${MASTERDIR}/Makefile"
END-of-/usr/ports/russian/gaim/Makefile
echo c - /usr/ports/russian/gaim/files
mkdir -p /usr/ports/russian/gaim/files > /dev/null 2>&1
echo x - /usr/ports/russian/gaim/files/patch-oscar.c
sed 's/^X//' >/usr/ports/russian/gaim/files/patch-oscar.c << 'END-of-/usr/ports/russian/gaim/files/patch-oscar.c'
X--- src/protocols/oscar/oscar.c.orig	2004-05-30 21:04:55.000000000 +0400
X+++ src/protocols/oscar/oscar.c	2004-06-05 22:14:22.000000000 +0400
X@@ -3019,6 +3019,7 @@
X 	GError *err = NULL;
X 	struct buddyinfo *bi;
X 	const char *iconfile;
X+	char *charset;
X 
X 	bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(account, userinfo->sn));
X 	if (!bi) {
X@@ -3110,10 +3112,11 @@
X 		if (!args->msg || !args->msglen)
X 			return 1;
X 
X-		tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err);
X+		charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1");		
X+		tmp = g_convert(args->msg, args->msglen, "UTF-8", charset, NULL, &convlen, &err);
X 		if (err) {
X-			gaim_debug_info("oscar",
X-					   "ISO-8859-1 IM conversion: %s\n", err->message);
X+  			gaim_debug(GAIM_DEBUG_INFO, "oscar",
X+ 					   "%s IM conversion: %s\n", charset, err->message);
X 			tmp = g_strdup(_("(There was an error receiving this message)"));
X 			g_error_free(err);
X 		}
X@@ -5133,6 +5136,8 @@
X 	GError *err = NULL;
X 	const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
X 	char *tmpmsg = NULL, *tmpmsg2 = NULL;
X+ 	GaimAccount *account = gc->account;
X+ 	char *charset;
X 
X 	if (dim && dim->connected) {
X 		/* If we're directly connected, send a direct IM */
X@@ -5233,7 +5238,8 @@
X 		}
X 		len = strlen(tmpmsg);
X 
X-		args.flags |= oscar_encoding_check(tmpmsg);
X+		if(!(gaim_account_get_bool(account, "send_plain", FALSE)))
X+			args.flags |= oscar_encoding_check(tmpmsg);
X 		if (args.flags & AIM_IMFLAGS_UNICODE) {
X 			gaim_debug_info("oscar", "Sending Unicode IM\n");
X 			args.charset = 0x0002;
X@@ -5272,7 +5278,10 @@
X 		} else {
X 			args.charset = 0x0000;
X 			args.charsubset = 0x0000;
X-			args.msg = tmpmsg;
X+			charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1");
X+			args.msg = g_convert(tmpmsg, len, charset, "UTF-8", NULL, &len, &err);
X+			if (err) gaim_debug(GAIM_DEBUG_ERROR, "oscar",
X+						   "conversion error: %s\n", err->message);
X 		}
X 		args.msglen = len;
X 
X@@ -7230,6 +7239,17 @@
X 	option = gaim_account_option_int_new(_("Auth port"), "port", 5190);
X 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
X 											   option);
X+	option = gaim_account_option_string_new(
X+			_("Charset for plain text messages"),
X+			"plain_charset", "ISO-8859-1");
X+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
X+			option);
X+
X+	option = gaim_account_option_bool_new(
X+			_("Send messages in plain text"),
X+			"send_plain", FALSE);
X+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
X+			option);
X 
X 	my_protocol = plugin;
X }
END-of-/usr/ports/russian/gaim/files/patch-oscar.c
exit
--- ru-gaim.port ends here ---
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2004-07-10 12:15:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Take it.
Comment 3 Sergey Matveychuk freebsd_committer freebsd_triage 2004-07-17 12:03:40 UTC
State Changed
From-To: open->closed

Committed, thanks!