summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-06-09 16:36:39 +0000
committeragc <agc@pkgsrc.org>1998-06-09 16:36:39 +0000
commitb9e6b61220c50791ba4e7ee16d0d1232ef96752b (patch)
tree7d3de30b16834a9c8afe57202caf834b24315834 /net
parent8222cead5d6ff65a1224146e29084ce16ab5b315 (diff)
downloadpkgsrc-b9e6b61220c50791ba4e7ee16d0d1232ef96752b.tar.gz
Initial import of vnc 3.3.1, which displays X11 and Win32 desktops on
remote X11/Win32/Java displays, into the NetBSD packages collection. Taken from the FreeBSD port, but modified slightly to find correct paths.
Diffstat (limited to 'net')
-rw-r--r--net/vnc/Makefile45
-rw-r--r--net/vnc/files/md52
-rw-r--r--net/vnc/patches/patch-aa561
-rw-r--r--net/vnc/patches/patch-ab115
-rw-r--r--net/vnc/pkg/COMMENT1
-rw-r--r--net/vnc/pkg/DESCR7
-rw-r--r--net/vnc/pkg/PLIST125
7 files changed, 856 insertions, 0 deletions
diff --git a/net/vnc/Makefile b/net/vnc/Makefile
new file mode 100644
index 00000000000..1fe6259f6d4
--- /dev/null
+++ b/net/vnc/Makefile
@@ -0,0 +1,45 @@
+# FreeBSD Id: Makefile,v 1.2 1998/03/19 01:54:59 msmith Exp
+#
+
+DISTNAME= vnc-3.3.1_unixsrc
+PKGNAME= vnc-3.1.1
+CATEGORIES= net
+MASTER_SITES= http://www.orl.co.uk/vnc/dist/
+DISTFILES= vnc-3.3.1_unixsrc.tgz \
+ vnc-3.3.1_doc.tgz
+IGNOREFILES= ${DISTFILES}
+
+MAINTAINER= msmith@FreeBSD.ORG
+
+USE_PERL5= YES
+
+EXTRACT_ONLY= vnc-3.3.1_unixsrc.tgz
+
+# Is this for real? The code was developed in the UK,
+# but the DES parts came from the USA in the first place.
+RESTRICTED= Contains cryptographic software
+
+NO_WRKSUBDIR= YES
+
+USE_IMAKE= YES
+NO_INSTALL_MANPAGES= YES
+
+ALL_TARGET= world
+
+# We have to frob a few things, and we want our own permissions, so it's easier
+# to do the install ourselves.
+post-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/Xvnc/programs/Xserver/Xvnc ${PREFIX}/bin/Xvnc
+ ${INSTALL_PROGRAM} ${WRKDIR}/vncviewer/vncviewer ${PREFIX}/bin/vncviewer
+ ${INSTALL_PROGRAM} ${WRKDIR}/vncpasswd/vncpasswd ${PREFIX}/bin/vncpasswd
+ ${SED} -e 's|/usr/local/vnc/classes|${X11BASE}/share/vnc/classes|g' \
+ -e 's|/usr/local/bin/perl|${LOCALBASE}/bin/perl|g' \
+ < ${WRKDIR}/vncserver \
+ > ${WRKDIR}/vncserver.local
+ ${INSTALL_SCRIPT} ${WRKDIR}/vncserver.local ${PREFIX}/bin/vncserver
+# The documentation comes with bogus ownerships; this is a little leaky security-wise
+ ${MKDIR} ${PREFIX}/share/doc/vnc
+ tar -C ${PREFIX}/share/doc/vnc -xzf ${DISTDIR}/vnc-3.3.1_doc.tgz
+ chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/vnc
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/vnc/files/md5 b/net/vnc/files/md5
new file mode 100644
index 00000000000..76a0971b098
--- /dev/null
+++ b/net/vnc/files/md5
@@ -0,0 +1,2 @@
+MD5 (vnc-3.3.1_unixsrc.tgz) = IGNORE
+MD5 (vnc-3.3.1_doc.tgz) = IGNORE
diff --git a/net/vnc/patches/patch-aa b/net/vnc/patches/patch-aa
new file mode 100644
index 00000000000..2f95243d641
--- /dev/null
+++ b/net/vnc/patches/patch-aa
@@ -0,0 +1,561 @@
+diff -ruN ../old/Imakefile ./Imakefile
+--- ../old/Imakefile Thu Jan 22 12:18:18 1998
++++ ./Imakefile Tue Feb 24 22:30:41 1998
+@@ -12,5 +12,5 @@
+ DependSubdirs($(SUBDIRS))
+
+ all::
+- (set -e; cd Xvnc; unset MAKEFLAGS MAKELEVEL; \
++ (set +e; unset MAKEFLAGS MAKELEVEL; set -e; cd Xvnc; \
+ ./vncxmkmf; make Makefiles; make depend; make all )
+diff -ruN ../old/Xvnc/config/FreeBSD.cf ./Xvnc/config/FreeBSD.cf
+--- ../old/Xvnc/config/FreeBSD.cf Wed Dec 31 16:00:00 1969
++++ ./Xvnc/config/FreeBSD.cf Tue Feb 24 23:42:33 1998
+@@ -0,0 +1,100 @@
++XCOMM platform: $XConsortium: FreeBSD.cf /main/10 1996/01/22 17:35:30 gildea $
++
++#ifndef OSName
++#define OSName FreeBSD 2.1
++#endif
++#ifndef OSVendor
++#define OSVendor Walnut Creek CD-ROM
++#endif
++XCOMM operating system: OSName
++#ifndef OSMajorVersion
++#define OSMajorVersion 2
++#endif
++#ifndef OSMinorVersion
++#define OSMinorVersion 1
++#endif
++#ifndef OSTeenyVersion
++#define OSTeenyVersion 0
++#endif
++
++#define HasPutenv YES
++#define HasBSD44Sockets YES
++
++#define CppCmd /usr/libexec/cpp -traditional
++#define PreProcessCmd /usr/libexec/cpp -traditional
++#undef InstallCmd
++#define InstallCmd /usr/bin/install
++
++#define UseGas YES
++#ifndef GccUsesGas
++# define GccUsesGas YES
++#endif
++
++#ifndef AsmDefines
++# define AsmDefines -DUSE_GAS
++#endif
++
++#if GccUsesGas
++# define GccGasOption -DGCCUSESGAS
++#else
++# define GccGasOption /**/
++#endif
++
++#ifndef HasGcc2
++# define HasGcc2 YES
++#endif
++
++#define MkdirHierCmd mkdir -p
++
++#define CcCmd gcc
++#ifndef DefaultCCOptions
++#define DefaultCCOptions -pipe
++#endif
++
++#ifdef i386Architecture
++#define OptimizedCDebugFlags -m486 -O2 -fno-strength-reduce
++#else
++#define OptimizedCDebugFlags -O2
++#endif
++
++#if OSMajorVersion > 1
++#define ServerOSDefines XFree86ServerOSDefines
++#define XawI18nDefines -DUSE_XWCHAR_STRING
++#define HasMakefileSafeInclude YES
++#define IncludeMakefile(file) @@# dependencies are in .depend
++#define DependFileName .depend
++#ifndef ExtraLibraries
++#define ExtraLibraries -lz
++#endif
++#else
++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
++#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
++#ifndef ExtraLibraries
++#define ExtraLibraries /* -lmalloc */
++#endif
++#endif
++
++#define ServerExtraDefines GccGasOption XFree86ServerDefines
++
++#define StandardDefines -DCSRG_BASED
++
++#define TroffCmd groff -Tps
++#define SetTtyGroup YES
++#define HasNdbm YES
++#define HasShm YES
++#define HasWChar32 YES
++
++#define HasLibCrypt YES
++
++#define AvoidNullMakeCommand YES
++
++#define BuildServer YES
++#define XF86SVGAServer NO
++#define XvncServer YES
++#define ProjectRoot /usr/X11R6
++
++#include <bsdLib.rules>
++
++#ifdef i386Architecture
++#include <xfree86.cf>
++#endif
+diff -ruN ../old/Xvnc/config/bsdLib.rules ./Xvnc/config/bsdLib.rules
+--- ../old/Xvnc/config/bsdLib.rules Wed Dec 31 16:00:00 1969
++++ ./Xvnc/config/bsdLib.rules Tue Feb 24 22:30:41 1998
+@@ -0,0 +1,93 @@
++XCOMM $XConsortium: bsdLib.rules /main/2 1996/01/24 06:38:15 kaleb $
++
++/*
++ * NetBSD/FreeBSD shared library rules
++ */
++
++#ifndef HasSharedLibraries
++#define HasSharedLibraries YES
++#endif
++#ifndef SharedDataSeparation
++#define SharedDataSeparation NO
++#endif
++#ifndef SharedCodeDef
++#define SharedCodeDef
++#endif
++#ifndef SharedLibraryDef
++#define SharedLibraryDef -DBSDSHLIB
++#endif
++#ifndef ShLibIncludeFile
++#define ShLibIncludeFile <bsdLib.tmpl>
++#endif
++#ifndef SharedLibraryLoadFlags
++#define SharedLibraryLoadFlags -Bshareable
++#endif
++#ifndef PositionIndependentCFlags
++#define PositionIndependentCFlags -fpic
++#endif
++
++/*
++ * InstallSharedLibrary - generate rules to install the shared library.
++ */
++#ifndef InstallSharedLibrary
++#define InstallSharedLibrary(libname,rev,dest) @@\
++install:: Concat(lib,libname.so.rev) @@\
++ MakeDir($(DESTDIR)dest) @@\
++ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
++@@\
++
++#endif /* InstallSharedLibrary */
++
++/*
++ * NormalSharedLibraryTarget - generate rules to create a shared library;
++ * build it into a different name so that the we do not hose people by having
++ * the library gone for long periods.
++ */
++#ifndef SharedLibraryTarget
++#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
++AllTarget(Concat(lib,libname.so.rev)) @@\
++ @@\
++Concat(lib,libname.so.rev): solist @@\
++ $(RM) $@~ @@\
++ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
++ $(RM) $@ @@\
++ $(MV) $@~ $@ @@\
++ LinkBuildLibrary($@) @@\
++ @@\
++clean:: @@\
++ $(RM) Concat(lib,libname.so.rev)
++
++#endif /* SharedLibraryTarget */
++
++/*
++ * SharedLibraryDataTarget - generate rules to create shlib data file;
++ */
++#ifndef SharedLibraryDataTarget
++#define SharedLibraryDataTarget(libname,rev,salist)
++#endif /* SharedLibraryDataTarget */
++
++#ifndef InstallSharedLibraryData
++#define InstallSharedLibraryData(libname,rev,dest)
++#endif /* InstallSharedLibraryData */
++
++/*
++ * SharedLibReferences - variables for shared libraries
++ */
++#ifndef SharedLibReferences
++#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
++revname = rev @@\
++Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
++Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
++LintLibReferences(varname,libname,libsource)
++#endif
++
++/*
++ * SharedDSLibReferences - variables for shared libraries
++ */
++#ifndef SharedDSLibReferences
++#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
++revname = rev @@\
++Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
++Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\
++LintLibReferences(varname,libname,libsource)
++#endif
+diff -ruN ../old/Xvnc/config/bsdLib.tmpl ./Xvnc/config/bsdLib.tmpl
+--- ../old/Xvnc/config/bsdLib.tmpl Wed Dec 31 16:00:00 1969
++++ ./Xvnc/config/bsdLib.tmpl Tue Feb 24 22:30:41 1998
+@@ -0,0 +1,15 @@
++XCOMM $XConsortium: bsdLib.tmpl,v 1.2 95/01/23 19:07:12 kaleb Exp $
++
++/*
++ * NetBSD/FreeBSD shared library template
++ */
++
++#ifndef SharedXtReqs
++#define SharedXtReqs /**/
++#endif
++#ifndef SharedXawReqs
++#define SharedXawReqs /**/
++#endif
++#ifndef SharedXmuReqs
++#define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB)
++#endif
+diff -ruN ../old/Xvnc/lib/font/bitmap/bitmapfunc.c ./Xvnc/lib/font/bitmap/bitmapfunc.c
+--- ../old/Xvnc/lib/font/bitmap/bitmapfunc.c Tue Jan 20 04:38:40 1998
++++ ./Xvnc/lib/font/bitmap/bitmapfunc.c Tue Feb 24 23:15:16 1998
+@@ -53,8 +53,11 @@
+ static BitmapFileFunctionsRec readers[] = {
+ pcfReadFont, pcfReadFontInfo,
+ pcfReadFont, pcfReadFontInfo,
++ pcfReadFont, pcfReadFontInfo,
+ snfReadFont, snfReadFontInfo,
+ snfReadFont, snfReadFontInfo,
++ snfReadFont, snfReadFontInfo,
++ bdfReadFont, bdfReadFontInfo,
+ bdfReadFont, bdfReadFontInfo,
+ bdfReadFont, bdfReadFontInfo,
+ };
+@@ -71,6 +74,10 @@
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES,
++ ".pcf.gz", 7,
++ BitmapOpenBitmap, BitmapOpenScalable,
++ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
++ CAPABILITIES,
+ ".snf", 4,
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+@@ -79,11 +86,19 @@
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES,
++ ".snf.gz", 7,
++ BitmapOpenBitmap, BitmapOpenScalable,
++ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
++ CAPABILITIES,
+ ".bdf", 4,
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES,
+ ".bdf.Z", 6,
++ BitmapOpenBitmap, BitmapOpenScalable,
++ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
++ CAPABILITIES,
++ ".bdf.gz", 7,
+ BitmapOpenBitmap, BitmapOpenScalable,
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
+ CAPABILITIES,
+diff -ruN ../old/Xvnc/lib/font/fontfile/Imakefile ./Xvnc/lib/font/fontfile/Imakefile
+--- ../old/Xvnc/lib/font/fontfile/Imakefile Tue Jan 20 04:38:42 1998
++++ ./Xvnc/lib/font/fontfile/Imakefile Tue Feb 24 23:27:48 1998
+@@ -8,10 +8,10 @@
+ #endif
+ SRCS = dirfile.c fontdir.c fontfile.c fileio.c fontscale.c \
+ defaults.c bitsource.c register.c renderers.c \
+- bufio.c decompress.c filewr.c
++ bufio.c decompress.c filewr.c gunzip.c
+ OBJS = dirfile.o fontdir.o fontfile.o fileio.o fontscale.o \
+ defaults.o bitsource.o register.o renderers.o \
+- bufio.o decompress.o filewr.o
++ bufio.o decompress.o filewr.o gunzip.o
+
+ SubdirLibraryRule($(OBJS))
+ NormalLibraryObjectRule()
+diff -ruN ../old/Xvnc/lib/font/fontfile/fileio.c ./Xvnc/lib/font/fontfile/fileio.c
+--- ../old/Xvnc/lib/font/fontfile/fileio.c Tue Jan 20 04:38:42 1998
++++ ./Xvnc/lib/font/fontfile/fileio.c Wed Feb 25 13:09:47 1998
+@@ -62,6 +62,13 @@
+ return 0;
+ }
+ raw = cooked;
++ } else if (len > 3 && !strcmp(name + len - 3, ".gz")) {
++ cooked = BufFilePushZIP (raw);
++ if (!cooked) {
++ BufFileClose (raw, TRUE);
++ return 0;
++ }
++ raw = cooked;
+ }
+ return (FontFilePtr) raw;
+ }
+diff -ruN ../old/Xvnc/lib/font/fontfile/gunzip.c ./Xvnc/lib/font/fontfile/gunzip.c
+--- ../old/Xvnc/lib/font/fontfile/gunzip.c Wed Dec 31 16:00:00 1969
++++ ./Xvnc/lib/font/fontfile/gunzip.c Tue Feb 24 23:12:36 1998
+@@ -0,0 +1,224 @@
++/* $XConsortium: gunzip.c /main/1 1996/11/03 19:33:23 kaleb $ */
++/* lib/font/fontfile/gunzip.c
++ written by Mark Eichin <eichin@kitten.gen.ma.us> September 1996.
++ intended for inclusion in X11 public releases. */
++
++#include "fontmisc.h"
++#include <bufio.h>
++#include <zlib.h>
++
++typedef struct _xzip_buf {
++ z_stream z;
++ int zstat;
++ BufChar b[BUFFILESIZE];
++ BufChar b_in[BUFFILESIZE];
++ BufFilePtr f;
++} xzip_buf;
++
++static int BufZipFileSkip(); /* f, count */
++static int BufZipFileFill(); /* read: f; write: char, f */
++static int BufZipFileClose(); /* f, flag */
++static int BufCheckZipHeader(); /* f */
++
++BufFilePtr
++BufFilePushZIP (f)
++ BufFilePtr f;
++{
++ xzip_buf *x;
++
++ x = (xzip_buf *) xalloc (sizeof (xzip_buf));
++ if (!x) return 0;
++ /* these are just for raw calloc/free */
++ x->z.zalloc = Z_NULL;
++ x->z.zfree = Z_NULL;
++ x->z.opaque = Z_NULL;
++ x->f = f;
++
++ /* force inflateInit to allocate it's own history buffer */
++ x->z.next_in = Z_NULL;
++ x->z.next_out = Z_NULL;
++ x->z.avail_in = x->z.avail_out = 0;
++
++ /* using negative windowBits sets "nowrap" mode, which turns off
++ zlib header checking [undocumented, for gzip compatibility only?] */
++ x->zstat = inflateInit2(&(x->z), -MAX_WBITS);
++ if (x->zstat != Z_OK) {
++ xfree(x);
++ return 0;
++ }
++
++ /* now that the history buffer is allocated, we provide the data buffer */
++ x->z.next_out = x->b;
++ x->z.avail_out = BUFFILESIZE;
++ x->z.next_out = x->b_in;
++ x->z.avail_in = 0;
++
++ if (BufCheckZipHeader(x->f)) {
++ xfree(x);
++ return 0;
++ }
++
++ return BufFileCreate(x,
++ BufZipFileFill,
++ BufZipFileSkip,
++ BufZipFileClose);
++}
++
++static int BufZipFileClose(f, flag)
++ BufFilePtr f;
++ int flag;
++{
++ xzip_buf *x = (xzip_buf *)f->private;
++ inflateEnd (&(x->z));
++ BufFileClose (x->f, flag);
++ xfree (x);
++ return 1;
++}
++
++/* here's the real work.
++ -- we need to put stuff in f.buffer, update f.left and f.bufp,
++ then return the first byte (or BUFFILEEOF).
++ -- to do this, we need to get stuff into avail_in, and next_in,
++ and call inflate appropriately.
++ -- we may also need to add CRC maintenance - if inflate tells us
++ Z_STREAM_END, we then have 4bytes CRC and 4bytes length...
++ gzio.c:gzread shows most of the mechanism.
++ */
++static int BufZipFileFill (f)
++ BufFilePtr f;
++{
++ xzip_buf *x = (xzip_buf *)f->private;
++
++ /* we only get called when left == 0... */
++ /* but just in case, deal */
++ if (f->left >= 0) {
++ f->left--;
++ return *(f->bufp++);
++ }
++ /* did we run out last time? */
++ switch (x->zstat) {
++ case Z_OK:
++ break;
++ case Z_STREAM_END:
++ case Z_DATA_ERROR:
++ case Z_ERRNO:
++ return BUFFILEEOF;
++ default:
++ return BUFFILEEOF;
++ }
++ /* now we work to consume what we can */
++ /* let zlib know what we can handle */
++ x->z.next_out = x->b;
++ x->z.avail_out = BUFFILESIZE;
++
++ /* and try to consume all of it */
++ while (x->z.avail_out > 0) {
++ /* if we don't have anything to work from... */
++ if (x->z.avail_in == 0) {
++ /* ... fill the z buf from underlying file */
++ int i, c;
++ for (i = 0; i < sizeof(x->b_in); i++) {
++ c = BufFileGet(x->f);
++ if (c == BUFFILEEOF) break;
++ x->b_in[i] = c;
++ }
++ x->z.avail_in += i;
++ x->z.next_in = x->b_in;
++ }
++ /* so now we have some output space and some input data */
++ x->zstat = inflate(&(x->z), Z_NO_FLUSH);
++ /* the inflation output happens in the f buffer directly... */
++ if (x->zstat == Z_STREAM_END) {
++ /* deal with EOF, crc */
++ break;
++ }
++ if (x->zstat != Z_OK) {
++ break;
++ }
++ }
++ f->bufp = x->b;
++ f->left = BUFFILESIZE - x->z.avail_out;
++
++ if (f->left >= 0) {
++ f->left--;
++ return *(f->bufp++);
++ } else {
++ return BUFFILEEOF;
++ }
++}
++
++/* there should be a BufCommonSkip... */
++static int BufZipFileSkip (f, c)
++ BufFilePtr f;
++ int c;
++{
++ /* BufFileRawSkip returns the count unchanged.
++ BufCompressedSkip returns 0.
++ That means it probably never gets called... */
++ int retval = c;
++ while(c--) {
++ int get = BufFileGet(f);
++ if (get == BUFFILEEOF) return get;
++ }
++ return retval;
++}
++
++/* now we need to duplicate check_header */
++/* contents:
++ 0x1f, 0x8b -- magic number
++ 1 byte -- method (Z_DEFLATED)
++ 1 byte -- flags (mask with RESERVED -> fail)
++ 4 byte -- time (discard)
++ 1 byte -- xflags (discard)
++ 1 byte -- "os" code (discard)
++ [if flags & EXTRA_FIELD:
++ 2 bytes -- LSBfirst length n
++ n bytes -- extra data (discard)]
++ [if flags & ORIG_NAME:
++ n bytes -- null terminated name (discard)]
++ [if flags & COMMENT:
++ n bytes -- null terminated comment (discard)]
++ [if flags & HEAD_CRC:
++ 2 bytes -- crc of headers? (discard)]
++ */
++
++/* gzip flag byte -- from gzio.c */
++#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
++#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
++#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
++#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
++#define COMMENT 0x10 /* bit 4 set: file comment present */
++#define RESERVED 0xE0 /* bits 5..7: reserved */
++
++#define GET(f) do {c = BufFileGet(f); if (c == BUFFILEEOF) return c;} while(0)
++static int BufCheckZipHeader(f)
++ BufFilePtr f;
++{
++ int c, flags;
++ GET(f); if (c != 0x1f) return 1; /* magic 1 */
++ GET(f); if (c != 0x8b) return 2; /* magic 2 */
++ GET(f); if (c != Z_DEFLATED) return 3; /* method */
++ GET(f); if (c & RESERVED) return 4; /* reserved flags */
++ flags = c;
++ GET(f); GET(f); GET(f); GET(f); /* time */
++ GET(f); /* xflags */
++ GET(f); /* os code */
++ if (flags & EXTRA_FIELD) {
++ int len;
++ GET(f); len = c;
++ GET(f); len += (c<<8);
++ while (len-- >= 0) {
++ GET(f);
++ }
++ }
++ if (flags & ORIG_NAME) {
++ do { GET(f); } while (c != 0);
++ }
++ if (flags & COMMENT) {
++ do { GET(f); } while (c != 0);
++ }
++ if (flags & HEAD_CRC) {
++ GET(f); GET(f); /* header crc */
++ }
++ return 0;
++}
+diff -ruN ../old/Xvnc/lib/font/include/bufio.h ./Xvnc/lib/font/include/bufio.h
+--- ../old/Xvnc/lib/font/include/bufio.h Tue Jan 20 04:38:42 1998
++++ ./Xvnc/lib/font/include/bufio.h Tue Feb 24 23:16:12 1998
+@@ -55,6 +55,7 @@
+ extern BufFilePtr BufFileCreate ();
+ extern BufFilePtr BufFileOpenRead (), BufFileOpenWrite ();
+ extern BufFilePtr BufFilePushCompressed ();
++extern BufFilePtr BufFilePushZip ();
+ extern int BufFileClose ();
+ extern int BufFileFlush ();
+ #define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))
+diff -ruN ../old/Xvnc/programs/Xserver/hw/vnc/auth.c ./Xvnc/programs/Xserver/hw/vnc/auth.c
+--- ../old/Xvnc/programs/Xserver/hw/vnc/auth.c Wed Jan 21 10:12:44 1998
++++ ./Xvnc/programs/Xserver/hw/vnc/auth.c Tue Feb 24 22:30:41 1998
+@@ -24,6 +24,9 @@
+ * USA.
+ */
+
++#ifdef __FreeBSD__
++# include <sys/types.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <netinet/in.h>
diff --git a/net/vnc/patches/patch-ab b/net/vnc/patches/patch-ab
new file mode 100644
index 00000000000..ecba6bf7145
--- /dev/null
+++ b/net/vnc/patches/patch-ab
@@ -0,0 +1,115 @@
+--- /dev/null Fri Jun 5 15:30:38 1998
++++ Xvnc/config/NetBSD.cf Fri Jun 5 15:36:14 1998
+@@ -0,0 +1,101 @@
++XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.49.2.9 1997/07/26 06:30:39 dawes Exp $
++
++#ifndef OSName
++#define OSName NetBSD 1.3
++#endif
++#ifndef OSVendor
++#define OSVendor The NetBSD Foundation, Inc.
++#endif
++#ifndef OSMajorVersion
++#define OSMajorVersion 1
++#endif
++#ifndef OSMinorVersion
++#define OSMinorVersion 3
++#endif
++#ifndef OSTeenyVersion
++#define OSTeenyVersion 0
++#endif
++
++XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
++
++#define HasPutenv YES
++#define HasBSD44Sockets YES
++
++#define CppCmd /usr/libexec/cpp -traditional
++#define PreProcessCmd /usr/libexec/cpp -traditional
++#undef InstallCmd
++#define InstallCmd /usr/bin/install
++
++#define UseGas YES
++#ifndef GccUsesGas
++# define GccUsesGas YES
++#endif
++
++#ifndef AsmDefines
++# define AsmDefines -DUSE_GAS
++#endif
++
++#if GccUsesGas
++# define GccGasOption -DGCCUSESGAS
++#else
++# define GccGasOption /**/
++#endif
++
++#ifndef HasGcc2
++# define HasGcc2 YES
++#endif
++
++#define MkdirHierCmd mkdir -p
++
++#define CcCmd gcc
++#ifndef DefaultCCOptions
++#define DefaultCCOptions -pipe
++#endif
++
++#ifdef i386Architecture
++#define OptimizedCDebugFlags -m486 -O2 -fno-strength-reduce
++#else
++#define OptimizedCDebugFlags -O2
++#endif
++
++#if OSMajorVersion >= 1
++#define ServerOSDefines XFree86ServerOSDefines
++#define XawI18nDefines -DUSE_XWCHAR_STRING
++#define HasMakefileSafeInclude YES
++#define IncludeMakefile(file) @@# dependencies are in .depend
++#define DependFileName .depend
++#ifndef ExtraLibraries
++#define ExtraLibraries -lz
++#endif
++#else
++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
++#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
++#ifndef ExtraLibraries
++#define ExtraLibraries /**/
++#endif
++#endif
++
++#define ServerExtraDefines GccGasOption XFree86ServerDefines
++
++#define StandardDefines -DCSRG_BASED
++
++#define TroffCmd groff -Tps
++#define SetTtyGroup YES
++#define HasNdbm YES
++#define HasShm YES
++#define HasWChar32 YES
++
++#define HasLibCrypt YES
++
++#define AvoidNullMakeCommand YES
++
++#define BuildServer YES
++#define XF86SVGAServer NO
++#define XvncServer YES
++#define ProjectRoot /usr/X11R6
++
++#include <bsdLib.rules>
++
++#ifdef i386Architecture
++#include <xfree86.cf>
++#endif
+--- Xvnc/lib/font/Type1/t1funcs.c 1998/06/05 15:02:02 1.1
++++ Xvnc/lib/font/Type1/t1funcs.c 1998/06/05 15:02:29
+@@ -84,6 +84,8 @@
+ from the X Consortium.
+
+ */
++
++#include <sys/types.h>
+
+ #include <string.h>
+ #ifdef _XOPEN_SOURCE
diff --git a/net/vnc/pkg/COMMENT b/net/vnc/pkg/COMMENT
new file mode 100644
index 00000000000..70f53f0e4c4
--- /dev/null
+++ b/net/vnc/pkg/COMMENT
@@ -0,0 +1 @@
+Display X and Win32 desktops on remote X/Win32/Java displays.
diff --git a/net/vnc/pkg/DESCR b/net/vnc/pkg/DESCR
new file mode 100644
index 00000000000..a4a0dd96161
--- /dev/null
+++ b/net/vnc/pkg/DESCR
@@ -0,0 +1,7 @@
+"VNC stands for Virtual Network Computing. It is, in essence, a remote
+ display system which allows you to view a computing 'desktop'
+ environment not only on the machine where it is running, but from
+ anywhere on the Internet and from a wide variety of machine
+ architectures."
+
+See http://www.orl.co.uk/vnc/ for more details.
diff --git a/net/vnc/pkg/PLIST b/net/vnc/pkg/PLIST
new file mode 100644
index 00000000000..711d1eeeb93
--- /dev/null
+++ b/net/vnc/pkg/PLIST
@@ -0,0 +1,125 @@
+bin/Xvnc
+bin/vncviewer
+bin/vncpasswd
+bin/vncserver
+share/doc/vnc/_private/_vti_cnf/sidebar.html
+share/doc/vnc/_private/_vti_cnf/header.html
+share/doc/vnc/_private/_vti_cnf/footer.html
+share/doc/vnc/_private/footer.html
+share/doc/vnc/_private/header.html
+share/doc/vnc/_private/sidebar.html
+share/doc/vnc/_vti_cnf/howitworks.html
+share/doc/vnc/_vti_cnf/gpl.html
+share/doc/vnc/_vti_cnf/free.html
+share/doc/vnc/_vti_cnf/download.htm
+share/doc/vnc/_vti_cnf/docs.html
+share/doc/vnc/_vti_cnf/intouch.html
+share/doc/vnc/_vti_cnf/internalversion.html
+share/doc/vnc/_vti_cnf/index.html
+share/doc/vnc/_vti_cnf/protocol.html
+share/doc/vnc/_vti_cnf/javavncviewer.html
+share/doc/vnc/_vti_cnf/rfbproto.pdf
+share/doc/vnc/_vti_cnf/xvncviewer.html
+share/doc/vnc/_vti_cnf/xvnc.html
+share/doc/vnc/_vti_cnf/winvncviewer.html
+share/doc/vnc/_vti_cnf/winvnc.html
+share/doc/vnc/_vti_cnf/styles.css
+share/doc/vnc/_vti_cnf/start.html
+share/doc/vnc/_vti_cnf/screenshots.html
+share/doc/vnc/_vti_cnf/rfbprotoheader.pdf
+share/doc/vnc/_vti_pvt/diskweb.cnf
+share/doc/vnc/_vti_pvt/frontpg.lck
+share/doc/vnc/_vti_pvt/services.cnf
+share/doc/vnc/_vti_pvt/bots.cnf
+share/doc/vnc/_vti_pvt/botinfs.cnf
+share/doc/vnc/_vti_pvt/service.lck
+share/doc/vnc/_vti_pvt/service.cnf
+share/doc/vnc/_vti_pvt/access.cnf
+share/doc/vnc/_vti_pvt/doctodep.btr
+share/doc/vnc/_vti_pvt/deptodoc.btr
+share/doc/vnc/_vti_pvt/writeto.cnf
+share/doc/vnc/_vti_pvt/linkinfo.cnf
+share/doc/vnc/_vti_pvt/structure.cnf
+share/doc/vnc/_vti_pvt/_vti_cnf/_x_todoh.htm
+share/doc/vnc/_vti_pvt/_vti_cnf/_x_todo.htm
+share/doc/vnc/_vti_pvt/_x_todo.htm
+share/doc/vnc/_vti_pvt/_x_todoh.htm
+share/doc/vnc/docs.html
+share/doc/vnc/download.htm
+share/doc/vnc/free.html
+share/doc/vnc/gpl.html
+share/doc/vnc/howitworks.html
+share/doc/vnc/images/_vti_cnf/clientserver.gif
+share/doc/vnc/images/_vti_cnf/cdplay.gif
+share/doc/vnc/images/_vti_cnf/bluepix.gif
+share/doc/vnc/images/_vti_cnf/badgeshad.gif
+share/doc/vnc/images/_vti_cnf/backbutton.gif
+share/doc/vnc/images/_vti_cnf/collage.gif
+share/doc/vnc/images/_vti_cnf/homebutton.gif
+share/doc/vnc/images/_vti_cnf/freebutton.gif
+share/doc/vnc/images/_vti_cnf/downloadbutton.gif
+share/doc/vnc/images/_vti_cnf/docbutton.gif
+share/doc/vnc/images/_vti_cnf/conndlg.gif
+share/doc/vnc/images/_vti_cnf/collagesmaller.gif
+share/doc/vnc/images/_vti_cnf/newlogosmall2.gif
+share/doc/vnc/images/_vti_cnf/intouchbutton.gif
+share/doc/vnc/images/_vti_cnf/ie1_small.gif
+share/doc/vnc/images/_vti_cnf/ie1.gif
+share/doc/vnc/images/_vti_cnf/ns1.gif
+share/doc/vnc/images/_vti_cnf/Xvnc.gif
+share/doc/vnc/images/_vti_cnf/winvnctray.GIF
+share/doc/vnc/images/_vti_cnf/winviewer1_small.gif
+share/doc/vnc/images/_vti_cnf/vnc.gif
+share/doc/vnc/images/_vti_cnf/winviewer1.gif
+share/doc/vnc/images/_vti_cnf/vinci1_small.gif
+share/doc/vnc/images/_vti_cnf/vinci1.gif
+share/doc/vnc/images/_vti_cnf/startbutton.gif
+share/doc/vnc/images/_vti_cnf/spacer.gif
+share/doc/vnc/images/_vti_cnf/sidebarbg.gif
+share/doc/vnc/images/_vti_cnf/screenbutton.gif
+share/doc/vnc/images/_vti_cnf/orlbutton.gif
+share/doc/vnc/images/_vti_cnf/ns1_small.gif
+share/doc/vnc/images/backbutton.gif
+share/doc/vnc/images/badgeshad.gif
+share/doc/vnc/images/bluepix.gif
+share/doc/vnc/images/cdplay.gif
+share/doc/vnc/images/clientserver.gif
+share/doc/vnc/images/collage.gif
+share/doc/vnc/images/collagesmaller.gif
+share/doc/vnc/images/conndlg.gif
+share/doc/vnc/images/docbutton.gif
+share/doc/vnc/images/downloadbutton.gif
+share/doc/vnc/images/freebutton.gif
+share/doc/vnc/images/homebutton.gif
+share/doc/vnc/images/ie1.gif
+share/doc/vnc/images/ie1_small.gif
+share/doc/vnc/images/intouchbutton.gif
+share/doc/vnc/images/newlogosmall2.gif
+share/doc/vnc/images/ns1.gif
+share/doc/vnc/images/ns1_small.gif
+share/doc/vnc/images/orlbutton.gif
+share/doc/vnc/images/sidebarbg.gif
+share/doc/vnc/images/screenbutton.gif
+share/doc/vnc/images/spacer.gif
+share/doc/vnc/images/startbutton.gif
+share/doc/vnc/images/vinci1.gif
+share/doc/vnc/images/vinci1_small.gif
+share/doc/vnc/images/vnc.gif
+share/doc/vnc/images/winviewer1.gif
+share/doc/vnc/images/winviewer1_small.gif
+share/doc/vnc/images/winvnctray.GIF
+share/doc/vnc/images/Xvnc.gif
+share/doc/vnc/index.html
+share/doc/vnc/internalversion.html
+share/doc/vnc/intouch.html
+share/doc/vnc/javavncviewer.html
+share/doc/vnc/protocol.html
+share/doc/vnc/rfbproto.pdf
+share/doc/vnc/rfbprotoheader.pdf
+share/doc/vnc/screenshots.html
+share/doc/vnc/start.html
+share/doc/vnc/styles.css
+share/doc/vnc/winvnc.html
+share/doc/vnc/winvncviewer.html
+share/doc/vnc/xvnc.html
+share/doc/vnc/xvncviewer.html