From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jun 20 01:10:37 2004 Return-Path: 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 B674116A4D1 for ; Sun, 20 Jun 2004 01:10:37 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AED4E43D31 for ; Sun, 20 Jun 2004 01:10:37 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i5K1AQNE050067 for ; Sun, 20 Jun 2004 01:10:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5K1AQF6050066; Sun, 20 Jun 2004 01:10:26 GMT (envelope-from gnats) Date: Sun, 20 Jun 2004 01:10:26 GMT Message-Id: <200406200110.i5K1AQF6050066@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Andrey Slusar 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 List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 01:10:37 -0000 The following reply was made to PR ports/68112; it has been noted by GNATS. From: Andrey Slusar To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: ports/68112 [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar protocol Date: Sun, 20 Jun 2004 04:04:44 +0300 >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 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 ---