pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44284: tirc compilation fix on DragonflyBSD



>Number:         44284
>Category:       pkg
>Synopsis:       tirc compilation fix on DragonflyBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 28 00:45:00 +0000 2010
>Originator:     Nolan Lum
>Release:        DragonflyBSD v2.8.2
>Organization:
>Environment:
DragonFly  2.8-RELEASE DragonFly v2.8.2-RELEASE #3: Fri Oct 29 08:00:40 PDT 
2010     
root%test29.backplane.com@localhost:/usr/obj/usr/src-misc/sys/X86_64_GENERIC  
x86_64
>Description:
The tirc package in pkgsrc contains code that utilizes CIRCLEQ, a queue that 
was removed in FreeBSD and DragonFlyBSD. I've included a patch that changes all 
uses of CIRCLEQ to the equivalent TAILQ, as use of CIRCLEQ is not recommended 
anyway.

--
Package description: tirc is another IRC client.  It has support for vi-like 
editor line and general usage, nickname completion, ANSI-colors, flood 
protection and many more.
>How-To-Repeat:

>Fix:
From 19fa8ee76f063969400a5c4db32090cbc110df72 Mon Sep 17 00:00:00 2001
From: Nolan Lum <nol888%gmail.com@localhost>
Date: Mon, 27 Dec 2010 17:51:31 -0500
Subject: [PATCH] Fix compilation of tirc

---
 chat/tirc/distinfo         |    2 +-
 chat/tirc/patches/patch-ad |  179 +++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 177 insertions(+), 4 deletions(-)

diff --git a/chat/tirc/distinfo b/chat/tirc/distinfo
index c036872..adc69ff 100644
--- a/chat/tirc/distinfo
+++ b/chat/tirc/distinfo
@@ -6,7 +6,7 @@ Size (tirc-1.2.tar.gz) = 300089 bytes
 SHA1 (patch-aa) = e47e007f827c3453e9a3944ede6b2aba4ae6b9ed
 SHA1 (patch-ab) = 012837ad61d2790fb00f8c621da10e912029bb86
 SHA1 (patch-ac) = 048f33969cca99f80e9f63401dab95ca1ee247bf
-SHA1 (patch-ad) = 9cfae360117275d08df46468308d895f353cbf83
+SHA1 (patch-ad) = e0bb2be3e25a36a525a6cd51e46b049c71b6379e
 SHA1 (patch-ae) = ab0a0da6a47ffc12ac81bce0aa45c20f05372a46
 SHA1 (patch-af) = 649f4b57ff56bc297f33a0511c6b11bb0016ef73
 SHA1 (patch-ag) = 34cfac73b5438ff108f96e57a4196994d50e0a23
diff --git a/chat/tirc/patches/patch-ad b/chat/tirc/patches/patch-ad
index 6316acf..c6d358c 100644
--- a/chat/tirc/patches/patch-ad
+++ b/chat/tirc/patches/patch-ad
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- screen.c.orig      2005-12-15 22:53:30.000000000 +0000
+--- screen.c.orig      1999-02-22 16:52:34 -0500
 +++ screen.c
-@@ -36,6 +36,7 @@ static char rcsid[] = "$Id: screen.c,v 1
+@@ -36,6 +36,7 @@
  #elif defined(HAVE_LIBGEN_H)
  #include <libgen.h>
  #endif
@@ -10,7 +10,25 @@ $NetBSD$
  
  #include "compat.h"
  #include "tty.h"
-@@ -109,7 +110,6 @@ extern char        *myname, nick[], *srvnm;
+@@ -66,7 +67,7 @@
+ struct ircpage {
+       struct ircwin   *ipg_iwa;
+       struct ircwin   *ipg_iwc;
+-      CIRCLEQ_ENTRY(ircpage) ipg_entries;
++      TAILQ_ENTRY(ircpage) ipg_entries;
+       int             ipg_upd;
+ }; 
+ 
+@@ -99,7 +100,7 @@
+ static int    dodisplay;      /* if 0, window updates and clock won't be
+                                * displayed (for example when in opt editor */
+ 
+-CIRCLEQ_HEAD(, ircpage)       pages_head;
++TAILQ_HEAD(, ircpage) pages_head;
+ 
+ #define       IW_USED         1
+ #define IW_VISIBLE    2
+@@ -109,7 +110,6 @@
  extern void   (*othercmd) __P((char *));
  extern int    on_irc;
  extern int    umd;
