On Tue, Aug 13, 2013 at 07:41:16PM +0200, Dominic Hargreaves wrote:
 
> I tried to fix this by applying define_functions_fix_build.patch from
> the Ubuntu package, 

FWIW that patch (attached for the maintainer's convenience) seems fine to me.

> but another failure then appeared:

The actual error here is

  xtext.c: In function ‘gtk_xtext_set_clip_owner’:
  xtext.c:2070:3: error: implicit declaration of function ‘gtk_clipboard_get’ 
[-Werror=implicit-function-declaration]
     gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD), str, 
len);
   ^
and it presumably doesn't happen in Ubuntu because they patch that part
away with 120-fix-clipboard-segfault.patch (attached as well.)

I see the underlying reason for the error is that the gtk_clipboard_get()
declaration in <gtk/gtkclipboard.h> reads

  #ifndef GDK_MULTIHEAD_SAFE
  GtkClipboard *gtk_clipboard_get             (GdkAtom       selection);
  #endif

and xtext.c defines GDK_MULTIHEAD_SAFE. I can't say what the correct fix
would be.

The package builds fine for me with these two patches applied.
-- 
Niko Tyni   [email protected]
Description: Don't set the CLIPBOARD buffer when selecting text. CLIPBOARD
 should only be used when specifically selecting copy from a context menu.
 This may also have the side effect of fixing the common but hard to
 reproduce clipboard segfault.
Author: Marc Deslauriers <[email protected]>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=658502
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=635317
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=624792
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xchat-gnome/+bug/844003

Index: xchat-gnome-0.30.0~git20110821.e2a400/src/fe-gnome/xtext.c
===================================================================
--- xchat-gnome-0.30.0~git20110821.e2a400.orig/src/fe-gnome/xtext.c	2011-07-27 17:00:57.000000000 -0400
+++ xchat-gnome-0.30.0~git20110821.e2a400/src/fe-gnome/xtext.c	2012-08-21 11:58:28.895474588 -0400
@@ -2055,22 +2055,12 @@
 static void
 gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event)
 {
-	char *str;
-	int len;
-
 	if (GTK_XTEXT (xtext)->selection_buffer &&
 		GTK_XTEXT (xtext)->selection_buffer != GTK_XTEXT (xtext)->buffer)
 		gtk_xtext_selection_clear (GTK_XTEXT (xtext)->selection_buffer);
 
 	GTK_XTEXT (xtext)->selection_buffer = GTK_XTEXT (xtext)->buffer;
 
-	str = gtk_xtext_selection_get_text (GTK_XTEXT (xtext), &len);
-	if (str)
-	{
-		gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD), str, len);
-		free (str);
-	}
-
 	gtk_selection_owner_set (xtext, GDK_SELECTION_PRIMARY, event->time);
 }
 
>From fa86953132e7b9500430bd125276e755d963db01 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <[email protected]>
Date: Wed, 17 Apr 2013 21:33:18 +0200
Subject: [PATCH] plugin/perl: add function prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=698232
---
 plugins/perl/perl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c
index 7de695a..fa44916 100644
--- a/plugins/perl/perl.c
+++ b/plugins/perl/perl.c
@@ -37,7 +37,9 @@
 static xchat_plugin *ph;		  /* plugin handle */
 
 static int perl_load_file (char *script_name);
-
+void xchat_plugin_get_info   (char **plugin_name, char **plugin_desc, char **plugin_version, void **reserved);
+int  xchat_plugin_init       (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg);
+int  xchat_plugin_deinit     (xchat_plugin * plugin_handle);
 #ifdef WIN32
 
 static DWORD
--

Reply via email to