summaryrefslogtreecommitdiff
path: root/plan9
diff options
context:
space:
mode:
authoragc <agc>1997-10-09 14:30:56 +0000
committeragc <agc>1997-10-09 14:30:56 +0000
commit009b3d9603f3d893fc0f3b17c6777e3aec3d84cc (patch)
treedb232209ea22925d7f406bcc3a7b5e7457bffa83 /plan9
parent98ffededba372a070d6300e852d618aec950a0bd (diff)
downloadpkgsrc-009b3d9603f3d893fc0f3b17c6777e3aec3d84cc.tar.gz
Initial import of FreeBSD plan9 ports category into the NetBSD package
system.
Diffstat (limited to 'plan9')
-rw-r--r--plan9/9menu/Makefile21
-rw-r--r--plan9/9menu/files/md51
-rw-r--r--plan9/9menu/patches/patch-aa31
-rw-r--r--plan9/9menu/pkg/COMMENT1
-rw-r--r--plan9/9menu/pkg/DESCR10
-rw-r--r--plan9/9menu/pkg/PLIST2
-rw-r--r--plan9/9term/Makefile21
-rw-r--r--plan9/9term/files/md51
-rw-r--r--plan9/9term/patches/patch-aa45
-rw-r--r--plan9/9term/patches/patch-ab415
-rw-r--r--plan9/9term/patches/patch-ac15
-rw-r--r--plan9/9term/pkg/COMMENT1
-rw-r--r--plan9/9term/pkg/DESCR10
-rw-r--r--plan9/9term/pkg/PLIST2
-rw-r--r--plan9/9wm/Makefile22
-rw-r--r--plan9/9wm/files/md51
-rw-r--r--plan9/9wm/patches/patch-aa71
-rw-r--r--plan9/9wm/pkg/COMMENT1
-rw-r--r--plan9/9wm/pkg/DESCR20
-rw-r--r--plan9/9wm/pkg/PLIST2
-rw-r--r--plan9/Makefile11
-rw-r--r--plan9/Xg/Makefile19
-rw-r--r--plan9/Xg/files/md51
-rw-r--r--plan9/Xg/patches/patch-aa20
-rw-r--r--plan9/Xg/pkg/COMMENT1
-rw-r--r--plan9/Xg/pkg/DESCR18
-rw-r--r--plan9/Xg/pkg/PLIST174
-rw-r--r--plan9/pkg/COMMENT1
-rw-r--r--plan9/rc/Makefile18
-rw-r--r--plan9/rc/files/md51
-rw-r--r--plan9/rc/patches/patch-aa93
-rw-r--r--plan9/rc/pkg/COMMENT1
-rw-r--r--plan9/rc/pkg/DESCR22
-rw-r--r--plan9/rc/pkg/PLIST8
-rw-r--r--plan9/sam/Makefile22
-rw-r--r--plan9/sam/files/md51
-rw-r--r--plan9/sam/patches/patch-aa62
-rw-r--r--plan9/sam/patches/patch-ab46
-rw-r--r--plan9/sam/patches/patch-ac71
-rw-r--r--plan9/sam/patches/patch-ad119
-rw-r--r--plan9/sam/patches/patch-ae23
-rw-r--r--plan9/sam/patches/patch-af41
-rw-r--r--plan9/sam/pkg/COMMENT1
-rw-r--r--plan9/sam/pkg/DESCR17
-rw-r--r--plan9/sam/pkg/PLIST19
45 files changed, 1503 insertions, 0 deletions
diff --git a/plan9/9menu/Makefile b/plan9/9menu/Makefile
new file mode 100644
index 00000000000..f1da85587e8
--- /dev/null
+++ b/plan9/9menu/Makefile
@@ -0,0 +1,21 @@
+# New ports collection makefile for: 9menu
+# Version required: 1.5
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.4 1997/09/08 12:23:55 tg Exp
+#
+
+DISTNAME= 9menu-1.5
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.mathcs.emory.edu/pub/arnold/
+EXTRACT_SUFX= .shar.gz
+
+MAINTAINER= erich@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+EXTRACT_CMD= zcat
+EXTRACT_BEFORE_ARGS=
+EXTRACT_AFTER_ARGS= |sh
+
+.include <bsd.port.mk>
diff --git a/plan9/9menu/files/md5 b/plan9/9menu/files/md5
new file mode 100644
index 00000000000..d6453026cf3
--- /dev/null
+++ b/plan9/9menu/files/md5
@@ -0,0 +1 @@
+MD5 (9menu-1.5.shar.gz) = 00f8dcb2bd1ab9291ce15834eb4e1588
diff --git a/plan9/9menu/patches/patch-aa b/plan9/9menu/patches/patch-aa
new file mode 100644
index 00000000000..375c3ac9189
--- /dev/null
+++ b/plan9/9menu/patches/patch-aa
@@ -0,0 +1,31 @@
+*** Makefile.orig Fri Aug 11 15:55:35 1995
+--- Makefile Fri Aug 11 16:03:26 1995
+***************
+*** 6,13 ****
+ # arnold@skeeve.atl.ga.us
+
+ CC = gcc
+! CFLAGS = -g -O
+! LIBS = -lX11
+
+ 9menu: 9menu.c
+ $(CC) $(CFLAGS) 9menu.c $(LIBS) -o 9menu
+--- 6,23 ----
+ # arnold@skeeve.atl.ga.us
+
+ CC = gcc
+! CFLAGS = -O -I/usr/X11R6/include
+! LIBS = -L/usr/X11R6/lib -lX11
+!
+!
+! all: 9menu
+
+ 9menu: 9menu.c
+ $(CC) $(CFLAGS) 9menu.c $(LIBS) -o 9menu
++
++ install:
++ $(INSTALL) -c 9menu $(PREFIX)/bin
++ $(INSTALL) -c 9menu.1 $(PREFIX)/man/man1
++ strip $(PREFIX)/bin/9menu
++ gzip -9nf $(PREFIX)/man/man1/9menu.1
++
diff --git a/plan9/9menu/pkg/COMMENT b/plan9/9menu/pkg/COMMENT
new file mode 100644
index 00000000000..bb43512b660
--- /dev/null
+++ b/plan9/9menu/pkg/COMMENT
@@ -0,0 +1 @@
+A simple menu patterened after plan9
diff --git a/plan9/9menu/pkg/DESCR b/plan9/9menu/pkg/DESCR
new file mode 100644
index 00000000000..67b630a8fab
--- /dev/null
+++ b/plan9/9menu/pkg/DESCR
@@ -0,0 +1,10 @@
+This is 9menu, a simple program that allows you to create X menus from the
+shell, where each menu item will run a command. 9menu is intended for use
+with 9wm, but can be used with any other window manager.
+
+The idea of a command line menu generator is from xmenu, but xmenu was
+exclusively a pop-up menu, not what I wanted.
+
+--
+Arnold Robbins
+arnold@gnu.ai.mit.edu
diff --git a/plan9/9menu/pkg/PLIST b/plan9/9menu/pkg/PLIST
new file mode 100644
index 00000000000..d0ee602b065
--- /dev/null
+++ b/plan9/9menu/pkg/PLIST
@@ -0,0 +1,2 @@
+bin/9menu
+man/man1/9menu.1.gz
diff --git a/plan9/9term/Makefile b/plan9/9term/Makefile
new file mode 100644
index 00000000000..a97cbf033d9
--- /dev/null
+++ b/plan9/9term/Makefile
@@ -0,0 +1,21 @@
+# New ports collection makefile for: 9term
+# Version required: 1.6.3
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.5 1996/12/07 23:43:56 asami Exp
+#
+
+DISTNAME= 9term.1.6.3
+PKGNAME= 9term-1.6.3
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
+
+MAINTAINER= erich@FreeBSD.org
+
+# needs library and private header, but not during runtime
+BUILD_DEPENDS= /always_build_it:${PORTSDIR}/plan9/sam
+
+NO_WRKSUBDIR= yes
+
+.include <bsd.port.mk>
diff --git a/plan9/9term/files/md5 b/plan9/9term/files/md5
new file mode 100644
index 00000000000..0739005a976
--- /dev/null
+++ b/plan9/9term/files/md5
@@ -0,0 +1 @@
+MD5 (9term.1.6.3.tar.gz) = 064a4428aba417a7793d3252423faf0b
diff --git a/plan9/9term/patches/patch-aa b/plan9/9term/patches/patch-aa
new file mode 100644
index 00000000000..a587c0a88d1
--- /dev/null
+++ b/plan9/9term/patches/patch-aa
@@ -0,0 +1,45 @@
+*** libtext/Makefile.orig Wed Jun 1 21:01:19 1994
+--- libtext/Makefile Mon Jul 31 11:34:06 1995
+***************
+*** 5,18 ****
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DSOLARIS
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files
+! INCS=-I. -I../include
+
+ # add name of library orderer - use ":" if none exists
+! RANLIB=:
+
+ # add name of library
+ AR=ar
+--- 5,19 ----
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DSUNOS -O2
+! SAMDIR=../../../sam/work
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files
+! INCS=-I. -I$(SAMDIR)/include
+
+ # add name of library orderer - use ":" if none exists
+! RANLIB=ranlib
+
+ # add name of library
+ AR=ar
+***************
+*** 38,41 ****
+
+ install: $(LIB)
+
+! $(OBJ): ../include/u.h ../include/libc.h ../include/libg.h ../include/frame.h ../include/text.h
+--- 39,42 ----
+
+ install: $(LIB)
+
+! $(OBJ): $(SAMDIR)/include/u.h $(SAMDIR)/include/libc.h $(SAMDIR)/include/libg.h $(SAMDIR)/include/frame.h text.h
diff --git a/plan9/9term/patches/patch-ab b/plan9/9term/patches/patch-ab
new file mode 100644
index 00000000000..8efa67b7cc4
--- /dev/null
+++ b/plan9/9term/patches/patch-ab
@@ -0,0 +1,415 @@
+*** 9term/9term.c.orig Fri Jun 3 03:35:39 1994
+--- 9term/9term.c Mon Jul 31 15:56:10 1995
+***************
+*** 10,16 ****
+--- 10,20 ----
+ #include <frame.h>
+ #include <text.h>
+
++ #ifdef __FreeBSD__
++ #include <sys/termios.h>
++ #else
+ #include <sys/termio.h>
++ #endif
+ #include <signal.h>
+ #include <sys/stat.h>
+
+***************
+*** 153,161 ****
+ }
+ }
+
+! setenv("TERM", "9term", 1);
+ /* Cope with BSD-oid systems. - cks */
+! setenv("TERMCAP", "9term: :am:bl=^G:do=^J:nl=^J:", 1);
+ signal(SIGINT, SIG_IGN);
+
+ init_display(&argc, argv, cmd, resource);
+--- 157,165 ----
+ }
+ }
+
+! O_setenv("TERM", "9term", 1);
+ /* Cope with BSD-oid systems. - cks */
+! O_setenv("TERMCAP", "9term: :am:bl=^G:do=^J:nl=^J:", 1);
+ signal(SIGINT, SIG_IGN);
+
+ init_display(&argc, argv, cmd, resource);
+***************
+*** 718,724 ****
+ texthighlight(t, t->length, t->length, F&~D);
+ #ifdef REMOTE
+ flushstream();
+! killpg(r == quitchar ? SIGQUIT : SIGINT);
+ #else
+ sendrunes(&r, 1);
+ #endif
+--- 722,728 ----
+ texthighlight(t, t->length, t->length, F&~D);
+ #ifdef REMOTE
+ flushstream();
+! O_killpg(r == quitchar ? SIGQUIT : SIGINT);
+ #else
+ sendrunes(&r, 1);
+ #endif
+***************
+*** 804,810 ****
+ * export a name-value pair to environment
+ */
+ int
+! setenv(char *name, char *value, int overwrite)
+ {
+ char *p;
+
+--- 808,814 ----
+ * export a name-value pair to environment
+ */
+ int
+! O_setenv(char *name, char *value, int overwrite)
+ {
+ char *p;
+
+*** 9term/9term.h.orig Thu Dec 15 08:49:15 1994
+--- 9term/9term.h Mon Jul 31 15:56:10 1995
+***************
+*** 31,37 ****
+ extern int isig;
+
+ extern void specialchars(int);
+! extern int setenv(char *, char *, int);
+ extern void init_display(int *, char **, char**, char*);
+ #ifdef NEEDVARARG
+ extern void error();
+--- 31,37 ----
+ extern int isig;
+
+ extern void specialchars(int);
+! extern int O_setenv(char *, char *, int);
+ extern void init_display(int *, char **, char**, char*);
+ #ifdef NEEDVARARG
+ extern void error();
+***************
+*** 65,70 ****
+--- 65,75 ----
+ #endif
+
+ #ifdef SUNOS
++ #define POSIXPTYS
++ #define BSDPTYS
++ #endif
++
++ #ifdef __FreeBSD__
+ #define POSIXPTYS
+ #define BSDPTYS
+ #endif
+*** 9term/Makefile.orig Sun Mar 13 22:50:54 1994
+--- 9term/Makefile Mon Jul 31 16:02:02 1995
+***************
+*** 11,37 ****
+ # Define RISCOS for Mips RISC/os
+ # Define BSDPTYS for BSD-style pty support
+ # Define POSIXPTYS for POSIX ptys
+- OS=-DSOLARIS
+
+! # where we'll install it
+! BINDIR=/usr/pgrad/matty/bin/$(cputype)
+
+ HEADERFILE=9term.h
+ TARGET=9term
+! INCLUDES=-I. -I../include -I/usr/openwin/include
+! CFLAGS=-g $(OS) $(INCLUDES) -fno-builtin -D_LIBXG_EXTENSION
+! LDFLAGS=-g -R/usr/openwin/lib -L/usr/openwin/lib -R/usr/ucblib -L/usr/ucblib
+ CC=gcc
+
+ # change this if your X11 libraries are in different places
+ # or if you need extra libraries to load with X11 applications
+! LIBS=../libtext/libtext.a ../libframe/libframe.a ../libXg/libXg.a
+! XLIBS=-lXt -lX11
+
+ OBJECTS=9term.o command.o display.o pty.o
+
+ $(TARGET): $(OBJECTS)
+! $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(XLIBS) -lm -lucb
+
+ wloc: wloc.o
+ $(CC) $(LDFLAGS) -o wloc wloc.o $(LIBS) $(XLIBS) -lm
+--- 11,39 ----
+ # Define RISCOS for Mips RISC/os
+ # Define BSDPTYS for BSD-style pty support
+ # Define POSIXPTYS for POSIX ptys
+
+! OS= -D_LIBXG_EXTENSION -DSUNOS
+!
+! SAMPATH=../../../sam/work
+!
+! BINDIR=. # where we'll install it
+
+ HEADERFILE=9term.h
+ TARGET=9term
+! INCLUDES=-I. -I../libtext -I$(SAMPATH)/include -I/usr/X11R6/include
+! CFLAGS= -O2 $(OS) $(INCLUDES)
+! LDFLAGS=
+ CC=gcc
+
+ # change this if your X11 libraries are in different places
+ # or if you need extra libraries to load with X11 applications
+! LIBS=../libtext/libtext.a $(SAMPATH)/libframe/libframe.a $(SAMPATH)/libXg/libXg.a
+! XLIBS= -L/usr/X11R6/lib -lXt -lX11
+
+ OBJECTS=9term.o command.o display.o pty.o
+
+ $(TARGET): $(OBJECTS)
+! $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(XLIBS) -lm
+
+ wloc: wloc.o
+ $(CC) $(LDFLAGS) -o wloc wloc.o $(LIBS) $(XLIBS) -lm
+***************
+*** 39,59 ****
+ label: wloc
+ ln wloc label
+
+- unicode: unicode.o
+- $(CC) $(LDFLAGS) -o unicode unicode.o $(LIBS) $(XLIBS) -lm
+-
+ install: $(TARGET) wloc label
+ cp $(TARGET) $(BINDIR)
+ chown root $(BINDIR)/$(TARGET)
+ chmod 04755 $(BINDIR)/$(TARGET)
+ mv wloc $(BINDIR)
+ mv label $(BINDIR)
+- mv unicode $(BINDIR)
+
+ clean:
+ rm -f *.o core
+
+ nuke: clean
+! rm -f $(TARGET) wloc label unicode
+
+ $(OBJECTS): 9term.h
+--- 41,57 ----
+ label: wloc
+ ln wloc label
+
+ install: $(TARGET) wloc label
+ cp $(TARGET) $(BINDIR)
+ chown root $(BINDIR)/$(TARGET)
+ chmod 04755 $(BINDIR)/$(TARGET)
+ mv wloc $(BINDIR)
+ mv label $(BINDIR)
+
+ clean:
+ rm -f *.o core
+
+ nuke: clean
+! rm -f $(TARGET) wloc label
+
+ $(OBJECTS): 9term.h
+*** 9term/command.c.orig Sun Mar 6 19:50:51 1994
+--- 9term/command.c Mon Jul 31 15:56:11 1995
+***************
+*** 13,19 ****
+--- 13,23 ----
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <grp.h>
++ #ifdef __FreeBSD__
++ #include <termios.h>
++ #else
+ #include <termio.h>
++ #endif
+ #ifdef SOLARIS
+ #include <sys/stropts.h>
+ #endif
+***************
+*** 204,210 ****
+ */
+
+ void
+! killpg(int sig)
+ {
+ if (comm_pid)
+ kill(-comm_pid, sig);
+--- 208,214 ----
+ */
+
+ void
+! O_killpg(int sig)
+ {
+ if (comm_pid)
+ kill(-comm_pid, sig);
+*** 9term/display.c.orig Thu Dec 15 08:48:28 1994
+--- 9term/display.c Mon Jul 31 15:56:11 1995
+***************
+*** 114,120 ****
+ delwin(Widget w, XEvent *event, String *params, Cardinal *n)
+ {
+ if (w == _toplevel)
+! killpg(SIGHUP);
+ }
+
+ /*
+--- 114,120 ----
+ delwin(Widget w, XEvent *event, String *params, Cardinal *n)
+ {
+ if (w == _toplevel)
+! O_killpg(SIGHUP);
+ }
+
+ /*
+***************
+*** 185,191 ****
+ else if (!strcasecmp(s, "plan9"))
+ kbdmode = PLAN9;
+ if (s = get_resource(resource, class, "p9font", "P9font"))
+! setenv("font", s, 1);
+ if (s = get_resource(resource, class, "highwater", "Highwater"))
+ highwater = atoi(s);
+ if (s = get_resource(resource, class, "lowwater", "Lowwater"))
+--- 185,191 ----
+ else if (!strcasecmp(s, "plan9"))
+ kbdmode = PLAN9;
+ if (s = get_resource(resource, class, "p9font", "P9font"))
+! O_setenv("font", s, 1);
+ if (s = get_resource(resource, class, "highwater", "Highwater"))
+ highwater = atoi(s);
+ if (s = get_resource(resource, class, "lowwater", "Lowwater"))
+***************
+*** 230,236 ****
+ #endif
+ /* export window id to environment */
+ sprintf(id, "%d", XtWindow(_toplevel));
+! setenv("WINDOWID", id, 1);
+
+ /* register mouse and keyboard events */
+ einit(Ekeyboard | Emouse);
+--- 230,236 ----
+ #endif
+ /* export window id to environment */
+ sprintf(id, "%d", XtWindow(_toplevel));
+! O_setenv("WINDOWID", id, 1);
+
+ /* register mouse and keyboard events */
+ einit(Ekeyboard | Emouse);
+*** 9term/pty.c.orig Fri Jul 22 10:47:29 1994
+--- 9term/pty.c Mon Jul 31 16:03:07 1995
+***************
+*** 12,18 ****
+
+ #include <utmp.h>
+ #include <errno.h>
+! #ifdef SUNOS
+ # undef _POSIX_SOURCE
+ # include <sys/termio.h>
+ # include <stropts.h>
+--- 12,27 ----
+
+ #include <utmp.h>
+ #include <errno.h>
+!
+! #ifdef __FreeBSD__
+! # include <termios.h>
+!
+! /* # include <stropts.h> */
+! /* Isn't POSIX and portability so much fun? */
+! # define VRPRNT VREPRINT
+! #endif
+!
+! #if defined(SUNOS) && !defined(__FreeBSD__)
+ # undef _POSIX_SOURCE
+ # include <sys/termio.h>
+ # include <stropts.h>
+***************
+*** 41,47 ****
+ # define VEOL2 _VEOL2
+ #endif
+
+! #ifdef RISCOS
+ # include <sys/stat.h>
+ # include </usr/include/ctype.h> /* to defeat posix version */
+ # define VLNEXT V_LNEXT
+--- 50,56 ----
+ # define VEOL2 _VEOL2
+ #endif
+
+! #ifdef RISCOS
+ # include <sys/stat.h>
+ # include </usr/include/ctype.h> /* to defeat posix version */
+ # define VLNEXT V_LNEXT
+***************
+*** 49,58 ****
+ # define VRPRNT V_RPRNT
+ # define VWERASE V_WERAS
+ #else
+ # include <ctype.h>
+ #endif
+
+! #ifdef OSF1
+ # define V_START VSTART
+ # define V_STOP VSTOP
+ # define V_SUSP VSUSP
+--- 58,69 ----
+ # define VRPRNT V_RPRNT
+ # define VWERASE V_WERAS
+ #else
++ #ifndef __FreeBSD__
+ # include <ctype.h>
+ #endif
++ #endif
+
+! #if defined(OSF1)
+ # define V_START VSTART
+ # define V_STOP VSTOP
+ # define V_SUSP VSUSP
+***************
+*** 115,121 ****
+ char udef, p9def;
+ };
+
+! #if defined(SUNOS) || defined(IRIX) || defined(SOLARIS)
+ # define V_START VSTART
+ # define V_STOP VSTOP
+ # define V_SUSP VSUSP
+--- 126,132 ----
+ char udef, p9def;
+ };
+
+! #if defined(SUNOS) || defined(IRIX) || defined(SOLARIS) || defined(__FreeBSD__)
+ # define V_START VSTART
+ # define V_STOP VSTOP
+ # define V_SUSP VSUSP
+***************
+*** 139,145 ****
+ #ifndef _POSIX_SOURCE
+ { "eol2", 4, VEOL2, 0, 0 },
+ #endif
+! #if !defined(_OSF_SOURCE) && !defined(_POSIX_SOURCE)
+ { "swtch", 5, VSWTCH, 0, 0 },
+ #endif
+ { "start", 5, V_START, ctrl('q'), ctrl('q') },
+--- 150,156 ----
+ #ifndef _POSIX_SOURCE
+ { "eol2", 4, VEOL2, 0, 0 },
+ #endif
+! #if !defined(_OSF_SOURCE) && !defined(_POSIX_SOURCE) && !defined(__FreeBSD__)
+ { "swtch", 5, VSWTCH, 0, 0 },
+ #endif
+ { "start", 5, V_START, ctrl('q'), ctrl('q') },
+***************
+*** 292,301 ****
+--- 303,318 ----
+ /* Insure some sanity. */
+ ttmode.c_lflag |= ECHO;
+ ttmode.c_oflag &= ~(ONLCR);
++ #ifndef __FreeBSD__
+ ttmode.c_oflag |= ONLRET;
++ #endif
+ } else {
+ ttmode.c_iflag = BRKINT | IGNPAR | ICRNL | IXON;
++ #ifdef __FreeBSD__
++ ttmode.c_oflag = OPOST;
++ #else
+ ttmode.c_oflag = OPOST | ONLRET;
++ #endif
+ ttmode.c_cflag = B9600 | PARENB | CS8 | CREAD;
+ ttmode.c_lflag = ISIG | ICANON | ECHO | ECHOK;
+ #ifdef __ultrix
diff --git a/plan9/9term/patches/patch-ac b/plan9/9term/patches/patch-ac
new file mode 100644
index 00000000000..8bd3e6269f4
--- /dev/null
+++ b/plan9/9term/patches/patch-ac
@@ -0,0 +1,15 @@
+*** Makefile.orig Fri Aug 11 15:57:26 1995
+--- Makefile Fri Aug 11 16:04:30 1995
+***************
+*** 0 ****
+--- 1,10 ----
++
++ MAN=man
++ all:
++ (cd libtext; make)
++ (cd 9term; make)
++ install:
++ $(INSTALL) -c 9term/9term $(PREFIX)/bin/
++ $(INSTALL) -c 9term/9term.1 $(PREFIX)/$(MAN)/man1/
++ strip $(PREFIX)/bin/9term
++ gzip -9nf $(PREFIX)/man/man1/9term.1
diff --git a/plan9/9term/pkg/COMMENT b/plan9/9term/pkg/COMMENT
new file mode 100644
index 00000000000..156bd06d62d
--- /dev/null
+++ b/plan9/9term/pkg/COMMENT
@@ -0,0 +1 @@
+An X11 program which emulates a plan9 window.
diff --git a/plan9/9term/pkg/DESCR b/plan9/9term/pkg/DESCR
new file mode 100644
index 00000000000..118271b454f
--- /dev/null
+++ b/plan9/9term/pkg/DESCR
@@ -0,0 +1,10 @@
+9term is a terminal emulator which emulates an 8 1/2 window.
+this version supports unicode. To see this support, cat one of
+the utf files in an 8 1/2 window. Your Xserver must be able to
+find the required fonts, and the `*p9font' x-resource must be
+set to point to the fonts, maybe `/usr/X11R6/lib/X11/fonts/Xg/unicode.9.font'.
+
+This port needs work, it is functional enough to get the feel
+for 9term, but some of the features don't work with FreeBSD.
+
+eric.
diff --git a/plan9/9term/pkg/PLIST b/plan9/9term/pkg/PLIST
new file mode 100644
index 00000000000..c05b3d50650
--- /dev/null
+++ b/plan9/9term/pkg/PLIST
@@ -0,0 +1,2 @@
+bin/9term
+man/man1/9term.1.gz
diff --git a/plan9/9wm/Makefile b/plan9/9wm/Makefile
new file mode 100644
index 00000000000..87f9905b707
--- /dev/null
+++ b/plan9/9wm/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: 9wm
+# Version required: 1.1
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.4 1997/05/28 06:18:20 fenner Exp
+#
+
+DISTNAME= 9wm-1.1
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.mathcs.emory.edu/pub/arnold/
+EXTRACT_SUFX= .shar.gz
+
+MAINTAINER= erich@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+EXTRACT_CMD= zcat
+EXTRACT_BEFORE_ARGS=
+EXTRACT_AFTER_ARGS= |sh
+USE_IMAKE= yes
+
+.include <bsd.port.mk>
diff --git a/plan9/9wm/files/md5 b/plan9/9wm/files/md5
new file mode 100644
index 00000000000..6133e480324
--- /dev/null
+++ b/plan9/9wm/files/md5
@@ -0,0 +1 @@
+MD5 (9wm-1.1.shar.gz) = e3ebae40e0d4ba2b4c05448c0bbf43ae
diff --git a/plan9/9wm/patches/patch-aa b/plan9/9wm/patches/patch-aa
new file mode 100644
index 00000000000..00a602d92df
--- /dev/null
+++ b/plan9/9wm/patches/patch-aa
@@ -0,0 +1,71 @@
+--- 9wm.c~ Mon Oct 21 09:26:24 1996
++++ 9wm.c Mon Oct 21 09:27:19 1996
+@@ -471,7 +471,7 @@
+ case NormalState:
+ XMapRaised(dpy, c->parent);
+ XMapWindow(dpy, c->window);
+- setstate(c, NormalState);
++ _setstate(c, NormalState);
+ if (c->trans != None && current && c->trans == current->window)
+ active(c);
+ break;
+--- fns.h~ Mon Oct 21 09:26:25 1996
++++ fns.h Mon Oct 21 09:27:31 1996
+@@ -31,7 +31,7 @@
+ Window getwprop();
+ int getiprop();
+ int getstate();
+-void setstate();
++void _setstate();
+ void setlabel();
+ void getproto();
+ void gettrans();
+--- manage.c~ Mon Oct 21 09:26:24 1996
++++ manage.c Mon Oct 21 09:27:49 1996
+@@ -131,7 +131,7 @@
+ active(c);
+ else
+ setactive(c, 0);
+- setstate(c, NormalState);
++ _setstate(c, NormalState);
+ }
+ if (current != c)
+ cmapfocus(current);
+@@ -161,7 +161,7 @@
+ XReparentWindow(dpy, c->window, root, c->x, c->y);
+ gravitate(c, 0);
+ XRemoveFromSaveSet(dpy, c->window);
+- setstate(c, WithdrawnState);
++ _setstate(c, WithdrawnState);
+
+ /* flush any errors */
+ ignore_badwindow = 1;
+@@ -417,7 +417,7 @@
+ }
+
+ void
+-setstate(c, state)
++_setstate(c, state)
+ Client *c;
+ int state;
+ {
+--- menu.c~ Mon Oct 21 09:26:24 1996
++++ menu.c Mon Oct 21 09:27:45 1996
+@@ -179,7 +179,7 @@
+ }
+ XUnmapWindow(dpy, c->parent);
+ XUnmapWindow(dpy, c->window);
+- setstate(c, IconicState);
++ _setstate(c, IconicState);
+ if (c == current)
+ nofocus();
+ hiddenc[numhidden] = c;
+@@ -210,7 +210,7 @@
+ if (map) {
+ XMapWindow(dpy, c->window);
+ XMapRaised(dpy, c->parent);
+- setstate(c, NormalState);
++ _setstate(c, NormalState);
+ active(c);
+ }
+
diff --git a/plan9/9wm/pkg/COMMENT b/plan9/9wm/pkg/COMMENT
new file mode 100644
index 00000000000..822917fb411
--- /dev/null
+++ b/plan9/9wm/pkg/COMMENT
@@ -0,0 +1 @@
+An 8 1/2-like Window Manager for X
diff --git a/plan9/9wm/pkg/DESCR b/plan9/9wm/pkg/DESCR
new file mode 100644
index 00000000000..da925f2e9da
--- /dev/null
+++ b/plan9/9wm/pkg/DESCR
@@ -0,0 +1,20 @@
+ 9wm Version 1.1
+ Copyright 1994 David Hogan.
+
+What is 9wm?
+============
+
+9wm is an X window manager which attempts to emulate the Plan 9 window
+manager 8-1/2 as far as possible within the constraints imposed by X.
+It provides a simple yet comfortable user interface, without garish
+decorations or title-bars. Or icons. And it's click-to-type. This
+will not appeal to everybody, but if you're not put off yet then read
+on. (And don't knock it until you've tried it).
+
+One major difference between 9wm and 8-1/2 is that the latter provides
+windows of text with a typescript interface, and doesn't need to run a
+separate program to emulate a terminal. 9wm, as an X window manager,
+does require a separate program. For better 8-1/2 emulation, you should
+obtain Matthew Farrow's "9term" program (ftp://ftp.cs.su.oz.au/matty/unicode),
+version 1.6 or later (earlier versions don't cooperate with 9wm in
+implementing "hold mode"). Of course, you can run xterm under 9wm as well.
diff --git a/plan9/9wm/pkg/PLIST b/plan9/9wm/pkg/PLIST
new file mode 100644
index 00000000000..76261967da6
--- /dev/null
+++ b/plan9/9wm/pkg/PLIST
@@ -0,0 +1,2 @@
+bin/9wm
+man/man1/9wm.1.gz
diff --git a/plan9/Makefile b/plan9/Makefile
new file mode 100644
index 00000000000..f6b5bc73099
--- /dev/null
+++ b/plan9/Makefile
@@ -0,0 +1,11 @@
+# FreeBSD Id: Makefile,v 1.3 1996/11/26 08:57:54 asami Exp
+#
+
+ SUBDIR += 9menu
+ SUBDIR += 9term
+ SUBDIR += 9wm
+ SUBDIR += Xg
+ SUBDIR += rc
+ SUBDIR += sam
+
+.include <bsd.port.subdir.mk>
diff --git a/plan9/Xg/Makefile b/plan9/Xg/Makefile
new file mode 100644
index 00000000000..1da1ea28517
--- /dev/null
+++ b/plan9/Xg/Makefile
@@ -0,0 +1,19 @@
+# New ports collection makefile for: libXg
+# Version required: ????? arbitrarily picked 1.0 for version
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.4 1997/01/27 15:59:35 erich Exp
+#
+
+DISTNAME= libXg.utf.fonts
+PKGNAME= libXgFonts-1.0
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
+
+MAINTAINER= erich@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+USE_X11= yes
+
+.include <bsd.port.mk>
diff --git a/plan9/Xg/files/md5 b/plan9/Xg/files/md5
new file mode 100644
index 00000000000..c4a5c7dc1b8
--- /dev/null
+++ b/plan9/Xg/files/md5
@@ -0,0 +1 @@
+MD5 (libXg.utf.fonts.tar.gz) = fb964c78dbda974ac52fca53a878a812
diff --git a/plan9/Xg/patches/patch-aa b/plan9/Xg/patches/patch-aa
new file mode 100644
index 00000000000..0f57ac58227
--- /dev/null
+++ b/plan9/Xg/patches/patch-aa
@@ -0,0 +1,20 @@
+*** Makefile~ Sun Aug 13 13:55:37 1995
+--- Makefile Sun Aug 13 13:56:11 1995
+***************
+*** 0 ****
+--- 1,15 ----
++
++ DESTDIR=$(PREFIX)/lib/X11/fonts/Xg
++
++ all:
++ @echo nothing to be done for \`$@\'
++ @echo this is an install-only target.
++
++ install:
++ [ -d $(DESTDIR) ] || mkdir -p $(DESTDIR)
++ for i in Xg/bdf/*.bdf; do b=$$(basename $$i .bdf); \
++ rm -f $(DESTDIR)/$$b.pcf.Z; \
++ bdftopcf -o $(DESTDIR)/$$b.pcf $$i; \
++ compress $(DESTDIR)/$$b.pcf; \
++ done; mkfontdir $(DESTDIR); \
++ cp Xg/matty/unicode.9.font $(DESTDIR)
diff --git a/plan9/Xg/pkg/COMMENT b/plan9/Xg/pkg/COMMENT
new file mode 100644
index 00000000000..e4dfd89bb27
--- /dev/null
+++ b/plan9/Xg/pkg/COMMENT
@@ -0,0 +1 @@
+These are the UNICODE fonts for use with 9term and sam.
diff --git a/plan9/Xg/pkg/DESCR b/plan9/Xg/pkg/DESCR
new file mode 100644
index 00000000000..7d042471653
--- /dev/null
+++ b/plan9/Xg/pkg/DESCR
@@ -0,0 +1,18 @@
+Unicode fonts
+=============
+
+The new libXg distribution supports Unicode. Sam and 9term built using
+the new UTF libXg will allow one to enter and edit files containing
+Unicode characters encoded using UTF-2 (UTF-FSS).
+To use them:
+
+o convert the bdf files to whatever format is appropriate for
+ your system and place the files in a suitable common directory
+o set this directory up as an X font directory by running some
+ program such as `mkfontdir' if necessary
+o add the directory to your fontpath `xset fp+ fontdir'
+o make sure libXg knows about the fontfile you wish to use by
+ setting the appropriate .p9font X resource (or just *p9font) to
+ be something like /lib/font/Xg/matty/unicode.9.font or by
+ specifying an appropriate -p9font argument to libXg programs.
+
diff --git a/plan9/Xg/pkg/PLIST b/plan9/Xg/pkg/PLIST
new file mode 100644
index 00000000000..39272713bd4
--- /dev/null
+++ b/plan9/Xg/pkg/PLIST
@@ -0,0 +1,174 @@
+lib/X11/fonts/Xg/big5.4e00.16.pcf.Z
+lib/X11/fonts/Xg/big5.5000.16.pcf.Z
+lib/X11/fonts/Xg/big5.5200.16.pcf.Z
+lib/X11/fonts/Xg/big5.5400.16.pcf.Z
+lib/X11/fonts/Xg/big5.5600.16.pcf.Z
+lib/X11/fonts/Xg/big5.5800.16.pcf.Z
+lib/X11/fonts/Xg/big5.5a00.16.pcf.Z
+lib/X11/fonts/Xg/big5.5c00.16.pcf.Z
+lib/X11/fonts/Xg/big5.5e00.16.pcf.Z
+lib/X11/fonts/Xg/big5.6000.16.pcf.Z
+lib/X11/fonts/Xg/big5.6200.16.pcf.Z
+lib/X11/fonts/Xg/big5.6400.16.pcf.Z
+lib/X11/fonts/Xg/big5.6600.16.pcf.Z
+lib/X11/fonts/Xg/big5.6800.16.pcf.Z
+lib/X11/fonts/Xg/big5.6a00.16.pcf.Z
+lib/X11/fonts/Xg/big5.6c00.16.pcf.Z
+lib/X11/fonts/Xg/fonts.dir
+lib/X11/fonts/Xg/big5.6e00.16.pcf.Z
+lib/X11/fonts/Xg/big5.7000.16.pcf.Z
+lib/X11/fonts/Xg/big5.7200.16.pcf.Z
+lib/X11/fonts/Xg/big5.7400.16.pcf.Z
+lib/X11/fonts/Xg/big5.7600.16.pcf.Z
+lib/X11/fonts/Xg/big5.7800.16.pcf.Z
+lib/X11/fonts/Xg/big5.7a00.16.pcf.Z
+lib/X11/fonts/Xg/big5.7c00.16.pcf.Z
+lib/X11/fonts/Xg/big5.7e00.16.pcf.Z
+lib/X11/fonts/Xg/big5.8000.16.pcf.Z
+lib/X11/fonts/Xg/big5.8200.16.pcf.Z
+lib/X11/fonts/Xg/big5.8400.16.pcf.Z
+lib/X11/fonts/Xg/big5.8600.16.pcf.Z
+lib/X11/fonts/Xg/big5.8800.16.pcf.Z
+lib/X11/fonts/Xg/big5.8a00.16.pcf.Z
+lib/X11/fonts/Xg/big5.8c00.16.pcf.Z
+lib/X11/fonts/Xg/big5.8e00.16.pcf.Z
+lib/X11/fonts/Xg/big5.9000.16.pcf.Z
+lib/X11/fonts/Xg/big5.9200.16.pcf.Z
+lib/X11/fonts/Xg/big5.9400.16.pcf.Z
+lib/X11/fonts/Xg/big5.9600.16.pcf.Z
+lib/X11/fonts/Xg/big5.9800.16.pcf.Z
+lib/X11/fonts/Xg/big5.9a00.16.pcf.Z
+lib/X11/fonts/Xg/big5.9c00.16.pcf.Z
+lib/X11/fonts/Xg/big5.9e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.hiragana.16.pcf.Z
+lib/X11/fonts/Xg/jis.hiragana.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis3000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis3000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis4e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis4e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5200.16.pcf.Z
+lib/X11/fonts/Xg/lucm.greek.9.pcf.Z
+lib/X11/fonts/Xg/jis.jis5200.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5400.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5400.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5600.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5600.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5800.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5800.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5a00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5a00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5c00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5c00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis5e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis5e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6200.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6200.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6400.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6400.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6600.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6600.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6800.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6800.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6a00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6a00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6c00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6c00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis6e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis6e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7200.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7200.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7400.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7400.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7600.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7600.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7800.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7800.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7a00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7a00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7c00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7c00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis7e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis7e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8200.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8200.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8400.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8400.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8600.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8600.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8800.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8800.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8a00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8a00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8c00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8c00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis8e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis8e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9000.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9000.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9200.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9200.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9400.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9400.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9600.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9600.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9800.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9800.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9a00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9a00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9c00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9c00.24.pcf.Z
+lib/X11/fonts/Xg/jis.jis9e00.16.pcf.Z
+lib/X11/fonts/Xg/jis.jis9e00.24.pcf.Z
+lib/X11/fonts/Xg/jis.katakana.16.pcf.Z
+lib/X11/fonts/Xg/jis.katakana.24.pcf.Z
+lib/X11/fonts/Xg/lucm.currency.9.pcf.Z
+lib/X11/fonts/Xg/lucm.genpunc.9.pcf.Z
+lib/X11/fonts/Xg/lucm.ipa.9.pcf.Z
+lib/X11/fonts/Xg/lucm.latin1.9.pcf.Z
+lib/X11/fonts/Xg/lucm.latineur.9.pcf.Z
+lib/X11/fonts/Xg/lucm.supsub.9.pcf.Z
+lib/X11/fonts/Xg/matty.blocks.pcf.Z
+lib/X11/fonts/Xg/matty.chart.pcf.Z
+lib/X11/fonts/Xg/matty.geometric.pcf.Z
+lib/X11/fonts/Xg/matty.hebrew.9.pcf.Z
+lib/X11/fonts/Xg/matty.latin1.9.pcf.Z
+lib/X11/fonts/Xg/matty.hebrew.9.orig.pcf.Z
+lib/X11/fonts/Xg/matty.math1.pcf.Z
+lib/X11/fonts/Xg/matty.hebrew.9.short.pcf.Z
+lib/X11/fonts/Xg/matty.letterlike.9.pcf.Z
+lib/X11/fonts/Xg/matty.math2.pcf.Z
+lib/X11/fonts/Xg/matty.tech.pcf.Z
+lib/X11/fonts/Xg/matty.tengwar.9.24.pcf.Z
+lib/X11/fonts/Xg/matty.tengwar.9.pcf.Z
+lib/X11/fonts/Xg/misc.arrows.pcf.Z
+lib/X11/fonts/Xg/misc.chart.pcf.Z
+lib/X11/fonts/Xg/misc.cyrillic.9.pcf.Z
+lib/X11/fonts/Xg/misc.ding.pcf.Z
+lib/X11/fonts/Xg/misc.genpunc.8.pcf.Z
+lib/X11/fonts/Xg/misc.greek.8.pcf.Z
+lib/X11/fonts/Xg/misc.ipa.8.pcf.Z
+lib/X11/fonts/Xg/misc.letterlike.8.pcf.Z
+lib/X11/fonts/Xg/misc.math1.pcf.Z
+lib/X11/fonts/Xg/misc.math2.pcf.Z
+lib/X11/fonts/Xg/misc.tech.pcf.Z
+lib/X11/fonts/Xg/misc.zapf.pcf.Z
+lib/X11/fonts/Xg/pelm.ascii.10.pcf.Z
+lib/X11/fonts/Xg/pelm.ascii.12.pcf.Z
+lib/X11/fonts/Xg/pelm.ascii.16.pcf.Z
+lib/X11/fonts/Xg/smiley.0.pcf.Z
+lib/X11/fonts/Xg/pelm.currency.9.pcf.Z
+lib/X11/fonts/Xg/pelm.fffd.9.pcf.Z
+lib/X11/fonts/Xg/pelm.latin1.8.pcf.Z
+lib/X11/fonts/Xg/pelm.latin1.9.pcf.Z
+lib/X11/fonts/Xg/pelm.latineur.8.pcf.Z
+lib/X11/fonts/Xg/pelm.latineur.9.pcf.Z
+lib/X11/fonts/Xg/pelm.supsub.8.pcf.Z
+lib/X11/fonts/Xg/pelm.supsub.9.pcf.Z
diff --git a/plan9/pkg/COMMENT b/plan9/pkg/COMMENT
new file mode 100644
index 00000000000..dda295c830f
--- /dev/null
+++ b/plan9/pkg/COMMENT
@@ -0,0 +1 @@
+Ports taken/borrowed from At&T's Plan9.
diff --git a/plan9/rc/Makefile b/plan9/rc/Makefile
new file mode 100644
index 00000000000..61f20ad5aa0
--- /dev/null
+++ b/plan9/rc/Makefile
@@ -0,0 +1,18 @@
+# New ports collection makefile for: rc
+# Version required: 1.5b1
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.3 1996/11/12 02:19:38 obrien Exp
+#
+
+DISTNAME= rc-1.5betadev-1
+PKGNAME= rc-1.5b1
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.sys.toronto.edu/pub/rc/
+
+MAINTAINER= erich@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+
+.include <bsd.port.mk>
diff --git a/plan9/rc/files/md5 b/plan9/rc/files/md5
new file mode 100644
index 00000000000..a510c99d59a
--- /dev/null
+++ b/plan9/rc/files/md5
@@ -0,0 +1 @@
+MD5 (rc-1.5betadev-1.tar.gz) = 4ddd5d227fe3817da9cf2781702a6c8b
diff --git a/plan9/rc/patches/patch-aa b/plan9/rc/patches/patch-aa
new file mode 100644
index 00000000000..8d0ff6190e1
--- /dev/null
+++ b/plan9/rc/patches/patch-aa
@@ -0,0 +1,93 @@
+*** Makefile.orig Sun Mar 6 21:32:46 1994
+--- Makefile Fri Aug 11 16:00:41 1995
+***************
+*** 16,23 ****
+ #ADDON=addon.o
+
+ # Use an ANSI compiler (or at least one that groks prototypes and void *):
+! CC=gcc -g -O
+! CFLAGS=
+ LDFLAGS=
+
+ # You may substitute "bison -y" for yacc. (You want to choose the one that
+--- 16,23 ----
+ #ADDON=addon.o
+
+ # Use an ANSI compiler (or at least one that groks prototypes and void *):
+! CC=gcc
+! CFLAGS= -O2
+ LDFLAGS=
+
+ # You may substitute "bison -y" for yacc. (You want to choose the one that
+***************
+*** 29,34 ****
+--- 29,47 ----
+ nalloc.o open.o print.o redir.o sigmsgs.o signal.o status.o tree.o \
+ utils.o var.o version.o wait.o walk.o which.o y.tab.o
+
++ all: rc history
++
++ install:
++ $(INSTALL) -c rc $(PREFIX)/bin
++ $(INSTALL) -c history/history $(PREFIX)/bin
++ for i in - -- -p --p; do rm -f $(PREFIX)/bin/$$i; ln $(PREFIX)/bin/history $(PREFIX)/bin/$$i; done
++ $(INSTALL) -c rc.1 $(PREFIX)/man/man1
++ $(INSTALL) -c history/history.1 $(PREFIX)/man/man1
++ strip $(PREFIX)/bin/rc
++ strip $(PREFIX)/bin/history
++ gzip -9nf $(PREFIX)/man/man1/rc.1
++ gzip -9nf $(PREFIX)/man/man1/history.1
++
+ # If rc is compiled with READLINE defined, you must supply the correct
+ # arguments to ld on this line. Typically this would be something like:
+ #
+*** builtins.c.orig Sun Mar 6 21:32:49 1994
+--- builtins.c Mon Jul 31 12:27:12 1995
+***************
+*** 466,477 ****
+
+ #ifndef SYSVR4
+ extern int getrlimit(int, struct rlimit *);
+ extern int setrlimit(int, struct rlimit *);
+ #endif
+
+ static void printlimit(const Limit *limit, bool hard) {
+ struct rlimit rlim;
+! long lim;
+ getrlimit(limit->flag, &rlim);
+ if (hard)
+ lim = rlim.rlim_max;
+--- 466,481 ----
+
+ #ifndef SYSVR4
+ extern int getrlimit(int, struct rlimit *);
++
++ #ifndef __FreeBSD__
+ extern int setrlimit(int, struct rlimit *);
+ #endif
+
++ #endif
++
+ static void printlimit(const Limit *limit, bool hard) {
+ struct rlimit rlim;
+! u_quad_t lim;
+ getrlimit(limit->flag, &rlim);
+ if (hard)
+ lim = rlim.rlim_max;
+***************
+*** 490,496 ****
+ }
+ }
+
+! static long parselimit(const Limit *limit, char *s) {
+ char *t;
+ int len = strlen(s);
+ long lim = 1;
+--- 494,500 ----
+ }
+ }
+
+! static u_quad_t parselimit(const Limit *limit, char *s) {
+ char *t;
+ int len = strlen(s);
+ long lim = 1;
diff --git a/plan9/rc/pkg/COMMENT b/plan9/rc/pkg/COMMENT
new file mode 100644
index 00000000000..eb1f3e0e67e
--- /dev/null
+++ b/plan9/rc/pkg/COMMENT
@@ -0,0 +1 @@
+A unix incarnation of the plan9 shell.
diff --git a/plan9/rc/pkg/DESCR b/plan9/rc/pkg/DESCR
new file mode 100644
index 00000000000..90ecb689fec
--- /dev/null
+++ b/plan9/rc/pkg/DESCR
@@ -0,0 +1,22 @@
+Excerpts from the README:
+
+ This is release 1.5 of rc.
+
+ A unix version of the Plan-9 Shell.
+
+ FEEPING CREATURISM
+
+ See the end of the man page, under "INCOMPATABILITIES" for (known?)
+ differences from the "real" rc. Most of these changes were necessary
+ to get rc to work in a reasonable fashion on a real (i.e., commercial,
+ non-Labs) UNIX system; a few were changes motivated by concern
+ about some inadequacies in the original design.
+
+ CREDITS
+
+ This shell was written by Byron Rakitzis, but kudos go to Paul
+ Haahr for letting me know what a shell should do and for contributing
+ certain bits and pieces to rc (notably the limits code, print.c,
+ most of which.c and the backquote redirection code).
+
+eric.
diff --git a/plan9/rc/pkg/PLIST b/plan9/rc/pkg/PLIST
new file mode 100644
index 00000000000..dfe16872b94
--- /dev/null
+++ b/plan9/rc/pkg/PLIST
@@ -0,0 +1,8 @@
+bin/rc
+bin/history
+bin/-
+bin/--
+bin/-p
+bin/--p
+man/man1/history.1.gz
+man/man1/rc.1.gz
diff --git a/plan9/sam/Makefile b/plan9/sam/Makefile
new file mode 100644
index 00000000000..5a385e28a21
--- /dev/null
+++ b/plan9/sam/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: sam
+# Version required: 4.3
+# Date created: Sun Aug 13 12:36:14 CDT 1995
+# Whom: erich@rrnet.com
+#
+# FreeBSD Id: Makefile,v 1.3 1996/11/12 02:19:40 obrien Exp
+#
+
+DISTNAME= sam
+PKGNAME= sam-4.3
+CATEGORIES= plan9
+MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
+EXTRACT_SUFX= .msg.gz
+
+MAINTAINER= erich@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+EXTRACT_CMD= zcat
+EXTRACT_BEFORE_ARGS=
+EXTRACT_AFTER_ARGS= |sh
+
+.include <bsd.port.mk>
diff --git a/plan9/sam/files/md5 b/plan9/sam/files/md5
new file mode 100644
index 00000000000..f5d6a51ab30
--- /dev/null
+++ b/plan9/sam/files/md5
@@ -0,0 +1 @@
+MD5 (sam.msg.gz) = c7e1e2f262ae7a9d08c7b7553d80595a
diff --git a/plan9/sam/patches/patch-aa b/plan9/sam/patches/patch-aa
new file mode 100644
index 00000000000..6b5c32ede1d
--- /dev/null
+++ b/plan9/sam/patches/patch-aa
@@ -0,0 +1,62 @@
+*** libXg/Makefile.orig Fri Jul 28 14:02:17 1995
+--- libXg/Makefile Fri Jul 21 15:03:43 1995
+***************
+*** 1,24 ****
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype Makefile for libXg
+ #
+- # define operating system. ONE of:
+- # -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
+- # -DHPUX -DAPOLLO -DCONVEX -DDYNIX
+- #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DIRIX -ansiposix
+
+ # add -Iincludedir for any include directories that need to be searched
+! INCS=-I../include
+
+ # set this if your X libraries are in different locations
+ # or if you need extra libraries to load with X11 applications
+! XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a
+
+ # add name of library orderer - use ":" if none
+! RANLIB=:
+
+ # add name of librarian
+ AR=ar
+--- 1,23 ----
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype BSDi Makefile for libXg
+! # Courtesy of Boyd Roberts
+! #
+! # Define operating system type: -DBSDi
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-O2 -DBSDi
+
+ # add -Iincludedir for any include directories that need to be searched
+! INCS=-I../include -I/usr/X11R6/include
+
+ # set this if your X libraries are in different locations
+ # or if you need extra libraries to load with X11 applications
+! XLIBS=/usr/X11/lib/libXt.a /usr/X11/lib/libX11.a
+
+ # add name of library orderer - use ":" if none
+! RANLIB=ranlib
+
+ # add name of librarian
+ AR=ar
+***************
+*** 50,56 ****
+ $(LIB): $(OBJS)
+ $(AR) rv $(LIB) $(OBJS)
+ $(RANLIB) $(LIB)
+-
+- $(LIB)(%.o): %.o
+
+ $(OBJS): ../include/libg.h libgint.h ../include/libc.h
+--- 49,53 ----
diff --git a/plan9/sam/patches/patch-ab b/plan9/sam/patches/patch-ab
new file mode 100644
index 00000000000..3ff1dcdce98
--- /dev/null
+++ b/plan9/sam/patches/patch-ab
@@ -0,0 +1,46 @@
+*** libframe/Makefile.orig Fri Jul 28 14:08:32 1995
+--- libframe/Makefile Fri Jul 21 15:02:32 1995
+***************
+*** 1,21 ****
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype Makefile for libframe
+ #
+- # define operating system. ONE of:
+- # -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
+- # -DHPUX -DAPOLLO -DCONVEX -DDYNIX
+- #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DIRIX -ansiposix
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include
+
+ # add name of library orderer - use ":" if none exists
+! RANLIB=:
+
+ # add name of library
+ AR=ar
+--- 1,20 ----
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype BSDi Makefile for libframe
+! # Courtesy of Boyd Roberts
+! #
+! # Define operating system type: -DBSDi
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DBSDi -O2
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include -I/usr/include/posix
+
+ # add name of library orderer - use ":" if none exists
+! RANLIB=ranlib
+
+ # add name of library
+ AR=ar
diff --git a/plan9/sam/patches/patch-ac b/plan9/sam/patches/patch-ac
new file mode 100644
index 00000000000..00db47f4ac6
--- /dev/null
+++ b/plan9/sam/patches/patch-ac
@@ -0,0 +1,71 @@
+*** samterm/Makefile.orig Fri Jul 28 14:09:32 1995
+--- samterm/Makefile Fri Jul 21 15:30:09 1995
+***************
+*** 1,31 ****
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype Makefile for samterm
+ #
+- # define operating system. ONE of:
+- # -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
+- # -DHPUX -DAPOLLO -DCONVEX -DDYNIX
+- #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DIRIX -ansiposix
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include
+
+ # SAMTERM contains the name of the file containing the samterm
+ # executable. SAMTERMDIR is the directory where it is installed.
+ SAMTERM=samterm
+! SAMTERMDIR=/v/bin
+
+ # set this if your X libraries are in different locations
+ # or if you need extra libraries to load with X11 applications
+! XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a
+
+ CFLAGS=$(OS) $(INCS) -D_LIBXG_EXTENSION
+
+! LIBS=../libframe/libframe.a ../libXg/libXg.a
+ CC=cc
+
+ OBJ=main.o flayer.o icons.o io.o menu.o mesg.o rasp.o scroll.o unix.o
+--- 1,35 ----
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype BSDi Makefile for samterm
+! # Courtesy of Boyd Roberts
+! #
+! # Define operating system type: -DBSDi
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DBSDi -O2
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include -I/usr/include/posix
+
+ # SAMTERM contains the name of the file containing the samterm
+ # executable. SAMTERMDIR is the directory where it is installed.
+ SAMTERM=samterm
+! SAMTERMDIR=$(PREFIX)/bin
+
+ # set this if your X libraries are in different locations
+ # or if you need extra libraries to load with X11 applications
+! #XLIBS= /usr/X11R6/lib/libXt.a \
+! # /usr/X11R6/lib/libSM.a \
+! # /usr/X11R6/lib/libICE.a \
+! # /usr/X11R6/lib/libX11.a
+!
+! XLIBS=-L/usr/X11R6/lib -lXt -lSM -lICE -lX11
+
+ CFLAGS=$(OS) $(INCS) -D_LIBXG_EXTENSION
+
+! LIBS=../libframe/libframe.a ../libXg/libXg.a
+ CC=cc
+
+ OBJ=main.o flayer.o icons.o io.o menu.o mesg.o rasp.o scroll.o unix.o
diff --git a/plan9/sam/patches/patch-ad b/plan9/sam/patches/patch-ad
new file mode 100644
index 00000000000..d444b917162
--- /dev/null
+++ b/plan9/sam/patches/patch-ad
@@ -0,0 +1,119 @@
+*** sam/Makefile.orig Mon Jul 31 15:45:40 1995
+--- sam/Makefile Mon Jul 31 15:46:24 1995
+***************
+*** 1,18 ****
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype Makefile for sam
+ #
+- # define operating system. ONE of:
+- # -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
+- # -DHPUX -DAPOLLO -DCONVEX -DDYNIX
+- #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DIRIX -ansiposix
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include
+
+ # Set the name of the environment variable containing the user's home directory
+ HOMEDIR=HOME
+--- 1,17 ----
+ # Copyright (c) 1992 AT&T - All rights reserved.
+ #
+! # Prototype BSDi Makefile for sam
+! # Courtesy of Boyd Roberts
+! #
+! # Define operating system type: -DBSDi
+ #
+ # Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
+ # if your compiler supports posix-compatible compilation
+! OS=-DBSDi -O2
+
+ # add -Iincludedir for any include directories that need to be searched
+ # for posix header files (for UMIPS, add -I/usr/include/posix)
+! INCS=-I../include -I/usr/include/posix
+
+ # Set the name of the environment variable containing the user's home directory
+ HOMEDIR=HOME
+***************
+*** 22,33 ****
+ # where sam is to be installed. SAMSAVEDIR is the name of the directory
+ # where the samsave file restoration script is stored.
+ RSAMNAME=sam
+! TERMNAME=/v/bin/samterm
+! SAMDIR=/usr/bin
+! SAMSAVEDIR=/v/bin
+
+ # Set TMP to a good place for tmp files (with lots of room)
+! TMP=/usr/tmp
+
+ # Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
+ # of its executable
+--- 21,32 ----
+ # where sam is to be installed. SAMSAVEDIR is the name of the directory
+ # where the samsave file restoration script is stored.
+ RSAMNAME=sam
+! TERMNAME=$(PREFIX)/bin/samterm
+! SAMDIR=$(PREFIX)/bin
+! SAMSAVEDIR=$(PREFIX)/bin
+
+ # Set TMP to a good place for tmp files (with lots of room)
+! TMP=/var/tmp
+
+ # Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
+ # of its executable
+***************
+*** 37,43 ****
+ # Set RXNAME and RXPATHNAME to the name of the remote execution command
+ # and the pathname of its executable
+ RXNAME=rsh
+! RXPATHNAME=/usr/bsd/rsh
+
+ SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave
+
+--- 36,42 ----
+ # Set RXNAME and RXPATHNAME to the name of the remote execution command
+ # and the pathname of its executable
+ RXNAME=rsh
+! RXPATHNAME=/usr/bin/rsh
+
+ SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave
+
+***************
+*** 68,76 ****
+ rm -f sam
+
+ install: sam
+! cp sam $(SAMDIR)/$(RSAMNAME)
+! cp samsave $(SAMSAVEDIR)/samsave
+! chmod +x samsave
+
+ $(OBJ): sam.h ../include/u.h ../include/libc.h errors.h mesg.h
+
+--- 67,76 ----
+ rm -f sam
+
+ install: sam
+! $(INSTALL) -c sam $(SAMDIR)/$(RSAMNAME)
+! $(INSTALL) -c samsave $(SAMSAVEDIR)/samsave
+! $(INSTALL) -c B.rc $(SAMDIR)/B
+! chmod +x $(SAMSAVEDIR)/samsave
+
+ $(OBJ): sam.h ../include/u.h ../include/libc.h errors.h mesg.h
+
+*** sam/B.rc.orig Mon Jul 31 15:45:31 1995
+--- sam/B.rc Mon Jul 31 15:47:10 1995
+***************
+*** 1,4 ****
+! #!/bin/rc
+
+ files=()
+ line=''
+--- 1,4 ----
+! #!/usr/local/bin/rc
+
+ files=()
+ line=''
diff --git a/plan9/sam/patches/patch-ae b/plan9/sam/patches/patch-ae
new file mode 100644
index 00000000000..95c677a8425
--- /dev/null
+++ b/plan9/sam/patches/patch-ae
@@ -0,0 +1,23 @@
+*** include/u.h~ Fri Jul 21 15:01:18 1995
+--- include/u.h Fri Jul 21 16:47:00 1995
+***************
+*** 46,53 ****
+ #define NOFIFO /* turn off exstart in samterm/unix.c */
+ #endif /* UMIPS */
+
+! #ifdef SUNOS
+ typedef unsigned short ushort;
+ typedef unsigned long ulong;
+ extern char *strerror(int);
+ extern void *memmove(void*, const void*, size_t);
+--- 46,55 ----
+ #define NOFIFO /* turn off exstart in samterm/unix.c */
+ #endif /* UMIPS */
+
+! #if defined(SUNOS)
+! #ifndef __FreeBSD__
+ typedef unsigned short ushort;
++ #endif
+ typedef unsigned long ulong;
+ extern char *strerror(int);
+ extern void *memmove(void*, const void*, size_t);
diff --git a/plan9/sam/patches/patch-af b/plan9/sam/patches/patch-af
new file mode 100644
index 00000000000..ba87ef18a54
--- /dev/null
+++ b/plan9/sam/patches/patch-af
@@ -0,0 +1,41 @@
+*** Makefile.orig Fri Aug 11 15:55:41 1995
+--- Makefile Fri Aug 11 16:08:35 1995
+***************
+*** 3,8 ****
+--- 3,17 ----
+ # master makefile for sam. configure sub-makefiles first.
+ #
+
++
++ MAN=man
++ MAN1=sam
++ MAN3=add balloc bitblt cachechars event frame graphics rgbpix rune
++ MAN4=font keyboard utf
++ MAN6=bitmap regexp
++ APP_DEFAULT_DIR=/usr/X11R6/lib/X11/app-defaults
++ AD=Sam
++
+ all: lXg lframe samdir samtermdir
+
+ lXg:
+***************
+*** 21,26 ****
+--- 30,47 ----
+ cd libframe; $(MAKE) install
+ cd sam; $(MAKE) install
+ cd samterm; $(MAKE) install
++ pwd
++ for i in $(MAN1); do cp doc/$$i.1 $(PREFIX)/$(MAN)/man1/$$i.1; done
++ for i in $(MAN3); do cp doc/$$i.3 $(PREFIX)/$(MAN)/man3/$$i.3; done
++ for i in $(MAN4); do cp doc/$$i.4 $(PREFIX)/$(MAN)/man4/$$i.4; done
++ for i in $(MAN6); do cp doc/$$i.6 $(PREFIX)/$(MAN)/man6/$$i.6; done
++ cp doc/$(AD).ad $(APP_DEFAULT_DIR)/$(AD)
++ strip $(PREFIX)/bin/sam
++ strip $(PREFIX)/bin/samterm
++ for i in $(MAN1); do gzip -9nf $(PREFIX)/$(MAN)/man1/$$i.1; done
++ for i in $(MAN3); do gzip -9nf $(PREFIX)/$(MAN)/man3/$$i.3; done
++ for i in $(MAN4); do gzip -9nf $(PREFIX)/$(MAN)/man4/$$i.4; done
++ for i in $(MAN6); do gzip -9nf $(PREFIX)/$(MAN)/man6/$$i.6; done
+
+ clean:
+ cd libXg; $(MAKE) clean
diff --git a/plan9/sam/pkg/COMMENT b/plan9/sam/pkg/COMMENT
new file mode 100644
index 00000000000..1bbc7df747a
--- /dev/null
+++ b/plan9/sam/pkg/COMMENT
@@ -0,0 +1 @@
+A unix version of Rob Pike's editor for plan9
diff --git a/plan9/sam/pkg/DESCR b/plan9/sam/pkg/DESCR
new file mode 100644
index 00000000000..2eab5d1faea
--- /dev/null
+++ b/plan9/sam/pkg/DESCR
@@ -0,0 +1,17 @@
+This is an X11 version of Rob Pike's editor, sam. Documentation describing
+its use and construction are provided in subdirectory doc. The file doc/sam.1
+contains the manual page; doc/sam.tut.ms is a tutorial that can be
+formatted with troff -ms. It substitutes Bold and Italics for the
+fonts named CW and CS; if your system has these fonts, remove the
+CW and CS macros at the beginning of the file. The files doc/sam.ps
+and doc/se.ps are postscript versions of published papers describing
+sam and structural regular expressions. These papers reflect sam's
+capabilities at the time of publication several years ago; while the
+general description remains accurate, some functions may have changed
+or been removed. Other files in the doc directory contain manual pages
+for the library packages used by sam.
+
+Sam is composed of two programs: sam itself, which does the command processing
+and file manipulation; and samterm, which controls the display and
+interacts with the user. You can run sam on one machine and samterm on another
+connected via remote execution.
diff --git a/plan9/sam/pkg/PLIST b/plan9/sam/pkg/PLIST
new file mode 100644
index 00000000000..4ca58d2dc24
--- /dev/null
+++ b/plan9/sam/pkg/PLIST
@@ -0,0 +1,19 @@
+bin/sam
+bin/samterm
+bin/samsave
+bin/B
+man/man3/add.3.gz
+man/man3/balloc.3.gz
+man/man3/bitblt.3.gz
+man/man6/bitmap.6.gz
+man/man3/cachechars.3.gz
+man/man3/event.3.gz
+man/man4/font.4.gz
+man/man3/frame.3.gz
+man/man3/graphics.3.gz
+man/man4/keyboard.4.gz
+man/man6/regexp.6.gz
+man/man3/rgbpix.3.gz
+man/man3/rune.3.gz
+man/man1/sam.1.gz
+man/man4/utf.4.gz