6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
authorAlan Coopersmith <Alan.Coopersmith@Sun.COM>
Fri, 06 Nov 2009 14:06:00 -0800
changeset 822 2a89ea3c59be
parent 821 ac493209c29b
child 823 b2299c1935d5
6898535 Upgrade VNC from RealVNC 4.1.3 to TigerVNC 1.0 [PSARC/2009/592]
open-src/Makefile
open-src/common/Makefile.inc
open-src/xserver/xorg/xtsol.patch
open-src/xserver/xvnc/COPYING
open-src/xserver/xvnc/Makefile
open-src/xserver/xvnc/README.txt
open-src/xserver/xvnc/applet-build.patch
open-src/xserver/xvnc/c++public.patch
open-src/xserver/xvnc/icon.patch
open-src/xserver/xvnc/solaris-port.patch
open-src/xserver/xvnc/tigervnc-xserver16.patch
open-src/xserver/xvnc/tigervnc_16.gif
open-src/xserver/xvnc/vnc-24bit.patch
open-src/xserver/xvnc/vnc-64bit.patch
open-src/xserver/xvnc/vnc-Makefile.am.patch
open-src/xserver/xvnc/vnc-allocate.patch
open-src/xserver/xvnc/vnc-always_use_fb.patch
open-src/xserver/xvnc/vnc-autotools-compile.patch
open-src/xserver/xvnc/vnc-autotools.patch
open-src/xserver/xvnc/vnc-bounds.patch
open-src/xserver/xvnc/vnc-config-subdirs.patch
open-src/xserver/xvnc/vnc-fasterPrivates.patch
open-src/xserver/xvnc/vnc-gcc43.patch
open-src/xserver/xvnc/vnc-includes.patch
open-src/xserver/xvnc/vnc-input-1.6.patch
open-src/xserver/xvnc/vnc-mieq.patch
open-src/xserver/xvnc/vnc-modular-xorg.patch
open-src/xserver/xvnc/vnc-nobuildtime.patch
open-src/xserver/xvnc/vnc-nohttpd.patch
open-src/xserver/xvnc/vnc-paint.patch
open-src/xserver/xvnc/vnc-privates.patch
open-src/xserver/xvnc/vnc-render.patch
open-src/xserver/xvnc/vnc-restart.patch
open-src/xserver/xvnc/vnc-samemachine-ipv6.patch
open-src/xserver/xvnc/vnc-scrollbars.patch
open-src/xserver/xvnc/vnc-selections.patch
open-src/xserver/xvnc/vnc-use-fb.patch
open-src/xserver/xvnc/vnc-viewerIPv6.patch
open-src/xserver/xvnc/vnc-vncpasswd.patch
open-src/xserver/xvnc/vnc-vsnprintf.patch
open-src/xserver/xvnc/vnc-xorg.patch
open-src/xserver/xvnc/vncserver-urandom.patch
open-src/xserver/xvnc/vncviewer-connect.patch
open-src/xserver/xvnc/xvnc-inetd.xml
packages/SUNWvncviewer/pkginfo.tmpl
packages/SUNWxvnc/depend_com
packages/SUNWxvnc/depend_i386
packages/SUNWxvnc/depend_i386.tmpl
packages/SUNWxvnc/depend_sparc
packages/SUNWxvnc/depend_sparc.tmpl
packages/SUNWxvnc/pkginfo.tmpl
packages/SUNWxvnc/prototype_com
--- a/open-src/Makefile	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/Makefile	Fri Nov 06 14:06:00 2009 -0800
@@ -28,7 +28,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# ident	"@(#)Makefile	1.23	09/10/13 SMI"
+# ident	"@(#)Makefile	1.24	09/11/06 SMI"
 #
 ###############################################################################
 #
@@ -41,8 +41,8 @@
 # handled properly
 
 # Some specific notes:
-# - app/rgb depends on the rgb.h header installed by the xserver, so has to
-#   be built after xserver
+# - app/rgb depends on the rgb.h header installed by the Xorg xserver, 
+#   so has to be built after xserver/xorg
 # - util/util-macros must be first, since any module that does autoreconf
 #   requires it
 # - data/xbitmaps must be before app, as some applications depend on the
@@ -54,9 +54,9 @@
 proto: util/util-macros
 lib: proto
 app: lib data/xbitmaps
-xserver: proto doc lib
-driver: xserver
-app/rgb: xserver
+xserver/xorg xserver/xvnc: proto doc lib
+driver: xserver/xorg
+app/rgb: xserver/xorg
 data: app
 font: app
 
@@ -68,7 +68,8 @@
 	doc \
 	lib \
 	app \
-	xserver \
+	xserver/xorg \
+	xserver/xvnc \
 	driver \
 	app/rgb \
 	data \
--- a/open-src/common/Makefile.inc	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/common/Makefile.inc	Fri Nov 06 14:06:00 2009 -0800
@@ -28,7 +28,7 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# ident	"@(#)Makefile.inc	1.100	09/10/13 SMI"
+# ident	"@(#)Makefile.inc	1.101	09/11/06 SMI"
 #
 
 ### Default rules
@@ -132,6 +132,10 @@
 clean_64::
 	-rm -rf $(BUILD_DIR_64)
 
+# Tell dmake not to remove and create source in parallel
+.NOPARALLEL: clean source
+.NOPARALLEL: clean_$(BUILD_TYPE) source_$(BUILD_TYPE)
+
 source: $(BUILD_TYPES:%=source_%)
 
 source_gen:: $(SOURCE_TARGETS)
@@ -494,7 +498,7 @@
 	(cd $(TOP)/util/lndir && $(MAKE) $(MAKEFLAGS) install)
 
 # Some modules use these tools to convert DocBook docs to text or html
-$(DOCBOOK2HTML) $(DOCBOOK2TEXT):
+$(DOCBOOK2HTML) + $(DOCBOOK2TEXT):
 	cd $(TOP)/doc/docbook-utils && $(MAKE) $(MAKEFLAGS) install
 
 $(XORG_DEFS_ENT):
--- a/open-src/xserver/xorg/xtsol.patch	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xorg/xtsol.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -1,5 +1,5 @@
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
+# Use is subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the
@@ -495,27 +495,16 @@
  
  #ifndef XFree86LOADER
  #define INITARGS void
-@@ -193,6 +196,10 @@ typedef void (*InitExtension)(INITARGS);
+@@ -193,6 +196,9 @@ typedef void (*InitExtension)(INITARGS);
  #ifdef SolarisIAExtension
  #include <X11/extensions/interactive.h>
  #endif
 +#ifdef TSOL
-+#define _XTSOL_SERVER
-+#include <X11/extensions/Xtsol.h>
++#include "../tsol/tsol.h"
 +#endif
  
  /* FIXME: this whole block of externs should be from the appropriate headers */
  #ifdef MITSHM
-@@ -282,6 +289,9 @@ extern void GEExtensionInit(INITARGS);
- #ifdef SolarisIAExtension
- extern void IAExtensionInit(void);
- #endif
-+#ifdef TSOL
-+extern void TsolExtensionInit(void);
-+#endif
- 
- /* The following is only a small first step towards run-time
-  * configurable extensions.
 @@ -331,6 +341,9 @@ static ExtensionToggle ExtensionToggleLi
  #ifdef SolarisIAExtension
      { IANAME /* "SolarisIA" */, &noIAExtension },
--- a/open-src/xserver/xvnc/COPYING	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/COPYING	Fri Nov 06 14:06:00 2009 -0800
@@ -15,26 +15,28 @@
 
 --------------------------------------------------------------------
 
-VNC 4.1.3 Source Distribution for Unix platforms
-================================================
-
-Copyright (C) 2002-2008 RealVNC Ltd.  All Rights Reserved.
-
-This software is distributed under the GNU General Public Licence as
-published by the Free Software Foundation.  See the copy of the license
-below for the conditions under which this software is made available.  
-
-This software is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
 Source code for this software, including the modifications to the original
 source files, may be found on the OpenSolaris web site at:
  http://www.opensolaris.org/os/community/x_win/
 
