From mjl@luckie.org.nz  Thu Aug 18 10:19:55 2005
Return-Path: <mjl@luckie.org.nz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1621616A420
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Aug 2005 10:19:55 +0000 (GMT)
	(envelope-from mjl@luckie.org.nz)
Received: from grunt1.ihug.co.nz (grunt1.ihug.co.nz [203.109.254.41])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8A84843D48
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Aug 2005 10:19:54 +0000 (GMT)
	(envelope-from mjl@luckie.org.nz)
Received: from 203-173-146-23.bliink.ihug.co.nz (lycra.luckie.org.nz) [203.173.146.23] 
	by grunt1.ihug.co.nz with esmtp (Exim 3.35 #1 (Debian))
	id 1E5hV3-0006D2-00; Thu, 18 Aug 2005 22:19:53 +1200
Received: from mjl by lycra.luckie.org.nz with local (Exim 4.52 (FreeBSD))
	id 1E5hV2-000IzQ-Jt
	for FreeBSD-gnats-submit@freebsd.org; Thu, 18 Aug 2005 22:19:52 +1200
Message-Id: <E1E5hV2-000IzQ-Jt@lycra.luckie.org.nz>
Date: Thu, 18 Aug 2005 22:19:52 +1200
From: Matthew Luckie <mjl@luckie.org.nz>
Reply-To: Matthew Luckie <mjl@luckie.org.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] unbreak audio/festival-gaim on 4.X
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         85082
>Category:       ports
>Synopsis:       [patch] unbreak audio/gaim-festival on 4.X
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 18 10:20:16 GMT 2005
>Closed-Date:    Thu Sep 15 00:47:45 GMT 2005
>Last-Modified:  Thu Sep 15 00:47:45 GMT 2005
>Originator:     Matthew Luckie
>Release:        FreeBSD 4.11-RELEASE-p8 i386
>Organization:
University of Waikato
>Environment:
System: FreeBSD lycra.luckie.org.nz 4.11-RELEASE-p8 FreeBSD 4.11-RELEASE-p8 #1: Wed May 11 14:02:09 NZST 2005 root@lycra.luckie.org.nz:/files/freebsd_src/sys/compile/lycra i386

>Description:
gaim-festival does not build on 4.X due to C99isms

festival.c: In function `im_recv_im':
festival.c:440: syntax error before `*'
festival.c:442: `ascii' undeclared (first use in this function)
festival.c:442: (Each undeclared identifier is reported only once
festival.c:442: for each function it appears in.)
festival.c:453: `buffer' undeclared (first use in this function)
festival.c: In function `chat_buddy_joined_cb':
festival.c:503: warning: passing arg 1 of `_event_speak' discards qualifiers from pointer target type
festival.c: In function `chat_buddy_left_cb':
festival.c:517: warning: passing arg 1 of `_event_speak' discards qualifiers from pointer target type
festival.c: In function `plugin_load':
festival.c:624: syntax error before `char'
festival.c:625: `proc' undeclared (first use in this function)
festival.c:627: syntax error before `int'
festival.c:630: `errno' undeclared (first use in this function)
festival.c:637: syntax error before `void'
festival.c:641: `conv_handle' undeclared (first use in this function)
festival.c:647: `blist_handle' undeclared (first use in this function)
festival.c:666: `accounts_handle' undeclared (first use in this function)
>How-To-Repeat:
N/A
>Fix:
diff -uNr gaim-festival.orig/Makefile gaim-festival/Makefile
--- gaim-festival.orig/Makefile	Sun Jul 10 07:00:23 2005
+++ gaim-festival/Makefile	Thu Aug 18 20:01:16 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	festival
 PORTVERSION=	1.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	audio
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	festival-gaim
diff -uNr gaim-festival.orig/files/patch-festival.c gaim-festival/files/patch-festival.c
--- gaim-festival.orig/files/patch-festival.c	Thu Jan  1 12:00:00 1970
+++ gaim-festival/files/patch-festival.c	Thu Aug 18 20:14:10 2005
@@ -0,0 +1,53 @@
+--- festival.c.orig	Thu Aug 18 20:02:32 2005
++++ festival.c	Thu Aug 18 20:11:48 2005
+@@ -435,10 +435,11 @@
+ {
+   char *stripped;
+   const char *alias = get_best_name(account, who);
+-  silent_joins = NULL;
+ 
+   GString *buffer= g_string_new("");
+   GString *ascii;
++
++  silent_joins = NULL;
+   ascii = g_string_new(g_convert (what, strlen (what),
+ 				  "ISO-8859-1", "UTF-8",
+ 				  NULL, NULL, NULL));
+@@ -613,7 +614,12 @@
+ plugin_load(GaimPlugin *plugin) {
+ 
+   FILE *which_pf;
+-  char line[1024];
++  char line[1024], proc[1024];
++  int errno=0;
++  void *conv_handle;
++  void *blist_handle;
++  void *accounts_handle;
++
+   which_pf= popen("which festival 2>/dev/null","r");
+   fscanf(which_pf,"%1023s",line);
+   pclose(which_pf);
+@@ -621,10 +627,8 @@
+   if( *line != '/')
+     return FALSE;
+ 
+-  char proc[1024];
+   sprintf(proc, "%s %s", snd((char *)gaim_prefs_get_string("/gaim/gtk/sound/method")), line);
+ 
+-  int errno=0;
+   festival_pf= popen(proc,"w");
+ 
+   if(errno) {
+@@ -634,9 +638,9 @@
+ 
+   load_conf();
+ 
+-  void *conv_handle = gaim_conversations_get_handle();
+-  void *blist_handle = gaim_blist_get_handle();
+-  void *accounts_handle = gaim_accounts_get_handle();
++  conv_handle = gaim_conversations_get_handle();
++  blist_handle = gaim_blist_get_handle();
++  accounts_handle = gaim_accounts_get_handle();
+ 
+   gaim_signal_connect(conv_handle, "received-im-msg",
+ 		      plugin, GAIM_CALLBACK(im_recv_im), NULL);

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bms 
Responsible-Changed-By: vs 
Responsible-Changed-When: Wed Sep 14 09:48:34 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85082 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Thu Sep 15 00:47:39 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85082 
>Unformatted:
