diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index ac32ebb..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -xchat-2.6.6.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01fb2f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xchat-2.8.4.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index bf6213f..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile for source rpm: xchat -# $Id$ -NAME := xchat -SPECFILE = $(firstword $(wildcard *.spec)) - -include ../common/Makefile.common diff --git a/sources b/sources index d7ed175..79c3a17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -43c187582beb31e744c4c5a833a022b5 xchat-2.6.6.tar.bz2 +66d60febc62a01bafac9bb3a35fb37ae xchat-2.8.4.tar.bz2 diff --git a/xc284-fix-scrollbfdleak.diff b/xc284-fix-scrollbfdleak.diff new file mode 100644 index 0000000..a5dbf2a --- /dev/null +++ b/xc284-fix-scrollbfdleak.diff @@ -0,0 +1,14 @@ +# +# Scrollback shrinking code forgets to close(). +# +--- xchat-2.8.4/src/common/text.c 2007-06-13 19:59:56.000000000 +1000 ++++ xchat-2.8.4p1/src/common/text.c 2007-11-02 23:52:57.000000000 +1100 +@@ -141,6 +146,7 @@ + } + + *len = st.st_size; ++ close (fh); + return buf; + } + + diff --git a/xc284-improvescrollback.diff b/xc284-improvescrollback.diff new file mode 100644 index 0000000..4bada74 --- /dev/null +++ b/xc284-improvescrollback.diff @@ -0,0 +1,28 @@ +# +# 1) Stops scrollback files growing too large by fixing the file-shrink code. +# 2) Puts a "Display scrollback from previous session" into the Setup GUI +# (logging section) so people can turn this off without typing commands. +# +--- xchat-2.8.4/src/common/text.c 29 Jul 2007 05:02:36 -0000 1.90 ++++ xchat-2.8.4p1/src/common/text.c 26 Sep 2007 07:29:55 -0000 +@@ -285,6 +285,8 @@ + } + } + ++ sess->scrollwritten = lines; ++ + if (lines) + { + text = ctime (&stamp); +--- xchat-2.8.4/src/fe-gtk/setup.c 9 Sep 2007 04:57:07 -0000 1.100 ++++ xchat-2.8.4p1/src/fe-gtk/setup.c 26 Sep 2007 07:29:57 -0000 +@@ -382,7 +382,8 @@ + static const setting logging_settings[] = + { + {ST_HEADER, N_("Logging"),0,0,0}, +- {ST_TOGGLE, N_("Enable logging of conversations"), P_OFFINTNL(logging), 0, 0, 2}, ++ {ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0}, ++ {ST_TOGGLE, N_("Enable logging of conversations"), P_OFFINTNL(logging), 0, 0, 2}, + {ST_ENTRY, N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask}, + {ST_LABEL, N_("%s=Server %c=Channel %n=Network.")}, + diff --git a/xc284-scrollbmkdir.diff b/xc284-scrollbmkdir.diff new file mode 100644 index 0000000..e2caa28 --- /dev/null +++ b/xc284-scrollbmkdir.diff @@ -0,0 +1,33 @@ +# +# Fix creation of ~/.xchat2/scrollback/ paths. +# +--- xchat-2.8.4/src/common/text.c 15 Jun 2007 03:53:42 -0000 1.89 ++++ xchat-2.8.4p1/src/common/text.c 8 Jul 2007 08:59:02 -0000 +@@ -49,20 +49,25 @@ + + + static void mkdir_p (char *dir); ++static char *log_create_filename (char *channame); + + + static char * + scrollback_get_filename (session *sess, char *buf, int max) + { +- char *net; ++ char *net, *chan; + + net = server_get_network (sess->server, FALSE); + if (!net) + return NULL; + +- snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, sess->channel); ++ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, ""); + mkdir_p (buf); + ++ chan = log_create_filename (sess->channel); ++ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, chan); ++ free (chan); ++ + return buf; + } + diff --git a/xchat-2.4.2-nickmenu-away-msg.patch b/xchat-2.4.2-nickmenu-away-msg.patch deleted file mode 100644 index 493ec0a..0000000 --- a/xchat-2.4.2-nickmenu-away-msg.patch +++ /dev/null @@ -1,40 +0,0 @@ -Patch to add away message to nick menu, -by Christopher Aillon - ---- ../xchat-2.4.2-orig/src/fe-gtk/menu.c 2005-03-14 23:44:12.000000000 -0500 -+++ src/fe-gtk/menu.c 2005-03-21 15:18:46.000000000 -0500 -@@ -450,12 +450,13 @@ static char *str_copy = 0; /* for all p - - void - menu_nickmenu (session *sess, GdkEventButton *event, char *nick, int num_sel) - { - char buf[256]; - struct User *user; -+ struct away_msg *away; - GtkWidget *wid, *submenu, *menu = gtk_menu_new (); - - if (str_copy) - free (str_copy); - str_copy = strdup (nick); - -@@ -487,12 +488,20 @@ menu_nickmenu (session *sess, GdkEventBu - menu_quick_item (0, buf, submenu, 0, 0); - - snprintf (buf, sizeof (buf), _("Server: %s"), - user->servername ? user->servername : _("Unknown")); - menu_quick_item (0, buf, submenu, 0, 0); - -+ if (user->away) -+ { -+ away = find_away_message (current_sess->server, nick); -+ snprintf (buf, sizeof (buf), _("Away Msg: %s"), -+ away && away->message ? away->message : _("Unknown")); -+ menu_quick_item (0, buf, submenu, 0, 0); -+ } -+ - snprintf (buf, sizeof (buf), _("Last Msg: %s"), - user->lasttalk ? ctime (&(user->lasttalk)) : _("Unknown")); - if (user->lasttalk) - buf[strlen (buf) - 1] = 0; - wid = menu_quick_item (0, buf, submenu, 0, 0); - diff --git a/xchat-2.4.3-im_context_filter_keypress.patch b/xchat-2.4.3-im_context_filter_keypress.patch deleted file mode 100644 index eb30d9d..0000000 --- a/xchat-2.4.3-im_context_filter_keypress.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- xchat-2.4.3/src/fe-gtk/fkeys.c.orig 2005-03-10 20:32:28.000000000 -1000 -+++ xchat-2.4.3/src/fe-gtk/fkeys.c 2005-05-15 21:03:27.000000000 -1000 -@@ -288,6 +288,11 @@ - kb->next = keys_root; - keys_root = kb; - } -+ /* make sure this key event is filtered in the Input Method. */ -+ if (gtk_im_context_filter_keypress (GTK_ENTRY (wid)->im_context, evt)) { -+ GTK_ENTRY (wid)->need_im_reset = TRUE; -+ return TRUE; -+ } - /* Run the function */ - n = key_actions[kb->action].handler (wid, evt, kb->data1, - kb->data2, sess); diff --git a/xchat-2.4.3-lib64.patch b/xchat-2.4.3-lib64.patch deleted file mode 100644 index a246595..0000000 --- a/xchat-2.4.3-lib64.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Naru xchat-2.4.3.orig/configure xchat-2.4.3/configure ---- xchat-2.4.3.orig/configure 2005-03-29 08:47:31.000000000 +0300 -+++ xchat-2.4.3/configure 2005-04-14 23:20:09.000000000 +0300 -@@ -30054,11 +30054,11 @@ - _ACEOF - - cat >>confdefs.h <<_ACEOF --#define XCHATLIBDIR "${prefix}/lib/xchat" -+#define XCHATLIBDIR "${libdir}/xchat" - _ACEOF - - cat >>confdefs.h <<_ACEOF --#define XCHATSHAREDIR "${prefix}/share/xchat" -+#define XCHATSHAREDIR "${datadir}/xchat" - _ACEOF - - fi -diff -Naru xchat-2.4.3.orig/configure.in xchat-2.4.3/configure.in ---- xchat-2.4.3.orig/configure.in 2005-03-29 08:45:59.000000000 +0300 -+++ xchat-2.4.3/configure.in 2005-04-14 23:20:47.000000000 +0300 -@@ -641,8 +641,8 @@ - AC_DEFINE_UNQUOTED(XCHATSHAREDIR, "${ac_default_prefix}/share/xchat") - else - AC_DEFINE_UNQUOTED(PREFIX, "${prefix}") -- AC_DEFINE_UNQUOTED(XCHATLIBDIR, "${prefix}/lib/xchat") -- AC_DEFINE_UNQUOTED(XCHATSHAREDIR, "${prefix}/share/xchat") -+ AC_DEFINE_UNQUOTED(XCHATLIBDIR, "${libdir}/xchat") -+ AC_DEFINE_UNQUOTED(XCHATSHAREDIR, "${datadir}/xchat") - fi - - dnl for plugins/xxx/Makefile.am diff --git a/xchat-2.4.4-multiline-messages.patch b/xchat-2.4.4-multiline-messages.patch deleted file mode 100644 index 4259c2f..0000000 --- a/xchat-2.4.4-multiline-messages.patch +++ /dev/null @@ -1,146 +0,0 @@ ---- xchat-2.4.4/src/common/proto-irc.c.multiline 2005-06-27 08:35:54.000000000 -0400 -+++ xchat-2.4.4/src/common/proto-irc.c 2005-06-27 08:36:25.000000000 -0400 -@@ -824,6 +824,10 @@ - } - if (!strcmp ("PRIVMSG", type)) - { -+#define M_QUOTE '\020' -+#define X_DELIM '\001' -+#define X_QUOTE '\134' -+ - char *to = word[3]; - int len; - int id = FALSE; /* identified */ -@@ -842,17 +846,59 @@ - text++; - } - len = strlen (text); -- if (text[0] == 1 && text[len - 1] == 1) /* ctcp */ -- { -- text[len - 1] = 0; -- text++; -- if (strncasecmp (text, "ACTION", 6) != 0) -- flood_check (nick, ip, serv, sess, 0); -- if (strncasecmp (text, "DCC ", 4) == 0) -- /* redo this with handle_quotes TRUE */ -- process_data_init (word[1], word_eol[1], word, word_eol, TRUE); -- ctcp_handle (sess, to, nick, text, word, word_eol); -- } else -+ -+ { /* find and dequote low-level CTCP quoting */ -+ char *ptr = text; -+ -+ while ((ptr = strchr(ptr, M_QUOTE)) != NULL) { -+ switch(*(ptr+1)) { -+ case 'r': -+ *(ptr+1) = '\r'; -+ break; -+ case 'n': -+ *(ptr+1) = '\n'; -+ break; -+ case '0': -+ *(ptr+1) = 0; -+ break; -+ } -+ memmove(ptr, ptr+1, strlen(ptr+1)+1); -+ ptr++; -+ } -+ } -+ -+ { /* find, handle, and remove CTCP messages */ -+ char *start, *end; -+ -+ while (((start = strchr(text, X_DELIM)) != NULL) && ((end = strchr(start+1, X_DELIM)) != NULL)) { -+ *end = 0; -+ -+ if (strncasecmp(start+1, "ACTION ", sizeof("ACTION ")-1) != 0) -+ flood_check(nick, ip, serv, sess, 0); -+ if (strncasecmp(text, "DCC ", sizeof("DCC ")-1) == 0) -+ /* redo this with handle_quotes TRUE */ -+ process_data_init (word[1], word_eol[1], word, word_eol, TRUE); -+ -+ { /* inline CTCP dequote */ -+ char *ptr = start+1; -+ -+ while ((ptr = strchr(ptr, X_QUOTE)) != NULL) { -+ switch(*(ptr+1)) { -+ case 'a': -+ *(ptr+1) = X_DELIM; -+ break; -+ } -+ memmove(ptr, ptr+1, strlen(ptr+1)+1); -+ ptr++; -+ } -+ } -+ -+ ctcp_handle(sess, to, nick, start+1, word, word_eol); -+ memmove(start, end+1, strlen(end+1)+1); -+ } -+ } -+ -+ if (*text != 0) - { - if (is_channel (serv, to)) - { ---- xchat-2.4.4/src/common/ctcp.c.multiline 2005-06-27 08:35:44.000000000 -0400 -+++ xchat-2.4.4/src/common/ctcp.c 2005-06-27 08:39:15.000000000 -0400 -@@ -58,13 +58,15 @@ - struct popup *pop; - GSList *list = ctcp_list; - -- po = strchr (ctcp, '\001'); -- if (po) -- *po = 0; -- -- po = strchr (word_eol[5], '\001'); -- if (po) -- *po = 0; -+// handled by PRIVMSG handler -+// po = strchr (ctcp, '\001'); -+// if (po) -+// *po = 0; -+ -+// this appears to be superfluous, but I am not sure; leaving it uncommented causes breakage -+// po = strchr (word_eol[5], '\001'); -+// if (po) -+// *po = 0; - - while (list) - { -@@ -129,7 +131,7 @@ - - if (!strcasecmp (msg, "VERSION") && !prefs.hidever) - { -- snprintf (outbuf, sizeof (outbuf), "VERSION xchat "VERSION" %s", -+ snprintf (outbuf, sizeof (outbuf), "VERSION xchat:"VERSION":%s", - get_cpu_str ()); - serv->p_nctcp (serv, nick, outbuf); - } -@@ -138,9 +140,10 @@ - { - if (!strncasecmp (msg, "SOUND", 5)) - { -- po = strchr (word[5], '\001'); -- if (po) -- po[0] = 0; -+// handled by PRIVMSG handler -+// po = strchr (word[5], '\001'); -+// if (po) -+// po[0] = 0; - - if (is_channel (sess->server, to)) - { -@@ -168,9 +171,10 @@ - } - - generic: -- po = strchr (msg, '\001'); -- if (po) -- po[0] = 0; -+// handled by PRIVMSG handler -+// po = strchr (msg, '\001'); -+// if (po) -+// po[0] = 0; - - if (!is_channel (sess->server, to)) - { diff --git a/xchat-2.4.4-unrealize.patch b/xchat-2.4.4-unrealize.patch deleted file mode 100644 index 4ba06d3..0000000 --- a/xchat-2.4.4-unrealize.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xchat-2.4.4/src/fe-gtk/xtext.c.unrealize 2005-08-17 14:53:54.719272000 -0400 -+++ xchat-2.4.4/src/fe-gtk/xtext.c 2005-08-17 14:54:16.680288000 -0400 -@@ -911,6 +911,8 @@ - { - backend_deinit (GTK_XTEXT (widget)); - -+ gdk_window_set_user_data (widget->window, NULL); -+ - if (parent_class->unrealize) - (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); - } diff --git a/xchat-2.6.0-dbus-api.patch b/xchat-2.6.0-dbus-api.patch deleted file mode 100644 index 9e76120..0000000 --- a/xchat-2.6.0-dbus-api.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- xchat-2.6.0/plugins/dbus/dbus-plugin.c.dbus-api 2005-12-01 20:14:15.000000000 -0500 -+++ xchat-2.6.0/plugins/dbus/dbus-plugin.c 2005-12-01 20:14:35.000000000 -0500 -@@ -152,7 +152,7 @@ - - if (!dbus_g_proxy_call (bus_proxy, "RequestName", &error, - G_TYPE_STRING, DBUS_SERVICE, -- G_TYPE_UINT, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, -+ G_TYPE_UINT, 0, - G_TYPE_INVALID, - G_TYPE_UINT, &request_name_result, - G_TYPE_INVALID)) diff --git a/xchat-2.6.6-es.patch b/xchat-2.6.6-es.patch deleted file mode 100644 index 8ed2899..0000000 --- a/xchat-2.6.6-es.patch +++ /dev/null @@ -1,33 +0,0 @@ -# -# Fix a few bad translation errors in xchat-2.6.6 Spanish. -# ---- xchat-2.6.6/po/es.po 2006-08-28 14:09:43.000000000 +1000 -+++ xchat-2.6.6p/po/es.po 2006-08-28 14:12:13.000000000 +1000 -@@ -747,15 +747,15 @@ - - #: src/common/textevents.h:60 - msgid "%C22*%O$t%C22Channel $1 modes: $2" --msgstr "C22*%O$t%C22Canal $1 modos: $2" -+msgstr "%C22*%O$t%C22Canal $1 modos: $2" - - #: src/common/textevents.h:63 - msgid "$4%C21%B%H<%H$1%H>%H%O%C21$t$2" --msgstr "4%C21%B%H<%H$1%H>%H%O%C21$t$2" -+msgstr "$4%C21%B%H<%H$1%H>%H%O%C21$t$2" - - #: src/common/textevents.h:66 - msgid "%C28-%C29$1/$2%C28-%O$t$3" --msgstr "C28-%C29$1/$2%C28-%O$t$3" -+msgstr "%C28-%C29$1/$2%C28-%O$t$3" - - #: src/common/textevents.h:69 - msgid "%C22*%O$t%C26$1%O gives channel operator status to%C26 $2" -@@ -799,7 +799,7 @@ - - #: src/common/textevents.h:99 - msgid "%C22*%O$t%C22Connecting to $1 ($2) port $3%O..." --msgstr "%C22*%O$t%C22Conectando a %1 ($2) puerto $3%O..." -+msgstr "%C22*%O$t%C22Conectando a $1 ($2) puerto $3%O..." - - #: src/common/textevents.h:102 - msgid "%C21*%O$t%C21Connection failed. Error: $1" diff --git a/xchat-2.6.6-fi.patch b/xchat-2.6.6-fi.patch deleted file mode 100644 index 6efb9d1..0000000 --- a/xchat-2.6.6-fi.patch +++ /dev/null @@ -1,16 +0,0 @@ -# -# Fixes an error in the Finnish translation that would -# cause highlighted messages not to wrap properly. -# ---- xchat-2.6.6/po/fi.po 2006-07-18 12:50:31.000000000 +1000 -+++ xchat-2.6.6p1/po/fi.po 2006-07-30 12:51:16.000000000 +1000 -@@ -734,7 +734,7 @@ - - #: src/common/textevents.h:63 - msgid "$4%C21%B%H<%H$1%H>%H%O%C21$t$2" --msgstr "$4%C21%B%H<%H$1%H%O%C21$t$2" -+msgstr "$4%C21%B%H<%H$1%H>%H%O%C21$t$2" - - #: src/common/textevents.h:66 - msgid "%C28-%C29$1/$2%C28-%O$t$3" - diff --git a/xchat-2.6.6-nonblock.patch b/xchat-2.6.6-nonblock.patch deleted file mode 100644 index 8d3c28a..0000000 --- a/xchat-2.6.6-nonblock.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- xchat-2.6.6/src/common/ssl.c.orig 2006-10-07 10:21:57.000000000 +0100 -+++ xchat-2.6.6/src/common/ssl.c 2006-10-07 10:24:12.000000000 +0100 -@@ -22,6 +22,7 @@ - #include /* asctime() */ - #include /* strncpy() */ - #include "ssl.h" /* struct cert_info */ -+#include "inet.h" /* would_block() */ - #include "../../config.h" /* HAVE_SNPRINTF */ - - #ifndef HAVE_SNPRINTF -@@ -256,7 +257,8 @@ _SSL_recv (SSL * ssl, char *buf, int len - break; - case SSL_ERROR_SYSCALL: - /* ??? */ -- perror ("SSL_read/read"); -+ if (!would_block()) -+ perror ("SSL_read/read"); - break; - case SSL_ERROR_ZERO_RETURN: - /* fprintf(stdeerr, "SSL closed on read\n"); */ diff --git a/xchat-2.6.6-simplify-to-use-gnome-open-for-default-webbrowser.patch b/xchat-2.6.6-simplify-to-use-gnome-open-for-default-webbrowser.patch deleted file mode 100644 index 5127114..0000000 --- a/xchat-2.6.6-simplify-to-use-gnome-open-for-default-webbrowser.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- xchat-2.6.6/src/common/xchat.c.orig 2006-08-02 23:07:47.000000000 -0400 -+++ xchat-2.6.6/src/common/xchat.c 2006-08-02 23:10:16.000000000 -0400 -@@ -578,7 +578,7 @@ - #ifdef WIN32 - static char defaultconf_urlhandlers[] = - "NAME Connect as IRC server\n" "CMD url %s\n\n"; --#else -+#elif 0 - static char defaultconf_urlhandlers[] = - "NAME SUB\n" "CMD Epiphany...\n\n"\ - "NAME Open\n" "CMD !epiphany '%s'\n\n"\ -@@ -626,6 +626,9 @@ - "NAME Ping\n" "CMD !"XTERM"ping -c 4 %s\n\n"\ - "NAME ENDSUB\n" "CMD \n\n"\ - "NAME Connect as IRC server\n" "CMD url %s\n\n"; -+#else -+static char defaultconf_urlhandlers[] = -+ "NAME Open URL in Web Browser\n" "CMD !gnome-open '%s'\n\n"; - #endif - #endif - diff --git a/xchat-2.6.6-simplify-to-use-htmlview-for-default-webbrowser.patch b/xchat-2.6.6-simplify-to-use-htmlview-for-default-webbrowser.patch deleted file mode 100644 index d671d36..0000000 --- a/xchat-2.6.6-simplify-to-use-htmlview-for-default-webbrowser.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- xchat-2.6.6/src/common/xchat.c.orig 2006-08-02 23:07:47.000000000 -0400 -+++ xchat-2.6.6/src/common/xchat.c 2006-08-02 23:10:16.000000000 -0400 -@@ -578,7 +578,7 @@ - #ifdef WIN32 - static char defaultconf_urlhandlers[] = - "NAME Connect as IRC server\n" "CMD url %s\n\n"; --#else -+#elif 0 - static char defaultconf_urlhandlers[] = - "NAME SUB\n" "CMD Epiphany...\n\n"\ - "NAME Open\n" "CMD !epiphany '%s'\n\n"\ -@@ -626,6 +626,9 @@ - "NAME Ping\n" "CMD !"XTERM"ping -c 4 %s\n\n"\ - "NAME ENDSUB\n" "CMD \n\n"\ - "NAME Connect as IRC server\n" "CMD url %s\n\n"; -+#else -+static char defaultconf_urlhandlers[] = -+ "NAME Open URL in Web Browser\n" "CMD !htmlview '%s'\n\n"; - #endif - #endif - diff --git a/xchat-2.8.4-disable-tray-icon-by-default.patch b/xchat-2.8.4-disable-tray-icon-by-default.patch new file mode 100644 index 0000000..5466815 --- /dev/null +++ b/xchat-2.8.4-disable-tray-icon-by-default.patch @@ -0,0 +1,12 @@ +diff -ur xchat-2.8.4/src/common/cfgfiles.c xchat-2.8.4-disable-tray-icon-by-default/src/common/cfgfiles.c +--- xchat-2.8.4/src/common/cfgfiles.c 2007-06-17 08:11:42.000000000 +0200 ++++ xchat-2.8.4-disable-tray-icon-by-default/src/common/cfgfiles.c 2007-07-04 12:05:21.000000000 +0200 +@@ -670,7 +670,7 @@ + prefs.autoopendccchatwindow = 1; + prefs.userhost = 1; + prefs.gui_url_mod = 4; /* ctrl */ +- prefs.gui_tray = 1; ++ prefs.gui_tray = 0; + prefs.gui_pane_left_size = 100; + prefs.gui_pane_right_size = 100; + prefs.mainwindow_save = 1; diff --git a/xchat-2.4.4-redhat-desktop.patch b/xchat-2.8.4-redhat-desktop.patch similarity index 58% rename from xchat-2.4.4-redhat-desktop.patch rename to xchat-2.8.4-redhat-desktop.patch index c175fa8..4187ede 100644 --- a/xchat-2.4.4-redhat-desktop.patch +++ b/xchat-2.8.4-redhat-desktop.patch @@ -1,6 +1,7 @@ ---- xchat-2.4.4/xchat.desktop.pre 2005-06-27 02:58:18.000000000 -0400 -+++ xchat-2.4.4/xchat.desktop 2005-06-27 08:25:51.000000000 -0400 -@@ -1,22 +1,9 @@ +diff -ur xchat-2.8.4/xchat.desktop xchat-2.8.4-redhat-desktop/xchat.desktop +--- xchat-2.8.4/xchat.desktop 2007-06-23 17:50:27.000000000 +0200 ++++ xchat-2.8.4-redhat-desktop/xchat.desktop 2007-07-04 12:00:46.000000000 +0200 +@@ -1,23 +1,10 @@ [Desktop Entry] Encoding=UTF-8 -Name=XChat IRC @@ -17,12 +18,14 @@ -Comment[sv]=IRC-klient -Comment[ro]=Client de IRC -Comment[zh_TW]=X-Chat 聊天程式 --Comment=IRC Client +-Comment=Chat with other people using Internet Relay Chat +Name=IRC +Comment=X-Chat Exec=xchat - Icon=xchat.png +-Icon=xchat.png ++Icon=xchat Terminal=false Type=Application -Categories=Application;Network; -+Categories=X-Red-Hat-Extras;Application;Network; ++Categories=Network; + StartupNotify=true diff --git a/xchat-2.8.4-shm-pixmaps.patch b/xchat-2.8.4-shm-pixmaps.patch new file mode 100644 index 0000000..68e572c --- /dev/null +++ b/xchat-2.8.4-shm-pixmaps.patch @@ -0,0 +1,56 @@ +diff -up xchat-2.8.4/src/fe-gtk/xtext.c.jx xchat-2.8.4/src/fe-gtk/xtext.c +--- xchat-2.8.4/src/fe-gtk/xtext.c.jx 2007-06-08 05:57:07.000000000 -0400 ++++ xchat-2.8.4/src/fe-gtk/xtext.c 2007-12-20 17:12:52.000000000 -0500 +@@ -3537,6 +3537,22 @@ get_image (GtkXText *xtext, Display *xdi + + #endif + ++#ifdef USE_SHM ++static int ++have_shm_pixmaps(Display *dpy) ++{ ++ static int checked = 0, major, minor; ++ static Bool have = FALSE; ++ ++ if (!checked) { ++ XShmQueryVersion(dpy, &major, &minor, &have); ++ checked = 1; ++ } ++ ++ return have; ++} ++#endif ++ + static GdkPixmap * + shade_pixmap (GtkXText * xtext, Pixmap p, int x, int y, int w, int h) + { +@@ -3549,6 +3565,11 @@ shade_pixmap (GtkXText * xtext, Pixmap p + GC tgc; + Display *xdisplay = GDK_WINDOW_XDISPLAY (xtext->draw_buf); + ++#ifdef USE_SHM ++ int shm_pixmaps; ++ shm_pixmaps = have_shm_pixmaps(xdisplay); ++#endif ++ + XGetGeometry (xdisplay, p, &root, &dummy, &dummy, &width, &height, + &dummy, &depth); + +@@ -3602,7 +3623,7 @@ shade_pixmap (GtkXText * xtext, Pixmap p + else + { + #ifdef USE_SHM +- if (xtext->shm) ++ if (xtext->shm && shm_pixmaps) + { + #if (GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION == 0) + shaded_pix = gdk_pixmap_foreign_new ( +@@ -3620,7 +3641,7 @@ shade_pixmap (GtkXText * xtext, Pixmap p + } + + #ifdef USE_SHM +- if (!xtext->shm) ++ if (!xtext->shm || !shm_pixmaps) + #endif + XPutImage (xdisplay, GDK_WINDOW_XWINDOW (shaded_pix), + GDK_GC_XGC (xtext->fgc), ximg, 0, 0, 0, 0, w, h); diff --git a/xchat.spec b/xchat.spec index 582c289..d424f4b 100644 --- a/xchat.spec +++ b/xchat.spec @@ -1,70 +1,79 @@ -# Enable this for Fedora Core 2 builds and newer. For Fedora Core 1, -# Red Hat Linux 9, and Red Hat Enterprise Linux 3, set to 0 -%define build_fc2 1 - %define gconf_version 2.14 Summary: A popular and easy to use graphical IRC (chat) client Name: xchat -Version: 2.6.6 -Release: 9%{?dist} +Version: 2.8.4 +Release: 11%{?dist} Epoch: 1 Group: Applications/Internet -License: GPL +License: GPLv2+ URL: http://www.xchat.org -Source: http://www.xchat.org/files/source/2.6/xchat-%{version}.tar.bz2 -Buildroot: %{_tmppath}/%{name}-%{version}-root -# Patches 0-9 reserved for official xchat.org patches +Source: http://www.xchat.org/files/source/2.8/xchat-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Patch10: xchat-2.4.4-redhat-desktop.patch +# Patches 0-9 reserved for official xchat.org patches +# Fix creation of ~/.xchat2/scrollback/ paths. +Patch0: xc284-scrollbmkdir.diff +# 1) Stops scrollback files growing too large by fixing the file-shrink code. +# 2) Puts a "Display scrollback from previous session" into the Setup GUI +# (logging section) so people can turn this off without typing commands. +Patch1: xc284-improvescrollback.diff +# Scrollback shrinking code forgets to close(). +Patch2: xc284-fix-scrollbfdleak.diff + +Patch10: xchat-2.8.4-redhat-desktop.patch Patch12: xchat-1.8.7-use-sysconf-to-detect-cpus.patch Patch19: xchat-2.0.2-freenode.patch -Patch21: xchat-2.6.6-nonblock.patch -Patch22: xchat-2.6.6-simplify-to-use-gnome-open-for-default-webbrowser.patch -Patch23: xchat-2.6.6-simplify-to-use-htmlview-for-default-webbrowser.patch -Patch33: xchat-2.4.3-im_context_filter_keypress.patch -# filed as 1262423 in the xchat bug tracker -Patch34: xchat-2.4.4-unrealize.patch +# see #241923 +Patch35: xchat-2.8.4-disable-tray-icon-by-default.patch +Patch40: xchat-2.8.4-shm-pixmaps.patch -# upstream 2.6.6 fi patch -Patch35: xchat-2.6.6-fi.patch -# upstream 2.6.6 es patch -Patch36: xchat-2.6.6-es.patch - -BuildRequires: perl python-devel openssl-devel pkgconfig -BuildRequires: GConf2-devel, gtkspell-devel +BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel +BuildRequires: GConf2-devel BuildRequires: dbus-devel >= 0.60, dbus-glib-devel >= 0.60 -BuildRequires: glib2-devel >= 2.0.3, gtk2-devel >= 2.0.3, bison >= 1.35 +BuildRequires: glib2-devel >= 2.10.0, gtk2-devel >= 2.10.0, bison >= 1.35 BuildRequires: gettext /bin/sed BuildRequires: libtool +BuildRequires: libsexy-devel +BuildRequires: desktop-file-utils >= 0.10 # For gconftool-2: Requires(post): GConf2 >= %{gconf_version} Requires(preun): GConf2 >= %{gconf_version} # Ensure that a compatible libperl is installed Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: gtkspell + +Provides: xchat-perl = %{epoch}:%{version}-%{release} +Obsoletes: xchat-perl < %{epoch}:%{version}-%{release} +Provides: xchat-python = %{epoch}:%{version}-%{release} +Obsoletes: xchat-python < %{epoch}:%{version}-%{release} %description -X-Chat is an easy to use graphical IRC chat client for the X Window -System. +X-Chat is an easy to use graphical IRC chat client for the X Window System. +It allows you to join multiple IRC channels (chat rooms) at the same time, +talk publicly, private one-on-one conversations etc. Even file transfers +are possible. + +This includes the plugins to run the Perl and Python scripts. + +%package tcl +Summary: Tcl script plugin for X-Chat +Group: Applications/Internet +Requires: %{name} = %{epoch}:%{version}-%{release} +%description tcl +This package contains the X-Chat plugin providing the Tcl scripting interface. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 -%patch10 -p1 -b .redhat-desktop-file +%patch10 -p1 -b .desktop-file %patch12 -p0 -b .use-sysconf-to-detect-cpus %patch19 -p0 -b .freenode -%patch21 -p1 -b .nonblock -%if %{build_fc2} -%patch22 -p1 -b .simplify-to-use-gnome-open-for-default-webbrowser -%else -%patch23 -p1 -b .simplify-to-use-htmlview-for-default-webbrowser -%endif -%patch33 -p1 -b .im_context_filter_keypress -%patch34 -p1 -b .unrealize -%patch35 -p1 -b .fi266 -%patch36 -p1 -b .es266 +%patch35 -p1 -b .tray-icon +%patch40 -p1 -b .shm-pixmaps %build # Remove CVS files from source dirs so they're not installed into doc dirs. @@ -75,39 +84,50 @@ export LDFLAGS=$(perl -MExtUtils::Embed -e ldopts) %configure --disable-panel \ --disable-textfe \ + --enable-gtkfe \ --enable-openssl \ --enable-python \ - --disable-tcl \ + --enable-tcl=%{_libdir} \ --enable-ipv6 \ - --enable-spell=static + --enable-spell=libsexy \ + --enable-shm # gtkspell breaks Input Method commit with ENTER -# static works if the optional exchant package is installed make %{?_smp_mflags} + %install %{__rm} -rf $RPM_BUILD_ROOT -export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 -%makeinstall -unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL +%{__make} install DESTDIR=$RPM_BUILD_ROOT GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 -# Get rid of static libs -%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la +# Get rid of libtool archives +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/xchat/plugins/*.la -# Move plugins around -%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xchat/plugins -for plugin in perl.so python.so dbus.so; do - %{__mv} $RPM_BUILD_ROOT%{_libdir}/$plugin $RPM_BUILD_ROOT%{_libdir}/xchat/plugins/ -done +# Install the .desktop file properly +%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/applications/xchat.desktop +desktop-file-install --vendor="" \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications xchat.desktop %find_lang %name +# do not Provide plugins .so +%define _use_internal_dependency_generator 0 +%{__cat} << \EOF > %{name}.prov +#!%{_buildshell} +%{__grep} -v %{_docdir} - | %{__find_provides} $* \ + | %{__sed} '/\.so$/d' +EOF +%define __find_provides %{_builddir}/%{name}-%{version}/%{name}.prov +%{__chmod} +x %{__find_provides} + + %post # Install schema export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule /etc/gconf/schemas/apps_xchat_url_handler.schemas >& /dev/null || : + %pre if [ "$1" -gt 1 ]; then export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` @@ -126,19 +146,140 @@ fi %files -f %{name}.lang %defattr(-,root,root) %doc README ChangeLog +%doc plugins/plugin20.html plugins/perl/xchat2-perl.html %{_bindir}/xchat -%{_bindir}/xchat-remote %dir %{_libdir}/xchat %dir %{_libdir}/xchat/plugins -%{_libdir}/xchat/plugins/*.so +%{_libdir}/xchat/plugins/perl.so +%{_libdir}/xchat/plugins/python.so %{_datadir}/applications/xchat.desktop %{_datadir}/pixmaps/* %{_sysconfdir}/gconf/schemas/apps_xchat_url_handler.schemas +%{_datadir}/dbus-1/services/org.xchat.service.service + +%files tcl +%defattr(-,root,root) +%{_libdir}/xchat/plugins/tcl.so %changelog +* Sat Jan 19 2008 Kevin Kofler - 1:2.8.4-11 +- fix bug in xchat-2.8.4-shm-pixmaps.patch (Adam Jackson, #429218) + +* Thu Jan 3 2008 Christopher Aillon 1:2.8.4-10 +- Rebuild + +* Thu Dec 20 2007 Adam Jackson 1:2.8.4-9 +- xchat-2.8.4-shm-pixmaps.patch: MIT-SHM pixmaps are optional, and when + using EXA they are not available. Check that the server supports them + before trying to create them so we don't crash. + +* Wed Dec 19 2007 Kevin Kofler - 1:2.8.4-8 +- apply xc284-fix-scrollbfdleak.diff from upstream + +* Wed Dec 5 2007 Christopher Aillon - 1:2.8.4-7 +- Fix the icon key in the .desktop file to validate + +* Sat Oct 13 2007 Kevin Kofler - 1:2.8.4-6 +- drop obsolete xchat-2.4.4-unrealize.patch (fixed upstream for a while) +- drop broken xchat-2.4.3-im_context_filter_keypress.patch (#295331) + +* Wed Sep 26 2007 Kevin Kofler - 1:2.8.4-5 +- apply xc284-improvescrollback.diff from upstream + +* Thu Aug 23 2007 Remi Collet - 1:2.8.4-4.fc8.1 +- F-8 rebuild (BuildID) + +* Sat Aug 11 2007 Kevin Kofler - 1:2.8.4-4 +- add missing BR perl(ExtUtils::Embed) + +* Fri Aug 3 2007 Kevin Kofler - 1:2.8.4-3 +- specify GPL version in License tag + +* Tue Jul 10 2007 Kevin Kofler - 1:2.8.4-2 +- apply xc284-scrollbmkdir.diff from upstream + +* Wed Jul 4 2007 Kevin Kofler - 1:2.8.4-1 +- update to 2.8.4 +- drop xc282-fixtrayzombies.diff (already in 2.8.4) +- rebase redhat-desktop and tray-icon patches + +* Fri Jun 22 2007 Kevin Kofler - 1:2.8.2-12 +- install the .desktop file with --vendor="" to keep the old name + +* Thu Jun 21 2007 Kevin Kofler - 1:2.8.2-11 +- add missing BR desktop-file-utils + +* Thu Jun 21 2007 Kevin Kofler - 1:2.8.2-10 +- remove Application; and X-Red-Hat-Extras; categories from .desktop file + (merge review #226551) +- install the .desktop file properly (merge review #226551) + +* Tue Jun 12 2007 Kevin Kofler - 1:2.8.2-9 +- build against system libsexy instead of static sexy-spell-entry now that this + is possible (Core-Extras merge) + +* Sat Jun 2 2007 Kevin Kofler - 1:2.8.2-8 +- disable tray icon by default (#241923) + +* Thu May 31 2007 Kevin Kofler - 1:2.8.2-7 +- revert to redhat-desktop patch pending further discussion + +* Thu May 31 2007 Kevin Kofler - 1:2.8.2-6 +- apply xc282-fixtrayzombies.diff from upstream + +* Wed May 30 2007 Kevin Kofler - 1:2.8.2-5 +- remove Requires: gtkspell as gtkspell is not currently being used + +* Mon May 28 2007 Kevin Kofler - 1:2.8.2-4 +- set explicit libdir for Tcl so it's found on lib64 arches (Remi Collet) +- move Tcl plugin into subpackage + (not an incompatible change as this was not built in f7-final at all) + +* Mon May 28 2007 Kevin Kofler - 1:2.8.2-3 +- use versioned Provides/Obsoletes to allow future package split + +* Mon May 28 2007 Kevin Kofler - 1:2.8.2-2 +- merge updates by Remi Collet and Marius Feraru (#224180) +- mention Tcl in description +- add release and user name to buildroot +- follow desktop-entry-spec on Name and GenericName as required by the Packaging + Guidelines +- drop BR gtkspell-devel as it's not currently used + +* Thu Apr 5 2007 Remi Collet - 1:2.8.2-1.fc6.remi +- update to 2.8.2 + * Sat Mar 24 2007 Matthias Clasen - 1:2.6.6-9 - Own /usr/lib/xchat (#166731) +* Thu Jan 25 2007 Marius Feraru - 1:2.8.0-1.n0i.1 +- version 2.8.0 +- disabled some patches: nonblock, locale (fi, es) +- enabled fast tinting +- fixed "exchant" typo +- switched to using the "make install" (DESTDIR works) +- simplified gconf schema disabling method +- dropped plugins mover +- updated "Get rid of static libs" +- dropped xchat-remote +- updated build requirements +- dropped "default-webbrowser" patches (xchat tries to do it better now) +- do not provide "perl.so", "python.so", etc +- own everything under %%{_libdir}/xchat +- converted spec file to UTF8 +- fixed desktop entry category (dropping "Application") +- keep plugins documentation + +* Tue Jan 16 2007 Remi Collet - 1:2.8.0-2.fc6.remi +- add Provides/Osboletes for extensions (split RPM available on xchat.org). +- longer description +- enable tcl extension +- Requires gtk >= 2.10.0 + +* Mon Jan 15 2007 Remi Collet - 1:2.8.0-1.fc6.remi +- update to 2.8.0 +- add upstream patches (xc280-fix-back.diff, xc280-fix-ja.diff) + * Fri Nov 3 2006 Matthias Clasen - 1:2.6.6-8 - Silence %%pre (#213838) @@ -550,7 +691,7 @@ fi * Mon Jun 25 2001 Karsten Hopp - use konqueror, not kfmclient on URLs -* Fri Feb 23 2001 Trond Eivind Glomsrd +* Fri Feb 23 2001 Trond Eivind Glomsrød - langify - use %%{_tmppath} - make it compile