@@ -18,3 +36,158 @@ $NetBSD$
  extern int    is_away;
  
  char          *prompt;
+@@ -167,7 +167,7 @@
+       tty_gotoxy(0, 0);
+       tty_flush();
+ 
+-      CIRCLEQ_INIT(&pages_head);
++      TAILQ_INIT(&pages_head);
+       cpage = NULL;
+       cpageno = 0;
+       otherpage = 0;
+@@ -307,8 +307,8 @@
+       }
+ 
+       /* Else try the other pages */
+-      for (ipg = pages_head.cqh_first; ipg != (struct ircpage *)&pages_head;
+-          ipg = ipg->ipg_entries.cqe_next) {
++      for (ipg = pages_head.tqh_first; ipg != (struct ircpage *)&pages_head;
++          ipg = ipg->ipg_entries.tqe_next) {
+           ipg_switchtopg(ipg);
+ 
+           /*
+@@ -656,9 +656,9 @@
+       struct channel *ch;
+       struct ircpage *ipg, *savepg = cpage;
+ 
+-      for (ipg = pages_head.cqh_first;
++      for (ipg = pages_head.tqh_first;
+           ipg != (struct ircpage *) &pages_head;
+-          ipg = ipg->ipg_entries.cqe_next) {
++          ipg = ipg->ipg_entries.tqe_next) {
+           ipg_switchtopg(ipg);
+           /*
+            * Traverse the window list. For each window, iterate through
+@@ -987,8 +987,8 @@
+ {
+       struct ircpage *ipg, *savepg = cpage;
+ 
+-      for (ipg = pages_head.cqh_first; ipg != (struct ircpage *)&pages_head;
+-          ipg = ipg->ipg_entries.cqe_next) {
++      for (ipg = pages_head.tqh_first; ipg != (struct ircpage *)&pages_head;
++          ipg = ipg->ipg_entries.tqe_next) {
+               ipg_switchtopg(ipg);
+               equalwin();
+       }
+@@ -1099,8 +1099,8 @@
+       strcpy(t, cname);
+       h = elf_hash(irc_strupr(t));
+ 
+-      for (ipg = pages_head.cqh_first; ipg != (struct ircpage *) &pages_head;
+-          ipg = ipg->ipg_entries.cqe_next) {
++      for (ipg = pages_head.tqh_first; ipg != (struct ircpage *) &pages_head;
++          ipg = ipg->ipg_entries.tqe_next) {
+               ipg_switchtopg(ipg);
+ 
+               w = iwa;
+@@ -2163,8 +2163,8 @@
+       struct ircwin *iw;
+       struct ircpage *ipg;
+ 
+-      for (ipg = pages_head.cqh_first; ipg != (struct ircpage *) &pages_head;
+-          ipg = ipg->ipg_entries.cqe_next)
++      for (ipg = pages_head.tqh_first; ipg != (struct ircpage *) &pages_head;
++          ipg = ipg->ipg_entries.tqe_next)
+               for (iw = ipg->ipg_iwa; iw != NULL; iw = iw->iw_next)
+                       reformat_backscroll(iw, t_columns);
+ }
+@@ -2197,7 +2197,7 @@
+       ipg->ipg_iwa = iwa;
+       ipg->ipg_iwc = iwc;
+       ipg->ipg_upd = 0;
+-      CIRCLEQ_INSERT_TAIL(&pages_head, ipg, ipg_entries);
++      TAILQ_INSERT_TAIL(&pages_head, ipg, ipg_entries);
+       otherpage = cpageno;
+       cpageno = numpages++;
+       set_prompt(NULL);
+@@ -2214,10 +2214,10 @@
+       int newpg;
+ 
+       if (iwa == NULL || (iwa->iw_next == NULL && iwa->iw_ch == NULL)) {
+-              if (ipg->ipg_entries.cqe_prev !=
++              if (*(ipg->ipg_entries.tqe_prev) !=
+                   (struct ircpage *) &pages_head)
+                       newpg = cpageno - 1;
+-              else if (ipg->ipg_entries.cqe_next !=
++              else if (ipg->ipg_entries.tqe_next !=
+                   (struct ircpage *) &pages_head)
+                       newpg = cpageno + 1;
+               else {
+@@ -2235,7 +2235,7 @@
+               }
+ 
+               ipg_switchto(newpg, 1);
+-              CIRCLEQ_REMOVE(&pages_head, ipg, ipg_entries);
++              TAILQ_REMOVE(&pages_head, ipg, ipg_entries);
+               free(ipg);
+               numpages--;
+               set_prompt(NULL);
+@@ -2256,9 +2256,9 @@
+       struct ircpage *ipg;
+       int pns = pageno;
+ 
+-      for (ipg = pages_head.cqh_first;
++      for (ipg = pages_head.tqh_first;
+           ipg != (struct ircpage *) &pages_head && pageno > 0;
+-          ipg = ipg->ipg_entries.cqe_next, pageno--)
++          ipg = ipg->ipg_entries.tqe_next, pageno--)
+               ;
+       if (pageno == 0 && ipg != (struct ircpage *) &pages_head) {
+               ipg_switchtopg(ipg);
+@@ -2312,9 +2312,9 @@
+ 
+       pline[0] = 0;
+ 
+-      for (i = 0, ipg = pages_head.cqh_first; i < numpages &&
++      for (i = 0, ipg = pages_head.tqh_first; i < numpages &&
+           ipg != (struct ircpage *) &pages_head;
+-          i++, ipg = ipg->ipg_entries.cqe_next) {
++          i++, ipg = ipg->ipg_entries.tqe_next) {
+               if (ipg != cpage)
+                       sprintf(t, "-%d-", i);
+               else
+@@ -2352,9 +2352,9 @@
+       struct ircpage *ipg;
+       int i, n = 1;
+       
+-      for (i = 0, ipg = pages_head.cqh_first;
++      for (i = 0, ipg = pages_head.tqh_first;
+           ipg != (struct ircpage *) &pages_head;
+-          ipg = ipg->ipg_entries.cqe_next, i++)
++          ipg = ipg->ipg_entries.tqe_next, i++)
+               if (ipg->ipg_upd)
+                       pglist[n++] = i + '0';
+       if (n > 1) {
+@@ -2378,9 +2378,9 @@
+       struct ircpage *ipg;
+       int i;
+       
+-      for (i = 0, ipg = pages_head.cqh_first;
++      for (i = 0, ipg = pages_head.tqh_first;
+           ipg != (struct ircpage *) &pages_head;
+-          ipg = ipg->ipg_entries.cqe_next, i++)
++          ipg = ipg->ipg_entries.tqe_next, i++)
+               if (ipg->ipg_upd)
+                       pupd |= 1 << i;
+       if (force_update)
+@@ -2434,8 +2434,8 @@
+       struct ircwin *w;
+       struct channel *ch;
+ 
+-      for (ipg = pages_head.cqh_first; ipg != (struct ircpage *)&pages_head;
+-          ipg = ipg->ipg_entries.cqe_next)
++      for (ipg = pages_head.tqh_first; ipg != (struct ircpage *)&pages_head;
++          ipg = ipg->ipg_entries.tqe_next)
+               for (w = iwa; w != NULL && w->iw_flags & IW_USED;
+                   w = w->iw_next)
+                       for (ch = w->iw_ch; ch != NULL; ch = ch->ch_wnext)
-- 
1.7.0.7



Home | Main Index | Thread Index | Old Index