From 3bb3dca05e4afd0a4bb88233fe68dba7b484f56a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 07:20:22 +0000 Subject: [PATCH 1/6] Initialize branch F-12 for xchat --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From 08d48beafc68f4f65d2fea9d7ac595eb2c069382 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:29:42 +0000 Subject: [PATCH 2/6] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6548b34..7c2ed50 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: xchat -# $Id: Makefile,v 1.1 2004/09/09 14:33:13 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:31:32 notting Exp $ NAME := xchat SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 75299fbd2074779c6e8f3e7518745cf008757574 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 1 May 2010 07:15:54 +0000 Subject: [PATCH 3/6] Sync from devel: 2.8.6-17 - Add port numbers for Freenode (Debarshi Ray) 2.8.6-16 - Added IRCClient .desktop file subcategory (#485306) - Added GTK .desktop file subcategory - Added curly brackets to the name macro for consistency. 2.8.6-15 - Add patch to allow switching to next channel with activity. 2.8.6-14 - rebuild against perl 5.10.1 --- xchat-2.8.6-change-page-activity.patch | 339 +++++++++++++++++++++++++ xchat-2.8.6-freenode-ports.patch | 35 +++ xchat.spec | 29 ++- 3 files changed, 400 insertions(+), 3 deletions(-) create mode 100644 xchat-2.8.6-change-page-activity.patch create mode 100644 xchat-2.8.6-freenode-ports.patch diff --git a/xchat-2.8.6-change-page-activity.patch b/xchat-2.8.6-change-page-activity.patch new file mode 100644 index 0000000..970158d --- /dev/null +++ b/xchat-2.8.6-change-page-activity.patch @@ -0,0 +1,339 @@ +diff -paur xchat2.orig/src/common/inbound.c xchat2/src/common/inbound.c +--- xchat2.orig/src/common/inbound.c 2008-07-20 17:31:44.898468115 +0200 ++++ xchat2/src/common/inbound.c 2008-07-19 19:57:09.799906780 +0200 +@@ -297,7 +297,10 @@ is_hilight (char *from, char *text, sess + { + g_free (text); + if (sess != current_tab) ++ { + sess->nick_said = TRUE; ++ lastact_update(sess); ++ } + fe_set_hilight (sess); + return 1; + } +@@ -344,6 +347,7 @@ inbound_action (session *sess, char *cha + sess->msg_said = TRUE; + sess->new_data = FALSE; + } ++ lastact_update(sess); + } + + user = userlist_find (sess, from); +@@ -395,6 +399,7 @@ inbound_chanmsg (server *serv, session * + { + sess->msg_said = TRUE; + sess->new_data = FALSE; ++ lastact_update(sess); + } + + user = userlist_find (sess, from); +diff -paur xchat2.orig/src/common/xchat.c xchat2/src/common/xchat.c +--- xchat2.orig/src/common/xchat.c 2008-07-20 17:31:44.900468825 +0200 ++++ xchat2/src/common/xchat.c 2008-07-20 17:33:57.089468218 +0200 +@@ -71,6 +71,23 @@ GSList *usermenu_list = 0; + GSList *urlhandler_list = 0; + GSList *tabmenu_list = 0; + ++/* ++ * This array contains 5 double linked lists, one for each priority in the ++ * "interesting session" queue ("channel" stands for everything but ++ * SESS_DIALOG): ++ * ++ * [0] queries with hilight ++ * [1] queries ++ * [2] channels with hilight ++ * [3] channels with dialogue ++ * [4] channels with other data ++ * ++ * Each time activity happens the corresponding session is put at the ++ * beginning of one of the lists. The aim is to be able to switch to the ++ * session with the most important/recent activity. ++ */ ++GList *sess_list_by_lastact[5] = {NULL, NULL, NULL, NULL, NULL}; ++ + static int in_xchat_exit = FALSE; + int xchat_is_quitting = FALSE; + /* command-line args */ +@@ -93,6 +110,105 @@ struct xchatprefs prefs; + SSL_CTX *ctx = NULL; + #endif + ++/* ++ * Update the priority queue of the "interesting sessions" ++ * (sess_list_by_lastact). ++ */ ++void ++lastact_update(session *sess) ++{ ++ int newidx; ++ ++ /* Find the priority (for the order see before) */ ++ if (sess->type == SESS_DIALOG) ++ { ++ if (sess->nick_said) ++ newidx = LACT_QUERY_HI; ++ else if (sess->msg_said) ++ newidx = LACT_QUERY; ++ else if (sess->new_data) ++ newidx = LACT_QUERY; ++ else ++ newidx = LACT_NONE; ++ } ++ else ++ { ++ if (sess->nick_said) ++ newidx = LACT_CHAN_HI; ++ else if (sess->msg_said) ++ newidx = LACT_CHAN; ++ else if (sess->new_data) ++ newidx = LACT_CHAN_DATA; ++ else ++ newidx = LACT_NONE; ++ } ++ ++ /* Check if this update is a no-op */ ++ if (sess->lastact_idx == newidx && ++ ((newidx != LACT_NONE && sess->lastact_elem == sess_list_by_lastact[newidx]) || ++ (newidx == LACT_NONE))) ++ return; ++ ++ /* Remove from the old position (and, if no new position, return */ ++ else if (sess->lastact_idx != LACT_NONE && sess->lastact_elem) ++ { ++ sess_list_by_lastact[sess->lastact_idx] = g_list_remove_link( ++ sess_list_by_lastact[sess->lastact_idx], ++ sess->lastact_elem); ++ if (newidx == LACT_NONE) ++ { ++ sess->lastact_idx = newidx; ++ return; ++ } ++ } ++ ++ /* No previous position, allocate new */ ++ else if (!sess->lastact_elem) ++ sess->lastact_elem = g_list_prepend(sess->lastact_elem, sess); ++ ++ sess->lastact_idx = newidx; ++ sess_list_by_lastact[newidx] = g_list_concat( ++ sess->lastact_elem, sess_list_by_lastact[newidx]); ++} ++ ++/* ++ * Extract the first session from the priority queue of sessions with recent ++ * activity. Return NULL if no such session can be found. ++ * ++ * If filter is specified, skip a session if filter(session) returns 0. This ++ * can be used for UI-specific needs, e.g. in fe-gtk we want to filter out ++ * detached sessions. ++ */ ++session * ++lastact_getfirst(int (*filter) (session *sess)) ++{ ++ int i; ++ session *sess = NULL; ++ GList *curitem; ++ ++ /* 5 is the number of priority classes LACT_ */ ++ for (i = 0; i < 5 && !sess; i++) ++ { ++ curitem = sess_list_by_lastact[i]; ++ while (curitem && !sess) ++ { ++ sess = g_list_nth_data(curitem, 0); ++ if (!sess || (filter && !filter(sess))) ++ { ++ sess = NULL; ++ curitem = g_list_next(curitem); ++ } ++ } ++ ++ if (sess) ++ { ++ sess_list_by_lastact[i] = g_list_remove_link(sess_list_by_lastact[i], curitem); ++ sess->lastact_idx = LACT_NONE; ++ } ++ } ++ ++ return sess; ++} + + int + is_session (session * sess) +@@ -362,6 +478,9 @@ session_new (server *serv, char *from, i + + sess_list = g_slist_prepend (sess_list, sess); + ++ sess->lastact_elem = NULL; ++ sess->lastact_idx = LACT_NONE; ++ + fe_new_window (sess, focus); + + return sess; +@@ -533,6 +652,16 @@ session_free (session *killsess) + current_sess = sess_list->data; + } + ++ if (killsess->lastact_elem) ++ { ++ if (killsess->lastact_idx != LACT_NONE) ++ sess_list_by_lastact[killsess->lastact_idx] = g_list_delete_link( ++ sess_list_by_lastact[killsess->lastact_idx], ++ killsess->lastact_elem); ++ else ++ g_list_free_1(killsess->lastact_elem); ++ } ++ + free (killsess); + + if (!sess_list && !in_xchat_exit) +diff -paur xchat2.orig/src/common/xchat.h xchat2/src/common/xchat.h +--- xchat2.orig/src/common/xchat.h 2008-07-20 17:31:44.901467675 +0200 ++++ xchat2/src/common/xchat.h 2008-07-20 17:33:28.240467970 +0200 +@@ -320,6 +320,15 @@ struct xchatprefs + #define SET_ON 1 + #define SET_DEFAULT 2 /* use global setting */ + ++/* Priorities in the "interesting sessions" priority queue ++ * (see xchat.c:sess_list_by_lastact) */ ++#define LACT_NONE -1 /* no queues */ ++#define LACT_QUERY_HI 0 /* query with hilight */ ++#define LACT_QUERY 1 /* query with messages */ ++#define LACT_CHAN_HI 2 /* channel with hilight */ ++#define LACT_CHAN 3 /* channel with messages */ ++#define LACT_CHAN_DATA 4 /* channel with other data */ ++ + typedef struct session + { + /* Per-Channel Alerts */ +@@ -369,6 +378,10 @@ typedef struct session + + int type; /* SESS_* */ + ++ GList *lastact_elem; /* our GList element in sess_list_by_lastact */ ++ int lastact_idx; /* the sess_list_by_lastact[] index of the list we're in. ++ * For valid values, see defines of LACT_*. */ ++ + int new_data:1; /* new data avail? (purple tab) */ + int nick_said:1; /* your nick mentioned? (blue tab) */ + int msg_said:1; /* new msg available? (red tab) */ +diff -paur xchat2.orig/src/common/xchatc.h xchat2/src/common/xchatc.h +--- xchat2.orig/src/common/xchatc.h 2008-07-20 17:31:44.901467675 +0200 ++++ xchat2/src/common/xchatc.h 2008-07-20 11:43:36.673967630 +0200 +@@ -25,10 +25,13 @@ extern GSList *ignore_list; + extern GSList *usermenu_list; + extern GSList *urlhandler_list; + extern GSList *tabmenu_list; ++extern GList *sess_list_by_lastact[]; + + session * find_channel (server *serv, char *chan); + session * find_dialog (server *serv, char *nick); + session * new_ircwindow (server *serv, char *name, int type, int focus); ++void lastact_update (session * sess); ++session * lastact_getfirst (int (*filter) (session *sess)); + int is_session (session * sess); + void session_free (session *killsess); + void lag_check (void); +diff -paur xchat2.orig/src/fe-gtk/fe-gtk.c xchat2/src/fe-gtk/fe-gtk.c +--- xchat2.orig/src/fe-gtk/fe-gtk.c 2008-07-20 17:31:44.958466232 +0200 ++++ xchat2/src/fe-gtk/fe-gtk.c 2008-07-19 19:58:57.431961788 +0200 +@@ -603,6 +603,7 @@ fe_print_text (struct session *sess, cha + sess->gui->is_tab && !sess->nick_said && stamp == 0) + { + sess->new_data = TRUE; ++ lastact_update(sess); + if (sess->msg_said) + fe_set_tab_color (sess, 2); + else +diff -paur xchat2.orig/src/fe-gtk/fkeys.c xchat2/src/fe-gtk/fkeys.c +--- xchat2.orig/src/fe-gtk/fkeys.c 2008-07-20 17:31:44.960465847 +0200 ++++ xchat2/src/fe-gtk/fkeys.c 2008-07-20 12:20:50.186930065 +0200 +@@ -158,7 +158,7 @@ static const struct key_action key_actio + {key_action_handle_command, "Run Command", + N_("The \002Run Command\002 action runs the data in Data 1 as if it has been typed into the entry box where you pressed the key sequence. Thus it can contain text (which will be sent to the channel/person), commands or user commands. When run all \002\\n\002 characters in Data 1 are used to deliminate seperate commands so it is possible to run more than one command. If you want a \002\\\002 in the actual text run then enter \002\\\\\002")}, + {key_action_page_switch, "Change Page", +- N_("The \002Change Page\002 command switches between pages in the notebook. Set Data 1 to the page you want to switch to. If Data 2 is set to anything then the switch will be relative to the current position")}, ++ N_("The \002Change Page\002 command switches between pages in the notebook. Set Data 1 to the page you want to switch to. If Data 2 is set to anything then the switch will be relative to the current position. Set Data 1 to auto to switch to the page with the most recent and important activity (queries first, then channels with hilight, channels with dialogue, channels with other data)")}, + {key_action_insert, "Insert in Buffer", + N_("The \002Insert in Buffer\002 command will insert the contents of Data 1 into the entry where the key sequence was pressed at the current cursor position")}, + {key_action_scroll_page, "Scroll Page", +@@ -402,6 +402,7 @@ key_load_defaults () + "A\n3\nChange Page\nD1:3\nD2!\n\n"\ + "A\n2\nChange Page\nD1:2\nD2!\n\n"\ + "A\n1\nChange Page\nD1:1\nD2!\n\n"\ ++ "A\ngrave\nChange Page\nD1:auto\nD2!\n\n"\ + "C\no\nInsert in Buffer\nD1:\nD2!\n\n"\ + "C\nb\nInsert in Buffer\nD1:\nD2!\n\n"\ + "C\nk\nInsert in Buffer\nD1:\nD2!\n\n"\ +@@ -1196,6 +1197,20 @@ key_action_handle_command (GtkWidget * w + return 0; + } + ++/* ++ * Check if the given session is inside the main window. This predicate ++ * is passed to lastact_pop as a way to filter out detached sessions. ++ * XXX: Consider moving this in a different file? ++ */ ++static int ++session_check_is_tab(session *sess) ++{ ++ if (!sess || !sess->gui) ++ return FALSE; ++ ++ return (sess->gui->is_tab); ++} ++ + static int + key_action_page_switch (GtkWidget * wid, GdkEventKey * evt, char *d1, + char *d2, struct session *sess) +@@ -1209,6 +1224,30 @@ key_action_page_switch (GtkWidget * wid, + if (!len) + return 1; + ++ if (strcasecmp(d1, "auto") == 0) ++ { ++ /* Auto switch makes no sense in detached sessions */ ++ if (!sess->gui->is_tab) ++ return 1; ++ ++ /* Obtain a session with recent activity */ ++ session *newsess = lastact_getfirst(session_check_is_tab); ++ ++ if (newsess) ++ { ++ /* ++ * Only sessions in the current window should be considered (i.e. ++ * we don't want to move the focus on a different window). This ++ * call could, in theory, do this, but we checked before that ++ * newsess->gui->is_tab and sess->gui->is_tab. ++ */ ++ mg_bring_tofront_sess(newsess); ++ return 0; ++ } ++ else ++ return 1; ++ } ++ + for (i = 0; i < len; i++) + { + if (d1[i] < '0' || d1[i] > '9') +diff -paur xchat2.orig/src/fe-gtk/maingui.c xchat2/src/fe-gtk/maingui.c +--- xchat2.orig/src/fe-gtk/maingui.c 2008-07-20 17:31:44.964469466 +0200 ++++ xchat2/src/fe-gtk/maingui.c 2008-07-19 19:58:58.255909127 +0200 +@@ -359,6 +359,7 @@ fe_set_tab_color (struct session *sess, + + break; + } ++ lastact_update(sess); + } + } + +@@ -643,6 +644,7 @@ mg_focus (session *sess) + sess->nick_said = FALSE; + sess->msg_said = FALSE; + sess->new_data = FALSE; ++ lastact_update(sess); + /* when called via mg_changui_new, is_tab might be true, but + sess->res->tab is still NULL. */ + if (sess->res->tab) diff --git a/xchat-2.8.6-freenode-ports.patch b/xchat-2.8.6-freenode-ports.patch new file mode 100644 index 0000000..3e336fd --- /dev/null +++ b/xchat-2.8.6-freenode-ports.patch @@ -0,0 +1,35 @@ +From bc98c28e891408145bed2b18d3c02adbadadde31 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Sat, 30 Jan 2010 13:05:21 +0200 +Subject: [PATCH] Added port numbers for Freenode + +http://freenode.net/irc_servers.shtml +--- + src/common/servlist.c | 11 ++++++++++- + 1 files changed, 10 insertions(+), 1 deletions(-) + +diff --git a/src/common/servlist.c b/src/common/servlist.c +index c6839e0..3082966 100644 +--- a/src/common/servlist.c ++++ b/src/common/servlist.c +@@ -207,7 +207,16 @@ static const struct defaultserver def[] = + {0, "irc.vendetta.com"}, + + {"FreeNode", 0}, +- {0, "irc.freenode.net"}, ++ {0, "irc.freenode.net/6665"}, ++ {0, "irc.freenode.net/6666"}, ++ {0, "irc.freenode.net/6667"}, ++ {0, "irc.freenode.net/8000"}, ++ {0, "irc.freenode.net/8001"}, ++ {0, "irc.freenode.net/8002"}, ++#ifdef USE_OPENSSL ++ {0, "irc.freenode.net/+7000"}, ++ {0, "irc.freenode.net/+7070"}, ++#endif + + /* {"Freeworld", 0}, + {0, "kabel.freeworld.nu"}, +-- +1.6.6 + diff --git a/xchat.spec b/xchat.spec index 8dec97d..d546eac 100644 --- a/xchat.spec +++ b/xchat.spec @@ -4,7 +4,7 @@ Summary: A popular and easy to use graphical IRC (chat) client Name: xchat Version: 2.8.6 -Release: 13%{?dist} +Release: 17%{?dist} Epoch: 1 Group: Applications/Internet License: GPLv2+ @@ -28,6 +28,11 @@ Patch40: xchat-2.8.4-shm-pixmaps.patch Patch41: xchat-2.8.6-default-utf8.patch # fix literal underscore in "C_onnect" button (#512034, Edward Sheldrake) Patch42: xchat-2.8.6-connect-mnemonic.patch +# patch to add ability to change to tab with most recent activity +# See http://sourceforge.net/tracker/?func=detail&aid=2022871&group_id=239&atid=350239 +Patch50: xchat-2.8.6-change-page-activity.patch +# add port numbers for Freenode (Debarshi Ray) +Patch51: xchat-2.8.6-freenode-ports.patch BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel BuildRequires: GConf2-devel @@ -76,6 +81,8 @@ This package contains the X-Chat plugin providing the Tcl scripting interface. %patch40 -p1 -b .shm-pixmaps %patch41 -p1 -b .default-utf8 %patch42 -p1 -b .connect-mnemonic +%patch50 -p1 -b .active-channel-switch +%patch51 -p1 -b .freenode-ports sed -i -e 's/#define GTK_DISABLE_DEPRECATED//g' src/fe-gtk/*.c @@ -110,9 +117,11 @@ make %{?_smp_mflags} # 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 + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category=IRCClient \ + --add-category=GTK xchat.desktop -%find_lang %name +%find_lang %{name} # do not Provide plugins .so %define _use_internal_dependency_generator 0 @@ -165,6 +174,20 @@ fi %{_libdir}/xchat/plugins/tcl.so %changelog +* Wed Apr 21 2010 Kevin Kofler - 1:2.8.6-17 +- Add port numbers for Freenode (Debarshi Ray) + +* Fri Apr 09 2010 Rudolf Kastl - 1:2.8.6-16 +- Added IRCClient .desktop file subcategory (#485306) +- Added GTK .desktop file subcategory +- Added curly brackets to the name macro for consistency. + +* Wed Dec 16 2009 Kevin Fenzi - 1:2.8.6-15 +- Add patch to allow switching to next channel with activity. + +* Mon Dec 7 2009 Stepan Kasal - 1:2.8.6-14 +- rebuild against perl 5.10.1 + * Thu Sep 10 2009 Christopher Aillon - 1:2.8.6-13 - Drop the antiquated OPN reference From e4b471135d2a35f735b2051da6aad65fed10bad1 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 3 Jun 2010 23:08:26 +0000 Subject: [PATCH 4/6] Sync from devel: 2.8.8-1 - Update to 2.8.8 (#597735) - Use xz tarball (new in 2.8.8) - Drop smallfixes, redhat-desktop (remaining part), shm-pixmaps and connect-mnemonic patches (all fixed upstream) 2.8.6-18 - Mass rebuild with perl-5.12.0 --- .cvsignore | 2 +- sources | 2 +- xc286-smallfixes.diff | 68 ------------------ xchat-2.8.4-redhat-desktop.patch | 14 ---- xchat-2.8.4-shm-pixmaps.patch | 106 ----------------------------- xchat-2.8.6-connect-mnemonic.patch | 11 --- xchat.spec | 25 +++---- 7 files changed, 15 insertions(+), 213 deletions(-) delete mode 100644 xc286-smallfixes.diff delete mode 100644 xchat-2.8.4-redhat-desktop.patch delete mode 100644 xchat-2.8.4-shm-pixmaps.patch delete mode 100644 xchat-2.8.6-connect-mnemonic.patch diff --git a/.cvsignore b/.cvsignore index b916783..1f5f78f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xchat-2.8.6.tar.bz2 +xchat-2.8.8.tar.xz diff --git a/sources b/sources index 1bcf67b..6ce9832 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1f2670865d43a23a9abc596dde999aca xchat-2.8.6.tar.bz2 +9a11f13121ff0af787bba3b014378e58 xchat-2.8.8.tar.xz diff --git a/xc286-smallfixes.diff b/xc286-smallfixes.diff deleted file mode 100644 index da90015..0000000 --- a/xc286-smallfixes.diff +++ /dev/null @@ -1,68 +0,0 @@ -# -# Various small fixes from CVS that are considered safe to apply to 2.8.6. -# ---- xchat-2.8.6/src/common/cfgfiles.c 2008-02-05 21:02:47.000000000 +1100 -+++ xchat-2.8.6p1/src/common/cfgfiles.c 2008-06-15 13:45:43.000000000 +1000 -@@ -886,7 +886,6 @@ - set_showval (session *sess, const struct prefs *var, char *tbuf) - { - int len, dots, j; -- static const char *offon[] = { "OFF", "ON" }; - - len = strlen (var->name); - memcpy (tbuf, var->name, len); -@@ -909,8 +908,10 @@ - *((int *) &prefs + var->offset)); - break; - case TYPE_BOOL: -- sprintf (tbuf + len, "\0033:\017 %s\n", offon[ -- *((int *) &prefs + var->offset)]); -+ if (*((int *) &prefs + var->offset)) -+ sprintf (tbuf + len, "\0033:\017 %s\n", "ON"); -+ else -+ sprintf (tbuf + len, "\0033:\017 %s\n", "OFF"); - break; - } - PrintText (sess, tbuf); ---- xchat-2.8.6/src/common/chanopt.c 2008-06-10 22:00:55.000000000 +1000 -+++ xchat-2.8.6p1/src/common/chanopt.c 2008-06-15 13:48:04.000000000 +1000 -@@ -32,7 +32,7 @@ - - #define S_F(xx) STRUCT_OFFSET_STR(struct session,xx) - --channel_options chanopt[] = -+static const channel_options chanopt[] = - { - {"alert_beep", "BEEP", S_F(alert_beep)}, - {"alert_taskbar", NULL, S_F(alert_taskbar)}, ---- xchat-2.8.6/src/common/servlist.c 2008-04-01 19:22:34.000000000 +1100 -+++ xchat-2.8.6p1/src/common/servlist.c 2008-06-15 13:57:41.000000000 +1000 -@@ -509,6 +509,8 @@ - list = g_slist_nth (net->servlist, net->selected); - if (!list) - list = net->servlist; -+ if (!list) -+ return; - ircserv = list->data; - - /* incase a protocol switch is added to the servlist gui */ ---- xchat-2.8.6/src/common/text.c 2008-03-28 13:20:04.000000000 +1100 -+++ xchat-2.8.6p1/src/common/text.c 2008-06-15 13:59:59.000000000 +1000 -@@ -216,7 +216,7 @@ - static void - scrollback_save (session *sess, char *text) - { -- char buf[1024]; -+ char buf[512 * 4]; - time_t stamp; - int len; - -@@ -266,7 +266,7 @@ - scrollback_load (session *sess) - { - int fh; -- char buf[1024]; -+ char buf[512 * 4]; - char *text; - time_t stamp; - int lines; diff --git a/xchat-2.8.4-redhat-desktop.patch b/xchat-2.8.4-redhat-desktop.patch deleted file mode 100644 index 3dc1c1d..0000000 --- a/xchat-2.8.4-redhat-desktop.patch +++ /dev/null @@ -1,14 +0,0 @@ -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 -@@ -16,8 +16,8 @@ - Comment[zh_TW]=X-Chat 聊天程式 - Comment=Chat with other people using Internet Relay Chat - Exec=xchat --Icon=xchat.png -+Icon=xchat - Terminal=false - Type=Application --Categories=Application;Network; -+Categories=Network; - StartupNotify=true diff --git a/xchat-2.8.4-shm-pixmaps.patch b/xchat-2.8.4-shm-pixmaps.patch deleted file mode 100644 index 21602ca..0000000 --- a/xchat-2.8.4-shm-pixmaps.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -ur xchat-2.8.4/src/fe-gtk/xtext.c xchat-2.8.4-shm-pixmaps/src/fe-gtk/xtext.c ---- xchat-2.8.4/src/fe-gtk/xtext.c 2007-06-08 11:57:07.000000000 +0200 -+++ xchat-2.8.4-shm-pixmaps/src/fe-gtk/xtext.c 2008-05-23 00:56:52.000000000 +0200 -@@ -1347,6 +1347,22 @@ - } - } - -+#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 void - gtk_xtext_paint (GtkWidget *widget, GdkRectangle *area) - { -@@ -1363,8 +1379,12 @@ - { - xtext->last_win_x = x; - xtext->last_win_y = y; --#if !defined(USE_SHM) && !defined(WIN32) -+#ifndef WIN32 -+#ifdef USE_SHM -+ if (xtext->shaded && !have_shm_pixmaps(GDK_WINDOW_XDISPLAY (xtext->draw_buf))) -+#else - if (xtext->shaded) -+#endif - { - xtext->recycle = TRUE; - gtk_xtext_load_trans (xtext); -@@ -3549,6 +3569,11 @@ - 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); - -@@ -3566,18 +3591,20 @@ - XFreeGC (xdisplay, tgc); - - #ifdef USE_SHM -- ximg = get_image (xtext, xdisplay, &xtext->shminfo, 0, 0, w, h, depth, tmp); --#else -- ximg = XGetImage (xdisplay, tmp, 0, 0, w, h, -1, ZPixmap); -+ if (shm_pixmaps) -+ ximg = get_image (xtext, xdisplay, &xtext->shminfo, 0, 0, w, h, depth, tmp); -+ else - #endif -+ ximg = XGetImage (xdisplay, tmp, 0, 0, w, h, -1, ZPixmap); - XFreePixmap (xdisplay, tmp); - } else - { - #ifdef USE_SHM -- ximg = get_image (xtext, xdisplay, &xtext->shminfo, x, y, w, h, depth, p); --#else -- ximg = XGetImage (xdisplay, p, x, y, w, h, -1, ZPixmap); -+ if (shm_pixmaps) -+ ximg = get_image (xtext, xdisplay, &xtext->shminfo, x, y, w, h, depth, p); -+ else - #endif -+ ximg = XGetImage (xdisplay, p, x, y, w, h, -1, ZPixmap); - } - - if (!ximg) -@@ -3602,7 +3629,7 @@ - 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 +3647,7 @@ - } - - #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); -@@ -3640,7 +3667,7 @@ - if (xtext->pixmap) - { - #ifdef USE_SHM -- if (xtext->shm) -+ if (xtext->shm && have_shm_pixmaps(GDK_WINDOW_XDISPLAY (xtext->draw_buf))) - { - XFreePixmap (GDK_WINDOW_XDISPLAY (xtext->pixmap), - GDK_WINDOW_XWINDOW (xtext->pixmap)); diff --git a/xchat-2.8.6-connect-mnemonic.patch b/xchat-2.8.6-connect-mnemonic.patch deleted file mode 100644 index e49ea01..0000000 --- a/xchat-2.8.6-connect-mnemonic.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urp xchat-2.8.6.orig/src/fe-gtk/gtkutil.c xchat-2.8.6/src/fe-gtk/gtkutil.c ---- xchat-2.8.6.orig/src/fe-gtk/gtkutil.c 2009-07-18 11:25:02.000000000 +0100 -+++ xchat-2.8.6/src/fe-gtk/gtkutil.c 2009-07-18 11:27:01.000000000 +0100 -@@ -376,6 +376,7 @@ gtkutil_button (GtkWidget *box, char *st - { - gtk_button_set_label (GTK_BUTTON (wid), labeltext); - gtk_button_set_image (GTK_BUTTON (wid), gtk_image_new_from_stock (stock, GTK_ICON_SIZE_MENU)); -+ gtk_button_set_use_underline (GTK_BUTTON (wid), TRUE); - if (box) - gtk_container_add (GTK_CONTAINER (box), wid); - } diff --git a/xchat.spec b/xchat.spec index d546eac..1a28f98 100644 --- a/xchat.spec +++ b/xchat.spec @@ -3,31 +3,26 @@ Summary: A popular and easy to use graphical IRC (chat) client Name: xchat -Version: 2.8.6 -Release: 17%{?dist} +Version: 2.8.8 +Release: 1%{?dist} Epoch: 1 Group: Applications/Internet License: GPLv2+ URL: http://www.xchat.org -Source: http://www.xchat.org/files/source/2.8/xchat-%{version}.tar.bz2 +Source: http://www.xchat.org/files/source/2.8/xchat-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Patches 0-9 reserved for official xchat.org patches -Patch0: xc286-smallfixes.diff -Patch10: xchat-2.8.4-redhat-desktop.patch Patch12: xchat-1.8.7-use-sysconf-to-detect-cpus.patch # see #241923 Patch35: xchat-2.8.4-disable-tray-icon-by-default.patch -Patch40: xchat-2.8.4-shm-pixmaps.patch # Upstream XChat 2.8.6 defaults to Latin1 (what upstream calls the "IRC" # encoding). Default to UTF-8 instead (as previous versions did, at least when # running under a UTF-8 locale). # Both the "IRC" and "UTF-8" settings will try to accept both Latin1 and UTF-8 # when it comes in, however "IRC" sends Latin1, "UTF-8" sends UTF-8. Patch41: xchat-2.8.6-default-utf8.patch -# fix literal underscore in "C_onnect" button (#512034, Edward Sheldrake) -Patch42: xchat-2.8.6-connect-mnemonic.patch # patch to add ability to change to tab with most recent activity # See http://sourceforge.net/tracker/?func=detail&aid=2022871&group_id=239&atid=350239 Patch50: xchat-2.8.6-change-page-activity.patch @@ -73,14 +68,11 @@ This package contains the X-Chat plugin providing the Tcl scripting interface. %prep %setup -q # Various small fixes from CVS that are considered safe to apply to 2.8.6. -%patch0 -p1 +# (currently none) -%patch10 -p1 -b .desktop-file %patch12 -p0 -b .use-sysconf-to-detect-cpus %patch35 -p1 -b .tray-icon -%patch40 -p1 -b .shm-pixmaps %patch41 -p1 -b .default-utf8 -%patch42 -p1 -b .connect-mnemonic %patch50 -p1 -b .active-channel-switch %patch51 -p1 -b .freenode-ports @@ -174,6 +166,15 @@ fi %{_libdir}/xchat/plugins/tcl.so %changelog +* Thu Jun 03 2010 Kevin Kofler - 1:2.8.8-1 +- Update to 2.8.8 (#597735) +- Use xz tarball (new in 2.8.8) +- Drop smallfixes, redhat-desktop (remaining part), shm-pixmaps and + connect-mnemonic patches (all fixed upstream) + +* Wed Jun 02 2010 Marcela Maslanova - 1:2.8.6-18 +- Mass rebuild with perl-5.12.0 + * Wed Apr 21 2010 Kevin Kofler - 1:2.8.6-17 - Add port numbers for Freenode (Debarshi Ray) From 31a183b7df31d6614b72285db89c23d59d05a7d5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 3 Jun 2010 23:13:29 +0000 Subject: [PATCH 5/6] - --enable-ntlm (no longer enabled by default) --- xchat.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xchat.spec b/xchat.spec index 1a28f98..d0393fa 100644 --- a/xchat.spec +++ b/xchat.spec @@ -4,7 +4,7 @@ Summary: A popular and easy to use graphical IRC (chat) client Name: xchat Version: 2.8.8 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Group: Applications/Internet License: GPLv2+ @@ -92,7 +92,8 @@ export LDFLAGS=$(perl -MExtUtils::Embed -e ldopts) --enable-tcl=%{_libdir} \ --enable-ipv6 \ --enable-spell=libsexy \ - --enable-shm + --enable-shm \ + --enable-ntlm # gtkspell breaks Input Method commit with ENTER @@ -166,6 +167,9 @@ fi %{_libdir}/xchat/plugins/tcl.so %changelog +* Thu Jun 03 2010 Kevin Kofler - 1:2.8.8-2 +- --enable-ntlm (no longer enabled by default) + * Thu Jun 03 2010 Kevin Kofler - 1:2.8.8-1 - Update to 2.8.8 (#597735) - Use xz tarball (new in 2.8.8) From 5d577d48a6a641c240c6c7a16830f91bd9629401 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:35:03 +0000 Subject: [PATCH 6/6] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 7c2ed50..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: xchat -# $Id: Makefile,v 1.2 2007/10/15 19:31:32 notting Exp $ -NAME := xchat -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12