-This distribution contains public domain DES software by Richard
-Outerbridge.  This is:
+--------------------------------------------------------------------
+
+TigerVNC Source Distribution for Unix platforms
+===============================================
+
+Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
+Copyright (C) 2000-2006 TightVNC Group
+Copyright (C) 2004-2009 Peter Astrand for Cendio AB
+
+This software is distributed under the GNU General Public Licence as
+published by the Free Software Foundation.  See the copy of the license
+below for the conditions under which this software is made available.
+TigerVNC also contains code from other sources.  See the
+sections below, and the individual files for details
+of the conditions under which they are made available.
+
+This distribution contains public domain DES software by Richard Outerbridge.
+This is:
 
     Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge.
     (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992.
@@ -44,7 +46,7 @@
 
  Copyright 1987, 1988, 1998  The Open Group
  
- Permission to use, copy, modify, distribute, and sell this software and its 
+ Permission to use, copy, modify, distribute, and sell this software and its
  documentation for any purpose is hereby granted without fee, provided that
  the above copyright notice appear in all copies and that both that
  copyright notice and this permission notice appear in supporting
@@ -68,6 +70,7 @@
  Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
  
                          All Rights Reserved
+ 
  Permission to use, copy, modify, and distribute this software and its 
  documentation for any purpose and without fee is hereby granted, 
  provided that the above copyright notice appear in all copies and that
@@ -85,9 +88,86 @@
  SOFTWARE.
 
 
+This distribution contains zlib compression software.  This is:
+
+  Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  [email protected]          [email protected]
+
+
+This distribution contains Java DES software by Dave Zimmerman
+<[email protected]> and Jef Poskanzer <[email protected]>.  This is:
+
+    Copyright (c) 1996 Widget Workshop, Inc. All Rights Reserved.
+
+    Permission to use, copy, modify, and distribute this software and its
+    documentation for NON-COMMERCIAL or COMMERCIAL purposes and without fee
+    is hereby granted, provided that this copyright notice is kept intact.
+    
+    WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+    SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+    NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+    PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE
+    LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+    MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+    
+    THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
+    CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
+    PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
+    NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE
+    SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE
+    SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE
+    PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES").  WIDGET
+    WORKSHOP SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF
+    FITNESS FOR HIGH RISK ACTIVITIES.
+
+    Copyright (C) 1996 by Jef Poskanzer <[email protected]>.  All rights
+    reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+    Visit the ACME Labs Java page for up-to-date versions of this and other
+    fine Java utilities: http://www.acme.com/java/
+
+
 --------------------------------------------------------------------
 
-
 		    GNU GENERAL PUBLIC LICENSE
 		       Version 2, June 1991
 
@@ -428,4 +508,3 @@
 consider it more useful to permit linking proprietary applications with the
 library.  If this is what you want to do, use the GNU Library General
 Public License instead of this License.
-
--- a/open-src/xserver/xvnc/Makefile	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/Makefile	Fri Nov 06 14:06:00 2009 -0800
@@ -1,8 +1,8 @@
 ###############################################################################
 #
-# Xvnc server Makefile
-# Based on Fedora's vnc.spec revision 1.202 from
-# http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc.spec
+# TigerVNC (Xvnc server & vncviewer) Makefile
+# Based on Fedora's tigervnc.spec revision 1.20 from
+# http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
@@ -32,14 +32,14 @@
 # or other dealings in this Software without prior written authorization
 # of the copyright holder.
 #
-# ident	"@(#)Makefile	1.20	09/10/13 SMI"
+# ident	"@(#)Makefile	1.21	09/11/06 SMI"
 #
 
 # Package name used in tarballs
-MODULE_NAME=vnc
+MODULE_NAME=tigervnc
 
 # Version number (used in path names)
-MODULE_VERSION=4_1_3-unixsrc
+MODULE_VERSION=1.0.0
 
 # Source tarball
 SOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
@@ -48,44 +48,23 @@
 # Xorg server source tarball to use sources from
 XORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
 XORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
-XORG_BUILD_DIR=$(SOURCE_DIR)/unix/xorg-x11-server-source
+XORG_BUILD_DIR=$(SOURCE_DIR)/unix/xserver
 
 # Download site for source
-# - Master source site doesn't allow wget downloads, so we use a mirror
-#SOURCE_URL=http://www.realvnc.com/dist/$(SOURCE_TARBALL_NAME)
-SOURCE_URL=http://dlc.sun.com/osol/x/downloads/mirrors/$(SOURCE_TARBALL_NAME)
+SOURCE_URL=$(SF_DOWNLOADS_URL)/project/tigervnc/tigervnc/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
 SOURCE_URL_SET=yes
 SOURCE_UNCOMPRESS=gzcat
 
 # Patches to apply to source after unpacking, in order
 SOURCE_PATCHES = \
-	vnc-Makefile.am.patch,-p1 \
-	vnc-use-fb.patch,-p1 \
-	vnc-restart.patch,-p1 \
-	vnc-vncpasswd.patch,-p1 \
-	vnc-modular-xorg.patch,-p1 \
-	vnc-xorg.patch,-p1 \
-	vnc-nohttpd.patch,-p1 \
-	vnc-64bit.patch,-p1 \
-	vnc-render.patch,-p1 \
-	vnc-autotools.patch,-p1 \
-	vnc-autotools-compile.patch,-p1 \
-	vnc-always_use_fb.patch,-p1 \
-	vnc-vsnprintf.patch,-p1 \
-	vnc-24bit.patch,-p1 \
-	vnc-gcc43.patch,-p1 \
-	vnc-privates.patch,-p1 \
-	vnc-mieq.patch,-p1 \
-	vnc-allocate.patch,-p1 \
-	vnc-paint.patch,-p1 \
-	vnc-selections.patch,-p1 \
-	vnc-scrollbars.patch,-p1 \
-	vnc-bounds.patch,-p1 \
-	vnc-includes.patch,-p1 \
-	vnc-viewerIPv6.patch,-p1 \
-	vnc-fasterPrivates.patch \
-	vnc-input-1.6.patch \
+	tigervnc-xserver16.patch \
+	vnc-config-subdirs.patch,-p1 \
+	vnc-samemachine-ipv6.patch,-p1 \
 	c++public.patch \
+	vnc-nobuildtime.patch \
+	vnc-nohttpd.patch \
+	vncviewer-connect.patch,-p1 \
+	vncserver-urandom.patch \
 	solaris-port.patch
 
 # Man pages to apply Sun footer to & attributes to list
@@ -103,22 +82,25 @@
 
 # Xvnc has to configure, build, and install in different directories due to 
 # the mixed codebases and unusual directory layout
+MODULE_ADD_SOURCE_TARGETS=Xvnc_source_init Xvnc_source_fini
+MODULE_SOURCE_DEPS=Xvnc_source_init
 CONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
 CONFIGURE_TARGETS_SET=yes
-BUILD_TARGETS=Xvnc_build set-elf-comments
+BUILD_TARGETS_common=Xvnc_build set-elf-comments
+BUILD_TARGETS_32=java_build
+BUILD_TARGETS=$(BUILD_TARGETS_common) $(BUILD_TARGETS_$(BUILD_TYPE))
 BUILD_TARGETS_SET=yes
-INSTALL_TARGETS=Xvnc_install
+INSTALL_TARGETS_common=Xvnc_install_module
+INSTALL_TARGETS_32=Xvnc_install_programs java_install
+INSTALL_TARGETS=$(INSTALL_TARGETS_common) $(INSTALL_TARGETS_$(BUILD_TYPE))
 INSTALL_TARGETS_SET=yes
 
-# Default rule to make, so that the source_gen rule below doesn't become
-# default by virtue of being first
-Xvnc_default: all
+include ../Makefile.inc
 
 # Merge in additional sources from Xorg tarball & sun-src directory
-# Use layout from Fedora RPM so their patches apply
-# This step has to be done before including common/Makefile.inc so
-# that patches applied in that step work correctly.
-source_gen:: $(LNDIR)
+# This step has to be done before default_source, so that patches applied
+# in that step work correctly.
+Xvnc_source_init: $(LNDIR)
 	mkdir -p $(SOURCE_DIR)/unix
 	bzcat $(XORG_TARBALL) | (cd $(BUILD_DIR) ; tar -xf - )
 	@if [ "x$(XORG_SOURCE_PATCHES)" != "x" ] ; then \
@@ -133,20 +115,10 @@
 	mv $(XORG_SOURCE_DIR) $(XORG_BUILD_DIR)
 	(cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
 
-
-include ../Makefile.inc
-
-# Merge in additional sources from Xorg tarball & sun-src directory
-# Use layout from Fedora RPM so their patches apply
-# This step has to be done after including common/Makefile.inc since
-# it depends on files created in that stage
-source_gen:: default_source
-	(cd $(SOURCE_DIR) ; \
-	cp -p unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \
-		unix/xc/programs/Xserver/Xvnc.man \
-		unix/xc/programs/Xserver/vnc/*.h \
-		unix/xc/programs/Xserver/vnc/*.cc \
-		unix/xorg-x11-server-source/hw/vnc/ )
+# Apply specific sets of Solaris attributes to various man pages
+# This step has to be done after default_source, since it depends
+# on files created in that stage
+Xvnc_source_fini: default_source
 	(cd $(SOURCE_DIR) && \
 		/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
 		-a '{Availability, SUNWvncviewer} {Interface Stability, Volatile}' \
@@ -154,21 +126,23 @@
 	(cd $(SOURCE_DIR) && \
 		/usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
 		-a '{Availability, SUNWxvnc} {Interface Stability, Volatile}' \
-		-p /usr/X11/bin/ unix/xc/programs/Xserver/Xvnc.man )
+		-p $(X11_DIR)/bin/ unix/xserver/hw/vnc/Xvnc.man )
 
 # Command line options to GNU autoconf configure script for vnc clients
 VNC_CONFIG_OPTS= --with-installed-zlib --prefix=/usr \
 	--mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
-	--localstatedir=/var
+	--localstatedir=/var --with-system-jpeg
 
 # Command line options to GNU autoconf configure script for Xvnc
 XVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
-	--disable-builddocs --with-int10=stub \
+	--disable-builddocs --without-int10 \
 	--disable-dga --disable-xfree86-utils --disable-config-hal \
-	--disable-xorg --disable-dmx --disable-xvfb --disable-xnest \
-	--disable-xprint --disable-kdrive
+	--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
+	--disable-xwin --disable-xephyr --disable-kdrive
+
 
 MODULE_CPPFLAGS = \
+	-D_XOPEN_SOURCE=500 -D__EXTENSIONS__ \
 	-D__extension__=\"\" \
 	-I$(PWD)/$(SOURCE_DIR)/common \
 	-I$(PWD)/$(SOURCE_DIR)/unix/vncconfig
@@ -203,36 +177,33 @@
 		$(AUTORECONF_ENV) autoreconf --install --force && \
 		$(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
 
+
 # Run configure script for Xvnc
-# Need to run delibtoolize to fix libtool interference with our linker 
-# flags, but need to make sure we use large pic flags (-KPIC/-fPIC)
-$(XORG_BUILD_DIR)/Makefile: $(UNPACK_TARGET) $(SOURCE_DIR)/unix/Makefile
+$(XORG_BUILD_DIR)/Makefile: $(UNPACK_TARGET)
 	(cd $(XORG_BUILD_DIR) &&  \
 		$(AUTORECONF_ENV) autoreconf --install --force && \
 		$(CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
-	$(TOP)/common/delibtoolize.pl -P -s $(SOURCE_DIR)
 
-Xvnc_build: $(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
-	(cd $(SOURCE_DIR)/common ; \
-	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
+Xvnc_build: $(CONFIGURE_TARGETS)
 	(cd $(SOURCE_DIR)/unix ; \
 	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
 	(cd $(XORG_BUILD_DIR) ; \
 	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
 
-Xvnc_install::
+Xvnc_install_module: $(BUILD_TARGETS)
 	(cd $(XORG_BUILD_DIR)/hw/vnc \
 	 &&  $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
 	 CPPROG="cp -p" install)
+
+Xvnc_install_programs: $(BUILD_TARGETS)
 	mkdir -p $(PROTODIR)/usr/bin/$(ARCHLIBSUBDIR) \
 		$(PROTODIR)/usr/share/man/man1 \
-		$(PROTODIR)$(X11_MAN_DIR)/man/man1 \
-		$(PROTODIR)/usr/share/vnc \
 		$(PROTODIR)/var/svc/manifest/application/x11 
 	cp -pf $(SOURCE_DIR)/unix/vncserver \
 		$(SOURCE_DIR)/unix/vncpasswd/vncpasswd \
 		$(SOURCE_DIR)/unix/vncconfig/vncconfig \
 		$(SOURCE_DIR)/unix/vncviewer/vncviewer \
+		$(SOURCE_DIR)/unix/x0vncserver/x0vncserver \
 		$(PROTODIR)/usr/bin/$(ARCHLIBSUBDIR)
 	cp -pf $(SOURCE_DIR)/unix/vncserver.man \
 		$(PROTODIR)/usr/share/man/man1/vncserver.1
@@ -242,8 +213,37 @@
 		$(PROTODIR)/usr/share/man/man1/vncpasswd.1
 	cp -pf $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \
 		$(PROTODIR)/usr/share/man/man1/vncviewer.1
-	cp -pf $(SOURCE_DIR)/common/javabin/index.vnc \
-		$(PROTODIR)/usr/share/vnc
-	cp -pf $(XORG_BUILD_DIR)/hw/vnc/Xvnc.man \
-		$(PROTODIR)$(X11_MAN_DIR)/man1/Xvnc.1
+	cp -pf $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
+		$(PROTODIR)/usr/share/man/man1/x0vncserver.1
 	cp -pf xvnc-inetd.xml $(PROTODIR)/var/svc/manifest/application/x11/
+
+# Java VNCviewer applet for connecting from a web browser
+JAVA_SOURCE_DIR = $(SOURCE_DIR)/java/src
+JAVA_INSTALL_DIR = $(PROTODIR)/usr/share/vnc/classes
+JAVA_JAR_FILE = $(JAVA_SOURCE_DIR)/VncViewer.jar
+
+# Temporary special handling of Java build fix submitted upstream
+JAVA_MAKEFILE = $(JAVA_SOURCE_DIR)/Makefile
+BUILD_TARGETS += $(JAVA_MAKEFILE)
+
+$(JAVA_MAKEFILE): $(UNPACK_TARGETS)
+	cp $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/Makefile $@
+	gpatch -d $(SOURCE_DIR) -p0 < applet-build.patch
+	gpatch -d $(SOURCE_DIR) -p0 < icon.patch
+	cp tigervnc_16.gif $(JAVA_SOURCE_DIR)
+
+java_build: $(JAVA_JAR_FILE)
+
+$(JAVA_JAR_FILE): $(UNPACK_TARGETS) $(JAVA_MAKEFILE)
+	(cd $(JAVA_SOURCE_DIR) ; \
+	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
+
+java_install: $(JAVA_JAR_FILE)
+	-rm -rf $(JAVA_INSTALL_DIR)
+	mkdir -p $(JAVA_INSTALL_DIR)
+	(cd $(JAVA_SOURCE_DIR) ; \
+	 $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
+		install INSTALL_DIR=$(JAVA_INSTALL_DIR))
+	cp -pf  $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/README \
+		$(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/LICENCE.TXT \
+		$(JAVA_INSTALL_DIR)
--- a/open-src/xserver/xvnc/README.txt	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/README.txt	Fri Nov 06 14:06:00 2009 -0800
@@ -1,7 +1,7 @@
 ###############################################################################
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-# Use subject to license terms.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the
@@ -33,22 +33,18 @@
 
 Architecture and Implementation
 
-   The open source RealVNC release is built using the Xorg server sources
+   The open source TigerVNC release is built using the Xorg server sources
    to provide the X server portion of the sources for Xvnc.   This provides
    an Xvnc that includes the same features as Sun's Xorg, including Sun
    enhancements like Trusted Extensions support & Xserver DTrace probes.
 
-   Since the original RealVNC code from realvnc.com is designed to use an
-   older X server release, we have based our code on the Xorg port done by
-   the Fedora Linux project.
-
 Source code access
 
    Our code:
 	In X gates: open-src/xserver/xvnc
 
    Upstream:
-	Original: http://www.realvnc.com/products/free/4.1/download.html
+	Original: http://www.tigervnc.com/
 	Fedora patches: http://cvs.fedoraproject.org/viewcvs/rpms/vnc/
 
    1. Please provide a brief description of the feature and how it is used.
@@ -62,7 +58,7 @@
       This project delivers Xvnc, an X server that displays to a Remote Frame
       Buffer (RFB) protocol client over the network, without requiring an 
       existing X server session displayed on local video hardware.   It also 
-      delivers the RealVNC vncviewer to connect to remote VNC servers, and 
+      delivers the TigerVNC vncviewer to connect to remote VNC servers, and 
       several associated programs for managing these.
 
    2. Does this feature EOL any other feature or does it offer an alternative
@@ -137,10 +133,13 @@
 
   14. Please provide a pointer to the following:
 
-          o ARC case:	        PSARC 2007/545 & LSARC 2007/625
+          o ARC case:	        
+		PSARC 2007/545: Xvnc (RealVNC 4.1.x)
+		LSARC 2007/625: vncviewer (RealVNC 4.1.x)
+		PSARC/2009/592: TigerVNC 1.0
           o Project Plan:	N/A
           o Documentation Plan:	Man pages from open source release
-          o Project Web Site:	http://www.realvnc.com/
+          o Project Web Site:	http://www.tigervnc.com/
 
   15.  Please provide the Bugster Product/Category/Subcategory.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/applet-build.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,157 @@
+Index: java/src/Makefile
+===================================================================
+--- java/src/Makefile	(revision 3916)
++++ java/src/Makefile	(working copy)
+@@ -4,41 +4,55 @@
+ 
+ CP = cp
+ JC = javac
+-JCFLAGS = -target 1.5 -classpath ../../../
++JCFLAGS = -target 1.5 -classpath .
+ JAR = jar
+ ARCHIVE = VncViewer.jar
+-MANIFEST = MANIFEST.MF
+-PAGES = index.vnc
++MANIFEST = com/tigervnc/vncviewer/MANIFEST.MF
++PAGES = com/tigervnc/vncviewer/index.vnc com/tigervnc/vncviewer/index.html
+ INSTALL_DIR = /usr/local/vnc/classes
+ 
+-CLASSES = VncViewer.class RfbProto.class AuthPanel.class VncCanvas.class \
+-	  VncCanvas2.class \
+-	  OptionsFrame.class ClipboardFrame.class ButtonPanel.class \
+-	  DesCipher.class CapabilityInfo.class CapsContainer.class \
+-	  RecordingFrame.class SessionRecorder.class \
+-	  SocketFactory.class HTTPConnectSocketFactory.class \
+-	  HTTPConnectSocket.class ReloginPanel.class \
+-	  InStream.class MemInStream.class ZlibInStream.class
++SOURCES = \
++	com/tigervnc/decoder/CopyRectDecoder.java		\
++	com/tigervnc/decoder/CoRREDecoder.java			\
++	com/tigervnc/decoder/HextileDecoder.java		\
++	com/tigervnc/decoder/RawDecoder.java			\
++	com/tigervnc/decoder/RREDecoder.java			\
++	com/tigervnc/decoder/TightDecoder.java			\
++	com/tigervnc/decoder/ZlibDecoder.java			\
++	com/tigervnc/decoder/ZRLEDecoder.java			\
++	com/tigervnc/vncviewer/AuthPanel.java			\
++	com/tigervnc/vncviewer/ButtonPanel.java			\
++	com/tigervnc/vncviewer/CapabilityInfo.java		\
++	com/tigervnc/vncviewer/CapsContainer.java		\
++	com/tigervnc/vncviewer/ClipboardFrame.java		\
++	com/tigervnc/vncviewer/DesCipher.java			\
++	com/tigervnc/vncviewer/HTTPConnectSocket.java		\
++	com/tigervnc/vncviewer/HTTPConnectSocketFactory.java	\
++	com/tigervnc/vncviewer/InStream.java			\
++	com/tigervnc/vncviewer/MemInStream.java			\
++	com/tigervnc/vncviewer/OptionsFrame.java		\
++	com/tigervnc/vncviewer/RecordingFrame.java		\
++	com/tigervnc/vncviewer/RecordOutputStream.java		\
++	com/tigervnc/vncviewer/ReloginPanel.java		\
++	com/tigervnc/vncviewer/RfbInputStream.java		\
++	com/tigervnc/vncviewer/RfbProto.java			\
++	com/tigervnc/vncviewer/SessionRecorder.java		\
++	com/tigervnc/vncviewer/SocketFactory.java		\
++	com/tigervnc/vncviewer/VncCanvas.java			\
++	com/tigervnc/vncviewer/VncCanvas2.java			\
++	com/tigervnc/vncviewer/VncViewer.java			\
++	com/tigervnc/vncviewer/ZlibInStream.java
+ 
+-SOURCES = VncViewer.java RfbProto.java AuthPanel.java VncCanvas.java \
+-	  VncCanvas2.java \
+-	  OptionsFrame.java ClipboardFrame.java ButtonPanel.java \
+-	  DesCipher.java CapabilityInfo.java CapsContainer.java \
+-	  RecordingFrame.java SessionRecorder.java \
+-	  SocketFactory.java HTTPConnectSocketFactory.java \
+-	  HTTPConnectSocket.java ReloginPanel.java \
+-	  InStream.java MemInStream.java ZlibInStream.java
++CLASSES = $(SOURCES:.java=.class)
+ 
+-all: $(CLASSES) $(ARCHIVE)
++all: $(ARCHIVE)
+ 
+-$(CLASSES): $(SOURCES)
++$(ARCHIVE): $(SOURCES) $(MANIFEST)
+ 	$(JC) $(JCFLAGS) -O $(SOURCES)
+-
+-$(ARCHIVE): $(CLASSES) $(MANIFEST)
+ 	$(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES)
+ 
+-install: $(CLASSES) $(ARCHIVE)
+-	$(CP) $(CLASSES) $(ARCHIVE) $(PAGES) $(INSTALL_DIR)
++install: $(ARCHIVE)
++	$(CP) $(ARCHIVE) $(PAGES) $(INSTALL_DIR)
+ 
+ export:: $(CLASSES) $(ARCHIVE) $(PAGES)
+ 	@$(ExportJavaClasses)
+Index: java/src/com/tigervnc/vncviewer/index.vnc
+===================================================================
+--- java/src/com/tigervnc/vncviewer/index.vnc	(revision 3916)
++++ java/src/com/tigervnc/vncviewer/index.vnc	(working copy)
+@@ -1,3 +1,4 @@
++<HTML><HEAD>
+ <!-- 
+      index.vnc - default HTML page for TigerVNC Java viewer applet, to be
+      used with Xvnc. On any file ending in .vnc, the HTTP server embedded in
+@@ -6,20 +7,20 @@
+      PARAMS. Use two dollar signs ($$) to get a dollar sign in the generated
+      HTML page.
+ 
+-     NOTE: the $PARAMS variable is not supported by the standard VNC, so
++     NOTE: the PARAMS variable is not supported by the standard VNC, so
+      make sure you have TigerVNC on the server side, if you're using this
+      variable.
+ -->
+-
+-<HTML>
+ <TITLE>
+ $USER's $DESKTOP desktop ($DISPLAY)
+ </TITLE>
+-<APPLET CODE=VncViewer.class ARCHIVE=VncViewer.jar
+-        WIDTH=$APPLETWIDTH HEIGHT=$APPLETHEIGHT>
+-<param name=PORT value=$PORT>
++</HEAD><BODY>
++<APPLET CODE="com.tigervnc.vncviewer.VncViewer.class" ARCHIVE="VncViewer.jar"
++        WIDTH="$APPLETWIDTH" HEIGHT="$APPLETHEIGHT">
++<param name="PORT" value="$PORT">
+ $PARAMS
+ </APPLET>
+ <BR>
+ <A href="http://www.tigervnc.org/">TigerVNC site</A>
++</BODY>
+ </HTML>
+Index: java/src/com/tigervnc/vncviewer/MANIFEST.MF
+===================================================================
+--- java/src/com/tigervnc/vncviewer/MANIFEST.MF	(revision 3916)
++++ java/src/com/tigervnc/vncviewer/MANIFEST.MF	(working copy)
+@@ -1,2 +1,2 @@
+ Manifest-Version: 1.0
+-Main-Class: VncViewer
++Main-Class: com.tigervnc.vncviewer.VncViewer
+Index: java/src/com/tigervnc/vncviewer/index.html
+===================================================================
+--- java/src/com/tigervnc/vncviewer/index.html	(revision 3916)
++++ java/src/com/tigervnc/vncviewer/index.html	(working copy)
+@@ -1,3 +1,4 @@
++<HTML><HEAD>
+ <!-- 
+      index.html - an example HTML page for TigerVNC Java viewer applet, to be
+      used with a standalone Web server running on the same machine where the
+@@ -15,15 +16,15 @@
+        actual desktop size on the server (height should be increased to leave
+        enough space for the button panel).
+ -->
+-
+-<HTML>
+ <TITLE>
+ TigerVNC desktop
+ </TITLE>
+-<APPLET CODE="VncViewer.class" ARCHIVE="VncViewer.jar"
++</HEAD><BODY>
++<APPLET CODE="com.tigervnc.vncviewer.VncViewer.class" ARCHIVE="VncViewer.jar"
+         WIDTH="800" HEIGHT="632">
+ <PARAM NAME="PORT" VALUE="5901">
+ </APPLET>
+ <BR>
+ <A href="http://www.tigervnc.org/">TigerVNC site</A>
++</BODY>
+ </HTML>
--- a/open-src/xserver/xvnc/c++public.patch	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/c++public.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -1,14 +1,23 @@
---- unix/xc/programs/Xserver/vnc/vncExtInit.cc	2006-05-15 09:56:20.000000000 -0700
-+++ unix/xc/programs/Xserver/vnc/vncExtInit.cc	2007-06-26 18:11:37.123722000 -0700
-@@ -20,6 +20,7 @@
+Needed to prevent errors when compiling with Sun C++ compiler:
+
+"../../include/inputstr.h", line 427: Warning: declarator required in declaration.
+"../../include/inputstr.h", line 427: Error: Use ";" to terminate declarations.
+"../../include/inputstr.h", line 427: Error: No ":" found following "public".
+"../../include/inputstr.h", line 427: Error: "}" expected instead of ";".
+"../../include/inputstr.h", line 427: Warning: declarator required in declaration.
+
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/vnc/vncExtInit.cc unix/xserver/hw/vnc/vncExtInit.cc
+--- unix/xserver/hw/vnc/vncExtInit.cc	2009-08-20 02:46:42.000000000 -0700
++++ unix/xserver/hw/vnc/vncExtInit.cc	2009-09-01 00:43:26.434020000 -0700
+@@ -24,6 +24,7 @@
  
  extern "C" {
  #define class c_class
 +#define public c_public    
  #define NEED_EVENTS
- #include "X.h"
- #include "Xproto.h"
-@@ -34,6 +35,7 @@
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
+@@ -38,6 +39,7 @@ extern "C" {
  #include "vncExt.h"
  #undef class
  #undef xalloc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/icon.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,61 @@
+--- java/src/Makefile	2009-10-30 00:10:31.496797111 -0700
++++ java/src/Makefile.icon	2009-10-30 00:10:14.375398782 -0700
+@@ -45,14 +45,19 @@
+ 
+ CLASSES = $(SOURCES:.java=.class)
+ 
++ICON = tigervnc_16.gif
++
+ all: $(ARCHIVE)
+ 
+ $(ARCHIVE): $(SOURCES) $(MANIFEST)
+ 	$(JC) $(JCFLAGS) -O $(SOURCES)
+ 	$(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES)
+ 
+-install: $(ARCHIVE)
+-	$(CP) $(ARCHIVE) $(PAGES) $(INSTALL_DIR)
++$(ICON):
++	convert -background transparent ../../media/tigervnc_16.svg $@
++
++install: $(ARCHIVE) $(ICON)
++	$(CP) $(ARCHIVE) $(ICON) $(PAGES) $(INSTALL_DIR)
+ 
+ export:: $(CLASSES) $(ARCHIVE) $(PAGES)
+ 	@$(ExportJavaClasses)
+
+--- java/src/com/tigervnc/vncviewer/index.html	2009-10-30 00:12:27.490801957 -0700
++++ java/src/com/tigervnc/vncviewer/index.html.icon	2009-10-30 00:26:29.413918281 -0700
+@@ -19,12 +19,13 @@
+ <TITLE>
+ TigerVNC desktop
+ </TITLE>
++<link rel="icon" type="image/gif" href="tigervnc_16.gif">
+ </HEAD><BODY>
+ <APPLET CODE="com.tigervnc.vncviewer.VncViewer.class" ARCHIVE="VncViewer.jar"
+         WIDTH="800" HEIGHT="632">
+ <PARAM NAME="PORT" VALUE="5901">
+ </APPLET>
+ <BR>
+-<A href="http://www.tigervnc.org/">TigerVNC site</A>
++<A href="http://www.tigervnc.org/"><IMG border="0" hspace="4" src="tigervnc_16.gif">TigerVNC site</A>
+ </BODY>
+ </HTML>
+
+--- java/src/com/tigervnc/vncviewer/index.vnc	2009-10-30 00:12:40.622099898 -0700
++++ java/src/com/tigervnc/vncviewer/index.vnc.icon	2009-10-30 00:28:45.392640755 -0700
+@@ -14,6 +14,7 @@
+ <TITLE>
+ $USER's $DESKTOP desktop ($DISPLAY)
+ </TITLE>
++<link rel="icon" type="image/gif" href="tigervnc_16.gif">
+ </HEAD><BODY>
+ <APPLET CODE="com.tigervnc.vncviewer.VncViewer.class" ARCHIVE="VncViewer.jar"
+         WIDTH="$APPLETWIDTH" HEIGHT="$APPLETHEIGHT">
+@@ -21,6 +22,6 @@
+ $PARAMS
+ </APPLET>
+ <BR>
+-<A href="http://www.tigervnc.org/">TigerVNC site</A>
++<A href="http://www.tigervnc.org/"><IMG border="0" hspace="4" src="tigervnc_16.gif">TigerVNC site</A>
+ </BODY>
+ </HTML>
--- a/open-src/xserver/xvnc/solaris-port.patch	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/solaris-port.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -27,95 +27,86 @@
 # of the copyright holder.
 #
 
---- common/rfb/Makefile.am	2007-06-27 19:05:47.368239000 -0700
-+++ common/rfb/Makefile.am	2007-06-27 19:47:41.890789000 -0700
-@@ -130,7 +130,7 @@
- 	ZRLEEncoder.cxx \
- 	ZRLEEncoder.h
+diff -urp -x '*~' -x '*.orig' common/rfb/Makefile.am common/rfb/Makefile.am
+--- common/rfb/Makefile.am	2009-08-20 02:46:42.000000000 -0700
++++ common/rfb/Makefile.am	2009-10-20 18:58:01.733395720 -0700
+@@ -42,7 +42,7 @@ librfb_la_SOURCES = $(HDRS) Blacklist.cx
+ 	secTypes.cxx util.cxx
+ 
+ librfb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/../win
+-librfb_la_LIBADD =
++librfb_la_LIBADD = $(LIBS)
  
--librfb_la_LIBADD = \
-+librfb_la_LIBADD = -lsocket -lnsl \
- 	$(top_srcdir)/network/libnetwork.la \
- 	$(top_srcdir)/rdr/librdr.la \
- 	$(top_srcdir)/Xregion/libXregion.la
-
---- unix/vncviewer/Makefile.am	2007-06-29 10:08:32.097924000 -0700
-+++ unix/vncviewer/Makefile.am	2007-06-29 10:43:37.891451000 -0700
-@@ -19,6 +19,8 @@
- 	-I$(top_srcdir)/tx
+ if INCLUDED_JPEG
+ librfb_la_CPPFLAGS += -I$(top_srcdir)/jpeg
+diff -urp -x '*~' -x '*.orig' unix/vncserver unix/vncserver
+--- unix/vncserver	2009-10-20 18:57:59.422472953 -0700
++++ unix/vncserver	2009-10-20 18:58:01.733670786 -0700
+@@ -39,6 +39,7 @@ $vncClasses = "";
+ 
+ $xauth = "xauth";
+ 
++$ENV{PATH} = "/usr/X11/bin:" . $ENV{PATH};
+ &SanityCheck();
  
- vncviewer_LDADD = \
--	$(top_srcdir)/../common/rfb/librfb.la \
- 	$(top_srcdir)/tx/libtx.la \
--	-lXext
-+	$(top_srcdir)/../common/rfb/librfb.la \
-+	$(top_srcdir)/../common/network/libnetwork.la \
-+	$(top_srcdir)/../common/rdr/librdr.la \
-+	-lXext -lX11 -lsocket -lnsl -lz
-
---- unix/vncconfig/Makefile.am	2007-06-29 10:08:32.073422000 -0700
-+++ unix/vncconfig/Makefile.am	2007-06-29 10:46:21.399874000 -0700
-@@ -13,5 +13,7 @@
- 	-I$(top_srcdir)/tx
+ #
+@@ -75,6 +76,15 @@ $defaultXStartup
+        "if [ -f /etc/X11/xinit/xinitrc ]; then\n".
+        "  exec sh /etc/X11/xinit/xinitrc\n".
+        "fi\n".
++       "if [ -x /etc/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then\n".
++       "  exec /etc/gdm/Xsession /usr/bin/dtstart jds\n".
++       "fi\n".
++       "if [ -x /etc/X11/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then\n".
++       "  exec /etc/X11/gdm/Xsession /usr/bin/dtstart jds\n".
++       "fi\n".
++       "if [ -x /usr/dt/config/Xsession.jds ]; then\n".
++       "  exec /usr/dt/config/Xsession.jds\n".
++       "fi\n".
+        "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
+        "xsetroot -solid grey\n".
+        "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
+diff -urp -x '*~' -x '*.orig' unix/vncviewer/Makefile.am unix/vncviewer/Makefile.am
+--- unix/vncviewer/Makefile.am	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncviewer/Makefile.am	2009-10-20 18:58:01.733812117 -0700
+@@ -13,6 +13,7 @@ vncviewer_CPPFLAGS = -I$(COMMON_DIR) -I$
  
- vncconfig_LDADD = \
-+	$(top_srcdir)/tx/libtx.la \
- 	$(top_srcdir)/../common/rfb/librfb.la \
--	$(top_srcdir)/tx/libtx.la
-+	$(top_srcdir)/../common/rdr/librdr.la \
-+	-lX11
-
---- unix/x0vncserver/Makefile.am~	2007-06-29 14:25:14.848138000 -0700
-+++ unix/x0vncserver/Makefile.am	2007-06-29 16:29:44.949322000 -0700
-@@ -14,7 +14,10 @@
- 	-I$(top_srcdir)/tx
+ vncviewer_LDADD = $(top_srcdir)/tx/libtx.la $(COMMON_DIR)/rfb/librfb.la \
+ 	$(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la \
++	-ljpeg -lz \
+ 	@X_PRE_LIBS@ @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ # @LIBINTL@
+ 
+ EXTRA_DIST = vncviewer.man
+diff -urp -x '*~' -x '*.orig' unix/x0vncserver/Makefile.am unix/x0vncserver/Makefile.am
+--- unix/x0vncserver/Makefile.am	2009-08-20 02:46:42.000000000 -0700
++++ unix/x0vncserver/Makefile.am	2009-10-20 18:58:01.733948483 -0700
+@@ -15,6 +15,7 @@ x0vncserver_CPPFLAGS = -I$(COMMON_DIR) -
+ 	@MITSHM_DEFINE@ @X_CFLAGS@
  
- x0vncserver_LDADD = \
--	$(top_srcdir)/../common/rfb/librfb.la \
- 	$(top_srcdir)/tx/libtx.la \
-+	$(top_srcdir)/../common/rfb/librfb.la \
-+	$(top_srcdir)/../common/network/libnetwork.la \
-+	$(top_srcdir)/../common/rdr/librdr.la \
-+	-lX11 -lsocket -lnsl -lz \
- 	-lXext \
- 	-lXtst
-
-
---- unix/xorg-x11-server-source/hw/vnc/Makefile.am~	2007-09-19 16:36:35.755205000 -0700
-+++ unix/xorg-x11-server-source/hw/vnc/Makefile.am	2007-09-19 16:40:43.150927000 -0700
-@@ -25,11 +25,22 @@
+ x0vncserver_LDADD = $(COMMON_DIR)/rfb/librfb.la \
++	-ljpeg -lz \
+ 	$(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la \
+ 	$(top_srcdir)/tx/libtx.la @INET_LIB@ @X_PRE_LIBS@ @X_LIBS@ \
+ 	@XTEST_LIB@ -lXext -lX11 @X_EXTRA_LIBS@
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/vnc/Makefile.am unix/xserver/hw/vnc/Makefile.am
+--- unix/xserver/hw/vnc/Makefile.am	2009-08-20 02:46:42.000000000 -0700
++++ unix/xserver/hw/vnc/Makefile.am	2009-10-20 18:58:01.734107661 -0700
+@@ -32,7 +32,14 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW
  	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \
- 	-I$(top_srcdir)/include -I$(includedir)/pixman-1
+ 	-I$(top_srcdir)/include -I$(includedir)/pixman-1 -I$(includedir)
  
 +if BUILD_TSOL_MODULE
 +TSOL_LIBS = 	../../tsol/libxtsol.la -ltsol -ltsnet -lsecdb -lbsm
 +endif
 +
- Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \
--	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11
+ Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
++	-ljpeg -lz \
 +	../../IA/libIA.la \
 +	$(TSOL_LIBS) \
-+ 	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11 \
-+	../../../../common/network/libnetwork.la \
-+	../../../../common/rdr/librdr.la \
-+	../../../../common/Xregion/libXregion.la \
-+	-lz
+ 	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11
  
  Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
- 
-+if XORG
- libvnc_la_LTLIBRARIES = libvnc.la
- libvnc_ladir = $(moduledir)/extensions
- 
-@@ -45,15 +59,16 @@
- libvnc_la_LDFLAGS = -module -avoid-version
- 
- libvnc_la_LIBADD = libvnccommon.la $(RFB_LIBS)
-+endif
- 
- # C++ hacks
- BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
- 
+@@ -60,8 +67,8 @@ BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
  fb.h: $(top_srcdir)/fb/fb.h
  	cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h
  
@@ -126,19 +117,21 @@
  
  fbrop.h: $(top_srcdir)/fb/fbrop.h
  	cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h
---- unix/xc/programs/Xserver/Xvnc.man	2007-10-08 21:26:03.141427000 -0700
-+++ unix/xc/programs/Xserver/Xvnc.man	2007-10-09 11:37:23.168899000 -0700
-@@ -67,8 +68,7 @@
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/vnc/Xvnc.man unix/xserver/hw/vnc/Xvnc.man
+--- unix/xserver/hw/vnc/Xvnc.man	2009-10-20 18:57:59.463630437 -0700
++++ unix/xserver/hw/vnc/Xvnc.man	2009-10-20 18:58:01.782738186 -0700
+@@ -67,8 +67,8 @@ List all the options and parameters
  
  .SH PARAMETERS
  VNC parameters can be set both via the command-line and through the
 -\fBvncconfig\fP(1) program, and with a VNC-enabled XFree86 server via Options
 -entries in the XF86Config file.
-+\fBvncconfig\fP(1) program.
++\fBvncconfig\fP(1) program, and with a VNC-enabled Xorg server via Options
++entries in the xorg.conf(4) file.
  
  Parameters can be turned on with -\fIparam\fP or off with
  -\fIparam\fP=0.  Parameters which take a value can be specified as
-@@ -221,12 +221,12 @@
+@@ -221,12 +221,12 @@ is a hexadecimal keysym. For example, to
  RemapKeys=0x22<>0x40
  
  .SH USAGE WITH INETD
@@ -153,7 +146,7 @@
  In the nowait mode, Xvnc uses its standard input and output directly as the
  connection to a viewer.  It never has a listening socket, so cannot accept
  further connections from viewers (it can however connect out to listening
-@@ -234,17 +234,28 @@
+@@ -234,17 +234,26 @@ viewers by use of the vncconfig program)
  same TCP port result in inetd spawning off a new Xvnc to deal with each
  connection.  When the connection to the viewer dies, the Xvnc and any
  associated X clients die.  This behaviour is most useful when combined with the
@@ -183,8 +176,6 @@
 +connection which should display the standard graphical login screen on that 
 +machine.   (To enable this, you will also have to enable XDMCP network 
 +connections on the login screen.   See 
-+.BR dtlogin (1)
-+or 
 +.BR gdm (1)
 +for details.)
 +Because the user needs to login via this screen, it is usually OK to accept 
@@ -193,7 +184,7 @@
  In the wait mode, when the first connection comes in, inetd gives the listening
  socket to Xvnc.  This means that for a given TCP port, there is only ever one
  Xvnc at a time.  Further viewer connections to the same port are accepted by
-@@ -252,14 +263,14 @@
+@@ -252,14 +261,14 @@ the same Xvnc in the normal way.  Even w
  the Xvnc will continue to run.  If this is used with the XDMCP options -query
  and -once, the Xvnc and associated X clients will die when the user logs out of
  the X session in the normal way.  It is important to use a VNC password in this
@@ -213,14 +204,19 @@
  unlike the previous example, if he disconnects, the session remains persistent,
  and when he reconnects he will get the same session back again.  When he logs
  out of the X session, the Xvnc will die, but of course a new one will be
-
---- unix/vncserver	2009-01-15 08:53:39.786723000 -0800
-+++ unix/vncserver	2009-01-15 19:14:50.411737000 -0800
-@@ -27,6 +27,7 @@
- # First make sure we're operating in a sane environment.
- #
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/xfree86/x86emu/Makefile.am unix/xserver/hw/xfree86/x86emu/Makefile.am
+--- unix/xserver/hw/xfree86/x86emu/Makefile.am	2009-10-11 19:52:40.000000000 -0700
++++ unix/xserver/hw/xfree86/x86emu/Makefile.am	2009-10-20 18:58:01.734528099 -0700
+@@ -1,3 +1,4 @@
++if INT10_X86EMU
+ noinst_LIBRARIES = libx86emu.a
  
-+$ENV{PATH} = "/usr/X11/bin:" . $ENV{PATH};
- &SanityCheck();
+ libx86emu_a_SOURCES = debug.c \
+@@ -8,6 +9,7 @@ libx86emu_a_SOURCES = debug.c \
+                       prim_ops.c \
+                       sys.c \
+                       x86emu.h
++endif
  
- #
+ INCLUDES = 
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/tigervnc-xserver16.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,103 @@
+# This is the patch from tigervnc-1.0.0/unix/xserver16.patch
+# modified to apply to the xserver sources used in our builds
+
+# Only changes needed to make the patch apply should happen in
+# this patch - other bug fixes & customizations should go into
+# separate patches, so they aren't lost when this patch is
+# replaced with new versions from upstream.
+
+diff -urp -x '*~' -x '*.orig' unix/xserver/configure.ac unix/xserver/configure.ac
+--- unix/xserver/configure.ac	2009-11-05 09:51:31.394739913 -0800
++++ unix/xserver/configure.ac	2009-11-05 09:51:34.040447226 -0800
+@@ -29,7 +29,6 @@ AC_PREREQ(2.57)
+ AC_INIT([xorg-server], 1.6.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+ AC_CONFIG_SRCDIR([Makefile.am])
+ AM_INIT_AUTOMAKE([dist-bzip2 foreign])
+-AM_MAINTAINER_MODE
+ 
+ RELEASE_DATE="2009-10-11"
+ 
+@@ -52,6 +51,7 @@ dnl kdrive-config.h covers the kdrive DD
+ AC_CONFIG_HEADERS(include/kdrive-config.h)
+ 
+ AC_PROG_CC
++AC_PROG_CXX
+ AM_PROG_AS
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+@@ -1044,7 +1044,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten
+ 
+ AC_DEFINE(XKB, 1, [Build XKB])
+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
+-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
++AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default])
+ AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data])
+ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKBBINDIR, [Path to XKB bin dir])
+ 
+@@ -1287,6 +1287,9 @@ if test "x$XVFB" = xyes; then
+ 	AC_SUBST([XVFB_SYS_LIBS])
+ fi
+ 
++dnl Xvnc DDX
++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC $RANDR_INC"])
++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"])
+ 
+ dnl Xnest DDX
+ 
+@@ -1322,6 +1325,8 @@ xorg_bus_linuxpci=no
+ xorg_bus_bsdpci=no
+ xorg_bus_sparc=no
+ 
++AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
++
+ if test "x$XORG" = xyes; then
+ 	XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
+ 	XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
+@@ -1509,7 +1514,6 @@ if test "x$XORG" = xyes; then
+ 	AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
+ 	AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
+ 	AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server])
+-	AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
+ 	AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
+ 	AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
+ 	AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
+@@ -1941,6 +1945,7 @@ hw/dmx/input/Makefile
+ hw/dmx/glxProxy/Makefile
+ hw/dmx/Makefile
+ hw/vfb/Makefile
++hw/vnc/Makefile
+ hw/xnest/Makefile
+ hw/xwin/Makefile
+ hw/xquartz/Makefile
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/Makefile.am unix/xserver/hw/Makefile.am
+--- unix/xserver/hw/Makefile.am	2008-10-12 16:18:43.000000000 -0700
++++ unix/xserver/hw/Makefile.am	2009-11-05 09:51:34.040617109 -0800
+@@ -33,7 +33,8 @@ SUBDIRS =			\
+ 	$(XNEST_SUBDIRS)	\
+ 	$(DMX_SUBDIRS)		\
+ 	$(KDRIVE_SUBDIRS)	\
+-	$(XQUARTZ_SUBDIRS)
++	$(XQUARTZ_SUBDIRS)	\
++	vnc
+ 
+ DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive
+ 
+diff -urp -x '*~' -x '*.orig' unix/xserver/mi/miinitext.c unix/xserver/mi/miinitext.c
+--- unix/xserver/mi/miinitext.c	2009-11-05 09:51:31.400530988 -0800
++++ unix/xserver/mi/miinitext.c	2009-11-05 09:51:34.040854798 -0800
+@@ -288,6 +288,7 @@ extern void GEExtensionInit(INITARGS);
+ #ifdef SolarisIAExtension
+ extern void IAExtensionInit(void);
+ #endif
++extern void vncExtensionInit(INITARGS);
+ 
+ /* The following is only a small first step towards run-time
+  * configurable extensions.
+@@ -460,6 +461,7 @@ InitExtensions(int argc, char *argv[])
+ #ifdef XF86BIGFONT
+     if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
+ #endif
++    vncExtensionInit();
+ #if !defined(NO_HW_ONLY_EXTS)
+ #if defined(XF86VIDMODE)
+     if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit();
Binary file open-src/xserver/xvnc/tigervnc_16.gif has changed
--- a/open-src/xserver/xvnc/vnc-24bit.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-24bit.patch
-
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.24bit	2007-06-07 17:27:46.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2007-06-07 17:29:01.000000000 +0200
-@@ -762,7 +762,7 @@ static Bool vfbScreenInit(int index, Scr
- 
-   miSetPixmapDepths();
- 
--  switch (pvfb->bitsPerPixel)
-+  switch (pvfb->depth)
-   {
-   case 8:
-       miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0);
-@@ -771,6 +771,9 @@ static Bool vfbScreenInit(int index, Scr
-   case 16:
-         miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f);
-     break;
-+  case 24:
-+	miSetVisualTypesAndMasks (24, 1 << TrueColor, 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff);
-+    break;
-   case 32:
-         miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00);
-     break;
-@@ -778,15 +781,17 @@ static Bool vfbScreenInit(int index, Scr
-     return FALSE;
-   }
- 
--  if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                    dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
--      return FALSE;
-+  ret =fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-+                    dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel);
- 
- #ifdef RENDER
-   if (ret && Render)
-       fbPictureInit(pScreen, 0, 0);
- #endif /* RENDER */
- 
-+  if (!ret)
-+      return FALSE;
-+
-   pScreen->InstallColormap = vfbInstallColormap;
-   pScreen->UninstallColormap = vfbUninstallColormap;
-   pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
--- a/open-src/xserver/xvnc/vnc-64bit.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-## Patch originally from Fedora vnc-4.1.2-21.fc8 RPM - vnc-64bit.patch
-
---- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h.64bit	2005-03-11 15:08:41.000000000 +0000
-+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h	2005-12-06 14:31:11.000000000 +0000
-@@ -29,6 +29,8 @@
- #include <rfb/VNCServerST.h>
- #include <rdr/SubstitutingInStream.h>
- 
-+#include "xorg-server.h"
-+
- extern "C" {
- #define class c_class;
- #include <scrnintstr.h>
---- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.64bit	2005-12-06 14:31:24.000000000 +0000
-+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2005-12-06 14:31:30.000000000 +0000
-@@ -973,25 +973,6 @@
- 
- } /* end InitOutput */
- 
--#ifdef DPMSExtension
--extern "C" {
--#if NeedFunctionPrototypes
--  void DPMSSet(CARD16 level)
--#else
--    void DPMSSet(level)
--    CARD16 level;
--#endif
--  {
--    return;
--  }
--
--  Bool DPMSSupported()
--  {
--    return FALSE;
--  }
--}
--#endif
--
- /* this is just to get the server to link on AIX */
- #ifdef AIXV3
- int SelectWaitTime = 10000; /* usec */
--- a/open-src/xserver/xvnc/vnc-Makefile.am.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-## Source originally from Fedora - Revision 1.4 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/Makefile.am
-converted to patch format
-
---- /dev/null	2008-09-30 20:41:15.000000000 -0700
-+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am	2008-09-30 20:39:33.184092000 -0700
-@@ -0,0 +1,60 @@
-+LIB_DIR=$(top_srcdir)/../../common
-+BIN_DIR=$(top_srcdir)/..
-+
-+RFB_LIBS=$(LIB_DIR)/rfb/librfb.la
-+
-+noinst_LTLIBRARIES = libvnccommon.la
-+
-+libvnccommon_la_SOURCES = vncExtInit.cc vncHooks.cc XserverDesktop.cc
-+
-+libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-+	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \
-+	-I$(BIN_DIR)/vncconfig -DGC_HAS_COMPOSITE_CLIP $(XVNC_CPPFLAGS) \
-+	-I$(includedir)/pixman-1
-+
-+bin_PROGRAMS = Xvnc
-+
-+Xvnc_SOURCES = xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c \
-+	$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
-+	$(top_srcdir)/fb/fbcmap_mi.c
-+
-+nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h
-+
-+Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \
-+	-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-+	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \
-+	-I$(top_srcdir)/include -I$(includedir)/pixman-1
-+
-+Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \
-+	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11
-+
-+Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-+
-+libvnc_la_LTLIBRARIES = libvnc.la
-+libvnc_ladir = $(moduledir)/extensions
-+
-+libvnc_la_SOURCES = xf86vncModule.cc
-+
-+libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(LIB_DIR) \
-+	-I$(top_srcdir)/hw/xfree86/common \
-+	-I$(top_srcdir)/hw/xfree86/os-support \
-+	-I$(top_srcdir)/hw/xfree86/os-support/bus \
-+	-DXFree86Module -DXFree86LOADER -DIN_MODULE \
-+	-I$(includedir)/pixman-1
-+
-+libvnc_la_LDFLAGS = -module -avoid-version
-+
-+libvnc_la_LIBADD = libvnccommon.la $(RFB_LIBS)
-+
-+# C++ hacks
-+BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
-+
-+fb.h: $(top_srcdir)/fb/fb.h
-+	cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h
-+
-+pixman.h: $(includedir)/pixman-1/pixman.h
-+	cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h
-+
-+fbrop.h: $(top_srcdir)/fb/fbrop.h
-+	cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h
-+
--- a/open-src/xserver/xvnc/vnc-allocate.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-allocate.patch
-with paths adjusted to match sources in tarball before files are moved
-
-Remove use of ALLOCATE_LOCAL & DEALLOCATE_LOCAL macros removed from X headers
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.allocate vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.allocate	2008-02-25 16:38:37.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2008-02-25 16:54:48.000000000 +0100
-@@ -536,9 +536,9 @@ static void vfbInstallColormap(ColormapP
-     swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
-     swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);
- 
--    ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel));
--    prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb));
--    defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
-+    ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
-+    prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
-+    defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
- 
-     for (i = 0; i < entries; i++)  ppix[i] = i;
-     /* XXX truecolor */
-@@ -553,9 +553,9 @@ static void vfbInstallColormap(ColormapP
-     }
-     (*pmap->pScreen->StoreColors)(pmap, entries, defs);
- 
--    DEALLOCATE_LOCAL(ppix);
--    DEALLOCATE_LOCAL(prgb);
--    DEALLOCATE_LOCAL(defs);
-+    xfree(ppix);
-+    xfree(prgb);
-+    xfree(defs);
-   }
- }
--- a/open-src/xserver/xvnc/vnc-always_use_fb.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-## Patch originally from Fedora - Revision 1.2 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-always_use_fb.patch
-
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.always_use_fb	2007-03-05 14:03:21.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2007-03-05 14:10:57.000000000 +0100
-@@ -33,27 +33,28 @@
- #include <network/TcpSocket.h>
- #include "vncExtInit.h"
- 
-+#ifdef HAVE_DIX_CONFIG_H
-+#include <dix-config.h>
-+#endif
-+
- extern "C" {
- #define class c_class
- #define public c_public
-+#define new c_new
- #ifdef WIN32
- #include <X11/Xwinsock.h>
- #endif
- #include <stdio.h>
--#include "X11/X.h"
-+#include <X11/X.h>
- #define NEED_EVENTS
--#include "X11/Xproto.h"
--#include "X11/Xos.h"
-+#include <X11/Xproto.h>
-+#include <X11/Xos.h>
- #include "scrnintstr.h"
- #include "servermd.h"
--#ifdef VNC_USE_FB
- #include "fb.h"
--#else
--#define PSZ 8
--#include "cfb.h"
--#endif
- #include "mi.h"
--#include "mibstore.h"
-+#include "micmap.h"
-+#include "miline.h"
- #include "colormapst.h"
- #include "gcstruct.h"
- #include "input.h"
-@@ -66,24 +67,12 @@
- #endif
- #include <X11/XWDFile.h>
- #include "dix.h"
--#include "miline.h"
- #include "inputstr.h"
- #include "keysym.h"
-   extern int defaultColorVisualClass;
-+#undef new
- #undef class
- #undef public
--#ifndef VNC_USE_FB
--  extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
--  extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
--  extern Bool cfb16CreateGC(GCPtr);
--  extern Bool cfb32CreateGC(GCPtr);
--  extern void cfb16GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
--  extern void cfb32GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
--  extern void cfb16GetImage(DrawablePtr, int, int, int, int, unsigned int,
--                            unsigned long, char*);
--  extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
--                            unsigned long, char*);
--#endif
- }
- 
- #define XVNCVERSION "Free Edition 4.1.2"
-@@ -502,67 +491,6 @@
- }
- #endif
- 
--#ifndef VNC_USE_FB
--static Bool vfbMultiDepthCreateGC(GCPtr   pGC)
--{
--  switch (vfbBitsPerPixel(pGC->depth))
--  {
--  case 1:  return mfbCreateGC (pGC);
--  case 8:  return cfbCreateGC (pGC);
--  case 16: return cfb16CreateGC (pGC);
--  case 32: return cfb32CreateGC (pGC);
--  default: return FALSE;
--  }
--}
--
--static void vfbMultiDepthGetSpans(
--                                  DrawablePtr		pDrawable,	/* drawable from which to get bits */
--                                  int			wMax,		/* largest value of all *pwidths */
--                                  register DDXPointPtr ppt,		/* points to start copying from */
--                                  int			*pwidth,	/* list of number of bits to copy */
--                                  int			nspans,		/* number of scanlines to copy */
--                                  char		*pdstStart)	/* where to put the bits */
--{
--  switch (pDrawable->bitsPerPixel) {
--  case 1:
--    mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
--    break;
--  case 8:
--    cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
--    break;
--  case 16:
--    cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
--    break;
--  case 32:
--    cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
--    break;
--  }
--  return;
--}
--
--static void
--vfbMultiDepthGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
--                      unsigned int format, unsigned long planeMask,
--                      char *pdstLine)
--{
--  switch (pDrawable->bitsPerPixel)
--  {
--  case 1:
--    mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
--    break;
--  case 8:
--    cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
--    break;
--  case 16:
--    cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
--    break;
--  case 32:
--    cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
--    break;
--  }
--}
--#endif
--
- static ColormapPtr InstalledMaps[MAXSCREENS];
- 
- static int vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
-@@ -832,44 +760,32 @@
-   defaultColorVisualClass
-     = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
- 
--#ifdef VNC_USE_FB
--  if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                    dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
--      return FALSE;
-+  miSetPixmapDepths();
- 
--#ifdef RENDER
--  if (ret && Render)
--      fbPictureInit(pScreen, 0, 0);
--#endif /* RENDER */
--#else /* VNC_USE_FB */
-   switch (pvfb->bitsPerPixel)
-   {
--  case 1:
--    ret = mfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                        dpi, dpi, pvfb->paddedWidth);
--    break;
-   case 8:
--    ret = cfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                        dpi, dpi, pvfb->paddedWidth);
-+      miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0);
-+
-     break;
-   case 16:
--    ret = cfb16ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                          dpi, dpi, pvfb->paddedWidth);
-+        miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f);
-     break;
-   case 32:
--    ret = cfb32ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
--                          dpi, dpi, pvfb->paddedWidth);
-+        miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00);
-     break;
-   default:
-     return FALSE;
-   }
- 
--  if (!ret) return FALSE;
-+  if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-+                    dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
-+      return FALSE;
- 
--  pScreen->CreateGC = vfbMultiDepthCreateGC;
--  pScreen->GetImage = vfbMultiDepthGetImage;
--  pScreen->GetSpans = vfbMultiDepthGetSpans;
--#endif
-+#ifdef RENDER
-+  if (ret && Render)
-+      fbPictureInit(pScreen, 0, 0);
-+#endif /* RENDER */
- 
-   pScreen->InstallColormap = vfbInstallColormap;
-   pScreen->UninstallColormap = vfbUninstallColormap;
-@@ -915,18 +831,7 @@
-     }
-   }
- 
--#ifdef VNC_USE_FB
-   ret = fbCreateDefColormap(pScreen);
--#else
--  if (pvfb->bitsPerPixel == 1)
--  {
--    ret = mfbCreateDefColormap(pScreen);
--  }
--  else
--  {
--    ret = cfbCreateDefColormap(pScreen);
--  }
--#endif
- 
-   miSetZeroLineBias(pScreen, pvfb->lineBias);
- 
--- a/open-src/xserver/xvnc/vnc-autotools-compile.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-autotools-compile.patch
-
---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.autotools-compile	2007-02-15 18:56:52.000000000 +0100
-+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx	2007-02-15 18:57:21.000000000 +0100
-@@ -42,7 +42,7 @@
- #include <rfb/LogWriter.h>
- 
- #ifndef VNC_SOCKLEN_T
--#define VNC_SOCKLEN_T int
-+#define VNC_SOCKLEN_T socklen_t
- #endif
- 
- #ifndef INADDR_NONE
--- a/open-src/xserver/xvnc/vnc-autotools.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,421 +0,0 @@
-## Patch originally from Fedora - Revision 1.3 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-autotools.patch
-
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,5 @@
-+SUBDIRS = \
-+	rdr \
-+	network \
-+	Xregion \
-+	rfb
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/rfb/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,136 @@
-+lib_LTLIBRARIES = librfb.la
-+
-+librfb_la_SOURCES = \
-+	Blacklist.cxx \
-+	Blacklist.h \
-+	CConnection.cxx \
-+	CConnection.h \
-+	CMsgHandler.cxx \
-+	CMsgHandler.h \
-+	CMsgReader.cxx \
-+	CMsgReader.h \
-+	CMsgReaderV3.cxx \
-+	CMsgReaderV3.h \
-+	CMsgWriter.cxx \
-+	CMsgWriter.h \
-+	CMsgWriterV3.cxx \
-+	CMsgWriterV3.h \
-+	ColourCube.h \
-+	ColourMap.h \
-+	ComparingUpdateTracker.cxx \
-+	ComparingUpdateTracker.h \
-+	Configuration.cxx \
-+	Configuration.h \
-+	ConnParams.cxx \
-+	ConnParams.h \
-+	CSecurity.h \
-+	CSecurityNone.h \
-+	CSecurityVncAuth.cxx \
-+	CSecurityVncAuth.h \
-+	Cursor.cxx \
-+	Cursor.h \
-+	Decoder.cxx \
-+	Decoder.h \
-+	d3des.c \
-+	d3des.h \
-+	Encoder.cxx \
-+	Encoder.h \
-+	encodings.cxx \
-+	encodings.h \
-+	Exception.h \
-+	hextileConstants.h \
-+	hextileDecode.h \
-+	HextileDecoder.cxx \
-+	HextileDecoder.h \
-+	hextileEncode.h \
-+	HextileEncoder.cxx \
-+	HextileEncoder.h \
-+	Hostname.h \
-+	HTTPServer.cxx \
-+	HTTPServer.h \
-+	ImageGetter.h \
-+	InputHandler.h \
-+	KeyRemapper.cxx \
-+	KeyRemapper.h \
-+	keysymdef.h \
-+	Logger.cxx \
-+	Logger_file.cxx \
-+	Logger_file.h \
-+	Logger.h \
-+	Logger_stdio.cxx \
-+	Logger_stdio.h \
-+	LogWriter.cxx \
-+	LogWriter.h \
-+	msgTypes.h \
-+	Password.cxx \
-+	Password.h \
-+	PixelBuffer.cxx \
-+	PixelBuffer.h \
-+	PixelFormat.cxx \
-+	PixelFormat.h \
-+	Pixel.h \
-+	RawDecoder.cxx \
-+	RawDecoder.h \
-+	RawEncoder.cxx \
-+	RawEncoder.h \
-+	Rect.h \
-+	Region.cxx \
-+	Region.h \
-+	rreDecode.h \
-+	RREDecoder.cxx \
-+	RREDecoder.h \
-+	rreEncode.h \
-+	RREEncoder.cxx \
-+	RREEncoder.h \
-+	SConnection.cxx \
-+	SConnection.h \
-+	SDesktop.h \
-+	secTypes.cxx \
-+	secTypes.h \
-+	ServerCore.cxx \
-+	ServerCore.h \
-+	SMsgHandler.cxx \
-+	SMsgHandler.h \
-+	SMsgReader.cxx \
-+	SMsgReader.h \
-+	SMsgReaderV3.cxx \
-+	SMsgReaderV3.h \
-+	SMsgWriter.cxx \
-+	SMsgWriter.h \
-+	SMsgWriterV3.cxx \
-+	SMsgWriterV3.h \
-+	SSecurityFactoryStandard.cxx \
-+	SSecurityFactoryStandard.h \
-+	SSecurity.h \
-+	SSecurityNone.h \
-+	SSecurityVncAuth.cxx \
-+	SSecurityVncAuth.h \
-+	Threading.h \
-+	Timer.cxx \
-+	Timer.h \
-+	TransImageGetter.cxx \
-+	TransImageGetter.h \
-+	transInitTempl.h \
-+	transTempl.h \
-+	TrueColourMap.h \
-+	UpdateTracker.cxx \
-+	UpdateTracker.h \
-+	UserPasswdGetter.h \
-+	util.cxx \
-+	util.h \
-+	VNCSConnectionST.cxx \
-+	VNCSConnectionST.h \
-+	VNCServer.h \
-+	VNCServerST.cxx \
-+	VNCServerST.h \
-+	zrleDecode.h \
-+	ZRLEDecoder.cxx \
-+	ZRLEDecoder.h \
-+	zrleEncode.h \
-+	ZRLEEncoder.cxx \
-+	ZRLEEncoder.h
-+
-+librfb_la_LIBADD = \
-+	$(top_srcdir)/network/libnetwork.la \
-+	$(top_srcdir)/rdr/librdr.la \
-+	$(top_srcdir)/Xregion/libXregion.la
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/rdr/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,30 @@
-+noinst_LTLIBRARIES = librdr.la
-+
-+librdr_la_SOURCES = \
-+	Exception.cxx \
-+	FdInStream.h \
-+	FixedMemOutStream.h \
-+	HexOutStream.cxx \
-+	InStream.h \
-+	OutStream.h \
-+	SubstitutingInStream.h \
-+	ZlibInStream.h \
-+	Exception.h \
-+	FdOutStream.cxx \
-+	HexInStream.cxx \
-+	HexOutStream.h \
-+	MemInStream.h \
-+	RandomStream.cxx \
-+	types.h \
-+	ZlibOutStream.cxx \
-+	FdInStream.cxx \
-+	FdOutStream.h \
-+	HexInStream.h \
-+	InStream.cxx \
-+	MemOutStream.h \
-+	RandomStream.h \
-+	ZlibInStream.cxx \
-+	ZlibOutStream.h
-+
-+librdr_la_LIBADD = \
-+	-lz
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/configure.ac	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,42 @@
-+#                                               -*- Autoconf -*-
-+# Process this file with autoconf to produce a configure script.
-+
-+AC_PREREQ(2.61)
-+AC_INIT([vnc-libs], 4.1.2, [bugzilla.redhat.com])
-+AC_CONFIG_HEADER([config.h])
-+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-+
-+# Checks for programs.
-+AC_PROG_CXX
-+AC_PROG_CC
-+AC_PROG_LIBTOOL
-+
-+# Checks for libraries.
-+
-+# Checks for header files.
-+AC_HEADER_STDC
-+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h unistd.h])
-+
-+# Checks for typedefs, structures, and compiler characteristics.
-+AC_HEADER_STDBOOL
-+AC_C_CONST
-+AC_C_INLINE
-+AC_TYPE_SIZE_T
-+AC_HEADER_TIME
-+AC_STRUCT_TM
-+
-+# Checks for library functions.
-+AC_FUNC_ERROR_AT_LINE
-+AC_FUNC_MEMCMP
-+AC_FUNC_SELECT_ARGTYPES
-+AC_TYPE_SIGNAL
-+AC_FUNC_STRFTIME
-+AC_FUNC_VPRINTF
-+AC_CHECK_FUNCS([ftime gethostbyname getpass gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strncasecmp])
-+
-+AC_CONFIG_FILES([Makefile
-+                 Xregion/Makefile
-+                 network/Makefile
-+                 rdr/Makefile
-+                 rfb/Makefile])
-+AC_OUTPUT
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/Xregion/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,6 @@
-+noinst_LTLIBRARIES = libXregion.la
-+
-+libXregion_la_SOURCES = \
-+	Region.c \
-+	region.h \
-+	Xregion.h
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/common/network/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,6 @@
-+noinst_LTLIBRARIES = libnetwork.la
-+
-+libnetwork_la_SOURCES = \
-+	Socket.h \
-+	TcpSocket.cxx \
-+	TcpSocket.h
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,6 @@
-+SUBDIRS = \
-+	tx \
-+	vncpasswd \
-+	vncviewer \
-+	vncconfig \
-+	x0vncserver
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/tx/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,25 @@
-+noinst_LTLIBRARIES = libtx.la
-+
-+libtx_la_SOURCES = \
-+	TXButton.h \
-+	TXDialog.h \
-+	TXEntry.h \
-+	TXCheckbox.h \
-+	TXImage.cxx \
-+	TXImage.h \
-+	TXLabel.h \
-+	TXMenu.cxx \
-+	TXMenu.h \
-+	TXMsgBox.h \
-+	TXScrollbar.cxx \
-+	TXScrollbar.h \
-+	TXViewport.cxx \
-+	TXViewport.h \
-+	TXWindow.cxx \
-+	TXWindow.h
-+
-+AM_CPPFLAGS = \
-+	-I$(top_srcdir)/../common/
-+
-+libtx_la_LIBADD = \
-+	-lX11
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/vncpasswd/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,10 @@
-+bin_PROGRAMS = vncpasswd
-+
-+vncpasswd_SOURCES = \
-+	vncpasswd.cxx
-+
-+AM_CPPFLAGS = \
-+	-I$(top_srcdir)/../common
-+
-+vncpasswd_LDADD = \
-+	$(top_srcdir)/../common/rfb/librfb.la
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/vncconfig/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,17 @@
-+bin_PROGRAMS = vncconfig
-+
-+vncconfig_SOURCES = \
-+	buildtime.c \
-+	QueryConnectDialog.cxx \
-+	QueryConnectDialog.h \
-+	vncconfig.cxx \
-+	vncExt.c \
-+	vncExt.h
-+
-+AM_CPPFLAGS = \
-+	-I$(top_srcdir)/../common \
-+	-I$(top_srcdir)/tx
-+
-+vncconfig_LDADD = \
-+	$(top_srcdir)/../common/rfb/librfb.la \
-+	$(top_srcdir)/tx/libtx.la
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/configure.ac	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,52 @@
-+#                                               -*- Autoconf -*-
-+# Process this file with autoconf to produce a configure script.
-+
-+AC_PREREQ(2.61)
-+AC_INIT([vnc], 4.1.2, [bugzilla.redhat.com])
-+AC_CONFIG_SRCDIR([x0vncserver/buildtime.c])
-+AC_CONFIG_HEADER([config.h])
-+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-+
-+# Checks for programs.
-+AC_PROG_CXX
-+AC_PROG_CC
-+AC_PROG_LIBTOOL
-+
-+# Checks for libraries.
-+
-+# Checks for header files.
-+AC_PATH_X
-+AC_HEADER_STDC
-+AC_HEADER_SYS_WAIT
-+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h strings.h sys/time.h termios.h unistd.h])
-+
-+# Checks for typedefs, structures, and compiler characteristics.
-+AC_HEADER_STDBOOL
-+AC_C_CONST
-+AC_C_INLINE
-+AC_C_RESTRICT
-+AC_TYPE_SIZE_T
-+AC_HEADER_TIME
-+
-+# Checks for library functions.
-+AC_FUNC_ERROR_AT_LINE
-+AC_FUNC_FORK
-+AC_FUNC_LSTAT
-+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-+AC_FUNC_MALLOC
-+AC_FUNC_MEMCMP
-+AC_FUNC_REALLOC
-+AC_FUNC_SELECT_ARGTYPES
-+AC_TYPE_SIGNAL
-+AC_FUNC_STAT
-+AC_FUNC_VPRINTF
-+AC_FUNC_WAIT3
-+AC_CHECK_FUNCS([memset mkdir select setenv strchr strdup strerror strspn strtol])
-+
-+AC_CONFIG_FILES([Makefile
-+                 tx/Makefile
-+                 vncconfig/Makefile
-+                 vncpasswd/Makefile
-+                 vncviewer/Makefile
-+                 x0vncserver/Makefile])
-+AC_OUTPUT
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/vncviewer/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,24 @@
-+bin_PROGRAMS = vncviewer
-+
-+vncviewer_SOURCES = \
-+	AboutDialog.h \
-+	buildtime.c \
-+	CConn.cxx \
-+	CConn.h \
-+	DesktopWindow.cxx \
-+	DesktopWindow.h \
-+	InfoDialog.h \
-+	OptionsDialog.h \
-+	parameters.h \
-+	PasswdDialog.h \
-+	ServerDialog.h \
-+	vncviewer.cxx
-+
-+AM_CPPFLAGS = \
-+	-I$(top_srcdir)/../common \
-+	-I$(top_srcdir)/tx
-+
-+vncviewer_LDADD = \
-+	$(top_srcdir)/../common/rfb/librfb.la \
-+	$(top_srcdir)/tx/libtx.la \
-+	-lXext
---- /dev/null	2007-02-16 09:39:42.585819347 +0100
-+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Makefile.am	2007-02-16 09:51:11.000000000 +0100
-@@ -0,0 +1,20 @@
-+bin_PROGRAMS = x0vncserver
-+
-+x0vncserver_SOURCES = \
-+	buildtime.c \
-+	Image.cxx \
-+	Image.h \
-+	x0vncserver.cxx \
-+	$(top_srcdir)/vncconfig/QueryConnectDialog.h \
-+	$(top_srcdir)/vncconfig/QueryConnectDialog.cxx
-+
-+AM_CPPFLAGS = \
-+	-I$(top_srcdir)/../common \
-+	-I$(top_srcdir)/vncconfig \
-+	-I$(top_srcdir)/tx
-+
-+x0vncserver_LDADD = \
-+	$(top_srcdir)/../common/rfb/librfb.la \
-+	$(top_srcdir)/tx/libtx.la \
-+	-lXext \
-+	-lXtst
--- a/open-src/xserver/xvnc/vnc-bounds.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-bounds.patch
-with paths adjusted to match sources in tarball before files are moved
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.bounds vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.bounds	2008-03-17 16:46:27.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc	2008-03-17 16:59:11.000000000 +0100
-@@ -486,32 +486,36 @@ void XserverDesktop::add_changed(RegionP
- {
-   if (ignoreHooks_) return;
-   if (grabbing) return;
-+
-+  BoxRec screenbox;
-+  RegionPtr newreg = REGION_CREATE(pScreen, 0, 0);
-+
-+  screenbox.x1 = screenbox.y1 = 0;
-+  screenbox.x2 = pScreen->width;
-+  screenbox.y2 = pScreen->height;
-+
-+  RegionPtr screenreg = REGION_CREATE(pScreen, &screenbox, 0);
-+  REGION_INTERSECT(pScreen, newreg, reg, screenreg);
-+  REGION_DESTROY (pScreen, screenreg);
-+
-   try {
-     rfb::Region rfbReg;
--    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, reg),
--                                     REGION_NUM_RECTS(reg),
--                                     (ShortRect*)REGION_RECTS(reg));
-+    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, newreg),
-+                                     REGION_NUM_RECTS(newreg),
-+                                     (ShortRect*)REGION_RECTS(newreg));
-     server->add_changed(rfbReg);
-     deferUpdate();
-   } catch (rdr::Exception& e) {
-     vlog.error("XserverDesktop::add_changed: %s",e.str());
-   }
-+  REGION_DESTROY (pScreen, newreg);
- }
- 
- void XserverDesktop::add_copied(RegionPtr dst, int dx, int dy)
- {
--  if (ignoreHooks_) return;
--  if (grabbing) return;
--  try {
--    rfb::Region rfbReg;
--    rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, dst),
--                                     REGION_NUM_RECTS(dst),
--                                     (ShortRect*)REGION_RECTS(dst));
--    server->add_copied(rfbReg, rfb::Point(dx, dy));
--    deferUpdate();
--  } catch (rdr::Exception& e) {
--    vlog.error("XserverDesktop::add_copied: %s",e.str());
--  }
-+  add_changed (dst);
-+  REGION_TRANSLATE (pScreen, dst, -dx, -dy);
-+  add_changed (dst);
- }
- 
- void XserverDesktop::positionCursor()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/vnc-config-subdirs.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,24 @@
+--- tigervnc-1.0.0/common/configure.ac~	Thu Aug 20 02:46:42 2009
++++ tigervnc-1.0.0/common/configure.ac	Mon Aug 31 07:14:23 2009
+@@ -58,7 +58,9 @@
+ 	[AC_SEARCH_LIBS([inflateEnd], [z], [], [INCLUDED_ZLIB=yes])])
+ 
+ AM_CONDITIONAL([INCLUDED_ZLIB], [ test "x$INCLUDED_ZLIB" = xyes ])
+-AC_CONFIG_SUBDIRS([zlib])
++if test "x$INCLUDED_ZLIB" = xyes ; then
++  AC_CONFIG_SUBDIRS([zlib])
++fi
+ 
+ dnl Check for libjpeg library
+ INCLUDED_JPEG=yes
+@@ -70,7 +72,9 @@
+ 	[])
+ 
+ AM_CONDITIONAL([INCLUDED_JPEG], [ test "x$INCLUDED_JPEG" = xyes ])
+-AC_CONFIG_SUBDIRS([jpeg])
++if test "x$INCLUDED_JPEG" = xyes ; then
++  AC_CONFIG_SUBDIRS([jpeg])
++fi
+ 
+ AC_CHECK_FUNCS([vsnprintf snprintf strcasecmp strncasecmp])
+ 
--- a/open-src/xserver/xvnc/vnc-fasterPrivates.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-Make Xvnc work with new Xorg 1.6 faster rework of devPrivates, which stores
-an index in the address pointed to by the key.
-
---- unix/xc/programs/Xserver/vnc/vncHooks.cc	2008-10-08 08:21:12.289265000 -0700
-+++ unix/xc/programs/Xserver/vnc/vncHooks.cc	2008-10-08 08:20:15.523901000 -0700
-@@ -90,8 +90,10 @@
-     GCOps *wrappedOps;
- } vncHooksGCRec, *vncHooksGCPtr;
- 
--static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey;
--static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey;
-+static int vncHooksScrPrivateKeyIndex;
-+static int vncHooksGCPrivateKeyIndex;
-+static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKeyIndex;
-+static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKeyIndex;
- 
- #define vncHooksScreenPrivate(scrn) \
- 	(vncHooksScreenPtr) dixLookupPrivate (&(scrn)->devPrivates, \
--- a/open-src/xserver/xvnc/vnc-gcc43.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-## Patch originally from Fedora - Revision 1.2 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-gcc43.patch
-
-diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx
---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43	2008-01-09 14:51:54.000000000 +0100
-+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx	2008-01-09 14:51:54.000000000 +0100
-@@ -37,6 +37,9 @@
- #include <fcntl.h>
- #endif
- 
-+extern "C" {
-+#include <stdlib.h>
-+}
- #include <network/TcpSocket.h>
- #include <rfb/util.h>
- #include <rfb/LogWriter.h>
-diff -up vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx
---- vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43	2006-05-15 18:56:20.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx	2008-01-09 14:51:54.000000000 +0100
-@@ -22,6 +22,7 @@
- 
- #include <stdio.h>
- #include <strings.h>
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
-diff -up vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx
---- vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43	2006-05-15 18:56:20.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx	2008-01-09 14:51:54.000000000 +0100
-@@ -21,6 +21,7 @@
- 
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
--- a/open-src/xserver/xvnc/vnc-includes.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-includes.patch
-with paths adjusted to match sources in tarball before files are moved
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.includes vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.includes	2008-04-04 13:54:24.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc	2008-04-04 13:54:49.000000000 +0200
-@@ -22,8 +22,8 @@
- extern "C" {
- #define class c_class
- #define NEED_EVENTS
--#include "X.h"
--#include "Xproto.h"
-+#include <X11/X.h>
-+#include <X11/Xproto.h>
- #include "misc.h"
- #include "os.h"
- #include "dixstruct.h"
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.includes vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.includes	2008-04-04 13:55:07.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc	2008-04-04 13:55:29.000000000 +0200
-@@ -50,9 +50,9 @@ extern char *display;
- #include "resource.h"
- #include "cursorstr.h"
- #include "windowstr.h"
--#include "mi/mi.h"
-+#include "mi.h"
- #define XK_CYRILLIC
--#include "keysym.h"
-+#include <X11/keysym.h>
- #undef public
- #undef class
- }
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/xvnc.cc.includes vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/xvnc.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.includes	2008-04-04 13:57:34.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2008-04-04 13:57:44.000000000 +0200
-@@ -68,7 +68,7 @@ extern "C" {
- #include <X11/XWDFile.h>
- #include "dix.h"
- #include "inputstr.h"
--#include "keysym.h"
-+#include <X11/keysym.h>
-   extern int defaultColorVisualClass;
- #undef new
- #undef class
--- a/open-src/xserver/xvnc/vnc-input-1.6.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-#
-
-Changes to Xvnc DDX layer to match Xorg 1.6 input device/events API changes
-
-Includes fix contributed by J�rgen Keil  <[email protected]> for
-OpenSolaris Bug #8687: german keyboard layout: umlaut keys not accepted by Xvnc
-http://defect.opensolaris.org/bz/show_bug.cgi?id=8687
-
-diff -urp -x '*~' -x '*.orig' unix/xc/programs/Xserver/vnc/XserverDesktop.cc unix/xc/programs/Xserver/vnc/XserverDesktop.cc
---- unix/xc/programs/Xserver/vnc/XserverDesktop.cc	2009-04-27 09:17:40.198280000 -0700
-+++ unix/xc/programs/Xserver/vnc/XserverDesktop.cc	2009-04-27 09:16:54.127059000 -0700
-@@ -40,9 +40,8 @@ extern "C" {
- #define public c_public
- #define class c_class
- 
--  // windowTable is in globals.h in XFree 4, but not in XFree 3 unfortunately
--extern WindowPtr *WindowTable;
--extern char *display;
-+#include "globals.h"	// extern WindowPtr *WindowTable;
-+#include "opaque.h"	// extern char *display;
- 
- #include "inputstr.h"
- #include "servermd.h"
-@@ -57,7 +56,7 @@ extern char *display;
- #undef class
- }
- 
--static xEvent *eventq = NULL;
-+static EventList *eventq = NULL;
- static DeviceIntPtr vncKeyboard = NULL;
- static DeviceIntPtr vncMouse = NULL;
- 
-@@ -213,16 +212,16 @@ XserverDesktop::XserverDesktop(ScreenPtr
- 
- // XXX Memory leak here, eventq is not free()-d because it has to exist till server exits
-   if (!eventq)
--    eventq = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-+    eventq = InitEventList(GetMaximumEventsNum());
-   if (!eventq)
-     FatalError("couldn't allocate room for events\n");
- 
-   if (vncMouse == NULL) {
--    vncMouse = AddInputDevice(vfbMouseProc, TRUE);
-+    vncMouse = AddInputDevice(serverClient, vfbMouseProc, TRUE);
-     RegisterPointerDevice (vncMouse);
-   }
-   if (vncKeyboard == NULL) {
--    vncKeyboard = AddInputDevice(vfbKeybdProc, TRUE);
-+    vncKeyboard = AddInputDevice(serverClient, vfbKeybdProc, TRUE);
-     RegisterKeyboardDevice (vncKeyboard);
-   }
- }
-@@ -531,10 +530,10 @@ void XserverDesktop::positionCursor()
- void XserverDesktop::blockHandler(fd_set* fds)
- {
-   try {
--    ScreenPtr screenWithCursor = GetCurrentRootWindow()->drawable.pScreen;
-+    ScreenPtr screenWithCursor = GetCurrentRootWindow(vncMouse)->drawable.pScreen;
-     if (screenWithCursor == pScreen) {
-       int x, y;
--      GetSpritePosition(&x, &y);
-+      GetSpritePosition(vncMouse, &x, &y);
-       if (x != cursorPos.x || y != cursorPos.y) {
-         cursorPos = oldCursorPos = Point(x, y);
-         server->setCursorPos(cursorPos);
-@@ -695,15 +694,16 @@ void XserverDesktop::pointerEvent(const 
-   // end of processing a load of RFB.
-   //(*pScreen->SetCursorPosition) (pScreen, pos.x, pos.y, FALSE);
- 
--  NewCurrentScreen(pScreen, pos.x, pos.y);
-+  NewCurrentScreen(vncMouse, pScreen, pos.x, pos.y);
- 
-   if (!pos.equals(cursorPos)) {
-     valuators[0] = pos.x;
-     valuators[1] = pos.y;
-+    GetEventList(&eventq);
-     n = GetPointerEvents (eventq, vncMouse, MotionNotify, 0,
-                           POINTER_ABSOLUTE, 0, 2, valuators);
-     for (i = 0; i < n; i++)
--      mieqEnqueue (vncMouse, eventq + i);
-+      mieqEnqueue (vncMouse, eventq[i].event);
-   }
- 
-   for (int i = 0; i < 5; i++) {
-@@ -720,7 +719,7 @@ void XserverDesktop::pointerEvent(const 
-                                       ButtonPress : ButtonRelease,
-                             detail, POINTER_RELATIVE, 0, 0, NULL);
-       for (j = 0; j < n; j++)
--        mieqEnqueue (vncMouse, eventq + j);
-+        mieqEnqueue (vncMouse, eventq[j].event);
-     }
-   }
- 
-@@ -842,7 +841,7 @@ private:
-     n = GetKeyboardEvents (eventq, vncKeyboard,
-                            down ? KeyPress : KeyRelease, keycode);
-     for (i = 0; i < n; i++)
--      mieqEnqueue (vncKeyboard, eventq + i);
-+      mieqEnqueue (vncKeyboard, eventq[i].event);
-     vlog.debug("fake keycode %d %s", keycode, down ? "down" : "up");
-   }
-   int modIndex;
-@@ -917,6 +917,6 @@
-     vlog.debug("Ignoring caps lock");
-     return;
-   }
--  KeyClassPtr keyc = vncKeyboard->key;
-+  KeyClassPtr keyc = inputInfo.keyboard->key;
-   KeySymsPtr keymap = &keyc->curKeySyms;
-   int i, j, k, n;
-@@ -970,7 +969,7 @@ void XserverDesktop::keyEvent(rdr::U32 k
-       if (!keymap->map[(kc - keymap->minKeyCode) * keymap->mapWidth]) {
-         keymap->map[(kc - keymap->minKeyCode) * keymap->mapWidth] = keysym;
-         col = 0;
--        SendMappingNotify(MappingKeyboard, kc, 1, serverClient);
-+        SendMappingNotify(vncKeyboard, MappingKeyboard, kc, 1, serverClient);
-         vlog.info("Added unknown keysym 0x%x to keycode %d",keysym,kc);
-         break;
-       }
-@@ -1009,7 +1008,7 @@ void XserverDesktop::keyEvent(rdr::U32 k
-   n = GetKeyboardEvents (eventq, vncKeyboard, down ? KeyPress : KeyRelease,
-                          kc);
-   for (i = 0; i < n; i++)
--    mieqEnqueue (vncKeyboard, eventq + i);
-+    mieqEnqueue (vncKeyboard, eventq[i].event);
- }
- 
- 
-@@ -1366,7 +1365,7 @@ static int vfbMouseProc(DeviceIntPtr pDe
-     map[3] = 3;
-     map[4] = 4;
-     map[5] = 5;
--    InitPointerDeviceStruct(&pDev->c_public, map, 5, GetMotionHistory,
-+    InitPointerDeviceStruct(&pDev->c_public, map, 5,
-                             (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2);
-     break;
- 
-diff -urp -x '*~' -x '*.orig' unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
---- unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2009-04-27 09:17:40.199148000 -0700
-+++ unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2009-04-27 09:16:54.127984000 -0700
-@@ -235,7 +235,6 @@
-             "Parameter names are case-insensitive.  The parameters are:\n\n");
-     rfb::Configuration::listParams(79, 14);
-   }
--}
- 
- static bool displayNumFree(int num)
- {
-@@ -720,21 +720,30 @@ static Bool vfbCursorOffScreen(ScreenPtr
-   return FALSE;
- }
- static void vfbCrossScreen (ScreenPtr pScreen, Bool entering) {}
--static Bool vfbRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) {
-+static Bool vfbRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
-+			     CursorPtr pCursor) {
-   return TRUE;
- }
--static Bool vfbUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) {
-+static Bool vfbUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
-+			       CursorPtr pCursor) {
-   return TRUE;
- }
--static void vfbSetCursor(ScreenPtr pScreen, CursorPtr pCursor,
-+static void vfbSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
-                                int x, int y) {}
--static void vfbMoveCursor(ScreenPtr pScreen, int x, int y) {}
-+static void vfbMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) {}
- 
-+static Bool vfbDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) {
-+    return TRUE;
-+}
-+static void vfbDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) {}
-+
- static miPointerSpriteFuncRec vfbPointerSpriteFuncs = {
-   vfbRealizeCursor,
-   vfbUnrealizeCursor,
-   vfbSetCursor,
--  vfbMoveCursor
-+  vfbMoveCursor,
-+  vfbDeviceCursorInitialize,
-+  vfbDeviceCursorCleanup  
- };
- 
- static miPointerScreenFuncRec vfbPointerScreenFuncs = {
-@@ -935,7 +937,6 @@ Bool LegalModifier(unsigned int key, Dev
- void ProcessInputEvents()
- {
-   mieqProcessInputEvents();
--  miPointerUpdate();
- }
- 
- void DDXRingBell(int percent, int pitch, int duration)
-@@ -950,3 +956,5 @@
- {
-   mieqInit ();
- }
-+
-+} // extern "C"
-
-diff -urp -x '*~' -x '*.orig' unix/xc/programs/Xserver/vnc/vncHooks.cc unix/xc/programs/Xserver/vnc/vncHooks.cc
---- unix/xc/programs/Xserver/vnc/vncHooks.cc	2009-04-27 09:17:40.232606000 -0700
-+++ unix/xc/programs/Xserver/vnc/vncHooks.cc	2009-04-27 09:16:54.124221000 -0700
-@@ -27,6 +27,7 @@
- extern "C" {
- #define class c_class
- #define private c_private
-+#define public c_public
- #include "scrnintstr.h"
- #include "windowstr.h"
- #include "gcstruct.h"
-@@ -47,6 +48,7 @@ extern "C" {
- 
- #undef class
- #undef private
-+#undef public
- }
- 
- #include "RegionHelper.h"
-@@ -112,7 +114,8 @@ static RegionPtr vncHooksRestoreAreas(Wi
- static void vncHooksInstallColormap(ColormapPtr pColormap);
- static void vncHooksStoreColors(ColormapPtr pColormap, int ndef,
-                                 xColorItem* pdef);
--static Bool vncHooksDisplayCursor(ScreenPtr pScreen, CursorPtr cursor);
-+static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
-+				  CursorPtr cursor);
- static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
-                                  pointer pReadmask);
- 
-@@ -417,12 +420,14 @@ static void vncHooksStoreColors(Colormap
- 
- // DisplayCursor - get the cursor shape
- 
--static Bool vncHooksDisplayCursor(ScreenPtr pScreen_, CursorPtr cursor)
-+static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen_,
-+				  CursorPtr cursor)
- {
-   SCREEN_UNWRAP(pScreen_, DisplayCursor);
- 
--  Bool ret = (*pScreen->DisplayCursor) (pScreen, cursor);
-+  Bool ret = (*pScreen->DisplayCursor) (pDev, pScreen, cursor);
- 
-+  if (cursor != NullCursor)
-   vncHooksScreen->desktop->setCursor(cursor);
- 
- 
--- a/open-src/xserver/xvnc/vnc-mieq.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,694 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-mieq.patch
-with paths adjusted to match sources in tarball before files are moved
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.mieq vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc.mieq	2006-05-15 18:56:20.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.cc	2008-03-05 12:25:06.000000000 +0100
-@@ -50,12 +50,20 @@ extern char *display;
- #include "resource.h"
- #include "cursorstr.h"
- #include "windowstr.h"
-+#include "mi/mi.h"
- #define XK_CYRILLIC
- #include "keysym.h"
- #undef public
- #undef class
- }
- 
-+static xEvent *eventq = NULL;
-+static DeviceIntPtr vncKeyboard = NULL;
-+static DeviceIntPtr vncMouse = NULL;
-+
-+static int vfbKeybdProc (DeviceIntPtr pDev, int onoff);
-+static int vfbMouseProc (DeviceIntPtr pDev, int onoff);
-+
- using namespace rfb;
- using namespace network;
- 
-@@ -202,6 +210,21 @@ XserverDesktop::XserverDesktop(ScreenPtr
- 
-   if (httpListener)
-     httpServer = new FileHTTPServer(this);
-+
-+// XXX Memory leak here, eventq is not free()-d because it has to exist till server exits
-+  if (!eventq)
-+    eventq = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-+  if (!eventq)
-+    FatalError("couldn't allocate room for events\n");
-+
-+  if (vncMouse == NULL) {
-+    vncMouse = AddInputDevice(vfbMouseProc, TRUE);
-+    RegisterPointerDevice (vncMouse);
-+  }
-+  if (vncKeyboard == NULL) {
-+    vncKeyboard = AddInputDevice(vfbKeybdProc, TRUE);
-+    RegisterKeyboardDevice (vncKeyboard);
-+  }
- }
- 
- XserverDesktop::~XserverDesktop()
-@@ -495,7 +518,7 @@ void XserverDesktop::positionCursor()
- {
-   if (!cursorPos.equals(oldCursorPos)) {
-     oldCursorPos = cursorPos;
--    (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE);
-+//    (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE);
-     server->setCursorPos(cursorPos);
-     server->tryUpdate();
-   }
-@@ -660,8 +683,8 @@ void XserverDesktop::approveConnection(v
- 
- void XserverDesktop::pointerEvent(const Point& pos, int buttonMask)
- {
--  xEvent ev;
--  DevicePtr dev = LookupPointerDevice();
-+  BYTE detail;
-+  int i, j, n, valuators[2];
- 
-   // SetCursorPosition seems to be very expensive (at least on XFree86 3.3.6
-   // for S3), so we delay calling it until positionCursor() is called at the
-@@ -670,14 +693,14 @@ void XserverDesktop::pointerEvent(const 
- 
-   NewCurrentScreen(pScreen, pos.x, pos.y);
- 
--  ev.u.u.type = MotionNotify;
--  ev.u.u.detail = 0;
--  ev.u.keyButtonPointer.rootX = pos.x;
--  ev.u.keyButtonPointer.rootY = pos.y;
--  ev.u.keyButtonPointer.time = GetTimeInMillis();
--
--  if (!pos.equals(cursorPos))
--    (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1);
-+  if (!pos.equals(cursorPos)) {
-+    valuators[0] = pos.x;
-+    valuators[1] = pos.y;
-+    n = GetPointerEvents (eventq, vncMouse, MotionNotify, 0,
-+                          POINTER_ABSOLUTE, 0, 2, valuators);
-+    for (i = 0; i < n; i++)
-+      mieqEnqueue (vncMouse, eventq + i);
-+  }
- 
-   for (int i = 0; i < 5; i++) {
-     if ((buttonMask ^ oldButtonMask) & (1<<i)) {
-@@ -685,12 +708,15 @@ void XserverDesktop::pointerEvent(const 
-       // God knows why but some idiot decided to conditionally move the pointer
-       // mapping out of DIX, so we guess here that if XINPUT is defined we have
-       // to do it ourselves...
--      ev.u.u.detail = ((DeviceIntPtr)dev)->button->map[i + 1];
-+      detail = vncMouse->button->map[i + 1];
- #else
--      ev.u.u.detail = i + 1;
-+      detail = i + 1;
- #endif
--      ev.u.u.type = (buttonMask & (1<<i)) ? ButtonPress : ButtonRelease;
--      (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1);
-+      n = GetPointerEvents (eventq, vncMouse, (buttonMask & (1<<i)) ?
-+                                      ButtonPress : ButtonRelease,
-+                            detail, POINTER_RELATIVE, 0, 0, NULL);
-+      for (j = 0; j < n; j++)
-+        mieqEnqueue (vncMouse, eventq + j);
-     }
-   }
- 
-@@ -771,8 +797,8 @@ void XserverDesktop::lookup(int index, i
- 
- class ModifierState {
- public:
--  ModifierState(DeviceIntPtr dev_, int modIndex_)
--    : dev(dev_), modIndex(modIndex_), nKeys(0), keys(0), pressed(false)
-+  ModifierState(int modIndex_)
-+    : modIndex(modIndex_), nKeys(0), keys(0), pressed(false)
-   {
-   }
-   ~ModifierState() {
-@@ -781,7 +807,7 @@ public:
-     delete [] keys;
-   }
-   void press() {
--    KeyClassPtr keyc = dev->key;
-+    KeyClassPtr keyc = vncKeyboard->key;
-     if (!(keyc->state & (1<<modIndex))) {
-       tempKeyEvent(keyc->modifierKeyMap[modIndex * keyc->maxKeysPerModifier],
-                    true);
-@@ -789,7 +815,7 @@ public:
-     }
-   }
-   void release() {
--    KeyClassPtr keyc = dev->key;
-+    KeyClassPtr keyc = vncKeyboard->key;
-     if (keyc->state & (1<<modIndex)) {
-       for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
-         int keycode
-@@ -802,20 +828,19 @@ public:
- private:
-   void tempKeyEvent(int keycode, bool down) {
-     if (keycode) {
--      if (!keys) keys = new int[dev->key->maxKeysPerModifier];
-+      if (!keys) keys = new int[vncKeyboard->key->maxKeysPerModifier];
-       keys[nKeys++] = keycode;
-       generateXKeyEvent(keycode, down);
-     }
-   }
-   void generateXKeyEvent(int keycode, bool down) {
--    xEvent ev;
--    ev.u.u.type = down ? KeyPress : KeyRelease;
--    ev.u.u.detail = keycode;
--    ev.u.keyButtonPointer.time = GetTimeInMillis();
--    (*dev->c_public.processInputProc)(&ev, dev, 1);
-+    int i, n;
-+    n = GetKeyboardEvents (eventq, vncKeyboard,
-+                           down ? KeyPress : KeyRelease, keycode);
-+    for (i = 0; i < n; i++)
-+      mieqEnqueue (vncKeyboard, eventq + i);
-     vlog.debug("fake keycode %d %s", keycode, down ? "down" : "up");
-   }
--  DeviceIntPtr dev;
-   int modIndex;
-   int nKeys;
-   int* keys;
-@@ -888,16 +913,16 @@ void XserverDesktop::keyEvent(rdr::U32 k
-     vlog.debug("Ignoring caps lock");
-     return;
-   }
--  DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
--  KeyClassPtr keyc = dev->key;
-+  KeyClassPtr keyc = vncKeyboard->key;
-   KeySymsPtr keymap = &keyc->curKeySyms;
-+  int i, j, k, n;
- 
-   // find which modifier Mode_switch is on.
-   int modeSwitchMapIndex = 0;
--  for (int i = 3; i < 8; i++) {
--    for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
-+  for (i = 3; i < 8; i++) {
-+    for (k = 0; k < keyc->maxKeysPerModifier; k++) {
-       int keycode = keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k];
--      for (int j = 0; j < keymap->mapWidth; j++) {
-+      for (j = 0; j < keymap->mapWidth; j++) {
-         if (keycode != 0 &&
-             keymap->map[(keycode - keymap->minKeyCode)
-                         * keymap->mapWidth + j] == XK_Mode_switch)
-@@ -926,7 +951,7 @@ void XserverDesktop::keyEvent(rdr::U32 k
-   if (kc == 0) {
-     // Not a direct match in the local keyboard mapping.  Check for alternative
-     // keysyms with the same meaning.
--    for (int i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) {
-+    for (i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) {
-       if (keysym == altKeysym[i].a)
-         kc = KeysymToKeycode(keymap, altKeysym[i].b, &col);
-       else if (keysym == altKeysym[i].b)
-@@ -954,16 +979,16 @@ void XserverDesktop::keyEvent(rdr::U32 k
- 
-   // See if it's a modifier key.  If so, then don't do any auto-repeat, because
-   // the X server will translate each press into a release followed by a press.
--  for (int i = 0; i < 8; i++) {
--    for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
-+  for (i = 0; i < 8; i++) {
-+    for (k = 0; k < keyc->maxKeysPerModifier; k++) {
-       if (kc == keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k] &&
-           IS_PRESSED(keyc,kc) && down)
-         return;
-     }
-   }
- 
--  ModifierState shift(dev, ShiftMapIndex);
--  ModifierState modeSwitch(dev, modeSwitchMapIndex);
-+  ModifierState shift(ShiftMapIndex);
-+  ModifierState modeSwitch(modeSwitchMapIndex);
-   if (down) {
-     if (col & 1)
-       shift.press();
-@@ -977,11 +1002,10 @@ void XserverDesktop::keyEvent(rdr::U32 k
-     }
-   }
-   vlog.debug("keycode %d %s", kc, down ? "down" : "up");
--  xEvent ev;
--  ev.u.u.type = down ? KeyPress : KeyRelease;
--  ev.u.u.detail = kc;
--  ev.u.keyButtonPointer.time = GetTimeInMillis();
--  (*dev->c_public.processInputProc)(&ev, dev, 1);
-+  n = GetKeyboardEvents (eventq, vncKeyboard, down ? KeyPress : KeyRelease,
-+                         kc);
-+  for (i = 0; i < n; i++)
-+    mieqEnqueue (vncKeyboard, eventq + i);
- }
- 
- 
-@@ -1150,3 +1174,208 @@ static KeyCode KeysymToKeycode(KeySymsPt
-   }
-   return 0;
- }
-+
-+void vncRingBell(int percent, int pitch, int duration)
-+{
-+  if (percent > 0)
-+    vncBell();
-+}
-+
-+/* Fairly standard US PC Keyboard */
-+
-+#define VFB_MIN_KEY 8
-+#define VFB_MAX_KEY 255
-+#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1)
-+#define KEYSYMS_PER_KEY 2
-+KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = {
-+  NoSymbol, NoSymbol,
-+  XK_Escape, NoSymbol,
-+  XK_1, XK_exclam,
-+  XK_2, XK_at,
-+  XK_3, XK_numbersign,
-+  XK_4, XK_dollar,
-+  XK_5, XK_percent,
-+  XK_6, XK_asciicircum,
-+  XK_7, XK_ampersand,
-+  XK_8, XK_asterisk,
-+  XK_9, XK_parenleft,
-+  XK_0, XK_parenright,
-+  XK_minus, XK_underscore,
-+  XK_equal, XK_plus,
-+  XK_BackSpace, NoSymbol,
-+  XK_Tab, NoSymbol,
-+  XK_q, XK_Q,
-+  XK_w, XK_W,
-+  XK_e, XK_E,
-+  XK_r, XK_R,
-+  XK_t, XK_T,
-+  XK_y, XK_Y,
-+  XK_u, XK_U,
-+  XK_i, XK_I,
-+  XK_o, XK_O,
-+  XK_p, XK_P,
-+  XK_bracketleft, XK_braceleft,
-+  XK_bracketright, XK_braceright,
-+  XK_Return, NoSymbol,
-+  XK_Control_L, NoSymbol,
-+  XK_a, XK_A,
-+  XK_s, XK_S,
-+  XK_d, XK_D,
-+  XK_f, XK_F,
-+  XK_g, XK_G,
-+  XK_h, XK_H,
-+  XK_j, XK_J,
-+  XK_k, XK_K,
-+  XK_l, XK_L,
-+  XK_semicolon, XK_colon,
-+  XK_apostrophe, XK_quotedbl,
-+  XK_grave, XK_asciitilde,
-+  XK_Shift_L, NoSymbol,
-+  XK_backslash, XK_bar,
-+  XK_z, XK_Z,
-+  XK_x, XK_X,
-+  XK_c, XK_C,
-+  XK_v, XK_V,
-+  XK_b, XK_B,
-+  XK_n, XK_N,
-+  XK_m, XK_M,
-+  XK_comma, XK_less,
-+  XK_period, XK_greater,
-+  XK_slash, XK_question,
-+  XK_Shift_R, NoSymbol,
-+  XK_KP_Multiply, NoSymbol,
-+  XK_Alt_L, XK_Meta_L,
-+  XK_space, NoSymbol,
-+  /*XK_Caps_Lock*/ NoSymbol, NoSymbol,
-+  XK_F1, NoSymbol,
-+  XK_F2, NoSymbol,
-+  XK_F3, NoSymbol,
-+  XK_F4, NoSymbol,
-+  XK_F5, NoSymbol,
-+  XK_F6, NoSymbol,
-+  XK_F7, NoSymbol,
-+  XK_F8, NoSymbol,
-+  XK_F9, NoSymbol,
-+  XK_F10, NoSymbol,
-+  XK_Num_Lock, XK_Pointer_EnableKeys,
-+  XK_Scroll_Lock, NoSymbol,
-+  XK_KP_Home, XK_KP_7,
-+  XK_KP_Up, XK_KP_8,
-+  XK_KP_Prior, XK_KP_9,
-+  XK_KP_Subtract, NoSymbol,
-+  XK_KP_Left, XK_KP_4,
-+  XK_KP_Begin, XK_KP_5,
-+  XK_KP_Right, XK_KP_6,
-+  XK_KP_Add, NoSymbol,
-+  XK_KP_End, XK_KP_1,
-+  XK_KP_Down, XK_KP_2,
-+  XK_KP_Next, XK_KP_3,
-+  XK_KP_Insert, XK_KP_0,
-+  XK_KP_Delete, XK_KP_Decimal,
-+  NoSymbol, NoSymbol,
-+  NoSymbol, NoSymbol,
-+  NoSymbol, NoSymbol,
-+  XK_F11, NoSymbol,
-+  XK_F12, NoSymbol,
-+  XK_Home, NoSymbol,
-+  XK_Up, NoSymbol,
-+  XK_Prior, NoSymbol,
-+  XK_Left, NoSymbol,
-+  NoSymbol, NoSymbol,
-+  XK_Right, NoSymbol,
-+  XK_End, NoSymbol,
-+  XK_Down, NoSymbol,
-+  XK_Next, NoSymbol,
-+  XK_Insert, NoSymbol,
-+  XK_Delete, NoSymbol,
-+  XK_KP_Enter, NoSymbol,
-+  XK_Control_R, NoSymbol,
-+  XK_Pause, XK_Break,
-+  XK_Print, XK_Execute,
-+  XK_KP_Divide, NoSymbol,
-+  XK_Alt_R, XK_Meta_R,
-+};
-+
-+static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
-+{
-+  int i;
-+
-+  for (i = 0; i < MAP_LENGTH; i++)
-+    pModMap[i] = NoSymbol;
-+
-+  for (i = 0; i < VFB_MAP_LEN; i++) {
-+    if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock)
-+      pModMap[i + VFB_MIN_KEY] = LockMask;
-+    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L ||
-+             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R)
-+      pModMap[i + VFB_MIN_KEY] = ShiftMask;
-+    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L ||
-+             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) {
-+      pModMap[i + VFB_MIN_KEY] = ControlMask;
-+    }
-+    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L ||
-+             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R)
-+      pModMap[i + VFB_MIN_KEY] = Mod1Mask;
-+  }
-+
-+  pKeySyms->minKeyCode = VFB_MIN_KEY;
-+  pKeySyms->maxKeyCode = VFB_MAX_KEY;
-+  pKeySyms->mapWidth = KEYSYMS_PER_KEY;
-+  pKeySyms->map = keyboardMap;
-+
-+  return TRUE;
-+}
-+
-+static int vfbKeybdProc(DeviceIntPtr pDev, int onoff)
-+{
-+  KeySymsRec            keySyms;
-+  CARD8                 modMap[MAP_LENGTH];
-+
-+  switch (onoff)
-+  {
-+  case DEVICE_INIT: 
-+    GetMappings(&keySyms, modMap);
-+    InitKeyboardDeviceStruct(&pDev->c_public, &keySyms, modMap,
-+                             (BellProcPtr)vncRingBell, (KbdCtrlProcPtr)NoopDDA);
-+    break;
-+  case DEVICE_ON: 
-+    pDev->c_public.on = TRUE;
-+    break;
-+  case DEVICE_OFF: 
-+    pDev->c_public.on = FALSE;
-+    break;
-+  case DEVICE_CLOSE:
-+    break;
-+  }
-+  return Success;
-+}
-+
-+static int vfbMouseProc(DeviceIntPtr pDev, int onoff)
-+{
-+  BYTE map[6];
-+
-+  switch (onoff)
-+  {
-+  case DEVICE_INIT:
-+    map[1] = 1;
-+    map[2] = 2;
-+    map[3] = 3;
-+    map[4] = 4;
-+    map[5] = 5;
-+    InitPointerDeviceStruct(&pDev->c_public, map, 5, GetMotionHistory,
-+                            (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2);
-+    break;
-+
-+  case DEVICE_ON:
-+    pDev->c_public.on = TRUE;
-+    break;
-+
-+  case DEVICE_OFF:
-+    pDev->c_public.on = FALSE;
-+    break;
-+
-+  case DEVICE_CLOSE:
-+    break;
-+  }
-+  return Success;
-+}
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/xvnc.cc.mieq vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/xvnc.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2008-03-04 12:08:05.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2008-03-05 11:52:34.000000000 +0100
-@@ -125,6 +125,8 @@ static bool displaySpecified = false;
- static bool wellKnownSocketsCreated = false;
- static char displayNumStr[16];
- 
-+extern void vncRingBell (int percent, int pitch, int duration);
-+
- #define swapcopy16(_dst, _src) \
-     if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \
-     else _dst = _src;
-@@ -925,7 +927,7 @@ void InitOutput(ScreenInfo *screenInfo, 
- int SelectWaitTime = 10000; /* usec */
- #endif
- 
--Bool LegalModifier(unsigned int key, DevicePtr pDev)
-+Bool LegalModifier(unsigned int key, DeviceIntPtr pDev)
- {
-   return TRUE;
- }
-@@ -936,223 +938,14 @@ void ProcessInputEvents()
-   miPointerUpdate();
- }
- 
--/* Fairly standard US PC Keyboard */
--
--#define VFB_MIN_KEY 8
--#define VFB_MAX_KEY 255
--#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1)
--#define KEYSYMS_PER_KEY 2
--KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = {
--  NoSymbol, NoSymbol,
--  XK_Escape, NoSymbol,
--  XK_1, XK_exclam,
--  XK_2, XK_at,
--  XK_3, XK_numbersign,
--  XK_4, XK_dollar,
--  XK_5, XK_percent,
--  XK_6, XK_asciicircum,
--  XK_7, XK_ampersand,
--  XK_8, XK_asterisk,
--  XK_9, XK_parenleft,
--  XK_0, XK_parenright,
--  XK_minus, XK_underscore,
--  XK_equal, XK_plus,
--  XK_BackSpace, NoSymbol,
--  XK_Tab, NoSymbol,
--  XK_q, XK_Q,
--  XK_w, XK_W,
--  XK_e, XK_E,
--  XK_r, XK_R,
--  XK_t, XK_T,
--  XK_y, XK_Y,
--  XK_u, XK_U,
--  XK_i, XK_I,
--  XK_o, XK_O,
--  XK_p, XK_P,
--  XK_bracketleft, XK_braceleft,
--  XK_bracketright, XK_braceright,
--  XK_Return, NoSymbol,
--  XK_Control_L, NoSymbol,
--  XK_a, XK_A,
--  XK_s, XK_S,
--  XK_d, XK_D,
--  XK_f, XK_F,
--  XK_g, XK_G,
--  XK_h, XK_H,
--  XK_j, XK_J,
--  XK_k, XK_K,
--  XK_l, XK_L,
--  XK_semicolon, XK_colon,
--  XK_apostrophe, XK_quotedbl,
--  XK_grave, XK_asciitilde,
--  XK_Shift_L, NoSymbol,
--  XK_backslash, XK_bar,
--  XK_z, XK_Z,
--  XK_x, XK_X,
--  XK_c, XK_C,
--  XK_v, XK_V,
--  XK_b, XK_B,
--  XK_n, XK_N,
--  XK_m, XK_M,
--  XK_comma, XK_less,
--  XK_period, XK_greater,
--  XK_slash, XK_question,
--  XK_Shift_R, NoSymbol,
--  XK_KP_Multiply, NoSymbol,
--  XK_Alt_L, XK_Meta_L,
--  XK_space, NoSymbol,
--  /*XK_Caps_Lock*/ NoSymbol, NoSymbol,
--  XK_F1, NoSymbol,
--  XK_F2, NoSymbol,
--  XK_F3, NoSymbol,
--  XK_F4, NoSymbol,
--  XK_F5, NoSymbol,
--  XK_F6, NoSymbol,
--  XK_F7, NoSymbol,
--  XK_F8, NoSymbol,
--  XK_F9, NoSymbol,
--  XK_F10, NoSymbol,
--  XK_Num_Lock, XK_Pointer_EnableKeys,
--  XK_Scroll_Lock, NoSymbol,
--  XK_KP_Home, XK_KP_7,
--  XK_KP_Up, XK_KP_8,
--  XK_KP_Prior, XK_KP_9,
--  XK_KP_Subtract, NoSymbol,
--  XK_KP_Left, XK_KP_4,
--  XK_KP_Begin, XK_KP_5,
--  XK_KP_Right, XK_KP_6,
--  XK_KP_Add, NoSymbol,
--  XK_KP_End, XK_KP_1,
--  XK_KP_Down, XK_KP_2,
--  XK_KP_Next, XK_KP_3,
--  XK_KP_Insert, XK_KP_0,
--  XK_KP_Delete, XK_KP_Decimal,
--  NoSymbol, NoSymbol,
--  NoSymbol, NoSymbol,
--  NoSymbol, NoSymbol,
--  XK_F11, NoSymbol,
--  XK_F12, NoSymbol,
--  XK_Home, NoSymbol,
--  XK_Up, NoSymbol,
--  XK_Prior, NoSymbol,
--  XK_Left, NoSymbol,
--  NoSymbol, NoSymbol,
--  XK_Right, NoSymbol,
--  XK_End, NoSymbol,
--  XK_Down, NoSymbol,
--  XK_Next, NoSymbol,
--  XK_Insert, NoSymbol,
--  XK_Delete, NoSymbol,
--  XK_KP_Enter, NoSymbol,
--  XK_Control_R, NoSymbol,
--  XK_Pause, XK_Break,
--  XK_Print, XK_Execute,
--  XK_KP_Divide, NoSymbol,
--  XK_Alt_R, XK_Meta_R,
--};
--
--static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
--{
--  int i;
--
--  for (i = 0; i < MAP_LENGTH; i++)
--    pModMap[i] = NoSymbol;
--
--  for (i = 0; i < VFB_MAP_LEN; i++) {
--    if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock)
--      pModMap[i + VFB_MIN_KEY] = LockMask;
--    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L ||
--             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R)
--      pModMap[i + VFB_MIN_KEY] = ShiftMask;
--    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L ||
--             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) {
--      pModMap[i + VFB_MIN_KEY] = ControlMask;
--    }
--    else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L ||
--             keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R)
--      pModMap[i + VFB_MIN_KEY] = Mod1Mask;
--  }
--
--  pKeySyms->minKeyCode = VFB_MIN_KEY;
--  pKeySyms->maxKeyCode = VFB_MAX_KEY;
--  pKeySyms->mapWidth = KEYSYMS_PER_KEY;
--  pKeySyms->map = keyboardMap;
--
--  return TRUE;
--}
--
--static void vfbBell(int percent, DeviceIntPtr device, pointer ctrl, int class_)
--{
--  if (percent > 0)
--    vncBell();
--}
--
--static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff)
--{
--  KeySymsRec		keySyms;
--  CARD8 		modMap[MAP_LENGTH];
--  DevicePtr pDev = (DevicePtr)pDevice;
--
--  switch (onoff)
--  {
--  case DEVICE_INIT: 
--    GetMappings(&keySyms, modMap);
--    InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
--                             (BellProcPtr)vfbBell, (KbdCtrlProcPtr)NoopDDA);
--    break;
--  case DEVICE_ON: 
--    pDev->on = TRUE;
--    break;
--  case DEVICE_OFF: 
--    pDev->on = FALSE;
--    break;
--  case DEVICE_CLOSE:
--    break;
--  }
--  return Success;
--}
--
--static int vfbMouseProc(DeviceIntPtr pDevice, int onoff)
-+void DDXRingBell(int percent, int pitch, int duration)
- {
--  BYTE map[6];
--  DevicePtr pDev = (DevicePtr)pDevice;
--
--  switch (onoff)
--  {
--  case DEVICE_INIT:
--    map[1] = 1;
--    map[2] = 2;
--    map[3] = 3;
--    map[4] = 4;
--    map[5] = 5;
--    InitPointerDeviceStruct(pDev, map, 5, miPointerGetMotionEvents,
--                            (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize());
--    break;
--
--  case DEVICE_ON:
--    pDev->on = TRUE;
--    break;
--
--  case DEVICE_OFF:
--    pDev->on = FALSE;
--    break;
--
--  case DEVICE_CLOSE:
--    break;
--  }
--  return Success;
-+  vncRingBell (percent, pitch, duration);
- }
--
- // InitInput is called after InitExtensions, so we're guaranteed that
- // vncExtensionInit() has already been called.
- 
- void InitInput(int argc, char *argv[])
- {
--  DeviceIntPtr p, k;
--  p = AddInputDevice(vfbMouseProc, TRUE);
--  k = AddInputDevice(vfbKeybdProc, TRUE);
--  RegisterPointerDevice(p);
--  RegisterKeyboardDevice(k);
--  miRegisterPointerDevice(screenInfo.screens[0], p);
--  (void)mieqInit ((DevicePtr)k, (DevicePtr)p);
-+  mieqInit ();
- }
--- a/open-src/xserver/xvnc/vnc-modular-xorg.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-## Patch originally from Fedora - Revision 1.13 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-modular-xorg.patch
-
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.modular-xorg	2007-03-02 15:45:38.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2007-03-02 15:45:38.000000000 +0100
-@@ -36,8 +36,6 @@
- extern "C" {
- #define class c_class
- #define public c_public
--#define xor c_xor
--#define and c_and
- #ifdef WIN32
- #include <X11/Xwinsock.h>
- #endif
-@@ -72,11 +70,8 @@
- #include "inputstr.h"
- #include "keysym.h"
-   extern int defaultColorVisualClass;
--  extern char buildtime[];
- #undef class
- #undef public
--#undef xor
--#undef and
- #ifndef VNC_USE_FB
-   extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-   extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-@@ -221,7 +216,7 @@
- 
-   void ddxUseMsg()
-   {
--    ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
-+    ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
-     ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
-            VENDOR_STRING);
-     ErrorF("-screen scrn WxHxD     set screen's width, height, depth\n");
-@@ -927,7 +922,7 @@
- 
- void InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
- {
--  ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
-+  ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
-   ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
-          VENDOR_STRING);
-   wellKnownSocketsCreated = true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/vnc-nobuildtime.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,145 @@
+Remove buildtime from binaries to avoid unnecessary change in ELF data.
+
+diff -urp -x '*~' -x '*.orig' unix/vncconfig/buildtime.c unix/vncconfig/buildtime.c
+--- unix/vncconfig/buildtime.c	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncconfig/buildtime.c	2009-11-05 09:51:42.545225775 -0800
+@@ -15,4 +15,3 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+  * USA.
+  */
+-char buildtime[] = __DATE__ " " __TIME__;
+diff -urp -x '*~' -x '*.orig' unix/vncviewer/AboutDialog.h unix/vncviewer/AboutDialog.h
+--- unix/vncviewer/AboutDialog.h	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncviewer/AboutDialog.h	2009-11-05 09:51:42.545775723 -0800
+@@ -30,7 +30,6 @@
+ #define gettext_noop(String) String
+ #define N_(String) gettext_noop (String)
+ 
+-extern char buildtime[];
+ 
+ class AboutDialog : public TXMsgBox {
+ public:
+diff -urp -x '*~' -x '*.orig' unix/vncviewer/buildtime.c unix/vncviewer/buildtime.c
+--- unix/vncviewer/buildtime.c	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncviewer/buildtime.c	2009-11-05 09:51:42.545497578 -0800
+@@ -15,4 +15,3 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+  * USA.
+  */
+-char buildtime[] = __DATE__ " " __TIME__;
+diff -urp -x '*~' -x '*.orig' unix/vncviewer/InfoDialog.h unix/vncviewer/InfoDialog.h
+--- unix/vncviewer/InfoDialog.h	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncviewer/InfoDialog.h	2009-11-05 09:51:42.545637493 -0800
+@@ -26,7 +26,6 @@
+ #include "TXLabel.h"
+ #include "TXButton.h"
+ 
+-extern char buildtime[];
+ 
+ class InfoDialog : public TXDialog, public TXButtonCallback {
+ public:
+diff -urp -x '*~' -x '*.orig' unix/vncviewer/vncviewer.cxx unix/vncviewer/vncviewer.cxx
+--- unix/vncviewer/vncviewer.cxx	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncviewer/vncviewer.cxx	2009-11-05 20:24:22.966736321 -0800
+@@ -129,7 +129,6 @@
+ 
+ char aboutText[1024];
+ char* programName;
+-extern char buildtime[];
+ 
+ static void CleanupSignalHandler(int sig)
+ {
+@@ -271,7 +270,7 @@
+   bindtextdomain(PACKAGE_NAME, LOCALEDIR);
+   textdomain(PACKAGE_NAME);
+ 
+-  const char englishAbout[] = N_("TigerVNC Viewer for X version %s - built %s\n"
++  const char englishAbout[] = N_("TigerVNC Viewer for X version %s\n"
+ 				 "Copyright (C) 2002-2005 RealVNC Ltd.\n"
+ 				 "Copyright (C) 2000-2006 TightVNC Group\n"
+ 				 "Copyright (C) 2004-2009 Peter Astrand for Cendio AB\n"
+@@ -279,7 +278,7 @@
+ 
+   // Write about text to console, still using normal locale codeset
+   snprintf(aboutText, sizeof(aboutText),
+-	   gettext(englishAbout), PACKAGE_VERSION, buildtime);
++	   gettext(englishAbout), PACKAGE_VERSION);
+   fprintf(stderr,"\n%s\n", aboutText);
+ 
+   // Set gettext codeset to what our GUI toolkit uses. Since we are
+@@ -290,7 +289,7 @@
+ 
+   // Re-create the aboutText for the GUI, now using GUI codeset
+   snprintf(aboutText, sizeof(aboutText),
+-	   gettext(englishAbout), PACKAGE_VERSION, buildtime);
++	   gettext(englishAbout), PACKAGE_VERSION);
+ 
+   rfb::initStdIOLoggers();
+   rfb::LogWriter::setLogParams("*:stderr:30");
+diff -urp -x '*~' -x '*.orig' unix/x0vncserver/buildtime.c unix/x0vncserver/buildtime.c
+--- unix/x0vncserver/buildtime.c	2009-08-20 02:46:42.000000000 -0700
++++ unix/x0vncserver/buildtime.c	2009-11-05 09:51:42.545912551 -0800
+@@ -15,4 +15,3 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+  * USA.
+  */
+-char buildtime[] = __DATE__ " " __TIME__;
+diff -urp -x '*~' -x '*.orig' unix/x0vncserver/x0vncserver.cxx unix/x0vncserver/x0vncserver.cxx
+--- unix/x0vncserver/x0vncserver.cxx	2009-08-20 02:46:42.000000000 -0700
++++ unix/x0vncserver/x0vncserver.cxx	2009-11-05 20:19:59.935847191 -0800
+@@ -54,8 +54,6 @@
+ #include <sys/proto.h>
+ #endif
+ 
+-extern char buildtime[];
+-
+ using namespace rfb;
+ using namespace network;
+ 
+@@ -370,8 +368,7 @@
+ 
+ static void printVersion(FILE *fp)
+ {
+-  fprintf(fp, "TigerVNC Server version %s, built %s\n",
+-          PACKAGE_VERSION, buildtime);
++  fprintf(fp, "TigerVNC Server version %s\n", PACKAGE_VERSION);
+ }
+ 
+ static void usage()
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/vnc/buildtime.c unix/xserver/hw/vnc/buildtime.c
+--- unix/xserver/hw/vnc/buildtime.c	2009-08-20 02:46:42.000000000 -0700
++++ unix/xserver/hw/vnc/buildtime.c	2009-11-05 09:51:42.545361930 -0800
+@@ -15,4 +15,3 @@
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+  * USA.
+  */
+-char buildtime[] = __DATE__ " " __TIME__;
+diff -urp -x '*~' -x '*.orig' unix/xserver/hw/vnc/xvnc.cc unix/xserver/hw/vnc/xvnc.cc
+--- unix/xserver/hw/vnc/xvnc.cc	2009-08-20 02:46:42.000000000 -0700
++++ unix/xserver/hw/vnc/xvnc.cc	2009-11-05 09:51:42.545083912 -0800
+@@ -79,7 +79,6 @@ extern "C" {
+ #include "randrstr.h"
+ #endif /* RANDR */
+ #include <X11/keysym.h>
+-  extern char buildtime[];
+ #undef class
+ #undef public
+ }
+@@ -256,7 +255,7 @@ void ddxBeforeReset(void)
+ void 
+ ddxUseMsg()
+ {
+-    ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
++    ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
+     ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
+            VENDOR_STRING);
+     ErrorF("-screen scrn WxHxD     set screen's width, height, depth\n");
+@@ -1225,7 +1224,7 @@ static void vfbClientStateChange(Callbac
+ void
+ InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
+ {
+-  ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
++  ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
+   ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
+          VENDOR_STRING);
+     int i;
--- a/open-src/xserver/xvnc/vnc-nohttpd.patch	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/vnc-nohttpd.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -2,39 +2,40 @@
 http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-nohttpd.patch
 ## Modified to make httpd service off by default and only offered via -httpd
 
---- vnc-4_1_1-unixsrc/unix/vncserver.nohttpd	2005-08-08 15:51:09.000000000 +0100
-+++ vnc-4_1_1-unixsrc/unix/vncserver	2005-08-11 12:13:59.000000000 +0100
-@@ -58,6 +58,7 @@
+diff -urp -x '*~' -x '*.orig' unix/vncserver unix/vncserver
+--- unix/vncserver	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncserver	2009-08-31 03:21:53.656835000 -0700
+@@ -123,6 +123,7 @@ if ($defFontPath) {
  # Check command line options
  
  &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
 +              "-httpd",0,
- 	      "-help",0,"-h",0,"--help",0);
+ 	      "-help",0,"-h",0,"--help",0,"-fp",1);
  
  &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
-@@ -78,6 +79,12 @@
- if ($opt{'-pixelformat'}) {
-     $pixelformat = $opt{'-pixelformat'};
+@@ -147,6 +148,12 @@ if ($opt{'-fp'}) {
+     $fontPath = $opt{'-fp'};
+     $fpArgSpecified = 1;
  }
 +if ($opt{'-httpd'}) {
 +    $nohttpd = 0;
-+  }
++}
 +else {
 +    $nohttpd = 1;
 +}
  
  &CheckGeometryAndDepth();
  
-@@ -137,7 +144,7 @@
+@@ -212,7 +219,7 @@ if ($opt{'-name'}) {
  
- $cmd = "Xvnc :$displayNumber";
+ $cmd = $exedir."Xvnc :$displayNumber";
  $cmd .= " -desktop " . &quotedString($desktopName);
 -$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles);
 +$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd);
  $cmd .= " -auth $xauthorityFile";
  $cmd .= " -geometry $geometry" if ($geometry);
  $cmd .= " -depth $depth" if ($depth);
-@@ -413,7 +420,7 @@
+@@ -535,7 +542,7 @@ sub removeSlashes
  
  sub Usage
  {
@@ -42,11 +43,12 @@
 +    die("\nusage: $prog [:<number>] [-httpd] [-name <desktop-name>] [-depth <depth>]\n".
  	"                 [-geometry <width>x<height>]\n".
  	"                 [-pixelformat rgbNNN|bgrNNN]\n".
- 	"                 <Xvnc-options>...\n\n".
---- vnc-4_1_1-unixsrc/unix/vncserver.man.nohttpd	2005-08-11 12:17:46.000000000 +0100
-+++ vnc-4_1_1-unixsrc/unix/vncserver.man	2005-08-11 12:19:35.000000000 +0100
-@@ -77,6 +77,10 @@
- must be 8 bits deep.
+ 	"                 [-fp <font-path>]\n".
+diff -urp -x '*~' -x '*.orig' unix/vncserver.man unix/vncserver.man
+--- unix/vncserver.man	2009-08-20 02:46:42.000000000 -0700
++++ unix/vncserver.man	2009-08-31 03:21:53.663499000 -0700
+@@ -80,6 +80,10 @@ for the \-cc option may result in strang
+ must have an 8-bit depth.
  
  .TP
 +.B \-httpd
--- a/open-src/xserver/xvnc/vnc-paint.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-paint.patch
-with paths adjusted to match sources in tarball before files are moved
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.paint vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.paint	2008-03-06 14:54:52.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc	2008-03-06 14:56:54.000000000 +0100
-@@ -72,8 +72,6 @@ typedef struct {
- 
-   CloseScreenProcPtr           CloseScreen;
-   CreateGCProcPtr              CreateGC;
--  PaintWindowBackgroundProcPtr PaintWindowBackground;
--  PaintWindowBorderProcPtr     PaintWindowBorder;
-   CopyWindowProcPtr            CopyWindow;
-   ClearToBackgroundProcPtr     ClearToBackground;
-   RestoreAreasProcPtr          RestoreAreas;
-@@ -106,10 +104,6 @@ static DevPrivateKey vncHooksGCPrivateKe
- 
- static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen);
- static Bool vncHooksCreateGC(GCPtr pGC);
--static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
--                                          int what);
--static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
--                                      int what);
- static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
-                                RegionPtr pOldRegion);
- static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w,
-@@ -231,8 +225,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
- 
-   vncHooksScreen->CloseScreen = pScreen->CloseScreen;
-   vncHooksScreen->CreateGC = pScreen->CreateGC;
--  vncHooksScreen->PaintWindowBackground = pScreen->PaintWindowBackground;
--  vncHooksScreen->PaintWindowBorder = pScreen->PaintWindowBorder;
-   vncHooksScreen->CopyWindow = pScreen->CopyWindow;
-   vncHooksScreen->ClearToBackground = pScreen->ClearToBackground;
-   vncHooksScreen->RestoreAreas = pScreen->RestoreAreas;
-@@ -253,8 +245,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
- 
-   pScreen->CloseScreen = vncHooksCloseScreen;
-   pScreen->CreateGC = vncHooksCreateGC;
--  pScreen->PaintWindowBackground = vncHooksPaintWindowBackground;
--  pScreen->PaintWindowBorder = vncHooksPaintWindowBorder;
-   pScreen->CopyWindow = vncHooksCopyWindow;
-   pScreen->ClearToBackground = vncHooksClearToBackground;
-   pScreen->RestoreAreas = vncHooksRestoreAreas;
-@@ -297,8 +287,6 @@ static Bool vncHooksCloseScreen(int i, S
-   SCREEN_UNWRAP(pScreen_, CloseScreen);
- 
-   pScreen->CreateGC = vncHooksScreen->CreateGC;
--  pScreen->PaintWindowBackground = vncHooksScreen->PaintWindowBackground;
--  pScreen->PaintWindowBorder = vncHooksScreen->PaintWindowBorder;
-   pScreen->CopyWindow = vncHooksScreen->CopyWindow;
-   pScreen->ClearToBackground = vncHooksScreen->ClearToBackground;
-   pScreen->RestoreAreas = vncHooksScreen->RestoreAreas;
-@@ -333,38 +321,6 @@ static Bool vncHooksCreateGC(GCPtr pGC)
-   return ret;
- }
- 
--// PaintWindowBackground - changed region is the given region
--
--static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
--                                          int what)
--{
--  SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBackground);
--
--  RegionHelper changed(pScreen, pRegion);
--
--  (*pScreen->PaintWindowBackground) (pWin, pRegion, what);
--
--  vncHooksScreen->desktop->add_changed(changed.reg);
--
--  SCREEN_REWRAP(PaintWindowBackground);
--}
--
--// PaintWindowBorder - changed region is the given region
--
--static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
--                                      int what)
--{
--  SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder);
--
--  RegionHelper changed(pScreen, pRegion);
--
--  (*pScreen->PaintWindowBorder) (pWin, pRegion, what);
--
--  vncHooksScreen->desktop->add_changed(changed.reg);
--
--  SCREEN_REWRAP(PaintWindowBorder);
--}
--
- // CopyWindow - destination of the copy is the old region, clipped by
- // borderClip, translated by the delta.  This call only does the copy - it
- // doesn't affect any other bits.
-@@ -534,16 +490,9 @@ static void vncHooksValidateGC(GCPtr pGC
-   (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
-     
-   u.vncHooksGC->wrappedOps = 0;
--  if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr)pDrawable)->viewable) {
--    WindowPtr pWin = (WindowPtr)pDrawable;
--    RegionPtr pRegion = &pWin->clipList;
--
--    if (pGC->subWindowMode == IncludeInferiors)
--      pRegion = &pWin->borderClip;
--    if (REGION_NOTEMPTY(pDrawable->pScreen, pRegion)) {
--      u.vncHooksGC->wrappedOps = pGC->ops;
--      DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
--    }
-+  if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) {
-+    u.vncHooksGC->wrappedOps = pGC->ops;
-+    DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
-   }
- }
- 
--- a/open-src/xserver/xvnc/vnc-privates.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-privates.patch
-with paths adjusted to match sources in tarball before files are moved
-
---- a/unix/xc/programs/Xserver/vnc/vncHooks.cc	Mon Jan 21 17:29:11 2008 +0100
-+++ b/unix/xc/programs/Xserver/vnc/vncHooks.cc	Thu Jan 24 09:50:48 2008 +0100
-@@ -86,9 +86,15 @@ typedef struct {
-     GCOps *wrappedOps;
- } vncHooksGCRec, *vncHooksGCPtr;
- 
--static int vncHooksScreenIndex;
--static int vncHooksGCIndex;
-+static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey;
-+static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey;
- 
-+#define vncHooksScreenPrivate(scrn) \
-+	(vncHooksScreenPtr) dixLookupPrivate (&(scrn)->devPrivates, \
-+					      vncHooksScrPrivateKey)
-+#define vncHooksGCPrivate(pGC) \
-+	(vncHooksGCPtr) dixLookupPrivate (&(pGC)->devPrivates, \
-+					  vncHooksGCPrivateKey)
- 
- // screen functions
- 
-@@ -209,26 +215,11 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
-   if (vncHooksGeneration != serverGeneration) {
-     vncHooksGeneration = serverGeneration;
- 
--    vncHooksScreenIndex = AllocateScreenPrivateIndex();
--    if (vncHooksScreenIndex < 0) {
--      ErrorF("vncHooksInit: AllocateScreenPrivateIndex failed\n");
--      return FALSE;
--    }
--
--    vncHooksGCIndex = AllocateGCPrivateIndex();
--    if (vncHooksGCIndex < 0) {
--      ErrorF("vncHooksInit: AllocateGCPrivateIndex failed\n");
--      return FALSE;
--    }
--  }
--
--  if (!AllocateGCPrivate(pScreen, vncHooksGCIndex, sizeof(vncHooksGCRec))) {
--    ErrorF("vncHooksInit: AllocateGCPrivate failed\n");
--    return FALSE;
-+    if (!dixRequestPrivate (vncHooksGCPrivateKey, sizeof (vncHooksGCRec)))
-+	return FALSE;
-   }
- 
-   vncHooksScreen = (vncHooksScreenPtr)xnfalloc(sizeof(vncHooksScreenRec));
--  pScreen->devPrivates[vncHooksScreenIndex].ptr = (pointer)vncHooksScreen;
- 
-   vncHooksScreen->desktop = desktop;
- 
-@@ -266,6 +257,8 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
-   pScreen->DisplayCursor = vncHooksDisplayCursor;
-   pScreen->BlockHandler = vncHooksBlockHandler;
- 
-+  dixSetPrivate (&pScreen->devPrivates, vncHooksScrPrivateKey, vncHooksScreen);
-+
-   return TRUE;
- }
- 
-@@ -281,11 +274,10 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
- // distinct type, so it would have to use templates, and it's not worth that
- // much pain.
- 
--#define SCREEN_UNWRAP(scrn,field)                                         \
--  ScreenPtr pScreen = scrn;                                               \
--  vncHooksScreenPtr vncHooksScreen                                        \
--    = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \
--  pScreen->field = vncHooksScreen->field;                                 \
-+#define SCREEN_UNWRAP(scrn,field) \
-+  ScreenPtr pScreen = scrn; \
-+  vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (scrn); \
-+  pScreen->field = vncHooksScreen->field; \
-   DBGPRINT((stderr,"vncHooks" #field " called\n"));
- 
- #define SCREEN_REWRAP(field) pScreen->field = vncHooks##field;
-@@ -322,8 +314,7 @@ static Bool vncHooksCreateGC(GCPtr pGC)
- {
-   SCREEN_UNWRAP(pGC->pScreen, CreateGC);
-     
--  vncHooksGCPtr vncHooksGC
--    = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
-+  vncHooksGCPtr vncHooksGC = vncHooksGCPrivate (pGC);
- 
-   Bool ret = (*pScreen->CreateGC) (pGC);
- 
-@@ -507,7 +498,7 @@ class GCFuncUnwrapper {
- class GCFuncUnwrapper {
- public:
-   GCFuncUnwrapper(GCPtr pGC_) : pGC(pGC_) {
--    vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
-+    vncHooksGC = vncHooksGCPrivate (pGC);
-     pGC->funcs = vncHooksGC->wrappedFuncs;
-     if (vncHooksGC->wrappedOps)
-       pGC->ops = vncHooksGC->wrappedOps;
-@@ -592,7 +583,7 @@ public:
-   GCOpUnwrapper(DrawablePtr pDrawable, GCPtr pGC_)
-     : pGC(pGC_), pScreen(pDrawable->pScreen)
-   {
--    vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
-+    vncHooksGC = vncHooksGCPrivate (pGC);
-     oldFuncs = pGC->funcs;
-     pGC->funcs = vncHooksGC->wrappedFuncs;
-     pGC->ops = vncHooksGC->wrappedOps;
-@@ -611,8 +602,7 @@ public:
- #define GC_OP_UNWRAPPER(pDrawable, pGC, name)                             \
-   GCOpUnwrapper u(pDrawable, pGC);                                        \
-   ScreenPtr pScreen = (pDrawable)->pScreen;                               \
--  vncHooksScreenPtr vncHooksScreen                                        \
--    = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \
-+  vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen);	  \
-   DBGPRINT((stderr,"vncHooks" #name " called\n"));
- 
- 
-@@ -1511,8 +1501,7 @@ static void vncHooksComposite(CARD8 op, 
-                               INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
- {
-     ScreenPtr           pScreen = pDst->pDrawable->pScreen;
--    vncHooksScreenPtr vncHooksScreen = \
--        ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
-+    vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen);
-     PictureScreenPtr    ps = GetPictureScreen(pScreen);
-     BoxRec              box;
- 
-@@ -1534,8 +1523,7 @@ static void vncHooksGlyphs(CARD8 op, Pic
-                            GlyphListPtr list, GlyphPtr *glyphs)
- {
-     ScreenPtr           pScreen = pDst->pDrawable->pScreen;
--    vncHooksScreenPtr vncHooksScreen = \
--        ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
-+    vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen);
-     PictureScreenPtr    ps = GetPictureScreen(pScreen);
-     int                 x, y;
-     int                 n;
--- a/open-src/xserver/xvnc/vnc-render.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-## Patch originally from Fedora vnc-4.1.2-21.fc8 RPM - vnc-render.patch
-
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.render	2007-06-07 15:50:16.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc	2007-06-07 15:57:54.000000000 +0200
-@@ -20,6 +20,10 @@
- #include "XserverDesktop.h"
- #include "vncHooks.h"
- 
-+#ifdef HAVE_DIX_CONFIG_H
-+#include <dix-config.h>
-+#endif
-+
- extern "C" {
- #define class c_class
- #define private c_private
-@@ -29,6 +33,9 @@ extern "C" {
- #include "regionstr.h"
- #include "dixfontstr.h"
- #include "colormapst.h"
-+#ifdef RENDER
-+#include "../../render/picturestr.h"
-+#endif
- 
- #ifdef GC_HAS_COMPOSITE_CLIP
- #define COMPOSITE_CLIP(gc) ((gc)->pCompositeClip)
-@@ -74,6 +81,10 @@ typedef struct {
-   StoreColorsProcPtr           StoreColors;
-   DisplayCursorProcPtr         DisplayCursor;
-   ScreenBlockHandlerProcPtr    BlockHandler;
-+#ifdef RENDER
-+  CompositeProcPtr             Composite;
-+  GlyphsProcPtr                Glyphs;
-+#endif
- } vncHooksScreenRec, *vncHooksScreenPtr;
- 
- typedef struct {
-@@ -105,6 +116,15 @@ static Bool vncHooksDisplayCursor(Screen
- static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
-                                  pointer pReadmask);
- 
-+// RENDER support
-+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-+                              INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
-+                              INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-+
-+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
-+                           PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
-+                           GlyphListPtr list, GlyphPtr *glyphs);
-+
- // GC "funcs"
- 
- static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
-@@ -230,6 +250,16 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
-   vncHooksScreen->DisplayCursor = pScreen->DisplayCursor;
-   vncHooksScreen->BlockHandler = pScreen->BlockHandler;
- 
-+#ifdef RENDER
-+  PictureScreenPtr    ps = GetPictureScreenIfSet(pScreen);
-+  if (ps) {
-+    vncHooksScreen->Composite = ps->Composite;
-+    vncHooksScreen->Glyphs = ps->Glyphs;
-+    ps->Composite = vncHooksComposite;
-+    ps->Glyphs = vncHooksGlyphs;
-+  }
-+#endif
-+
-   pScreen->CloseScreen = vncHooksCloseScreen;
-   pScreen->CreateGC = vncHooksCreateGC;
-   pScreen->PaintWindowBackground = vncHooksPaintWindowBackground;
-@@ -1473,3 +1503,80 @@ static void vncHooksPushPixels(GCPtr pGC
- 
-   vncHooksScreen->desktop->add_changed(changed.reg);
- }
-+
-+#ifdef RENDER
-+#define RENDER_MAKE_BOX(pDrawable,X,Y,W,H) { \
-+    box.x1 = X + pDrawable->x; \
-+    box.x2 = X + pDrawable->x + W; \
-+    box.y1 = Y + pDrawable->y; \
-+    box.y2 = Y + pDrawable->y + H; \
-+}
-+
-+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
-+                              INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
-+                              INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
-+{
-+    ScreenPtr           pScreen = pDst->pDrawable->pScreen;
-+    vncHooksScreenPtr vncHooksScreen = \
-+        ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
-+    PictureScreenPtr    ps = GetPictureScreen(pScreen);
-+    BoxRec              box;
-+
-+    ps->Composite = vncHooksScreen->Composite;
-+    (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc,
-+                     xMask, yMask, xDst, yDst, width, height);
-+    ps->Composite = vncHooksComposite;
-+
-+    if (pDst->pDrawable->type == DRAWABLE_WINDOW) {
-+        RENDER_MAKE_BOX(pDst->pDrawable, xDst, yDst, width, height);
-+        RegionHelper changed(pScreen, &box, 0);
-+        vncHooksScreen->desktop->add_changed(changed.reg);
-+    }
-+}
-+
-+
-+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
-+                           PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
-+                           GlyphListPtr list, GlyphPtr *glyphs)
-+{
-+    ScreenPtr           pScreen = pDst->pDrawable->pScreen;
-+    vncHooksScreenPtr vncHooksScreen = \
-+        ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
-+    PictureScreenPtr    ps = GetPictureScreen(pScreen);
-+    int                 x, y;
-+    int                 n;
-+    GlyphPtr            glyph;
-+    BoxRec              box;
-+
-+    ps->Glyphs = vncHooksScreen->Glyphs;
-+    (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc,
-+                   nlist, list, glyphs);
-+    ps->Glyphs = vncHooksGlyphs;
-+
-+    if (pDst->pDrawable->type == DRAWABLE_WINDOW)
-+    {
-+        x = xSrc;
-+        y = ySrc;
-+        while (nlist--)
-+        {
-+            x += list->xOff;
-+            y += list->yOff;
-+            n = list->len;
-+            while (n--)
-+            {
-+                glyph = *glyphs++;
-+                RENDER_MAKE_BOX(pDst->pDrawable,
-+                                x - glyph->info.x, y - glyph->info.y,
-+                                glyph->info.width, glyph->info.height);
-+                RegionHelper changed(pScreen, &box, 0);
-+                vncHooksScreen->desktop->add_changed(changed.reg);
-+
-+                x += glyph->info.xOff;
-+                y += glyph->info.yOff;
-+            }
-+            list++;
-+        }
-+    }
-+}
-+#endif
-+
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.render	2007-06-07 15:49:32.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2007-06-07 15:49:32.000000000 +0200
-@@ -130,6 +130,7 @@ static vfbScreenInfo vfbScreens[MAXSCREE
- static Bool vfbPixmapDepths[33];
- static char needswap = 0;
- static int lastScreen = -1;
-+static Bool Render = TRUE;
- 
- static bool displaySpecified = false;
- static bool wellKnownSocketsCreated = false;
-@@ -221,6 +222,10 @@ extern "C" {
-            VENDOR_STRING);
-     ErrorF("-screen scrn WxHxD     set screen's width, height, depth\n");
-     ErrorF("-pixdepths list-of-int support given pixmap depths\n");
-+#ifdef RENDER
-+    ErrorF("+/-render             turn on/off RENDER extension support"
-+          "(default on)\n");
-+#endif
-     ErrorF("-linebias n            adjust thin line pixelization\n");
-     ErrorF("-blackpixel n          pixel value for black\n");
-     ErrorF("-whitepixel n          pixel value for white\n");
-@@ -317,6 +322,20 @@ int ddxProcessArgument(int argc, char *a
-     return ret;
-   }
- 
-+#ifdef RENDER
-+  if (strcmp (argv[i], "+render") == 0)        /* +render */
-+  {
-+    Render = TRUE;
-+    return 1;
-+  }
-+
-+  if (strcmp (argv[i], "-render") == 0)        /* -render */
-+  {
-+    Render = FALSE;
-+    return 1;
-+  }
-+#endif
-+
-   if (strcmp (argv[i], "-blackpixel") == 0)	/* -blackpixel n */
-   {
-     Pixel pix;
-@@ -817,7 +836,12 @@ static Bool vfbScreenInit(int index, Scr
-   if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-                     dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
-       return FALSE;
--#else
-+
-+#ifdef RENDER
-+  if (ret && Render)
-+      fbPictureInit(pScreen, 0, 0);
-+#endif /* RENDER */
-+#else /* VNC_USE_FB */
-   switch (pvfb->bitsPerPixel)
-   {
-   case 1:
-@@ -938,6 +962,19 @@ void InitOutput(ScreenInfo *screenInfo, 
-     vfbPixmapDepths[vfbScreens[i].depth] = TRUE;
-   }
- 
-+#ifdef RENDER
-+  /* RENDER needs a good set of pixmaps. */
-+  if (Render) {
-+      vfbPixmapDepths[1] = TRUE;
-+      vfbPixmapDepths[4] = TRUE;
-+      vfbPixmapDepths[8] = TRUE;
-+/*    vfbPixmapDepths[15] = TRUE; */
-+      vfbPixmapDepths[16] = TRUE;
-+      vfbPixmapDepths[24] = TRUE;
-+      vfbPixmapDepths[32] = TRUE;
-+  }
-+#endif
-+
-   for (i = 1; i <= 32; i++)
-   {
-     if (vfbPixmapDepths[i])
--- a/open-src/xserver/xvnc/vnc-restart.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-## Patch originally from Fedora - Revision 1.2 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-restart.patch
-
---- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.restart	2005-03-04 09:02:21.000000000 +0000
-+++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx	2005-03-04 09:03:05.000000000 +0000
-@@ -140,10 +140,14 @@
-   }
- 
-   // Attempt to connect to the remote host
--  if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
--    int e = errorNumber;
--    closesocket(sock);
--    throw SocketException("unable to connect to host", e);
-+  for (;;) {
-+    if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
-+      int e = errorNumber;
-+      if (e == EINTR)
-+        continue;
-+      closesocket(sock);
-+      throw SocketException("unable to connect to host", e);
-+    } else break;
-   }
- 
-   // Disable Nagle's algorithm, to reduce latency
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/vnc-samemachine-ipv6.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,58 @@
+From a99ce1b80c7fd3f0b611eb782dcda32ecd240d5f Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <[email protected]>
+Date: Fri, 30 Oct 2009 23:38:18 -0700
+Subject: [PATCH] Buffer overflow in TcpSocket::sameMachine for IPv6 connections
+
+Only enough room to write IPv4 addresses was being passed to
+getpeername & getsockname, but they could be used on IPv6 connections.
+
+If a connection was made to an IPv6 address, the call to getpeername
+would overwrite addrlen with the actual size of the IPv6 address, which
+would then be passed to getsockname as the space available to write the
+next address, which would cause it to overflow the stack.
+
+OpenSolaris bug report: http://defect.opensolaris.org/bz/show_bug.cgi?id=12366
+---
+ common/network/TcpSocket.cxx |   24 +++++++++++++++++++-----
+ 1 files changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
+index 7fd9c6a..93cdceb 100644
+--- a/common/network/TcpSocket.cxx
++++ b/common/network/TcpSocket.cxx
+@@ -293,13 +293,27 @@ char* TcpSocket::getPeerEndpoint() {
+ }
+ 
+ bool TcpSocket::sameMachine() {
+-  struct sockaddr_in peeraddr, myaddr;
+-  socklen_t addrlen = sizeof(struct sockaddr_in);
++  vnc_sockaddr_t peeraddr, myaddr;
++  socklen_t addrlen;
+ 
+-  getpeername(getFd(), (struct sockaddr *)&peeraddr, &addrlen);
+-  getsockname(getFd(), (struct sockaddr *)&myaddr, &addrlen);
++  addrlen = sizeof(peeraddr);
++  if (getpeername(getFd(), &peeraddr.u.sa, &addrlen) < 0)
++      throw SocketException ("unable to get peer address", errorNumber);
+ 
+-  return (peeraddr.sin_addr.s_addr == myaddr.sin_addr.s_addr);
++  addrlen = sizeof(myaddr); /* need to reset, since getpeername overwrote */
++  if (getsockname(getFd(), &myaddr.u.sa, &addrlen) < 0)
++      throw SocketException ("unable to get my address", errorNumber);
++
++  if (peeraddr.u.sa.sa_family != myaddr.u.sa.sa_family)
++      return false;
++
++#ifdef HAVE_GETADDRINFO
++  if (peeraddr.u.sa.sa_family == AF_INET6)
++      return IN6_ARE_ADDR_EQUAL(&peeraddr.u.sin6.sin6_addr,
++				&myaddr.u.sin6.sin6_addr);
++#endif
++
++  return (peeraddr.u.sin.sin_addr.s_addr == myaddr.u.sin.sin_addr.s_addr);
+ }
+ 
+ void TcpSocket::shutdown()
+-- 
+1.5.6.5
+
--- a/open-src/xserver/xvnc/vnc-scrollbars.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-scrollbars.patch
-
-diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.h
---- vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars	2008-03-14 12:44:19.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.h	2008-03-14 12:44:19.000000000 +0100
-@@ -77,7 +77,8 @@ private:
-   int xOff, yOff;
-   rfb::Timer bumpScrollTimer;
-   bool bumpScroll;
--  bool needScrollbars;
-+  bool needXScrollbar;
-+  bool needYScrollbar;
-   int bumpScrollX, bumpScrollY;
- };
- #endif
-diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx
---- vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars	2008-03-14 12:44:19.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx	2008-03-14 13:08:30.000000000 +0100
-@@ -25,7 +25,8 @@
- TXViewport::TXViewport(Display* dpy_, int w, int h, TXWindow* parent_)
-   : TXWindow(dpy_, w, h, parent_), child(0), hScrollbar(0),
-     vScrollbar(0), scrollbarSize(15), xOff(0), yOff(0), bumpScrollTimer(this),
--    bumpScroll(false), needScrollbars(false), bumpScrollX(0), bumpScrollY(0)
-+    bumpScroll(false), needXScrollbar(false), needYScrollbar(false),
-+    bumpScrollX(0), bumpScrollY(0)
- {
-   clipper = new TXWindow(dpy, width()-scrollbarSize, height()-scrollbarSize,
-                          this);
-@@ -132,13 +133,23 @@ bool TXViewport::handleTimeout(rfb::Time
- 
- void TXViewport::resizeNotify()
- {
--  needScrollbars = (!bumpScroll &&
--                    (width() < child->width() || height() < child->height()) &&
--                    (width() > scrollbarSize && height() > scrollbarSize));
--  if (needScrollbars) {
-+  needXScrollbar = (!bumpScroll && width() < child->width() &&
-+		    height() > scrollbarSize && width() > scrollbarSize);
-+  needYScrollbar = (!bumpScroll && height() < child->height() &&
-+		    height() > scrollbarSize && width() > scrollbarSize);
-+
-+  if (needXScrollbar && needYScrollbar) {
-     clipper->resize(width()-scrollbarSize, height()-scrollbarSize);
-     hScrollbar->map();
-     vScrollbar->map();
-+  } else if (needXScrollbar) {
-+    clipper->resize(width(), height()-scrollbarSize);
-+    hScrollbar->map();
-+    vScrollbar->unmap();
-+  } else if (needYScrollbar) {
-+    clipper->resize(width()-scrollbarSize, height());
-+    hScrollbar->unmap();
-+    vScrollbar->map();
-   } else {
-     clipper->resize(width(), height());
-     hScrollbar->unmap();
-@@ -147,10 +158,13 @@ void TXViewport::resizeNotify()
- 
-   setOffset(xOff, yOff);
- 
--  if (needScrollbars) {
-+  if (needXScrollbar) {
-     hScrollbar->move(0, height()-scrollbarSize);
-     hScrollbar->resize(width()-scrollbarSize, scrollbarSize);
-     hScrollbar->set(child->width(), -xOff, width()-scrollbarSize);
-+  }
-+
-+  if (needYScrollbar) {
-     vScrollbar->move(width()-scrollbarSize, 0);
-     vScrollbar->resize(scrollbarSize, height()-scrollbarSize);
-     vScrollbar->set(child->height(), -yOff, height()-scrollbarSize);
--- a/open-src/xserver/xvnc/vnc-selections.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-selections.patch
-with paths adjusted to match sources in tarball before files are moved
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.selections vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.selections	2008-03-10 15:34:24.000000000 +0100
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc	2008-03-11 10:55:44.000000000 +0100
-@@ -62,11 +62,9 @@ extern "C" {
-   static void SendSelectionChangeEvent(Atom selection);
-   static int ProcVncExtDispatch(ClientPtr client);
-   static int SProcVncExtDispatch(ClientPtr client);
-+  static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args);
- 
-   extern char *display;
--
--  extern Selection *CurrentSelections;
--  extern int NumCurrentSelections;
- }
- 
- using namespace rfb;
-@@ -99,7 +97,6 @@ struct VncInputSelect {
-   VncInputSelect* next;
- };
- 
--static int nPrevSelections = 0;
- static TimeStamp* prevSelectionTimes = 0;
- 
- static int vncErrorBase = 0;
-@@ -147,6 +144,10 @@ void vncExtensionInit()
-     FatalError("AddCallback failed\n");
-   }
- 
-+  if (!AddCallback(&SelectionCallback, vncSelectionCallback, 0)) {
-+    FatalError("Add selection callback failed\n");
-+  }
-+
-   try {
-     if (!initialised) {
-       rfb::initStdIOLoggers();
-@@ -212,6 +213,14 @@ static void vncResetProc(ExtensionEntry*
- {
- }
- 
-+static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args)
-+{
-+  SelectionInfoRec *info = (SelectionInfoRec *) args;
-+  Selection *selection = info->selection;
-+
-+  SendSelectionChangeEvent(selection->selection);
-+}
-+
- //
- // vncBlockHandler - called just before the X server goes into select().  Call
- // on to the block handler for each desktop.  Then check whether any of the
-@@ -227,27 +236,6 @@ static void vncBlockHandler(pointer data
-       desktop[scr]->blockHandler(fds);
-     }
-   }
--
--  if (nPrevSelections != NumCurrentSelections) {
--    prevSelectionTimes
--      = (TimeStamp*)xnfrealloc(prevSelectionTimes,
--                               NumCurrentSelections * sizeof(TimeStamp));
--    for (int i = nPrevSelections; i < NumCurrentSelections; i++) {
--      prevSelectionTimes[i].months = 0;
--      prevSelectionTimes[i].milliseconds = 0;
--    }
--    nPrevSelections = NumCurrentSelections;
--  }
--  for (int i = 0; i < NumCurrentSelections; i++) {
--    if (CurrentSelections[i].lastTimeChanged.months
--        != prevSelectionTimes[i].months ||
--        CurrentSelections[i].lastTimeChanged.milliseconds
--        != prevSelectionTimes[i].milliseconds)
--    {
--      SendSelectionChangeEvent(CurrentSelections[i].selection);
--      prevSelectionTimes[i] = CurrentSelections[i].lastTimeChanged;
--    }
--  }
- }
- 
- static void vncWakeupHandler(pointer data, int nfds, pointer readmask)
--- a/open-src/xserver/xvnc/vnc-use-fb.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-## Patch originally from Fedora - Revision 1.5 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-use-fb.patch
-
-Makes Xvnc use fb instead of the older cfb*/mfb libraries.
-
-diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
---- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb	2006-05-12 18:50:32.000000000 +0200
-+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc	2008-07-16 13:28:27.000000000 +0200
-@@ -48,8 +48,12 @@ extern "C" {
- #include "X11/Xos.h"
- #include "scrnintstr.h"
- #include "servermd.h"
-+#ifdef VNC_USE_FB
-+#include "fb.h"
-+#else
- #define PSZ 8
- #include "cfb.h"
-+#endif
- #include "mi.h"
- #include "mibstore.h"
- #include "colormapst.h"
-@@ -73,6 +77,7 @@ extern "C" {
- #undef public
- #undef xor
- #undef and
-+#ifndef VNC_USE_FB
-   extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-   extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-   extern Bool cfb16CreateGC(GCPtr);
-@@ -83,6 +88,7 @@ extern "C" {
-                             unsigned long, char*);
-   extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
-                             unsigned long, char*);
-+#endif
- }
- 
- #define XVNCVERSION "Free Edition 4.1.2"
-@@ -482,7 +488,7 @@ CARD32 GetTimeInMillis()
- }
- #endif
- 
--
-+#ifndef VNC_USE_FB
- static Bool vfbMultiDepthCreateGC(GCPtr   pGC)
- {
-   switch (vfbBitsPerPixel(pGC->depth))
-@@ -541,6 +547,7 @@ vfbMultiDepthGetImage(DrawablePtr pDrawa
-     break;
-   }
- }
-+#endif
- 
- static ColormapPtr InstalledMaps[MAXSCREENS];
- 
-@@ -811,6 +818,11 @@ static Bool vfbScreenInit(int index, Scr
-   defaultColorVisualClass
-     = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
- 
-+#ifdef VNC_USE_FB
-+  if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-+                    dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
-+      return FALSE;
-+#else
-   switch (pvfb->bitsPerPixel)
-   {
-   case 1:
-@@ -838,6 +850,7 @@ static Bool vfbScreenInit(int index, Scr
-   pScreen->CreateGC = vfbMultiDepthCreateGC;
-   pScreen->GetImage = vfbMultiDepthGetImage;
-   pScreen->GetSpans = vfbMultiDepthGetSpans;
-+#endif
- 
-   pScreen->InstallColormap = vfbInstallColormap;
-   pScreen->UninstallColormap = vfbUninstallColormap;
-@@ -883,6 +896,9 @@ static Bool vfbScreenInit(int index, Scr
-     }
-   }
- 
-+#ifdef VNC_USE_FB
-+  ret = fbCreateDefColormap(pScreen);
-+#else
-   if (pvfb->bitsPerPixel == 1)
-   {
-     ret = mfbCreateDefColormap(pScreen);
-@@ -891,6 +907,7 @@ static Bool vfbScreenInit(int index, Scr
-   {
-     ret = cfbCreateDefColormap(pScreen);
-   }
-+#endif
- 
-   miSetZeroLineBias(pScreen, pvfb->lineBias);
- 
--- a/open-src/xserver/xvnc/vnc-viewerIPv6.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-## Patch from Fedora - Revision 1.2 of
-## http://cvs.fedoraproject.org/viewcvs/rpms/vnc/devel/vnc-viewerIPv6.patch
-
-diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am
---- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6	2008-05-29 17:53:53.000000000 +0200
-+++ vnc-4_1_2-unixsrc/common/network/Makefile.am	2008-05-29 17:53:53.000000000 +0200
-@@ -1,5 +1,7 @@
- noinst_LTLIBRARIES = libnetwork.la
- 
-+libnetwork_la_CPPFLAGS = -DHAVE_IPV6
-+
- libnetwork_la_SOURCES = \
- 	Socket.h \
- 	TcpSocket.cxx \
-diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx
---- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6	2008-05-29 17:53:53.000000000 +0200
-+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx	2008-05-29 18:18:28.000000000 +0200
-@@ -109,50 +109,100 @@ TcpSocket::TcpSocket(int sock, bool clos
- TcpSocket::TcpSocket(const char *host, int port)
-   : closeFd(true)
- {
--  int sock;
-+  int sock, err, family, ret;
-+  size_t addrlen;
-+  struct sockaddr_storage addr;
-+#ifdef HAVE_IPV6
-+  struct addrinfo *hostai, *current, hints;
-+  char errstr[256];
-+#endif
- 
-   // - Create a socket
-   initSockets();
--  if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
--    throw SocketException("unable to create socket", errorNumber);
- 
--#ifndef WIN32
--  // - By default, close the socket on exec()
--  fcntl(sock, F_SETFD, FD_CLOEXEC);
--#endif
-+#ifdef HAVE_IPV6
-+  memset(&hints, 0, sizeof(struct addrinfo));
-+  hints.ai_family = AF_UNSPEC;
-+  hints.ai_socktype = SOCK_STREAM;
-+  hints.ai_canonname = NULL;
-+  hints.ai_addr = NULL;
-+  hints.ai_next = NULL;
-+
-+  if (getaddrinfo(host, NULL, &hints, &hostai) != 0) {
-+    err = errorNumber;
-+    if (snprintf(errstr, 256, "unable resolve host by name (%s)",
-+	gai_strerror(err)) < 0)
-+      throw Exception("unable resolve host by name");
-+    throw Exception(errstr);
-+  }
-+
-+  for (current = hostai; current != NULL; current = hostai->ai_next) {
-+    family = current->ai_family;
-+    if (family != AF_INET && family != AF_INET6)
-+      continue;
-+
-+    addrlen = current->ai_addrlen;
-+    memcpy(&addr, current->ai_addr, addrlen);
-+
-+    if (family == AF_INET)
-+      ((struct sockaddr_in *)&addr)->sin_port = htons(port);
-+    else
-+      ((struct sockaddr_in6 *)&addr)->sin6_port = htons(port);
- 
--  // - Connect it to something
-+#else
-+    family = AF_INET;
-+    addrlen = sizeof(struct sockaddr_in);
- 
--  // Try processing the host as an IP address
--  struct sockaddr_in addr;
--  memset(&addr, 0, sizeof(addr));
--  addr.sin_family = AF_INET;
--  addr.sin_addr.s_addr = inet_addr(host);
--  addr.sin_port = htons(port);
--  if ((int)addr.sin_addr.s_addr == -1) {
--    // Host was not an IP address - try resolving as DNS name
--    struct hostent *hostinfo;
--    hostinfo = gethostbyname(host);
--    if (hostinfo && hostinfo->h_addr) {
--      addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr;
--    } else {
--      int e = errorNumber;
--      closesocket(sock);
--      throw SocketException("unable to resolve host by name", e);
-+    // Try processing the host as an IP address
-+    memset(&addr, 0, addrlen);
-+    addr.sin_family = AF_INET;
-+    addr.sin_addr.s_addr = inet_addr(host);
-+    addr.sin_port = htons(port);
-+    if ((int)addr.sin_addr.s_addr == -1) {
-+      // Host was not an IP address - try resolving as DNS name
-+      struct hostent *hostinfo;
-+      hostinfo = gethostbyname(host);
-+      if (hostinfo && hostinfo->h_addr) {
-+	addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr;
-+      } else {
-+	err = errorNumber;
-+	strcpy(errstr, "unable to resolve host by name");
-+	goto socket_fail;
-+      }
-+    }
-+#endif
-+    sock = socket (family, SOCK_STREAM, 0);
-+    if (sock == -1) {
-+      err = errno;
-+      strcpy(errstr, "unable to create socket");
-+      goto socket_fail;
-     }
--  }
- 
--  // Attempt to connect to the remote host
--  for (;;) {
--    if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
--      int e = errorNumber;
--      if (e == EINTR)
--        continue;
-+    // Attempt to connect to the remote host
-+    while ((ret = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) {
-+      err = errorNumber;
-+      if (err == EINTR)
-+	continue;
-       closesocket(sock);
--      throw SocketException("unable to connect to host", e);
--    } else break;
-+      break;
-+    }
-+#ifdef HAVE_IPV6
-+    if (ret == 0)
-+      break;
-+    else
-+      continue;
-+  }
-+#endif
-+  if (ret == -1) {
-+    strcpy(errstr, "unable to connect to host");
-+    goto socket_fail;
-   }
- 
-+#ifndef WIN32
-+  // - By default, close the socket on exec()
-+  fcntl(sock, F_SETFD, FD_CLOEXEC);
-+#endif
-+
-   // Disable Nagle's algorithm, to reduce latency
-   enableNagles(sock, false);
- 
-@@ -160,6 +210,14 @@ TcpSocket::TcpSocket(const char *host, i
-   instream = new FdInStream(sock);
-   outstream = new FdOutStream(sock);
-   ownStreams = true;
-+
-+  return;
-+
-+socket_fail:
-+#ifdef HAVE_IPV6
-+  freeaddrinfo(hostai);
-+#endif
-+  throw SocketException(errstr, err);
- }
- 
- TcpSocket::~TcpSocket() {
--- a/open-src/xserver/xvnc/vnc-vncpasswd.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-vncpasswd.patch
-
-Fixes vncpasswd crash (Red Hat bug #160471).
-https://bugzilla.redhat.com/show_bug.cgi?id=160471
-http://www.realvnc.com/pipermail/vnc-list/2005-June/051429.html
-
---- vnc-4_1_1-unixsrc/common/rfb/Password.cxx.vncpasswd	2005-06-27 15:08:30.000000000 +0100
-+++ vnc-4_1_1-unixsrc/common/rfb/Password.cxx	2005-06-27 15:18:28.000000000 +0100
-@@ -38,6 +38,9 @@
- PlainPasswd::PlainPasswd(char* pwd) : CharArray(pwd) {
- }
- 
-+PlainPasswd::PlainPasswd(int len) : CharArray(len) {
-+}
-+
- PlainPasswd::PlainPasswd(const ObfuscatedPasswd& obfPwd) : CharArray(9) {
-   if (obfPwd.length < 8)
-     throw rdr::Exception("bad obfuscated password length");
---- vnc-4_1_1-unixsrc/common/rfb/Password.h.vncpasswd	2005-06-27 15:18:46.000000000 +0100
-+++ vnc-4_1_1-unixsrc/common/rfb/Password.h	2005-06-27 15:18:56.000000000 +0100
-@@ -28,6 +28,7 @@
-   public:
-     PlainPasswd();
-     PlainPasswd(char* pwd);
-+    PlainPasswd(int l);
-     PlainPasswd(const ObfuscatedPasswd& obfPwd);
-     ~PlainPasswd();
-     void replaceBuf(char* b);
--- a/open-src/xserver/xvnc/vnc-vsnprintf.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-## Patch originally from Fedora - Revision 1.1 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-vsnprintf.patch
-
-Needed to prevent crash when Xprintf calls vsnprintf with NULL string/0 length
-to measure length of text (Sun bug 6833541).
-
---- vnc-4_1_2-unixsrc/common/rfb/Logger.cxx.vsnprintf	2007-02-26 12:29:25.000000000 +0100
-+++ vnc-4_1_2-unixsrc/common/rfb/Logger.cxx	2007-02-26 12:30:03.000000000 +0100
-@@ -34,7 +34,7 @@
- 
- using namespace rfb;
- 
--#ifndef HAVE_VSNPRINTF
-+/*#ifndef HAVE_VSNPRINTF
- #ifdef __RFB_THREADING_IMPL
- static Mutex fpLock;
- #endif
-@@ -63,7 +63,7 @@
-   return len;
- }
- #endif
--
-+*/
- 
- Logger* Logger::loggers = 0;
- 
--- a/open-src/xserver/xvnc/vnc-xorg.patch	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-## Patch originally from Fedora - Revision 1.4 of:
-http://cvs.fedoraproject.org/viewvc/rpms/vnc/devel/vnc-xorg.patch
-## Updated to apply to Xorg 1.5.99.901
-
-diff -urp -x '*~' -x '*.orig'  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac
----  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac	2009-01-23 17:12:07.905592000 -0800
-+++  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac	2009-01-23 17:16:49.289083000 -0800
-@@ -29,7 +29,6 @@ AC_PREREQ(2.57)
- AC_INIT([xorg-server], 1.5.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
- AC_CONFIG_SRCDIR([Makefile.am])
- AM_INIT_AUTOMAKE([dist-bzip2 foreign])
--AM_MAINTAINER_MODE
- 
- dnl this gets generated by autoheader, and thus contains all the defines.  we
- dnl don't ever actually use it, internally.
-@@ -1272,6 +1271,9 @@ if test "x$XVFB" = xyes; then
- 	AC_SUBST([XVFB_SYS_LIBS])
- fi
- 
-+dnl Xvnc DDX
-+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"])
-+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"])
- 
- dnl Xnest DDX
- 
-@@ -1926,6 +1928,7 @@ hw/dmx/input/Makefile
- hw/dmx/glxProxy/Makefile
- hw/dmx/Makefile
- hw/vfb/Makefile
-+hw/vnc/Makefile
- hw/xnest/Makefile
- hw/xwin/Makefile
- hw/xquartz/Makefile
-diff -urp -x '*~' -x '*.orig'  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am
----  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am	2008-10-12 16:18:43.000000000 -0700
-+++  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am	2009-01-23 17:16:49.414933000 -0800
-@@ -33,7 +33,8 @@ SUBDIRS =			\
- 	$(XNEST_SUBDIRS)	\
- 	$(DMX_SUBDIRS)		\
- 	$(KDRIVE_SUBDIRS)	\
--	$(XQUARTZ_SUBDIRS)
-+	$(XQUARTZ_SUBDIRS)	\
-+	vnc
- 
- DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive
- 
-diff -urp -x '*~' -x '*.orig'  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c
----  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c	2009-01-23 17:12:07.969104000 -0800
-+++  vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c	2009-01-23 17:16:49.493023000 -0800
-@@ -219,6 +219,7 @@ extern void XInputExtensionInit(INITARGS
- extern void XTestExtensionInit(INITARGS);
- #endif
- extern void BigReqExtensionInit(INITARGS);
-+extern void vncExtensionInit(INITARGS);
- #ifdef SCREENSAVER
- extern void ScreenSaverExtensionInit (INITARGS);
- #endif
-@@ -432,6 +433,7 @@ InitExtensions(int argc, char *argv[])
-     if (!noTestExtensions) XTestExtensionInit();
- #endif
-     BigReqExtensionInit();
-+    vncExtensionInit();
- #if defined(SCREENSAVER)
-     if (!noScreenSaverExtension) ScreenSaverExtensionInit ();
- #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/vncserver-urandom.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,36 @@
+--- unix/vncserver	2009-11-05 20:00:59.601018622 -0800
++++ unix/vncserver	2009-11-05 20:16:46.059095655 -0800
+@@ -196,16 +196,25 @@
+ $desktopLog = "$vncUserDir/$host:$displayNumber.log";
+ unlink($desktopLog);
+ 
+-# Make an X server cookie - use as the seed the sum of the current time, our
+-# PID and part of the encrypted form of the password.  Ideally we'd use
+-# /dev/urandom, but that's only available on Linux.
+-
+-srand(time+$$+unpack("L",`cat $vncUserDir/passwd`));
+-$cookie = "";
+-for (1..16) {
++# Make an X server cookie - use /dev/urandom on systems that have it,
++# otherwise use perl's random number generator, seeded with the sum
++# of the current time, our PID and part of the encrypted form of the password.
++
++my $cookie = "";
++if (open(URANDOM, '<', '/dev/urandom')) {
++  my $randata;
++  if (sysread(URANDOM, $randata, 16) == 16) {
++    $cookie = unpack 'h*', $randata;
++  }
++  close(URANDOM);
++}
++if ($cookie eq "") {
++  srand(time+$$+unpack("L",`cat $vncUserDir/passwd`));
++  for (1..16) {
+     $cookie .= sprintf("%02x", int(rand(256)) % 256);
++  }
+ }
+-    
++
+ system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
+ system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); 
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/vncviewer-connect.patch	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,19 @@
+Use salen for socket length argument to connect()
+
+Needed on Solaris to stop connect() from returning EINVAL for invalid
+socket length when starting vncviewer.
+
+[Submitted to [email protected] on Oct 29 2009,
+ applied to svn by atkac on Oct 30 in rev 3917]
+
+--- tigervnc-1.0.0/common/network/TcpSocket.cxx	Thu Aug 20 02:46:42 2009
++++ tigervnc-1.0.0/common/network/TcpSocket.cxx	Thu Oct 29 20:12:25 2009
+@@ -188,7 +188,7 @@
+     }
+ 
+   /* Attempt to connect to the remote host */
+-    while ((result = connect(sock, &sa.u.sa, sizeof(sa))) == -1) {
++    while ((result = connect(sock, &sa.u.sa, salen)) == -1) {
+       err = errorNumber;
+ #ifndef WIN32
+       if (err == EINTR)
--- a/open-src/xserver/xvnc/xvnc-inetd.xml	Fri Oct 30 20:53:57 2009 -0700
+++ b/open-src/xserver/xvnc/xvnc-inetd.xml	Fri Nov 06 14:06:00 2009 -0800
@@ -3,7 +3,8 @@
 <!--
     Service manifest for the Xvnc service, when run from inetd(1M)
 
-    Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+    Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+    Use is subject to license terms.
 
     Permission is hereby granted, free of charge, to any person obtaining a
     copy of this software and associated documentation files (the
@@ -55,7 +56,7 @@
 	<exec_method
 		type='method'
 		name='inetd_start'
-		exec='/usr/X11/bin/Xvnc -inetd -query localhost -once securitytypes=none'
+		exec='/usr/bin/Xvnc -inetd -query localhost -once securitytypes=none'
 		timeout_seconds='0'>
 		<method_context>
 			<method_credential user='noaccess' group='noaccess' />
@@ -94,7 +95,7 @@
 		</common_name>
 		<documentation>
 			<manpage title='Xvnc' section='1' 
-				manpath='/usr/X11/share/man' />
+				manpath='/usr/share/man' />
 		</documentation>
 	</template>
 </service>
--- a/packages/SUNWvncviewer/pkginfo.tmpl	Fri Oct 30 20:53:57 2009 -0700
+++ b/packages/SUNWvncviewer/pkginfo.tmpl	Fri Nov 06 14:06:00 2009 -0800
@@ -1,6 +1,7 @@
 ##########################################################################
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the
@@ -29,7 +30,7 @@
 #
 ##########################################################################
 #
-# ident "%Z%%M% %I%     %E% SMI"
+# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 PKG="SUNWvncviewer"
@@ -37,7 +38,7 @@
 ARCH="ISA"
 VERSION=0.1,REV=0.2000.02.02
 CATEGORY="system"
-DESC="VNC client based on the RealVNC open source release that displays a session over RFB protocol from a VNC server"
+DESC="VNC client based on the TigerVNC open source release that displays a session over RFB protocol from a VNC server"
 BASEDIR="/usr"
 VENDOR="Sun Microsystems, Inc."
 HOTLINE="Please contact your local service provider"
@@ -47,4 +48,4 @@
 SUNW_PRODNAME="X.Org Foundation X11 for Solaris"
 SUNW_PRODVERS=1.0
 SUNW_PKGTYPE=usr
-CLASSES=none
\ No newline at end of file
+CLASSES=none
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/SUNWxvnc/depend_com	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,44 @@
+##########################################################################
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+##########################################################################
+#
+# ident	"@(#)depend_com	1.3	09/11/06 SMI"
+#
+# Xvnc server for Solaris
+
+P SUNWesu	Extended System Utilities
+P SUNWxwfnt	X Window System Fonts
+P SUNWxwfsw	X Window System platform required font software
+P SUNWlibms	Sun Compilers Bundled shared libm
+P SUNWzlib	The Zip compression library
+P SUNWxorg-xkb	X.org Foundation Xserver keyboard layouts
+P SUNWxorg-clientlibs	X.Org Foundation X Client Libraries
+P SUNWlibC 	Sun Compilers Bundled libC
--- a/packages/SUNWxvnc/depend_i386	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-##########################################################################
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-#
-##########################################################################
-#
-# ident "@(#)depend_i386 1.2     07/11/02 SMI"
-#
-# X.Org Foundation X server for Solaris
-
-P SUNWcsr	Core Solaris, (Root)
-P SUNWcsu	Core Solaris, (Usr)
-P SUNWcsl	Core Solaris, (Shared Libs)
-P SUNWcslr	Core Solaris Libraries (Root)
-P SUNWesu	Extended System Utilities
-P SUNWxwfnt	X Window System Fonts
-P SUNWxwfsw	X Window System platform required font software
-P SUNWlibms	Sun Compilers Bundled shared libm
-P SUNWzlib	The Zip compression library
-P SUNWxorg-xkb	X.org Foundation Xserver keyboard layouts
-P SUNWxwplt	X Window System platform software
-P SUNWxorg-clientlibs	X.Org Foundation X Client Libraries
-P SUNWlibC 	Sun Compilers Bundled libC
-P SUNWxorg-mesa Xorg Server Mesa Modules and Libraries
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/SUNWxvnc/depend_i386.tmpl	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,42 @@
+##########################################################################
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+##########################################################################
+#
+# ident	"@(#)depend_i386.tmpl	1.3	09/11/06 SMI"
+#
+# Xvnc server for Solaris & OpenSolaris
+
+# x86-specific platform specific dependencies:
+P SUNWxorg-mesa Xorg Server Mesa Modules and Libraries
+
+include ../depend
+
+include depend_com
--- a/packages/SUNWxvnc/depend_sparc	Fri Oct 30 20:53:57 2009 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-##########################################################################
-#
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, and/or sell copies of the Software, and to permit persons
-# to whom the Software is furnished to do so, provided that the above
-# copyright notice(s) and this permission notice appear in all copies of
-# the Software and that both the above copyright notice(s) and this
-# permission notice appear in supporting documentation.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-# Except as contained in this notice, the name of a copyright holder
-# shall not be used in advertising or otherwise to promote the sale, use
-# or other dealings in this Software without prior written authorization
-# of the copyright holder.
-#
-##########################################################################
-#
-# ident "@(#)depend_sparc 1.2     07/11/02 SMI"
-#
-# X.Org Foundation X server for Solaris
-
-P SUNWcsr	Core Solaris, (Root)
-P SUNWcsu	Core Solaris, (Usr)
-P SUNWcsl	Core Solaris, (Shared Libs)
-P SUNWcslr	Core Solaris Libraries (Root)
-P SUNWesu	Extended System Utilities
-P SUNWxwfnt	X Window System Fonts
-P SUNWxwfsw	X Window System platform required font software
-P SUNWlibms	Sun Compilers Bundled shared libm
-P SUNWzlib	The Zip compression library
-P SUNWxorg-xkb	X.org Foundation Xserver keyboard layouts
-P SUNWxwplt	X Window System platform software
-P SUNWxorg-clientlibs	X.Org Foundation X Client Libraries
-P SUNWlibC 	Sun Compilers Bundled libC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/SUNWxvnc/depend_sparc.tmpl	Fri Nov 06 14:06:00 2009 -0800
@@ -0,0 +1,41 @@
+##########################################################################
+#
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+##########################################################################
+#
+# ident	"@(#)depend_sparc.tmpl	1.1	09/11/06 SMI"
+#
+# Xvnc server for Solaris & OpenSolaris
+
+# SPARC-specific platform specific dependencies:  none
+
+include ../depend
+
+include depend_com
--- a/packages/SUNWxvnc/pkginfo.tmpl	Fri Oct 30 20:53:57 2009 -0700
+++ b/packages/SUNWxvnc/pkginfo.tmpl	Fri Nov 06 14:06:00 2009 -0800
@@ -1,6 +1,7 @@
 ##########################################################################
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the
@@ -29,7 +30,7 @@
 #
 ##########################################################################
 #
-# ident "@(#)pkginfo.tmpl 1.1     07/10/10 SMI"
+# ident	"@(#)pkginfo.tmpl	1.2	09/11/06 SMI"
 #
 
 PKG="SUNWxvnc"
@@ -37,7 +38,7 @@
 ARCH="ISA"
 VERSION=0.1,REV=0.2000.02.02
 CATEGORY="system"
-DESC="X Window System server based on X.Org Foundation open source release and RealVNC open source release that displays over RFB protocol to a VNC client"
+DESC="X Window System server based on X.Org Foundation open source release and TigerVNC open source release that displays over RFB protocol to a VNC client"
 BASEDIR="/usr"
 VENDOR="Sun Microsystems, Inc."
 HOTLINE="Please contact your local service provider"
--- a/packages/SUNWxvnc/prototype_com	Fri Oct 30 20:53:57 2009 -0700
+++ b/packages/SUNWxvnc/prototype_com	Fri Nov 06 14:06:00 2009 -0800
@@ -1,6 +1,7 @@
 ###########################################################################
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the
@@ -29,7 +30,7 @@
 #
 ###########################################################################
 #
-# ident "@(#)prototype_com 1.2     07/10/10 SMI"
+# ident	"@(#)prototype_com	1.3	09/11/06 SMI"
 #
 # Xvnc server for Solaris
 
@@ -39,30 +40,29 @@
 i copyright
 
 d none X11 0755 root bin
-
-!search $HOME/X11/$XSERVERBINDIR
-d none X11/bin 				0755 root bin
-f none X11/bin/Xvnc			2555 root root
-
-!search $HOME/X11/share/man/man1
-s none X11/man=share/man
-d none X11/share 			0755 root bin
-d none X11/share/man 			0755 root bin
-d none X11/share/man/man1 		0755 root bin
-f none X11/share/man/man1/Xvnc.1	0444 root bin
+d none X11/bin				0755 root bin
+s none X11/bin/Xvnc=../../bin/Xvnc
 
 !search $HOME/bin
 d none bin				0755 root bin
 f none bin/vncconfig			0555 root bin
 f none bin/vncpasswd			0555 root bin
 f none bin/vncserver			0555 root bin
+f none bin/x0vncserver			0555 root bin
 
-!search $HOME/share/vnc		
+!search $HOME/X11/$XSERVERBINDIR
+f none bin/Xvnc				2555 root root
+
+!search $HOME/share/vnc/classes
 d none share				0755 root sys
 d none share/vnc			0755 root bin
 d none share/vnc/classes		0755 root bin
-f none share/vnc/classes/index.vnc	0555 root bin
-s none share/vnc/classes/vncviewer.jar=../../vino/vino-client.jar
+f none share/vnc/classes/index.html	0444 root bin
+f none share/vnc/classes/index.vnc	0444 root bin
+f none share/vnc/classes/LICENCE.TXT	0444 root bin
+f none share/vnc/classes/README		0444 root bin
+f none share/vnc/classes/tigervnc_16.gif 0444 root bin
+f none share/vnc/classes/VncViewer.jar	0555 root bin
 
 !search $HOME/share/man/man1
 d none share/man			0755 root bin
@@ -70,5 +70,9 @@
 f none share/man/man1/vncconfig.1	0444 root bin
 f none share/man/man1/vncpasswd.1	0444 root bin
 f none share/man/man1/vncserver.1	0444 root bin
+f none share/man/man1/x0vncserver.1	0444 root bin
+
+!search $HOME/X11/share/man/man1
+f none share/man/man1/Xvnc.1		0444 root bin