summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-01-18 08:03:55 +0000
committerMike Frysinger <vapier@gentoo.org>2003-01-18 08:03:55 +0000
commite949caeadfd2c3f7aebf15c9ee55fe084ddef2cc (patch)
tree4b0f71cdb5583f7446c3031cfbe3602eddab9f76 /net-misc/rfb
parentmore kernel bugs fixed (diff)
downloadgentoo-2-e949caeadfd2c3f7aebf15c9ee55fe084ddef2cc.tar.gz
gentoo-2-e949caeadfd2c3f7aebf15c9ee55fe084ddef2cc.tar.bz2
gentoo-2-e949caeadfd2c3f7aebf15c9ee55fe084ddef2cc.zip
added -daemon support
Diffstat (limited to 'net-misc/rfb')
-rw-r--r--net-misc/rfb/ChangeLog9
-rw-r--r--net-misc/rfb/files/rfb-0.6.1-daemon.patch231
-rw-r--r--net-misc/rfb/files/rfb-0.6.1-gcc3.x.patch (renamed from net-misc/rfb/files/gcc3.x-rfb-0.6.1.patch)48
-rw-r--r--net-misc/rfb/rfb-0.6.1-r1.ebuild42
-rw-r--r--net-misc/rfb/rfb-0.6.1.ebuild12
5 files changed, 308 insertions, 34 deletions
diff --git a/net-misc/rfb/ChangeLog b/net-misc/rfb/ChangeLog
index f3ff169f215a..3fcfa4898b2b 100644
--- a/net-misc/rfb/ChangeLog
+++ b/net-misc/rfb/ChangeLog
@@ -1,9 +1,12 @@
# ChangeLog for net-misc/rfb
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/rfb/ChangeLog,v 1.3 2002/12/13 11:00:14 blizzy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rfb/ChangeLog,v 1.4 2003/01/18 08:03:55 vapier Exp $
+
+*rfb-0.6.1 (18 Jan 2003)
+
+ 18 Jan 2003; Mike Frysinger <vapier@gentoo.org> :
+ Added a patch to support a '-daemon' switch ... sexy :)
- 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
-
*rfb-0.6.1 (23 Oct 2002)
23 Oct 2002; Mike Frysinger <vapier@gentoo.org> :
diff --git a/net-misc/rfb/files/rfb-0.6.1-daemon.patch b/net-misc/rfb/files/rfb-0.6.1-daemon.patch
new file mode 100644
index 000000000000..6a95ffff7988
--- /dev/null
+++ b/net-misc/rfb/files/rfb-0.6.1-daemon.patch
@@ -0,0 +1,231 @@
+--- lib/rfbServer.cc.orig 2003-01-18 02:35:37.000000000 -0500
++++ lib/rfbServer.cc 2003-01-18 02:49:07.000000000 -0500
+@@ -29,9 +29,11 @@
+ using std::cout;
+ using std::endl;
+
+-namespace rfb {
++bool isdaemon = false;
+
++namespace rfb {
+
++void Server::toggleDaemon(bool t) { isdaemon = t; }
+
+ Server::Server()
+ : stateProtocolVersion( this )
+@@ -142,6 +144,7 @@
+ blocksX = (framebuffer->width + blockWidth - 1) / blockWidth;
+ blocksY = (framebuffer->height + blockHeight - 1) / blockHeight;
+ blocks = (Block*) malloc( sizeof(Block) * blocksX * blocksY );
++ if (!isdaemon) {
+ cerr << "framebuffer->width: " << framebuffer->width << endl;
+ cerr << "framebuffer->height: " << framebuffer->height << endl;
+ cerr << "blockWidth: " << blockWidth << endl;
+@@ -149,6 +152,7 @@
+ cerr << "blocksX: " << blocksX << endl;
+ cerr << "blocksY: " << blocksY << endl;
+ cerr << "blocks: " << blocks << endl;
++ }
+ // ResetBlocks();
+ }
+
+@@ -234,8 +238,10 @@
+
+ void Server::handleClientInitialisation( ClientInitialisation &clientInitialisation )
+ {
++ if (!isdaemon) {
+ cout << "-> handleClientInitialisation" << endl;
+ cout << "shared flag: " << (int) clientInitialisation.shared_flag << endl;
++ }
+
+ ServerInitialisation serverInitialisation;
+ getServerInitialisation( serverInitialisation );
+@@ -674,6 +680,7 @@
+ }
+ if ( size == 4 ) {
+ if ( offset == size ) {
++ if (!isdaemon)
+ cerr << "encoding: " << (int) encodings.encoding[encodings.count] << endl;
+ encodings.count = encodings.count + 1;
+ data = (unsigned char*) &(encodings.encoding[encodings.count]);
+--- include/rfbServer.h.orig 2003-01-18 02:39:38.000000000 -0500
++++ include/rfbServer.h 2003-01-18 02:57:31.000000000 -0500
+@@ -342,6 +342,7 @@
+ void ResetBlocks();
+ void DeleteBlocks();
+ void BlocksToHints();
++ void toggleDaemon(bool);
+
+ Block *blocks;
+ unsigned int blockWidth, blockHeight;
+--- x0rfbserver/x0rfbserver.cc.orig 2003-01-18 01:15:47.000000000 -0500
++++ x0rfbserver/x0rfbserver.cc 2003-01-18 02:59:23.000000000 -0500
+@@ -72,6 +72,7 @@
+ OXClient *clientX;
+ const OXWindow *root;
+ Display *dpy;
++extern bool isdaemon;
+
+
+ namespace rfb {
+@@ -347,11 +348,13 @@
+
+ void OXServerMainFrame::CreateFramebuffer()
+ {
++ if (!isdaemon) {
+ cerr << "CreateFramebuffer() start" << endl;
+ cerr << "dpy" << dpy << endl;
+ cerr << "id " << root->GetId() << endl;
+ cerr << "w " << clientX->GetDisplayWidth() << endl;
+ cerr << "h " << clientX->GetDisplayHeight() << endl;
++ }
+ framebufferImage = XGetImage( dpy,
+ root->GetId(),
+ 0,
+@@ -360,6 +363,7 @@
+ clientX->GetDisplayHeight(),
+ AllPlanes,
+ ZPixmap );
++ if (!isdaemon)
+ cerr << "FI " << framebufferImage << endl;
+ framebuffer.width = framebufferImage->width;
+ framebuffer.height = framebufferImage->height;
+@@ -397,9 +401,11 @@
+ }
+ scanner = new XUpdateScanner( dpy, root->GetId(), &framebuffer );
+
++ if (!isdaemon) {
+ cerr << "fpf " << int(framebuffer.pixelFormat.bits_per_pixel) << endl;
+
+ cerr << "CreateFramebuffer() end" << endl;
++ }
+ }
+
+
+@@ -616,6 +622,7 @@
+ event.same_screen = True;
+ event.state = modifier;
+ event.keycode = kc;
++ if (!isdaemon)
+ cerr << "XSendEvent (XKeyEvent)" << endl;
+ if ( kc != NoSymbol )
+ XSendEvent( dpy,
+@@ -703,6 +710,7 @@
+ }
+ }
+ else {
++ if (!isdaemon)
+ cerr << "XWarpPointer" << endl;
+ XWarpPointer( dpy,
+ None,
+@@ -751,9 +759,11 @@
+ #ifdef USE_ZLIB_WARREN
+ void BaseServer::handleEnableZlib( CARD8 level )
+ {
++ if (!isdaemon)
+ cerr << "EnableZlib: level " << (int) level << endl;
+ Server::handleEnableZlib( level );
+ bufferedConnection->enableSenderDeflation( level );
++ if (!isdaemon)
+ cerr << "Zlib enabled" << endl;
+ }
+ #endif // USE_ZLIB_WARREN
+@@ -803,6 +813,8 @@
+ , key_Hyper_L( 0 )
+ , key_Hyper_R( 0 )
+ {
++ toggleDaemon(isdaemon);
++ if (!isdaemon)
+ cerr << "BaseServer() start" << endl;
+ memcpy( password, "\0\0\0\0\0\0\0\0", 8 );
+ strncpy( password, properties.password, 8 );
+@@ -820,12 +832,14 @@
+ fh = new OSocketFileHandler( mainFrame, fd, XCM_READABLE | XCM_WRITABLE );
+ mainFrame->RegisterServer( this );
+ connection->send( (unsigned char*) RFB_PROTOCOL_VERSION, 12 );
++ if (!isdaemon)
+ cerr << "BaseServer() end" << endl;
+ }
+
+
+ BaseServer::~BaseServer()
+ {
++ if (!isdaemon)
+ cerr << "~BaseServer() start" << endl;
+ DeleteBlocks();
+ mainFrame->UnregisterServer( this );
+@@ -833,6 +847,7 @@
+ delete fh;
+ shutdown( fd, 2 );
+ close( fd );
++ if (!isdaemon)
+ cerr << "~BaseServer() end" << endl;
+ }
+
+@@ -860,6 +875,7 @@
+ << " x0rfbserver -stdio" << endl
+ << " x0rfbserver -about" << endl
+ << " x0rfbserver -help" << endl
++ << " x0rfbserver -daemon (default)" << endl
+ << endl
+ << "<options>" << endl
+ << " -shared" << endl
+@@ -871,7 +887,7 @@
+
+ void parseCommandLine_x0rfbserver( int argc, char **argv )
+ {
+- enum { UNDEF, ABOUT, STDIO } mode;
++ enum { UNDEF, ABOUT, STDIO, DAEMON } mode;
+ mode = UNDEF;
+
+ int i = 1;
+@@ -891,6 +907,13 @@
+ if ( mode == UNDEF ) mode = STDIO;
+ else printHelp_x0rfbserver();
+ i++;
++ } else
++
++ if ( !strcmp( argv[i], "-daemon" ) ) {
++ if ( mode == UNDEF ) mode = DAEMON;
++ else printHelp_x0rfbserver();
++ isdaemon = true;
++ i++;
+ } else printHelp_x0rfbserver();
+ }
+
+@@ -920,6 +943,15 @@
+ break;
+
+
++ case DAEMON: {
++ if (fork()) { return; }
++ clientX = new OXClient;
++ root = clientX->GetRoot();
++ dpy = root->GetDisplay();
++ new rfb::OXServerMainFrame( 48, 48 );
++ exit( 0 );
++ }
++ break;
+
+ case STDIO: {
+ clientX = new OXClient;
+--- x0rfbserver/XUpdateScanner.cc.orig 2003-01-18 02:07:02.000000000 -0500
++++ x0rfbserver/XUpdateScanner.cc 2003-01-18 02:34:14.000000000 -0500
+@@ -386,6 +386,7 @@
+ }
+ }
+
++ if (!isdaemon)
+ cerr << "TILES: " << tilec << endl;
+
+ if ( properties.showMousePointer ) {
+--- x0rfbserver/XUpdateScanner.h.orig 2003-01-18 02:34:33.000000000 -0500
++++ x0rfbserver/XUpdateScanner.h 2003-01-18 02:33:56.000000000 -0500
+@@ -23,6 +23,7 @@
+
+
+ #include "rfbServer.h"
++extern bool isdaemon;
+
+ namespace rfb {
+
diff --git a/net-misc/rfb/files/gcc3.x-rfb-0.6.1.patch b/net-misc/rfb/files/rfb-0.6.1-gcc3.x.patch
index 985faf8d3ee6..f0b11f05d79e 100644
--- a/net-misc/rfb/files/gcc3.x-rfb-0.6.1.patch
+++ b/net-misc/rfb/files/rfb-0.6.1-gcc3.x.patch
@@ -1,5 +1,5 @@
---- ./lib/Framebuffer.cc.orig 2002-09-29 17:27:45.000000000 -0400
-+++ ./lib/Framebuffer.cc 2002-09-29 17:28:37.000000000 -0400
+--- lib/Framebuffer.cc.orig 2002-09-29 17:27:45.000000000 -0400
++++ lib/Framebuffer.cc 2002-09-29 17:28:37.000000000 -0400
@@ -161,7 +161,7 @@
unsigned int r,
unsigned int g,
@@ -51,8 +51,8 @@
if ( width < 0 ) width = fb->width;
if ( height < 0 ) height = fb->height;
char tmp[255] = "";
---- ./lib/rfb.cc.orig 2002-09-29 17:34:41.000000000 -0400
-+++ ./lib/rfb.cc 2002-09-29 17:34:51.000000000 -0400
+--- lib/rfb.cc.orig 2002-09-29 17:34:41.000000000 -0400
++++ lib/rfb.cc 2002-09-29 17:34:51.000000000 -0400
@@ -28,7 +28,7 @@
/* CARD16 */
/**************************************************/
@@ -71,8 +71,8 @@
{
value[3] = _value;
_value >>= 8;
---- ./lib/rfbServer.cc.orig 2002-09-29 17:37:06.000000000 -0400
-+++ ./lib/rfbServer.cc 2002-09-29 17:41:36.000000000 -0400
+--- lib/rfbServer.cc.orig 2002-09-29 17:37:06.000000000 -0400
++++ lib/rfbServer.cc 2002-09-29 17:41:36.000000000 -0400
@@ -22,8 +22,12 @@
#include "rfbServer.h"
#include <stdlib.h>
@@ -86,8 +86,8 @@
namespace rfb {
---- ./include/rfbServer.h.orig 2002-09-29 17:29:06.000000000 -0400
-+++ ./include/rfbServer.h 2002-09-29 17:34:19.000000000 -0400
+--- include/rfbServer.h.orig 2002-09-29 17:29:06.000000000 -0400
++++ include/rfbServer.h 2002-09-29 17:34:19.000000000 -0400
@@ -26,6 +26,7 @@
#include "Framebuffer.h"
@@ -96,8 +96,8 @@
namespace rfb {
---- ./include/rfbClient.h.orig 2002-09-29 17:36:15.000000000 -0400
-+++ ./include/rfbClient.h 2002-09-29 17:36:33.000000000 -0400
+--- include/rfbClient.h.orig 2002-09-29 17:36:15.000000000 -0400
++++ include/rfbClient.h 2002-09-29 17:36:33.000000000 -0400
@@ -257,7 +257,7 @@
protected:
@@ -107,8 +107,8 @@
};
---- ./x0rfbserver/xclass++.h.orig 2002-09-29 17:49:18.000000000 -0400
-+++ ./x0rfbserver/xclass++.h 2002-09-29 17:49:24.000000000 -0400
+--- x0rfbserver/xclass++.h.orig 2002-09-29 17:49:18.000000000 -0400
++++ x0rfbserver/xclass++.h 2002-09-29 17:49:24.000000000 -0400
@@ -2,7 +2,7 @@
#define _hexonet_xclass_plusplus_
@@ -118,8 +118,8 @@
#define LAYOUT_HINTS map< OXFrame*, OLayoutHints* > layoutHints
---- ./x0rfbserver/XUpdateScanner.cc.orig 2002-09-29 17:50:40.000000000 -0400
-+++ ./x0rfbserver/XUpdateScanner.cc 2002-09-29 17:51:12.000000000 -0400
+--- x0rfbserver/XUpdateScanner.cc.orig 2002-09-29 17:50:40.000000000 -0400
++++ x0rfbserver/XUpdateScanner.cc 2002-09-29 17:51:12.000000000 -0400
@@ -18,6 +18,10 @@
* USA.
*/
@@ -131,8 +131,8 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/Xlib.h>
---- ./x0rfbserver/x0rfbserver.cc.orig 2002-09-29 17:51:53.000000000 -0400
-+++ ./x0rfbserver/x0rfbserver.cc 2002-09-29 17:52:23.000000000 -0400
+--- x0rfbserver/x0rfbserver.cc.orig 2002-09-29 17:51:53.000000000 -0400
++++ x0rfbserver/x0rfbserver.cc 2002-09-29 17:52:23.000000000 -0400
@@ -18,6 +18,10 @@
* USA.
*/
@@ -144,8 +144,8 @@
#include "rfbServer.h"
#include "version.h"
#include "OXAbout.h"
---- ./xrfbviewer/OXViewerApplet.h.orig 2002-09-29 17:44:49.000000000 -0400
-+++ ./xrfbviewer/OXViewerApplet.h 2002-09-29 17:45:02.000000000 -0400
+--- xrfbviewer/OXViewerApplet.h.orig 2002-09-29 17:44:49.000000000 -0400
++++ xrfbviewer/OXViewerApplet.h 2002-09-29 17:45:02.000000000 -0400
@@ -31,6 +31,7 @@
#include "ConnectionInfo.h"
@@ -154,8 +154,8 @@
class OXCompositeFrame;
---- ./xrfbviewer/xclass++.h.orig 2002-09-29 17:44:53.000000000 -0400
-+++ ./xrfbviewer/xclass++.h 2002-09-29 17:45:10.000000000 -0400
+--- xrfbviewer/xclass++.h.orig 2002-09-29 17:44:53.000000000 -0400
++++ xrfbviewer/xclass++.h 2002-09-29 17:45:10.000000000 -0400
@@ -2,7 +2,7 @@
#define _hexonet_xclass_plusplus_
@@ -165,8 +165,8 @@
#define LAYOUT_HINTS map< OXFrame*, OLayoutHints* > layoutHints
---- ./xrfbviewer/OXViewerApplet.cc.orig 2002-09-29 17:47:01.000000000 -0400
-+++ ./xrfbviewer/OXViewerApplet.cc 2002-09-29 17:47:32.000000000 -0400
+--- xrfbviewer/OXViewerApplet.cc.orig 2002-09-29 17:47:01.000000000 -0400
++++ xrfbviewer/OXViewerApplet.cc 2002-09-29 17:47:32.000000000 -0400
@@ -25,6 +25,8 @@
#include "OXConnectionDetails.h"
@@ -176,8 +176,8 @@
#include <sys/types.h>
#include <fcntl.h>
---- ./rfbcat/rfbcat.cc.orig 2002-09-29 17:54:27.000000000 -0400
-+++ ./rfbcat/rfbcat.cc 2002-09-29 17:54:43.000000000 -0400
+--- rfbcat/rfbcat.cc.orig 2002-09-29 17:54:27.000000000 -0400
++++ rfbcat/rfbcat.cc 2002-09-29 17:54:43.000000000 -0400
@@ -21,6 +21,8 @@
#include "rfbClient.h"
diff --git a/net-misc/rfb/rfb-0.6.1-r1.ebuild b/net-misc/rfb/rfb-0.6.1-r1.ebuild
new file mode 100644
index 000000000000..cc129789db29
--- /dev/null
+++ b/net-misc/rfb/rfb-0.6.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rfb/rfb-0.6.1-r1.ebuild,v 1.1 2003/01/18 08:03:55 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="comprehensive collection of rfb enabled tools and applications"
+HOMEPAGE="http://forums.hexonet.com/"
+SRC_URI="http://download.hexonet.com/software/rfb/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha"
+
+DEPEND="x11-libs/xclass"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-gcc3.x.patch
+ epatch ${FILESDIR}/${P}-daemon.patch
+}
+
+src_compile() {
+ make depend || die "make depend failed"
+ make CXXFLAGS="-DUSE_ZLIB_WARREN -I../include ${CXXFLAGS}" || die "make failed"
+}
+
+src_install() {
+# dolib lib/librfb.a #does anything other than rfb use this ?
+
+ dobin rfbcat/rfbcat x0rfbserver/x0rfbserver \
+ xrfbviewer/{xplayfbs,xrfbviewer}
+ for f in rfbcat x0rfbserver xvncconnect xrfbviewer ; do
+ dobin ${f}/${f}
+ done
+
+ doman man/man1/*
+
+ dodoc README
+ dohtml rfm_fbs.1.0.html
+}
diff --git a/net-misc/rfb/rfb-0.6.1.ebuild b/net-misc/rfb/rfb-0.6.1.ebuild
index e9778e75721c..003361f5837d 100644
--- a/net-misc/rfb/rfb-0.6.1.ebuild
+++ b/net-misc/rfb/rfb-0.6.1.ebuild
@@ -1,24 +1,22 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/rfb/rfb-0.6.1.ebuild,v 1.3 2002/12/15 10:44:21 bjb Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rfb/rfb-0.6.1.ebuild,v 1.4 2003/01/18 08:03:55 vapier Exp $
+
+inherit eutils
DESCRIPTION="comprehensive collection of rfb enabled tools and applications"
HOMEPAGE="http://forums.hexonet.com/"
SRC_URI="http://download.hexonet.com/software/rfb/${P}.tar.gz"
+
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~alpha"
-IUSE=""
DEPEND="x11-libs/xclass"
-S="${WORKDIR}/${P}"
-
-# todo: make this guy use zlib rather than the build in zlib functions ?
-
src_compile() {
cd ${S}
- patch -p0<${FILESDIR}/gcc3.x-rfb-0.6.1.patch
+ epatch ${FILESDIR}/gcc3.x-rfb-0.6.1.patch
make depend || die "make depend failed"
make CXXFLAGS="-DUSE_ZLIB_WARREN -I../include ${CXXFLAGS}" || die "make failed"