From 8f5afb12e71d9d1b114bf66dc7cc6cbd37545f39 Mon Sep 17 00:00:00 2001 From: sturm Date: Thu, 2 Dec 2004 21:21:23 +0000 Subject: [PATCH] Initial import of x11vnc 0.6.2 x11vnc allows one to remotely view and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows. from Craig Barraclough --- x11/x11vnc/Makefile | 32 ++++++++++++++ x11/x11vnc/distinfo | 3 ++ x11/x11vnc/patches/patch-configure | 42 +++++++++++++++++++ x11/x11vnc/patches/patch-libvncserver_httpd_c | 21 ++++++++++ x11/x11vnc/patches/patch-libvncserver_main_c | 12 ++++++ .../patches/patch-libvncserver_rfbserver_c | 30 +++++++++++++ .../patches/patch-libvncserver_sockets_c | 12 ++++++ x11/x11vnc/pkg/DESCR | 4 ++ x11/x11vnc/pkg/PLIST | 4 ++ 9 files changed, 160 insertions(+) create mode 100644 x11/x11vnc/Makefile create mode 100644 x11/x11vnc/distinfo create mode 100644 x11/x11vnc/patches/patch-configure create mode 100644 x11/x11vnc/patches/patch-libvncserver_httpd_c create mode 100644 x11/x11vnc/patches/patch-libvncserver_main_c create mode 100644 x11/x11vnc/patches/patch-libvncserver_rfbserver_c create mode 100644 x11/x11vnc/patches/patch-libvncserver_sockets_c create mode 100644 x11/x11vnc/pkg/DESCR create mode 100644 x11/x11vnc/pkg/PLIST diff --git a/x11/x11vnc/Makefile b/x11/x11vnc/Makefile new file mode 100644 index 00000000000..a0a64aec31f --- /dev/null +++ b/x11/x11vnc/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ + +COMMENT= "VNC server for real X displays" + +VERSION= 0.6.2 +DISTNAME= x11vnc-${VERSION} +CATEGORIES= x11 + +HOMEPAGE= http://www.karlrunge.com/x11vnc/ + +MAINTAINER= Craig Barraclough + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB= X11 Xext Xinerama Xtst c pthread z + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libvncserver/} + +USE_X11= Yes + +CONFIGURE_STYLE=gnu +CONFIGURE_ARGS+=--with-x + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/x11vnc + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/x11vnc + +.include diff --git a/x11/x11vnc/distinfo b/x11/x11vnc/distinfo new file mode 100644 index 00000000000..431ffa2d798 --- /dev/null +++ b/x11/x11vnc/distinfo @@ -0,0 +1,3 @@ +MD5 (x11vnc-0.6.2.tar.gz) = e8d2e11332624dcf3eea992248dd8f68 +RMD160 (x11vnc-0.6.2.tar.gz) = 0f3764f2075eb31a473142dd2e45f67b8f1173c5 +SHA1 (x11vnc-0.6.2.tar.gz) = 847d9260ee8da28e5ba854f3dd84b5a53dfa2770 diff --git a/x11/x11vnc/patches/patch-configure b/x11/x11vnc/patches/patch-configure new file mode 100644 index 00000000000..43bde605bc2 --- /dev/null +++ b/x11/x11vnc/patches/patch-configure @@ -0,0 +1,42 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +--- configure.orig Thu Dec 2 20:42:03 2004 ++++ configure Thu Dec 2 20:42:44 2004 +@@ -5375,13 +5375,13 @@ fi + fi + if test ! -z "$HAVE_PTHREAD_H"; then + +-echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 +-echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 ++echo "$as_me:$LINENO: checking for pthread_mutex_lock in -pthread" >&5 ++echo $ECHO_N "checking for pthread_mutex_lock in -pthread... $ECHO_C" >&6 + if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpthread $LIBS" ++LIBS="-pthread $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ +@@ -5434,17 +5434,17 @@ if test $ac_cv_lib_pthread_pthread_mutex + #define HAVE_LIBPTHREAD 1 + _ACEOF + +- LIBS="-lpthread $LIBS" ++ LIBS="-pthread $LIBS" + + fi + +- echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 +-echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 ++ echo "$as_me:$LINENO: checking for pthread_mutex_lock in -pthread" >&5 ++echo $ECHO_N "checking for pthread_mutex_lock in -pthread... $ECHO_C" >&6 + if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lpthread $LIBS" ++LIBS="-pthread $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + /* confdefs.h. */ diff --git a/x11/x11vnc/patches/patch-libvncserver_httpd_c b/x11/x11vnc/patches/patch-libvncserver_httpd_c new file mode 100644 index 00000000000..d9d350291fa --- /dev/null +++ b/x11/x11vnc/patches/patch-libvncserver_httpd_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-libvncserver_httpd_c,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +--- libvncserver/httpd.c.orig Thu Dec 2 21:04:09 2004 ++++ libvncserver/httpd.c Thu Dec 2 21:04:52 2004 +@@ -123,7 +123,7 @@ httpCheckFds(rfbScreenInfoPtr rfbScreen) + fd_set fds; + struct timeval tv; + struct sockaddr_in addr; +- size_t addrlen = sizeof(addr); ++ socklen_t addrlen = sizeof(addr); + + if (!rfbScreen->httpDir) + return; +@@ -208,7 +208,7 @@ static void + httpProcessInput(rfbScreenInfoPtr rfbScreen) + { + struct sockaddr_in addr; +- size_t addrlen = sizeof(addr); ++ socklen_t addrlen = sizeof(addr); + char fullFname[512]; + char params[1024]; + char *ptr; diff --git a/x11/x11vnc/patches/patch-libvncserver_main_c b/x11/x11vnc/patches/patch-libvncserver_main_c new file mode 100644 index 00000000000..74faa40fb42 --- /dev/null +++ b/x11/x11vnc/patches/patch-libvncserver_main_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-libvncserver_main_c,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +--- libvncserver/main.c.orig Thu Dec 2 21:01:06 2004 ++++ libvncserver/main.c Thu Dec 2 21:02:08 2004 +@@ -323,7 +323,7 @@ listenerRun(void *data) + int client_fd; + struct sockaddr_in peer; + rfbClientPtr cl; +- size_t len; ++ socklen_t len; + + len = sizeof(peer); + diff --git a/x11/x11vnc/patches/patch-libvncserver_rfbserver_c b/x11/x11vnc/patches/patch-libvncserver_rfbserver_c new file mode 100644 index 00000000000..35456302c81 --- /dev/null +++ b/x11/x11vnc/patches/patch-libvncserver_rfbserver_c @@ -0,0 +1,30 @@ +$OpenBSD: patch-libvncserver_rfbserver_c,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +--- libvncserver/rfbserver.c.orig Tue Jun 15 15:23:57 2004 ++++ libvncserver/rfbserver.c Thu Dec 2 21:03:19 2004 +@@ -101,7 +101,7 @@ rfbClientListInit(rfbScreenInfoPtr rfbSc + { + if(sizeof(rfbBool)!=1) { + /* a sanity check */ +- fprintf(stderr,"rfbBool's size is not 1 (%d)!\n",sizeof(rfbBool)); ++ fprintf(stderr,"rfbBool's size is not 1 (%ld)!\n",(long)sizeof(rfbBool)); + /* we cannot continue, because rfbBool is supposed to be char everywhere */ + exit(1); + } +@@ -227,7 +227,7 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUD + rfbClientIteratorPtr iterator; + rfbClientPtr cl,cl_; + struct sockaddr_in addr; +- size_t addrlen = sizeof(struct sockaddr_in); ++ socklen_t addrlen = sizeof(struct sockaddr_in); + + cl = (rfbClientPtr)calloc(sizeof(rfbClientRec),1); + +@@ -523,7 +523,7 @@ rfbProcessClientProtocolVersion(cl) + + pv[sz_rfbProtocolVersionMsg] = 0; + if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) { +- char name[1024]; ++ char name[1025]; + if(sscanf(pv,"RFB %03d.%03d %1024s\n",&major_,&minor_,name) != 3) { + rfbErr("rfbProcessClientProtocolVersion: not a valid RFB client\n"); + rfbCloseClient(cl); diff --git a/x11/x11vnc/patches/patch-libvncserver_sockets_c b/x11/x11vnc/patches/patch-libvncserver_sockets_c new file mode 100644 index 00000000000..32cd5afd8cd --- /dev/null +++ b/x11/x11vnc/patches/patch-libvncserver_sockets_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-libvncserver_sockets_c,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +--- libvncserver/sockets.c.orig Thu Dec 2 21:03:26 2004 ++++ libvncserver/sockets.c Thu Dec 2 21:04:02 2004 +@@ -195,7 +195,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,l + fd_set fds; + struct timeval tv; + struct sockaddr_in addr; +- size_t addrlen = sizeof(addr); ++ socklen_t addrlen = sizeof(addr); + char buf[6]; + const int one = 1; + int sock; diff --git a/x11/x11vnc/pkg/DESCR b/x11/x11vnc/pkg/DESCR new file mode 100644 index 00000000000..6b7b0de7c97 --- /dev/null +++ b/x11/x11vnc/pkg/DESCR @@ -0,0 +1,4 @@ +x11vnc allows one to remotely view and interact with real X displays (i.e. a +display corresponding to a physical monitor, keyboard, and mouse) with any +VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for +Windows. diff --git a/x11/x11vnc/pkg/PLIST b/x11/x11vnc/pkg/PLIST new file mode 100644 index 00000000000..ad723f4105d --- /dev/null +++ b/x11/x11vnc/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2004/12/02 21:21:23 sturm Exp $ +bin/x11vnc +share/doc/x11vnc/ +share/doc/x11vnc/README