From marcus@shumai.marcuscom.com  Wed Jan  9 17:43:03 2002
Return-Path: <marcus@shumai.marcuscom.com>
Received: from shumai.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46])
	by hub.freebsd.org (Postfix) with ESMTP id D12FE37B417
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Jan 2002 17:43:01 -0800 (PST)
Received: (from marcus@localhost)
	by shumai.marcuscom.com (8.11.6/8.11.6) id g0A1hET68810;
	Wed, 9 Jan 2002 20:43:14 -0500 (EST)
	(envelope-from marcus)
Message-Id: <200201100143.g0A1hET68810@shumai.marcuscom.com>
Date: Wed, 9 Jan 2002 20:43:14 -0500 (EST)
From: Joe Marcus Clarke <marcus@marcuscom.com>
Reply-To: Joe Marcus Clarke <marcus@marcuscom.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] Add net/x0rfbserver
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33750
>Category:       ports
>Synopsis:       [NEW PORT] Add net/x0rfbserver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 09 17:50:01 PST 2002
>Closed-Date:    Sat May 18 21:46:43 PDT 2002
>Last-Modified:  Sat May 18 21:46:43 PDT 2002
>Originator:     Joe Marcus Clarke
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
MarcusCom, Inc.
>Environment:
System: FreeBSD shumai.marcuscom.com 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Sun Jan 6 01:07:48 EST 2002 marcus@shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386


	
>Description:
	x0rfbserver allows one to export a running X desktop to another machine.
