From owner-freebsd-ports-bugs@FreeBSD.ORG  Sat Jun 19 13:20:27 2004
Return-Path: <owner-freebsd-ports-bugs@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 89F9B16A4CE
	for <freebsd-ports-bugs@hub.freebsd.org>;
	Sat, 19 Jun 2004 13:20:27 +0000 (GMT)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7D03143D5D
	for <freebsd-ports-bugs@hub.freebsd.org>;
	Sat, 19 Jun 2004 13:20:27 +0000 (GMT)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	i5JDKPEh070712	for <freebsd-ports-bugs@freefall.freebsd.org>;
	Sat, 19 Jun 2004 13:20:25 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5JDKPiI070711;
	Sat, 19 Jun 2004 13:20:25 GMT
	(envelope-from gnats)
Resent-Date: Sat, 19 Jun 2004 13:20:25 GMT
Resent-Message-Id: <200406191320.i5JDKPiI070711@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,
	Andrey Slusar <vasallia@ukr.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0460D16A4CF
	for <FreeBSD-gnats-submit@freebsd.org>;
	Sat, 19 Jun 2004 13:14:11 +0000 (GMT)
Received: from mail-kv.alkar.net (mail-kv.alkar.net [195.248.176.165])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3B9D543D2F
	for <FreeBSD-gnats-submit@freebsd.org>;
	Sat, 19 Jun 2004 13:14:10 +0000 (GMT)
	(envelope-from vasallia@ukr.net)
Received: from [212.86.241.204] (helo=santinel.home.ua)
	by mail-kv.alkar.net with esmtp (Exim 4.34 (FreeBSD))
	id 1BbffK-0003di-PU
	for FreeBSD-gnats-submit@freebsd.org; Sat, 19 Jun 2004 16:13:52 +0300
Received: from anray by santinel.home.ua with local (Exim 4.34; FreeBSD)
	id 1BbffD-000PiZ-RC	for <FreeBSD-gnats-submit@freebsd.org>;
	Sat, 19 Jun 2004 16:13:43 +0300
Message-Id: <E1BbffD-000PiZ-RC@santinel.home.ua>
Date: Sat, 19 Jun 2004 16:13:43 +0300
From: Andrey Slusar <vasallia@ukr.net>
To: FreeBSD-gnats-submit@FreeBSD.org
X-Send-Pr-Version: 3.113
Subject: ports/68112: [NEW PORT] russian/gaim: gaim with underclared
	charsets support for oscar protocol
X-BeenThere: freebsd-ports-bugs@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
Reply-To: Andrey Slusar <vasallia@ukr.net>
List-Id: Ports bug reports <freebsd-ports-bugs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>,
	<mailto:freebsd-ports-bugs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs>
List-Post: <mailto:freebsd-ports-bugs@freebsd.org>
List-Help: <mailto:freebsd-ports-bugs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>,
	<mailto:freebsd-ports-bugs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 19 Jun 2004 13:20:27 -0000


>Number:         68112
>Category:       ports
>Synopsis:       [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar protocol
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 19 13:20:25 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Slusar
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>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:
	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
>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=	xmms
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 ---


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