summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2013-12-16 06:42:20 +0000
committerdholland <dholland@pkgsrc.org>2013-12-16 06:42:20 +0000
commit58788ca12e7a13de1facd4f82149799a8aed885a (patch)
tree4554ab3fbc5353eda1acdbbd2145c638f64f279b
parentb6b4d7388b9567312bb1be9d265c87344041a319 (diff)
downloadpkgsrc-58788ca12e7a13de1facd4f82149799a8aed885a.tar.gz
Add chat/phone, which is like VMS phone, written by Jonathan C. Broome
in 1985 and fixed up by Christos "last week". (I've apparently been sitting on this package since 20130101, so it was a year ago...) XXX: this should probably grow an rc script for the master daemon, phoned.
-rw-r--r--chat/phone/DESCR2
-rw-r--r--chat/phone/Makefile18
-rw-r--r--chat/phone/PLIST5
-rw-r--r--chat/phone/distinfo9
-rw-r--r--chat/phone/patches/patch-client_Makefile33
-rw-r--r--chat/phone/patches/patch-conv_Makefile28
-rw-r--r--chat/phone/patches/patch-master_Makefile46
-rw-r--r--chat/phone/patches/patch-master_utmp.c18
8 files changed, 159 insertions, 0 deletions
diff --git a/chat/phone/DESCR b/chat/phone/DESCR
new file mode 100644
index 00000000000..0c0ed419ae4
--- /dev/null
+++ b/chat/phone/DESCR
@@ -0,0 +1,2 @@
+Multi-person chat program akin to VMS phone, written by Jonathan
+C. Broome in 1985.
diff --git a/chat/phone/Makefile b/chat/phone/Makefile
new file mode 100644
index 00000000000..c46f87f588c
--- /dev/null
+++ b/chat/phone/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+DISTNAME= phone-2.0
+CATEGORIES= chat
+MASTER_SITES= ftp://ftp.astron.com/pub/phone/
+
+MAINTAINER= christos@NetBSD.org
+HOMEPAGE= ftp://ftp.astron.com/pub/phone/
+COMMENT= Multi-person chat program, like VMS phone
+LICENSE= generic-nonlicense
+
+INSTALLATION_DIRS= bin libexec ${PKGMANDIR}/man1 sbin
+
+post-install:
+ ${INSTALL_MAN} ${WRKSRC}/phone.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/phone.1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/chat/phone/PLIST b/chat/phone/PLIST
new file mode 100644
index 00000000000..eb85cb94975
--- /dev/null
+++ b/chat/phone/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2013/12/16 06:42:20 dholland Exp $
+bin/phone
+libexec/convd
+man/man1/phone.1
+sbin/phoned
diff --git a/chat/phone/distinfo b/chat/phone/distinfo
new file mode 100644
index 00000000000..729ca01e75b
--- /dev/null
+++ b/chat/phone/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+SHA1 (phone-2.0.tar.gz) = 61f3decc0a6b778f61d8b6bdecd37536c5883e8c
+RMD160 (phone-2.0.tar.gz) = 777ed87ab0fa992d680bc57284f856ea960c279d
+Size (phone-2.0.tar.gz) = 45729 bytes
+SHA1 (patch-client_Makefile) = 9023d14175c35dedc4e69341613aa88b37c55d7c
+SHA1 (patch-conv_Makefile) = 8356d737897207ba3492fcace90c5563ab0c97e4
+SHA1 (patch-master_Makefile) = de0a6dcc2b6729e90683768096f21c51acef0162
+SHA1 (patch-master_utmp.c) = 31d34b14e0c951028961d229c67d5718ffe49e30
diff --git a/chat/phone/patches/patch-client_Makefile b/chat/phone/patches/patch-client_Makefile
new file mode 100644
index 00000000000..e02210f1721
--- /dev/null
+++ b/chat/phone/patches/patch-client_Makefile
@@ -0,0 +1,33 @@
+$NetBSD: patch-client_Makefile,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+Configure for pkgsrc.
+
+--- client/Makefile~ 2013-01-02 01:52:29.000000000 +0000
++++ client/Makefile
+@@ -25,7 +25,7 @@ LIBS = -lcurses -ltermlib #-lresolv
+
+ LPR = lpr
+ #RDEST = /usr/ucb/phone
+-RDEST = /usr/local/bin/phone
++RDEST = ${PREFIX}/bin/phone
+
+ HDRS = defs.h
+
+@@ -50,14 +50,14 @@ DEST = phone
+ all: ${DEST}
+
+ ${DEST}: ${OBJS}
+- /bin/rm -f ${DEST}
++ rm -f ${DEST}
+ ${CC} ${CFLAGS} -o ${DEST} ${OBJS} ${LIBS}
+
+ ${OBJS}: ${HDRS}
+
+ install: ${DEST}
+- /bin/rm -f ${RDEST}
+- cp ${DEST} ${RDEST}
++ rm -f ${RDEST}
++ ${BSD_INSTALL_PROGRAM} ${DEST} ${DESTDIR}${RDEST}
+
+ print: ${HDRS} ${SRCS}
+ pr -f ${HDRS} ${SRCS} | expand -4 | ${LPR}
diff --git a/chat/phone/patches/patch-conv_Makefile b/chat/phone/patches/patch-conv_Makefile
new file mode 100644
index 00000000000..05a2f74cc47
--- /dev/null
+++ b/chat/phone/patches/patch-conv_Makefile
@@ -0,0 +1,28 @@
+$NetBSD: patch-conv_Makefile,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+Configure for pkgsrc.
+
+--- conv/Makefile~ 2013-01-01 19:20:59.000000000 +0000
++++ conv/Makefile
+@@ -10,17 +10,17 @@ CFLAGS+= -std=gnu99 -Wall -Wstrict-prot
+ CFLAGS += -g
+ SRCS = convd.c
+ DEST = convd
+-RDEST = /usr/etc/convd
++RDEST = ${PREFIX}/libexec/convd
+
+ all: ${DEST}
+
+ ${DEST}: ${SRCS}
+- /bin/rm -f ${DEST}
++ rm -f ${DEST}
+ ${CC} ${CFLAGS} -o ${DEST} ${SRCS}
+
+ install: ${DEST}
+- /bin/rm -f ${RDEST}
+- cp ${DEST} ${RDEST}
++ rm -f ${RDEST}
++ ${BSD_INSTALL_PROGRAM} ${DEST} ${DESTDIR}${RDEST}
+
+ clean:
+ /bin/rm -f ${DEST} core *.o
diff --git a/chat/phone/patches/patch-master_Makefile b/chat/phone/patches/patch-master_Makefile
new file mode 100644
index 00000000000..88a8f96463d
--- /dev/null
+++ b/chat/phone/patches/patch-master_Makefile
@@ -0,0 +1,46 @@
+$NetBSD: patch-master_Makefile,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+Configure for pkgsrc.
+
+--- master/Makefile.orig 2013-01-01 23:59:38.000000000 +0000
++++ master/Makefile
+@@ -23,8 +23,10 @@
+ #OFLAG= -O
+ OFLAG= -g
+ #INETD= -DINETD
+-#FORK=-DFORK
+-CFLAGS = $(OFLAG) $(INETD) $(FORK) -DSERVICES -DDPATH=\"/u/christos/phone/conv/convd\"
++FORK=-DFORK
++# not -DSERVICES
++CFLAGS = $(OFLAG) $(INETD) $(FORK) -DDPATH=\"${PREFIX}/libexec/convd\"
++CFLAGS+= -DNO_WHO
+ CFLAGS+= -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror
+
+
+@@ -41,7 +43,7 @@ OBJS = child.o daemon.o dopage.o forward
+ reinvite.o sendit.o strsave.o utmp.o
+
+ DEST = phoned
+-RDEST = /usr/etc/in.phoned
++RDEST = ${PREFIX}/sbin/phoned
+ #RDEST = /etc/phoned
+
+
+@@ -51,14 +53,14 @@ RDEST = /usr/etc/in.phoned
+ all: ${DEST}
+
+ ${DEST}: ${OBJS}
+- /bin/rm -f ${DEST}
++ rm -f ${DEST}
+ ${CC} ${CFLAGS} -o ${DEST} ${OBJS}
+
+ ${OBJS}: ${HDRS}
+
+ install: ${DEST}
+- /bin/rm -f ${RDEST}
+- cp ${DEST} ${RDEST}
++ rm -f ${RDEST}
++ ${BSD_INSTALL_PROGRAM} ${DEST} ${DESTDIR}${RDEST}
+
+ clean:
+ /bin/rm -f ${DEST} core *.o
diff --git a/chat/phone/patches/patch-master_utmp.c b/chat/phone/patches/patch-master_utmp.c
new file mode 100644
index 00000000000..7da742a7b0a
--- /dev/null
+++ b/chat/phone/patches/patch-master_utmp.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-master_utmp.c,v 1.1 2013/12/16 06:42:20 dholland Exp $
+
+Fix build failure when NO_WHO is defined.
+
+--- master/utmp.c~ 2013-01-02 02:07:17.000000000 +0000
++++ master/utmp.c
+@@ -69,9 +69,11 @@ findtty(const char *user, const char *tt
+ void
+ who(struct sockaddr_in *sin)
+ {
++#ifndef NO_WHO
+ struct utmpx *utmp;
+ int users = 0;
+ char *msg = NULL;
++#endif
+
+ #ifdef NO_WHO /* not allowed here ... */
+ sendit(misc, sin, "%c%c%cwho@%s: this site doesn't allow remote who.",