summaryrefslogtreecommitdiff
path: root/chat/icb
diff options
context:
space:
mode:
authorwiz <wiz>2000-12-15 00:36:25 +0000
committerwiz <wiz>2000-12-15 00:36:25 +0000
commitc14570556499bf6fff1ea3aae45ddfecf11f6e64 (patch)
tree9efd46171d88d283a1dcc676d340dae7e3a2606c /chat/icb
parent457d8e87adf2eec3c960d68d946b92357ed076e8 (diff)
downloadpkgsrc-c14570556499bf6fff1ea3aae45ddfecf11f6e64.tar.gz
Create new 'chat' category, featuring chat clients and servers of all kinds.
Move some packages from 'net' here.
Diffstat (limited to 'chat/icb')
-rw-r--r--chat/icb/Makefile30
-rw-r--r--chat/icb/files/config56
-rw-r--r--chat/icb/files/md53
-rw-r--r--chat/icb/files/patch-sum21
-rw-r--r--chat/icb/patches/patch-aa43
-rw-r--r--chat/icb/patches/patch-ab14
-rw-r--r--chat/icb/patches/patch-ac13
-rw-r--r--chat/icb/patches/patch-ad17
-rw-r--r--chat/icb/patches/patch-ae13
-rw-r--r--chat/icb/patches/patch-af13
-rw-r--r--chat/icb/patches/patch-ag44
-rw-r--r--chat/icb/patches/patch-ah14
-rw-r--r--chat/icb/patches/patch-ai54
-rw-r--r--chat/icb/patches/patch-aj21
-rw-r--r--chat/icb/patches/patch-ak59
-rw-r--r--chat/icb/patches/patch-al14
-rw-r--r--chat/icb/patches/patch-am27
-rw-r--r--chat/icb/patches/patch-an68
-rw-r--r--chat/icb/patches/patch-ao18
-rw-r--r--chat/icb/patches/patch-ap60
-rw-r--r--chat/icb/patches/patch-aq35
-rw-r--r--chat/icb/patches/patch-ar12
-rw-r--r--chat/icb/patches/patch-as21
-rw-r--r--chat/icb/pkg/COMMENT1
-rw-r--r--chat/icb/pkg/DESCR2
-rw-r--r--chat/icb/pkg/PLIST8
26 files changed, 681 insertions, 0 deletions
diff --git a/chat/icb/Makefile b/chat/icb/Makefile
new file mode 100644
index 00000000000..9c338485097
--- /dev/null
+++ b/chat/icb/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/12/15 00:36:36 wiz Exp $
+#
+
+# Note: The file ftp://ftp.icb.net/pub/icb/icb-0.9grok2.tar.gz is way
+# older than this here. It's got no readline support, tcl, ... - HF
+DISTNAME= icb-5.0.9
+PKGNAME= icb-5.0.9pl1
+CATEGORIES= chat
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+
+MAINTAINER= cjs@netbsd.org
+HOMEPAGE= http://www.icb.net/
+
+NO_SRC_ON_FTP= "already in MASTER_SITE_LOCAL"
+
+do-configure:
+ @cd ${WRKSRC}; \
+ ${SED} -e s,@PREFIX@,${PREFIX},g ${FILESDIR}/config >${WRKSRC}/config
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/icb/icb ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/icbserverdb ${PREFIX}/libdata
+ ${INSTALL} -d ${PREFIX}/libdata/icb
+ ${INSTALL_SCRIPT} ${WRKSRC}/sample.icbrc \
+ ${WRKSRC}/contrib/bartender \
+ ${WRKSRC}/contrib/confuse \
+ ${WRKSRC}/contrib/echofile \
+ ${PREFIX}/libdata/icb
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/chat/icb/files/config b/chat/icb/files/config
new file mode 100644
index 00000000000..765076a8244
--- /dev/null
+++ b/chat/icb/files/config
@@ -0,0 +1,56 @@
+# $NetBSD: config,v 1.1.1.1 2000/12/15 00:36:37 wiz Exp $
+#
+# THIS IS AN AUTOMATICALLY GENERATED FILE
+#
+# If you edit this file and later run "setup", your
+# changes will be lost. This file gets fed to "make",
+# so keep that in mind if you make changes.
+#
+
+# Installing user's home directory
+HOME = /nonexistent
+
+# Directory where the client will be installed.
+BINDIR = @PREFIX@/bin
+
+# Directory where the manual page will be installed.
+MANDIR = @PREFIX@/man
+
+# Compiler to use.
+CC = cc
+
+# Compile options.
+CFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
+TCLCFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
+
+# Lint flags
+LFLAGS = -u -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
+
+# System dependent source file.
+SYSDEP =sysdep.bsd
+
+# Other libraries to include.
+OTHERLIBS =-lcurses -ltermcap
+
+# Resolver library
+RESOLVLIB =
+
+# Parallel makes. Set to & for Sequents.
+PMAKE =
+
+# Makefile dependency generator.
+MAKEDEPEND = makedepend
+
+# Makefile dependency generator.
+DEPENDFLAGS = -fMake -DNO_LRAND48 -DSTRINGS_H -DTIME_H
+
+# Hostname and port of remote server.
+DEFAULTHOST = crater.unm.edu
+DEFAULTPORT = 7326
+
+# Directory for support files
+LIBDIR = @PREFIX@/libdata
+
+# location of server database
+SERVERLIST = @PREFIX@/libdata/icbserverdb
+
diff --git a/chat/icb/files/md5 b/chat/icb/files/md5
new file mode 100644
index 00000000000..5e9223a07fc
--- /dev/null
+++ b/chat/icb/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/12/15 00:36:37 wiz Exp $
+
+MD5 (icb-5.0.9.tar.gz) = 1240504a8b0350a05c4441e7e91956e4
diff --git a/chat/icb/files/patch-sum b/chat/icb/files/patch-sum
new file mode 100644
index 00000000000..3a1ca986e26
--- /dev/null
+++ b/chat/icb/files/patch-sum
@@ -0,0 +1,21 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/12/15 00:36:37 wiz Exp $
+
+MD5 (patch-aa) = f6342b55aa894c06fdc83bbc3a8d9ecc
+MD5 (patch-ab) = af1c56e0de45046d2f36c1b4b7558741
+MD5 (patch-ac) = 4ab936ec1ad42beb7ceed7372807747a
+MD5 (patch-ad) = dcfe2f67487ec52d26d8df8bd589609a
+MD5 (patch-ae) = ee233ed0ce26a3388d8a5011d356a6e6
+MD5 (patch-af) = 29d28cc0e6a97a3f7a372391beebc1d6
+MD5 (patch-ag) = da51e2bc7636f0dc31987e764fa846dd
+MD5 (patch-ah) = 236d9cb118b325ee23135259e7981ea8
+MD5 (patch-ai) = 61eebb483ef75f5d6b86212c0b60c048
+MD5 (patch-aj) = 35794c14dd5975ba7b91efdc25905d2a
+MD5 (patch-ak) = d60689a2090fbedd4d0092e561f3a6f9
+MD5 (patch-al) = c7bdb306490980e1a549f838dd3a0652
+MD5 (patch-am) = 96ab9521ecc69d670c445e0acf724279
+MD5 (patch-an) = b618da755e0a9383a7c5429a062d12e5
+MD5 (patch-ao) = 1b382d84b41e37130a49300e21945789
+MD5 (patch-ap) = ddd5c1ff9deb3e7c38264675305b0098
+MD5 (patch-aq) = ab312e8e310b08633a504b6c19aa2289
+MD5 (patch-ar) = 06c67af14f9a8ae76bf48ad4a07a2087
+MD5 (patch-as) = fb3e96b60ffb3c4f754749b6a3a40c65
diff --git a/chat/icb/patches/patch-aa b/chat/icb/patches/patch-aa
new file mode 100644
index 00000000000..dfcc5b80026
--- /dev/null
+++ b/chat/icb/patches/patch-aa
@@ -0,0 +1,43 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/12/15 00:36:37 wiz Exp $
+
+--- icb/c_log.c.orig Fri Feb 24 22:20:18 1995
++++ icb/c_log.c Fri Jul 21 02:08:35 2000
+@@ -6,6 +6,7 @@
+ #include "icb.h"
+ #include "externs.h"
+ #include <time.h>
++#include <errno.h>
+
+ FILE *logfp = NULL;
+
+@@ -45,8 +46,6 @@
+ time_t time();
+ struct tm *t, *localtime();
+ time_t clock;
+- extern int errno, sys_nerr;
+- extern char *sys_errlist[];
+
+ /* determine pathname to use */
+ if (path == NULL || *path == '\0')
+@@ -97,8 +96,8 @@
+ aptr++;
+
+ /* timestamp it */
+- sprintf(mbuf, "Session log \"%s\" started at %d/%02d/%-2d %s.",
+- path, t->tm_mon+1, t->tm_mday, t->tm_year, aptr);
++ sprintf(mbuf, "Session log \"%s\" started at %d/%02d/%-4d %s.",
++ path, t->tm_mon+1, t->tm_mday, 1900+t->tm_year, aptr);
+ putl(mbuf, PL_SCR | PL_LOG);
+
+ return(0);
+@@ -126,8 +125,8 @@
+ aptr++;
+
+ /* timestamp it */
+- sprintf(mbuf, "Session log closed at %d/%02d/%-2d %s.",
+- t->tm_mon+1, t->tm_mday, t->tm_year, aptr);
++ sprintf(mbuf, "Session log closed at %d/%02d/%-4d %s.",
++ t->tm_mon+1, t->tm_mday, 1900+t->tm_year, aptr);
+ putl(mbuf, PL_SCR | PL_LOG);
+
+ /* close it */
diff --git a/chat/icb/patches/patch-ab b/chat/icb/patches/patch-ab
new file mode 100644
index 00000000000..b9c2492ed00
--- /dev/null
+++ b/chat/icb/patches/patch-ab
@@ -0,0 +1,14 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/12/15 00:36:37 wiz Exp $
+
+diff -x *.orig -urN ./icb/c_shell.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/c_shell.c
+--- ./icb/c_shell.c Fri Feb 24 22:20:19 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/c_shell.c Fri Nov 26 22:56:29 1999
+@@ -14,7 +14,7 @@
+ static char *usage = "usage: c_shell [command]";
+ int w, pid;
+ int shellout = 0;
+- union wait status;
++ int status;
+ char *shell, *getenv();
+
+ /* disallow use if restricted mode set */
diff --git a/chat/icb/patches/patch-ac b/chat/icb/patches/patch-ac
new file mode 100644
index 00000000000..b3fe11d3780
--- /dev/null
+++ b/chat/icb/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/globals.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/globals.c
+--- ./icb/globals.c Fri Feb 24 22:20:22 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/globals.c Fri Nov 26 22:56:30 1999
+@@ -59,6 +59,7 @@
+ 1, /* beeps */
+ "vi", /* editmode */
+ 0, /* tabreply */
++ 0, /* printtime */
+ 1, /* cute */
+ 0, /* autodel */
+ "", /* personalto */
diff --git a/chat/icb/patches/patch-ad b/chat/icb/patches/patch-ad
new file mode 100644
index 00000000000..e0cf1ac21a3
--- /dev/null
+++ b/chat/icb/patches/patch-ad
@@ -0,0 +1,17 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/helpdata.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/helpdata.c
+--- ./icb/helpdata.c Fri Feb 24 22:20:23 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/helpdata.c Fri Nov 26 22:56:30 1999
+@@ -600,6 +600,11 @@
+ " waiting for your screen, this gives you a chance to see the output",
+ " of your command.",
+ "",
++"printtime (boolean) default: false",
++"",
++" Print the current time in front of every line sent to the display",
++" and log file.",
++"",
+ "restricted (boolean) default: false",
+ "",
+ " Restricted shuts off the ability to run subshell commands or to",
diff --git a/chat/icb/patches/patch-ae b/chat/icb/patches/patch-ae
new file mode 100644
index 00000000000..c692985cebb
--- /dev/null
+++ b/chat/icb/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/icb.h /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/icb.h
+--- ./icb/icb.h Fri Feb 24 22:20:23 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/icb.h Fri Nov 26 22:56:30 1999
+@@ -38,6 +38,7 @@
+ int beeps; /* whether beeps are audible */
+ char *editmode; /* input editing mode */
+ int tabreply; /* should replies go into the tab history? */
++ int printtime; /* print timestamp in front of every msg? */
+ int cute; /* cute messages when a blank line is entered */
+ int autodel; /* automatically delete nicks from the tab
+ history that produce a "not logged on" error */
diff --git a/chat/icb/patches/patch-af b/chat/icb/patches/patch-af
new file mode 100644
index 00000000000..32ca4ab39fc
--- /dev/null
+++ b/chat/icb/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/oset.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/oset.c
+--- ./icb/oset.c Fri Feb 24 22:20:24 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/oset.c Fri Nov 26 22:56:31 1999
+@@ -39,6 +39,7 @@
+ { "pagesize", V_INT, (char *)&gv.pagesize },
+ { "pauseonshell", V_BOOLEAN, (char *)&gv.pauseonshell },
+ { "personalto", V_STRING, (char *)&gv.personalto },
++ { "printtime", V_BOOLEAN, (char *)&gv.printtime },
+ { "restricted", V_BOOLEAN, (char *)&gv.restricted },
+ { "tabreply", V_BOOLEAN, (char *)&gv.tabreply },
+ { "timedisplay", V_STRING, (char *)&gv.timedisplay },
diff --git a/chat/icb/patches/patch-ag b/chat/icb/patches/patch-ag
new file mode 100644
index 00000000000..f601d78408f
--- /dev/null
+++ b/chat/icb/patches/patch-ag
@@ -0,0 +1,44 @@
+$NetBSD: patch-ag,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+--- icb/print.c.orig Fri Feb 24 22:20:25 1995
++++ icb/print.c Sat Nov 27 00:01:04 1999
+@@ -5,6 +5,7 @@
+
+ #include "icb.h"
+ #include "externs.h"
++#include <time.h>
+
+ extern FILE *logfp;
+
+@@ -17,12 +18,22 @@
+ char printbuf[1024];
+ char *p = printbuf;
+ char *t = s;
++ struct tm *tm, *localtime();
++ char timestamp[9];
+
+ if (continued) {
+ linenumber = 0;
+ continued = 0;
+ }
+
++ /* If requested, prepare timestamp */
++ if (gv.printtime) {
++ gettime();
++ tm = localtime(&curtime);
++ snprintf(timestamp, sizeof(timestamp), "[%02d:%02d] ",
++ tm->tm_hour, tm->tm_min);
++ }
++
+ if (flags & PL_SCR) {
+ /* if paging in effect, do paging */
+ if (gv.pagesize && (++linenumber >= gv.pagesize)) {
+@@ -35,6 +46,8 @@
+ *p++ = *t++;
+ *p++ = '\r';
+ *p++ = '\n';
++ if (gv.printtime)
++ write(1, timestamp, 8);
+ write(1, printbuf, p - printbuf);
+ }
+
diff --git a/chat/icb/patches/patch-ah b/chat/icb/patches/patch-ah
new file mode 100644
index 00000000000..d4389180b89
--- /dev/null
+++ b/chat/icb/patches/patch-ah
@@ -0,0 +1,14 @@
+$NetBSD: patch-ah,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/protos.h /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/protos.h
+--- ./icb/protos.h Fri Feb 24 22:20:25 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/protos.h Fri Nov 26 22:56:28 1999
+@@ -64,7 +64,7 @@
+ int inserttab(void);
+ int ishushed(char *nick);
+ int lcaseit(char *s);
+-#ifdef linux
++#if defined(linux) || (defined(BSD) && BSD >= 199306)
+ int linebuffer(FILE *fp);
+ #else
+ int linebuffer(struct _iobuf *fp);
diff --git a/chat/icb/patches/patch-ai b/chat/icb/patches/patch-ai
new file mode 100644
index 00000000000..1a22ea1a202
--- /dev/null
+++ b/chat/icb/patches/patch-ai
@@ -0,0 +1,54 @@
+$NetBSD: patch-ai,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/serverlist.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/serverlist.c
+--- ./icb/serverlist.c Fri Feb 24 22:20:29 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/serverlist.c Fri Nov 26 22:56:29 1999
+@@ -1,4 +1,6 @@
+ #include <stdio.h>
++#include <stdlib.h>
++#include <pwd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "icb.h"
+@@ -14,15 +16,14 @@
+ FILE *openserverfile()
+ {
+ struct stat statbuf;
+- char *personalsl;
+- char command[256];
+- char pwd[256];
++ char *personalsl, *home;
++ char pwd[MAXPATHLEN+1];
+ FILE *ret;
+
+ #ifdef sgi
+ #undef SYSV
+ #endif
+-#ifndef SYSV
++#if !defined(SYSV) && !(defined(BSD) && BSD >= 199306) && !defined(__linux__)
+ getwd(pwd);
+ #else /* SYSV */
+ getcwd(pwd, MAXPATHLEN+1);
+@@ -30,11 +31,20 @@
+ #ifdef sgi
+ #define SYSV
+ #endif
+- chdir(getenv("HOME"));
++ if ((home = getenv("HOME")) == NULL) {
++ struct passwd *pw;
++ if ((pw = getpwuid(getuid())) == NULL)
++ home = ".";
++ home = pw->pw_dir;
++ }
++ chdir(home);
+ if (!stat(PERSONALSL,&statbuf))
+ {
+- sprintf(command,"/bin/cat %s %s\n", PERSONALSL, SERVERLIST);
++ char *command = malloc(strlen("/bin/cat \n") +
++ strlen(PERSONALSL) + strlen(SERVERLIST) + 1);
++ sprintf(command, "/bin/cat %s %s\n", PERSONALSL, SERVERLIST);
+ ret= popen(command,"r");
++ free(command);
+ }
+ else
+ ret= fopen(SERVERLIST,"r");
diff --git a/chat/icb/patches/patch-aj b/chat/icb/patches/patch-aj
new file mode 100644
index 00000000000..12a50b2e95a
--- /dev/null
+++ b/chat/icb/patches/patch-aj
@@ -0,0 +1,21 @@
+$NetBSD: patch-aj,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/strings.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/strings.c
+--- ./icb/strings.c Fri Feb 24 22:20:30 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/strings.c Fri Nov 26 22:56:28 1999
+@@ -333,6 +333,7 @@
+ /* cat multiple strings into one */
+ /* call with strscat(dest, src, src, ...) */
+
++#if 0
+ char *
+ strscat(va_alist)
+ va_dcl
+@@ -357,6 +358,7 @@
+ *dest = '\0';
+ return(dest);
+ }
++#endif
+
+ char *basename(path)
+ char *path;
diff --git a/chat/icb/patches/patch-ak b/chat/icb/patches/patch-ak
new file mode 100644
index 00000000000..608731f0ae3
--- /dev/null
+++ b/chat/icb/patches/patch-ak
@@ -0,0 +1,59 @@
+$NetBSD: patch-ak,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./icb/unix.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/unix.c
+--- ./icb/unix.c Fri Feb 24 22:20:31 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/unix.c Fri Nov 26 22:56:29 1999
+@@ -4,6 +4,8 @@
+ /* This file contains routines that are unix dependent. */
+ /* Eventually, most unixisms should be moved here. */
+
++#include <sys/types.h>
++#include <sys/param.h>
+ #include <stdio.h>
+ #include "icb.h"
+ #include "externs.h"
+@@ -13,6 +15,14 @@
+ #undef stty
+ #undef gtty
+
++#if defined(__linux__)
++#include <termios.h>
++#include <sys/ioctl.h>
++#define TTYSTRUCT termios
++#define stty(fd,buf) tcgetattr((fd), (buf))
++#define gtty(fd,buf) tcsetattr((fd), TCSANOW, (buf))
++#define SYSV
++#else
+ #ifndef SYSV
+
+ #ifdef linux
+@@ -30,6 +40,7 @@
+ #define stty(fd,buf) ioctl((fd),TCSETA,(buf))
+ #define gtty(fd,buf) ioctl((fd),TCGETA,(buf))
+ #endif /* SYSV */
++#endif /* __linux__ */
+
+ char *getlogin();
+
+@@ -49,8 +60,10 @@
+ if (((loginid = getlogin()) == NULL) || *loginid == '\0')
+ if ((pw = getpwuid(getuid())) == NULL)
+ loginid = NULL;
+- else
+- loginid = pw->pw_name;
++ else {
++ loginid = malloc(strlen(pw->pw_name) + 1);
++ strcpy(loginid, pw->pw_name);
++ }
+ return(loginid);
+ }
+
+@@ -181,7 +194,7 @@
+
+ getwinsize()
+ {
+-#ifndef NOWINSIZE
++#ifdef TIOCGWINSZ
+ struct winsize win;
+
+ /* get tty settings */
diff --git a/chat/icb/patches/patch-al b/chat/icb/patches/patch-al
new file mode 100644
index 00000000000..4b49c7b3ad2
--- /dev/null
+++ b/chat/icb/patches/patch-al
@@ -0,0 +1,14 @@
+$NetBSD: patch-al,v 1.1.1.1 2000/12/15 00:36:38 wiz Exp $
+
+diff -x *.orig -urN ./murgil/getrname.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/murgil/getrname.c
+--- ./murgil/getrname.c Fri Feb 24 22:19:41 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/murgil/getrname.c Fri Nov 26 22:56:29 1999
+@@ -14,7 +14,7 @@
+ {
+ static char rname[24];
+ struct hostent *host;
+-#if defined(linux)
++#if defined(linux) || defined(__NetBSD__)
+ #define PEER_CAST (struct sockaddr *)
+ #define HOST_CAST (char *)
+ #else
diff --git a/chat/icb/patches/patch-am b/chat/icb/patches/patch-am
new file mode 100644
index 00000000000..33d7e009979
--- /dev/null
+++ b/chat/icb/patches/patch-am
@@ -0,0 +1,27 @@
+$NetBSD: patch-am,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./murgil/serverserve.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/murgil/serverserve.c
+--- ./murgil/serverserve.c Fri Feb 24 22:19:44 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/murgil/serverserve.c Fri Nov 26 22:56:30 1999
+@@ -20,6 +20,9 @@
+ int timeisup;
+
+ sighandler gotalarm();
++#ifndef __FDS_BITS
++# define __FDS_BITS(set) ((set)->fds_bits)
++#endif
+
+ serverserve()
+ {
+@@ -81,9 +84,9 @@
+
+ /* examine set of file descriptors */
+ for (b = 0, y = 0; b <= (howmany(highestfd, 32) - 1); b++, y += 32) {
+- if (!fdr.fds_bits[b])
++ if (!__FDS_BITS(&fdr)[b])
+ continue;
+- bits = fdr.fds_bits[b];
++ bits = __FDS_BITS(&fdr)[b];
+ for (x = y; bits; x++, bits >>= 01)
+ if (bits & 01)
+ if (x == port_fd) {
diff --git a/chat/icb/patches/patch-an b/chat/icb/patches/patch-an
new file mode 100644
index 00000000000..1b114ccf14c
--- /dev/null
+++ b/chat/icb/patches/patch-an
@@ -0,0 +1,68 @@
+$NetBSD: patch-an,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./readline/readline.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/readline/readline.c
+--- ./readline/readline.c Fri Feb 24 22:20:03 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/readline/readline.c Fri Nov 26 22:56:30 1999
+@@ -48,7 +48,11 @@
+ # include <unistd.h>
+ #endif
+
++#if !defined(__linux__)
+ #define NEW_TTY_DRIVER
++#else
++#define TERMIOS_TTY_DRIVER
++#endif
+ #define HAVE_BSD_SIGNALS
+ /* #define USE_XON_XOFF */
+
+@@ -80,6 +84,10 @@
+ # if !defined (O_NDELAY)
+ # define O_NDELAY O_NONBLOCK /* Posix-style non-blocking i/o */
+ # endif /* O_NDELAY */
++#else
++# ifdef TERMIOS_TTY_DRIVER
++# include <termios.h>
++# endif /* !TERMIOS_MISSING */
+ #endif /* _POSIX_VERSION */
+
+ /* Other (BSD) machines use sgtty. */
+@@ -133,7 +141,7 @@
+ # endif /* USGr3 */
+ #endif /* USG && hpux */
+
+-#if defined (_POSIX_VERSION) || defined (USGr3)
++#if defined (_POSIX_VERSION) || defined (USGr3) || defined(__linux__)
+ # include <dirent.h>
+ # define direct dirent
+ # if defined (_POSIX_VERSION)
+@@ -280,7 +288,7 @@
+ static FILE *in_stream, *out_stream;
+
+ /* The names of the streams that we do input and output to. */
+-FILE *rl_instream = stdin, *rl_outstream = stdout;
++FILE *rl_instream = NULL, *rl_outstream = NULL;
+
+ /* Non-zero means echo characters as they are read. */
+ int readline_echoing_p = 1;
+@@ -1152,6 +1160,8 @@
+ {
+ /* Find out if we are running in Emacs. */
+ running_in_emacs = getenv ("EMACS");
++ rl_instream = stdin;
++ rl_outstream = stdout;
+
+ /* Allocate data structures. */
+ if (!rl_line_buffer)
+@@ -2505,7 +2515,11 @@
+
+ tio.c_lflag &= ~(ICANON | ECHO);
+
+- if (otio.c_cc[VEOF] != _POSIX_VDISABLE)
++#ifdef ONLCR
++ tio.c_oflag |= OPOST|ONLCR;
++#endif
++
++ if ((unsigned char)otio.c_cc[VEOF] != (unsigned char)_POSIX_VDISABLE)
+ eof_char = otio.c_cc[VEOF];
+
+ #if defined (USE_XON_XOFF)
diff --git a/chat/icb/patches/patch-ao b/chat/icb/patches/patch-ao
new file mode 100644
index 00000000000..dea0259c490
--- /dev/null
+++ b/chat/icb/patches/patch-ao
@@ -0,0 +1,18 @@
+$NetBSD: patch-ao,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./tcl/strerror.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/strerror.c
+--- ./tcl/strerror.c Fri Feb 24 22:19:50 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/strerror.c Fri Nov 26 22:56:30 1999
+@@ -20,6 +20,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
++#if !defined(BSD4_4) && !defined(__linux__)
+ /*
+ * List of known errors:
+ */
+@@ -138,3 +139,4 @@
+ (void) sprintf(defaultMsg, "unknown error (%d)", error);
+ return defaultMsg;
+ }
++#endif
diff --git a/chat/icb/patches/patch-ap b/chat/icb/patches/patch-ap
new file mode 100644
index 00000000000..ebb97deaf70
--- /dev/null
+++ b/chat/icb/patches/patch-ap
@@ -0,0 +1,60 @@
+$NetBSD: patch-ap,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./tcl/tclCmdAH.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclCmdAH.c
+--- ./tcl/tclCmdAH.c Fri Feb 24 22:19:53 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclCmdAH.c Fri Nov 26 22:56:28 1999
+@@ -38,9 +38,22 @@
+ #include <sys/wait.h>
+ #include "tclInt.h"
+
++#ifdef __NetBSD__
++#define unix
++#endif
++
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#include <unistd.h>
++#endif
++
+ extern int errno;
++#if !(defined(BSD) && BSD >= 199306)
+ extern long lseek();
++#endif
++#ifndef BSD4_4
+ extern char *mktemp();
++#endif
+
+ /*
+ *----------------------------------------------------------------------
+@@ -430,7 +443,7 @@
+ int pid = -1; /* -1 means child process doesn't
+ * exist (yet). Non-zero gives its
+ * id (0 only in child). */
+- union wait status;
++ int status;
+ char *cmdName, *execName;
+
+ /*
+@@ -501,8 +514,13 @@
+ } else {
+ char tmp[sizeof(TMP_FILE_NAME) + 1];
+ strcpy(tmp, TMP_FILE_NAME);
++#ifdef BSD4_4
++ mkstemp(tmp);
++ stdIn[0] = mkstemp(tmp);
++#else
+ mktemp(tmp);
+ stdIn[0] = open(tmp, O_RDWR|O_CREAT, 0);
++#endif
+ if (stdIn[0] < 0) {
+ sprintf(interp->result,
+ "couldn't create input file for \"%.50s\" command: %.50s",
+@@ -642,7 +660,7 @@
+ sprintf(interp->result, "command terminated abnormally");
+ result = TCL_ERROR;
+ }
+- result = status.w_retcode;
++ result = WEXITSTATUS(status);
+ }
+ if (stdIn[0] != -1) {
+ close(stdIn[0]);
diff --git a/chat/icb/patches/patch-aq b/chat/icb/patches/patch-aq
new file mode 100644
index 00000000000..40542b77ec8
--- /dev/null
+++ b/chat/icb/patches/patch-aq
@@ -0,0 +1,35 @@
+$NetBSD: patch-aq,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./tcl/tclGlob.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclGlob.c
+--- ./tcl/tclGlob.c Fri Feb 24 22:19:55 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclGlob.c Fri Nov 26 22:56:30 1999
+@@ -28,6 +28,12 @@
+ #include <sys/stat.h>
+ #include <tcl.h>
+
++#ifdef __linux__
++#define DIRNAMLEN(d) strlen((d)->d_name)
++#else
++#define DIRNAMLEN(d) ((d)->d_namlen)
++#endif
++
+ /*
+ * The structure below is used to keep track of a globbing result
+ * being built up (i.e. a partial list of file names). The list
+@@ -298,12 +304,12 @@
+ if (Tcl_StringMatch(entryPtr->d_name, pattern)) {
+ if (*p == 0) {
+ AppendResult(dir, entryPtr->d_name,
+- (int) entryPtr->d_namlen, resPtr);
++ (int) DIRNAMLEN(entryPtr), resPtr);
+ } else {
+- if ((l1+entryPtr->d_namlen+2) <= STATIC_SIZE) {
++ if ((l1+DIRNAMLEN(entryPtr)+2) <= STATIC_SIZE) {
+ newDir = static1;
+ } else {
+- newDir = malloc((unsigned) (l1+entryPtr->d_namlen+2));
++ newDir = malloc((unsigned) (l1+DIRNAMLEN(entryPtr)+2));
+ }
+ sprintf(newDir, "%s%s/", dir, entryPtr->d_name);
+ result = DoGlob(interp, newDir, p+1, resPtr);
+
diff --git a/chat/icb/patches/patch-ar b/chat/icb/patches/patch-ar
new file mode 100644
index 00000000000..c3654004433
--- /dev/null
+++ b/chat/icb/patches/patch-ar
@@ -0,0 +1,12 @@
+$NetBSD: patch-ar,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+--- sample.icbrc.orig Fri Nov 26 23:44:37 1999
++++ sample.icbrc Fri Nov 26 23:45:00 1999
+@@ -15,6 +15,7 @@
+ oset autodel false # set to "true" to have nicks that generate an "error -
+ # so-and-so not signed on" removed from tab history
+ #echoback on # uncomment to see your own public messages
++#oset printtime true # print time in front of each message
+
+ #==============================================================================#
+ # procedures
diff --git a/chat/icb/patches/patch-as b/chat/icb/patches/patch-as
new file mode 100644
index 00000000000..b63e52c513e
--- /dev/null
+++ b/chat/icb/patches/patch-as
@@ -0,0 +1,21 @@
+$NetBSD: patch-as,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+--- icb/unix.c.orig Sun Nov 28 23:33:27 1999
++++ icb/unix.c Sun Nov 28 23:35:51 1999
+@@ -92,13 +92,13 @@
+ pushback(c)
+ char c;
+ {
+-#ifndef SYSV
++#ifdef TIOCSTI
+ if (ioctl(0, TIOCSTI, &c) < 0)
+ perror("TIOCSTI ioctl failed");
+-#else /* SYSV */
++#else /* !TIOCSTI */
+ if (ungetc(c,stdin) == EOF)
+ perror("ungetc() failed");
+-#endif /* SYSV */
++#endif /* TIOCSTI */
+ }
+
+
diff --git a/chat/icb/pkg/COMMENT b/chat/icb/pkg/COMMENT
new file mode 100644
index 00000000000..7aa00e3ffea
--- /dev/null
+++ b/chat/icb/pkg/COMMENT
@@ -0,0 +1 @@
+Internet CB - a mostly-defunct chat client
diff --git a/chat/icb/pkg/DESCR b/chat/icb/pkg/DESCR
new file mode 100644
index 00000000000..e2c2b796b76
--- /dev/null
+++ b/chat/icb/pkg/DESCR
@@ -0,0 +1,2 @@
+This is a chat client similar to irc, but for the icb protocol.
+Virtually nobody uses it these days.
diff --git a/chat/icb/pkg/PLIST b/chat/icb/pkg/PLIST
new file mode 100644
index 00000000000..d5785bf63e9
--- /dev/null
+++ b/chat/icb/pkg/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+bin/icb
+libdata/icbserverdb
+libdata/icb/sample.icbrc
+libdata/icb/bartender
+libdata/icb/confuse
+libdata/icb/echofile
+@dirrm libdata/icb