It works like VNC, but for :0.  It requires my recently submitted xclass
port to build.
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	x0rfbserver
#	x0rfbserver/Makefile
#	x0rfbserver/files
#	x0rfbserver/files/patch-x0rfbserver::OXProperties.cc
#	x0rfbserver/files/patch-x0rfbserver::XUpdateScanner.cc
#	x0rfbserver/files/patch-x0rfbserver::x0rfbserver.cc
#	x0rfbserver/pkg-comment
#	x0rfbserver/pkg-descr
#	x0rfbserver/distinfo
#	x0rfbserver/pkg-plist
#
echo c - x0rfbserver
mkdir -p x0rfbserver > /dev/null 2>&1
echo x - x0rfbserver/Makefile
sed 's/^X//' >x0rfbserver/Makefile << 'END-of-x0rfbserver/Makefile'
X# New ports collection makefile for:	x0rfbserver
X# Date created:	 	2002 January 07
X# Whom:			Joe Marcus Clarke <marcus@marcuscom.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	x0rfbserver
XPORTVERSION=	0.1.2
XCATEGORIES=	net
XMASTER_SITES=	http://www.hexonet.de/download/
XDISTNAME=	rfb-0.1.2
X
XMAINTAINER=	marcus@marcuscom.com
X
XBUILD_DEPENDS=	xc-config:${PORTSDIR}/x11-toolkits/xclass
X
XWRKSRC=		${WRKDIR}/rfb-${PORTVERSION}
XCXXFLAGS=	-DUSE_ZLIB_WARREN `xc-config --cflags` \
X			-I../include -finline-functions -funroll-loops -O3 -g -Wall
XUSE_GMAKE=	yes
X
XMAN1=	x0rfbserver.1 xrfbviewer.1 xplayfbs.1
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/x0rfbserver/x0rfbserver ${PREFIX}/bin
X	@${INSTALL_PROGRAM} ${WRKSRC}/xrfbviewer/xplayfbs ${PREFIX}/bin
X	@${INSTALL_PROGRAM} ${WRKSRC}/xrfbviewer/xrfbviewer ${PREFIX}/bin
X.for i in ${MAN1}
X	@( cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} ${i} ${PREFIX}/man/man1 )
X.endfor
X
X.include <bsd.port.mk>
END-of-x0rfbserver/Makefile
echo c - x0rfbserver/files
mkdir -p x0rfbserver/files > /dev/null 2>&1
echo x - x0rfbserver/files/patch-x0rfbserver::OXProperties.cc
sed 's/^X//' >x0rfbserver/files/patch-x0rfbserver::OXProperties.cc << 'END-of-x0rfbserver/files/patch-x0rfbserver::OXProperties.cc'
X--- x0rfbserver/OXProperties.cc.orig	Sat Jan  5 22:24:29 2002
X+++ x0rfbserver/OXProperties.cc	Sat Jan  5 22:24:50 2002
X@@ -76,20 +76,22 @@
X {
X   OIniFile iniFile( filename, INI_WRITE );
X   char tmp[1024];
X+  char *one = "1";
X+  char *zero = "0";
X 
X   iniFile.PutNext( "Connection" );
X-  iniFile.PutItem( "SocketConnections", properties.acceptSocketConnections? "1":"0" );
X+  iniFile.PutItem( "SocketConnections", properties.acceptSocketConnections? one:zero );
X   snprintf( tmp, 1023, "%i", properties.displayNumber );
X   iniFile.PutItem( "Display", tmp );
X-  iniFile.PutItem( "AutoDisplay", properties.autoDisplayNumber? "1":"0" );
X+  iniFile.PutItem( "AutoDisplay", properties.autoDisplayNumber? one:zero );
X   encryptPasswordHex( properties.password, tmp );
X   iniFile.PutItem( "Password", tmp );
X-  iniFile.PutItem( "DisableRemote", properties.disableRemoteControl? "1":"0" );
X-  iniFile.PutItem( "DisableLocal", properties.disableLocalControl? "1":"0" );
X+  iniFile.PutItem( "DisableRemote", properties.disableRemoteControl? one:zero );
X+  iniFile.PutItem( "DisableLocal", properties.disableLocalControl? one:zero );
X 
X   iniFile.PutNewLine();
X   iniFile.PutNext( "Update" );
X-  iniFile.PutItem( "ShowMousePointer", properties.showMousePointer? "1":"0" );
X+  iniFile.PutItem( "ShowMousePointer", properties.showMousePointer? one:zero );
X }
X 
X 
END-of-x0rfbserver/files/patch-x0rfbserver::OXProperties.cc
echo x - x0rfbserver/files/patch-x0rfbserver::XUpdateScanner.cc
sed 's/^X//' >x0rfbserver/files/patch-x0rfbserver::XUpdateScanner.cc << 'END-of-x0rfbserver/files/patch-x0rfbserver::XUpdateScanner.cc'
X--- x0rfbserver/XUpdateScanner.cc.orig	Sat Jan  5 22:14:45 2002
X+++ x0rfbserver/XUpdateScanner.cc	Sat Jan  5 22:15:08 2002
X@@ -18,6 +18,8 @@
X  *  USA.
X  */
X 
X+#include <machine/param.h>
X+#include <sys/types.h>
X #include <sys/ipc.h>
X #include <sys/shm.h>
X #include <X11/Xlib.h>
END-of-x0rfbserver/files/patch-x0rfbserver::XUpdateScanner.cc
echo x - x0rfbserver/files/patch-x0rfbserver::x0rfbserver.cc
sed 's/^X//' >x0rfbserver/files/patch-x0rfbserver::x0rfbserver.cc << 'END-of-x0rfbserver/files/patch-x0rfbserver::x0rfbserver.cc'
X--- x0rfbserver/x0rfbserver.cc.orig	Mon Nov 27 04:47:46 2000
X+++ x0rfbserver/x0rfbserver.cc	Wed Jan  9 18:05:09 2002
X@@ -32,6 +32,7 @@
X #include <netdb.h>
X #include <stdio.h>
X #include <stdlib.h>
X+#include <errno.h>
X #include <unistd.h>
X 
X 
X@@ -394,6 +395,7 @@
X     if ( bytesRead >= 0 )
X       connection->receiverBuffer.end += bytesRead;
X     else {
X+	  if (errno == EAGAIN) return false;
X       delete server;
X       return true;
X     }
X@@ -410,6 +412,7 @@
X     if ( bytesWritten >= 0 )
X       connection->senderBuffer.pos += bytesWritten;
X     else {
X+	  if (errno == EAGAIN) return false;
X       delete server;
X       return true;
X     }
X@@ -420,7 +423,7 @@
X   }
X 
X   if ( _mask & XCM_EXCEPTION ) {
X-    delete server;
X+    //delete server;
X     return true;
X   }
X 
X@@ -462,9 +465,8 @@
X void BaseServer::getServerInitialisation( ServerInitialisation &_serverInit )
X {
X   Server::getServerInitialisation( _serverInit );
X-  _serverInit.name_length = strlen( getenv("HOSTNAME") );
X-  _serverInit.name_string = (CARD8 *) malloc( _serverInit.name_length + 1 );
X-  strcpy( (char*) _serverInit.name_string, getenv( "HOSTNAME" ) );
X+  _serverInit.name_string = (CARD8 *) malloc( 256 );
X+  gethostname((char *)_serverInit.name_string, 256);
X }
X 
X 
END-of-x0rfbserver/files/patch-x0rfbserver::x0rfbserver.cc
echo x - x0rfbserver/pkg-comment
sed 's/^X//' >x0rfbserver/pkg-comment << 'END-of-x0rfbserver/pkg-comment'
XExport a running X desktop to another machine
END-of-x0rfbserver/pkg-comment
echo x - x0rfbserver/pkg-descr
sed 's/^X//' >x0rfbserver/pkg-descr << 'END-of-x0rfbserver/pkg-descr'
Xx0rfbserver is a software application that is able to export an X desktop to 
Xanother machine. It exports the framebuffer of the X server to one or more 
Xclients using strong compression and injects keyboard and mouse inputs from the 
Xclients into the server. The protocol used is the well documented RFB 3.3 
Xprotocol, so x0rfbserver should be compatible with every client speaking that 
Xprotocol too, e.g. it should work together with the vnc viewers of AT&T. 
Xx0rfbserver provides a complete remote control of the desktop on the computer 
Xit is running on. 
X
XWWW: http://www.hexonet.de/software/x0rfbserver/
END-of-x0rfbserver/pkg-descr
echo x - x0rfbserver/distinfo
sed 's/^X//' >x0rfbserver/distinfo << 'END-of-x0rfbserver/distinfo'
XMD5 (rfb-0.1.2.tar.gz) = 35c7787756c189b88cf7d4019cb49781
END-of-x0rfbserver/distinfo
echo x - x0rfbserver/pkg-plist
sed 's/^X//' >x0rfbserver/pkg-plist << 'END-of-x0rfbserver/pkg-plist'
Xbin/x0rfbserver
Xbin/xplayfbs
Xbin/xrfbviewer
END-of-x0rfbserver/pkg-plist
exit

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->marcus 
Responsible-Changed-By: marcus 
Responsible-Changed-When: Sat May 18 21:45:25 PDT 2002 
Responsible-Changed-Why:  
This is mine. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33750 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sat May 18 21:45:44 PDT 2002 
State-Changed-Why:  
This port is being retired as it looks like the author i no longer actively 
maintaining it.  Since it was never committed to begin with, simply close 
the PR.  If the author picks up the project, I can add the port later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33750 
>Unformatted:
