summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libvncserver')
-rw-r--r--net-libs/libvncserver/Manifest1
-rw-r--r--net-libs/libvncserver/files/libvncserver-0.9.10-libva-1.0.patch52
-rw-r--r--net-libs/libvncserver/files/libvncserver-0.9.9-segfault.patch76
-rw-r--r--net-libs/libvncserver/files/libvncserver-memcpy.patch24
-rw-r--r--net-libs/libvncserver/libvncserver-0.9.10-r1.ebuild68
-rw-r--r--net-libs/libvncserver/libvncserver-0.9.10-r3.ebuild68
-rw-r--r--net-libs/libvncserver/libvncserver-0.9.10.ebuild67
-rw-r--r--net-libs/libvncserver/metadata.xml28
8 files changed, 384 insertions, 0 deletions
diff --git a/net-libs/libvncserver/Manifest b/net-libs/libvncserver/Manifest
new file mode 100644
index 000000000000..89c19a7b60a7
--- /dev/null
+++ b/net-libs/libvncserver/Manifest
@@ -0,0 +1 @@
+DIST LibVNCServer-0.9.10.tar.gz 1415191 SHA256 ed10819a5bfbf269969f97f075939cc38273cc1b6d28bccfb0999fba489411f7 SHA512 eb637dfb72dc50fb713a715c9d0cc8824a6871527c2edb497e70c92e2e708021fbd5d8134f2dee6a9e90d1c8fd3fee53c5f5ece790c2804e938011a980ffceae WHIRLPOOL 821234e772d15668b88bd99e72345a7b5d1a9072fd868ddd47fb47a1e4c6b3c1c2de2380622231a968bd98ac05f20a004a80dfbe43db77f8170056121207b9f4
diff --git a/net-libs/libvncserver/files/libvncserver-0.9.10-libva-1.0.patch b/net-libs/libvncserver/files/libvncserver-0.9.10-libva-1.0.patch
new file mode 100644
index 000000000000..2e6939e8860f
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.10-libva-1.0.patch
@@ -0,0 +1,52 @@
+commit 7b6243157f042a7bde353abc6fb22aadad6d9e2d
+Author: Floris Bos <bos@je-eigen-domein.nl>
+Date: 2014-12-29 00:02:33 +0100
+
+ Fix libva related compile errors
+
+ - Make h264.c compile with recent libva version by including va_compat.h
+ - Only enable libva if libva-x11 is installed
+ - Modified configure help text
+ Previous help text suggested libva was only build when --with-libva
+ was specified, while actual behavior is to build it by default.
+
+ Warning: THIS CODE IS UNTESTED. Lacking a h.264 capable VNC server
+ Also no attempt is made to support platforms not using X11
+
+ Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
+
+diff --git a/configure.ac b/configure.ac
+index ca9f3b3..fe8b1de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -150,12 +150,11 @@ AM_CONDITIONAL(HAVE_LIBSSL, test ! -z "$SSL_LIBS")
+
+
+ # See if we want libva support
+-# TODO: check if library actually exists
+ AH_TEMPLATE(CONFIG_LIBVA, [Build libva support])
+ AC_ARG_WITH(libva,
+-[ --with-libva build libva support],,)
++[ --without-libva disable support for libva],,)
+ if test "x$with_libva" != "xno"; then
+- AC_CHECK_LIB(va, vaInitialize,
++ AC_CHECK_LIB(va-x11, vaGetDisplay,
+ VA_LIBS="-lva -lva-x11"
+ [AC_DEFINE(CONFIG_LIBVA) CONFIG_LIBVA="true"], ,)
+ fi
+diff --git a/libvncclient/h264.c b/libvncclient/h264.c
+index 1d94454..c63a713 100644
+--- a/libvncclient/h264.c
++++ b/libvncclient/h264.c
+@@ -20,6 +20,10 @@
+ #ifdef LIBVNCSERVER_CONFIG_LIBVA
+
+ #include <X11/Xlib.h>
++#include <va/va_version.h>
++#if VA_CHECK_VERSION(0,34,0)
++#include <va/va_compat.h>
++#endif
+ #include <va/va_x11.h>
+
+ enum _slice_types {
+
diff --git a/net-libs/libvncserver/files/libvncserver-0.9.9-segfault.patch b/net-libs/libvncserver/files/libvncserver-0.9.9-segfault.patch
new file mode 100644
index 000000000000..6da3b018af22
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-0.9.9-segfault.patch
@@ -0,0 +1,76 @@
+From 66282f58000c8863e104666c30cb67b1d5cbdee3 Mon Sep 17 00:00:00 2001
+From: "Kyle J. McKay" <mackyle@gmail.com>
+Date: Fri, 18 May 2012 00:30:11 -0700
+Subject: [PATCH] libvncserver/sockets.c: do not segfault when
+ listenSock/listen6Sock == -1
+
+---
+ libvncserver/sockets.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
+index 84c9c98..3ff2aac 100644
+--- a/libvncserver/sockets.c
++++ b/libvncserver/sockets.c
+@@ -402,9 +402,9 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen)
+ rfbLogPerror("rfbProcessNewConnection: error in select");
+ return FALSE;
+ }
+- if (FD_ISSET(rfbScreen->listenSock, &listen_fds))
++ if (rfbScreen->listenSock >= 0 && FD_ISSET(rfbScreen->listenSock, &listen_fds))
+ chosen_listen_sock = rfbScreen->listenSock;
+- if (FD_ISSET(rfbScreen->listen6Sock, &listen_fds))
++ if (rfbScreen->listen6Sock >= 0 && FD_ISSET(rfbScreen->listen6Sock, &listen_fds))
+ chosen_listen_sock = rfbScreen->listen6Sock;
+
+ if ((sock = accept(chosen_listen_sock,
+--
+1.8.5.5
+
+From 584542ba97d35706a9e5c001b5cdf64296b5dd7f Mon Sep 17 00:00:00 2001
+From: Oliver Loch <o.loch@gmx.net>
+Date: Wed, 8 Aug 2012 22:09:13 +0200
+Subject: [PATCH] Patched sockets.c to allow the use of IPv6 without IPv4.
+
+As requested only those lines are indented that have been changed.
+---
+ libvncserver/sockets.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
+index 3ff2aac..15b40ac 100644
+--- a/libvncserver/sockets.c
++++ b/libvncserver/sockets.c
+@@ -176,7 +176,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
+ rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
+ #endif
+ }
+- else if(rfbScreen->port>0) {
++ else
++ {
++ if(rfbScreen->port>0) {
+ FD_ZERO(&(rfbScreen->allFds));
+
+ if ((rfbScreen->listenSock = rfbListenOnTCPPort(rfbScreen->port, iface)) < 0) {
+@@ -187,8 +189,10 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
+
+ FD_SET(rfbScreen->listenSock, &(rfbScreen->allFds));
+ rfbScreen->maxFd = rfbScreen->listenSock;
++ }
+
+ #ifdef LIBVNCSERVER_IPv6
++ if (rfbScreen->ipv6port>0) {
+ if ((rfbScreen->listen6Sock = rfbListenOnTCP6Port(rfbScreen->ipv6port, rfbScreen->listen6Interface)) < 0) {
+ /* ListenOnTCP6Port has its own detailed error printout */
+ return;
+@@ -197,6 +201,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
+
+ FD_SET(rfbScreen->listen6Sock, &(rfbScreen->allFds));
+ rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
++ }
+ #endif
+
+ }
+--
+1.8.5.5
+
diff --git a/net-libs/libvncserver/files/libvncserver-memcpy.patch b/net-libs/libvncserver/files/libvncserver-memcpy.patch
new file mode 100644
index 000000000000..9d30e7e3122a
--- /dev/null
+++ b/net-libs/libvncserver/files/libvncserver-memcpy.patch
@@ -0,0 +1,24 @@
+Fix a buffer overflow on platforms where sizeof(long) > sizeof(int).
+https://bugs.gentoo.org/show_bug.cgi?id=329031
+
+--- libvncserver/tightvnc-filetransfer/filetransfermsg.c
++++ libvncserver/tightvnc-filetransfer/filetransfermsg.c
+@@ -393,7 +393,8 @@
+ CreateFileDownloadZeroSizeDataMsg(unsigned long mTime)
+ {
+ FileTransferMsg fileDownloadZeroSizeDataMsg;
+- int length = sz_rfbFileDownloadDataMsg + sizeof(int);
++ uint32_t mTime32 = (uint32_t)mTime;
++ int length = sz_rfbFileDownloadDataMsg + sizeof(mTime32);
+ rfbFileDownloadDataMsg *pFDD = NULL;
+ char *pFollow = NULL;
+
+@@ -413,7 +414,7 @@
+ pFDD->compressedSize = Swap16IfLE(0);
+ pFDD->realSize = Swap16IfLE(0);
+
+- memcpy(pFollow, &mTime, sizeof(unsigned long));
++ memcpy(pFollow, &mTime, sizeof(mTime32));
+
+ fileDownloadZeroSizeDataMsg.data = pData;
+ fileDownloadZeroSizeDataMsg.length = length;
diff --git a/net-libs/libvncserver/libvncserver-0.9.10-r1.ebuild b/net-libs/libvncserver/libvncserver-0.9.10-r1.ebuild
new file mode 100644
index 000000000000..12f679367ec6
--- /dev/null
+++ b/net-libs/libvncserver/libvncserver-0.9.10-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="library for creating vnc servers"
+HOMEPAGE="http://libvncserver.sourceforge.net/"
+SRC_URI="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="+24bpp gcrypt gnutls ipv6 +jpeg +png ssl static-libs test threads vaapi +zlib"
+
+DEPEND="
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gnutls? (
+ >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
+ )
+ !gnutls? (
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}-LibVNCServer-${PV}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ # https://github.com/LibVNC/libvncserver/issues/11
+ epatch "${FILESDIR}/${P}-libva-1.0.patch"
+
+ sed -i -r \
+ -e "/^SUBDIRS/s:\<$(usex test 'test|' '')client_examples|examples\>::g" \
+ Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ $(use_with 24bpp) \
+ $(use_with gnutls) \
+ $(usex gnutls --with-gcrypt $(use_with gcrypt)) \
+ $(usex gnutls --without-ssl $(use_with ssl)) \
+ $(use_with ipv6) \
+ $(use_with jpeg) \
+ $(use_with png) \
+ $(use_with threads pthread) \
+ $(use_with vaapi libva) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/net-libs/libvncserver/libvncserver-0.9.10-r3.ebuild b/net-libs/libvncserver/libvncserver-0.9.10-r3.ebuild
new file mode 100644
index 000000000000..2513920a9deb
--- /dev/null
+++ b/net-libs/libvncserver/libvncserver-0.9.10-r3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="library for creating vnc servers"
+HOMEPAGE="http://libvncserver.sourceforge.net/"
+SRC_URI="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="+24bpp gcrypt gnutls ipv6 +jpeg +png ssl static-libs test threads +zlib"
+
+DEPEND="
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gnutls? (
+ >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
+ )
+ !gnutls? (
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}-LibVNCServer-${PV}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ # https://github.com/LibVNC/libvncserver/issues/11
+ epatch "${FILESDIR}/${P}-libva-1.0.patch"
+
+ sed -i -r \
+ -e "/^SUBDIRS/s:\<$(usex test '' 'test|')client_examples|examples\>::g" \
+ Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # bug 548012: disable vaapi per upstream
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-silent-rules \
+ --without-libva \
+ $(use_enable static-libs static) \
+ $(use_with 24bpp) \
+ $(use_with gnutls) \
+ $(usex gnutls --with-gcrypt $(use_with gcrypt)) \
+ $(usex gnutls --without-ssl $(use_with ssl)) \
+ $(use_with ipv6) \
+ $(use_with jpeg) \
+ $(use_with png) \
+ $(use_with threads pthread) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/net-libs/libvncserver/libvncserver-0.9.10.ebuild b/net-libs/libvncserver/libvncserver-0.9.10.ebuild
new file mode 100644
index 000000000000..109f2e0741f1
--- /dev/null
+++ b/net-libs/libvncserver/libvncserver-0.9.10.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="library for creating vnc servers"
+HOMEPAGE="http://libvncserver.sourceforge.net/"
+SRC_URI="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="+24bpp gcrypt gnutls ipv6 +jpeg +png ssl static-libs test threads vaapi +zlib"
+
+DEPEND="
+ gcrypt? ( >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] )
+ gnutls? (
+ >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}]
+ )
+ !gnutls? (
+ ssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ )
+ jpeg? ( >=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}] )
+ png? ( >=media-libs/libpng-1.6.10:0[${MULTILIB_USEDEP}] )
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}-LibVNCServer-${PV}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ # https://github.com/LibVNC/libvncserver/issues/11
+ epatch "${FILESDIR}/${P}-libva-1.0.patch"
+
+ sed -i -r \
+ -e "/^SUBDIRS/s:\<$(usex test 'test|' '')client_examples|examples\>::g" \
+ Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ econf \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ $(use_with 24bpp) \
+ $(use_with gnutls) \
+ $(usex gnutls --with-gcrypt $(use_with gcrypt)) \
+ $(usex gnutls --without-ssl $(use_with ssl)) \
+ $(use_with ipv6) \
+ $(use_with jpeg) \
+ $(use_with png) \
+ $(use_with threads pthread) \
+ $(use_with zlib)
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files
+}
diff --git a/net-libs/libvncserver/metadata.xml b/net-libs/libvncserver/metadata.xml
new file mode 100644
index 000000000000..5ed648558f0d
--- /dev/null
+++ b/net-libs/libvncserver/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>alex_y_xu@yahoo.ca</email>
+ <name>Alex Xu</name>
+ <description>Proxy maintainer</description>
+ </maintainer>
+ <longdescription>
+If you don't know VNC, have a look at the original VNC or at Tridia
+VNC, who also have commercial support for it.
+
+Now that you know what it is, maybe you want to make your own server. If
+this is not the case, you can ignore the rest of this page an go on
+surfing the internet.
+
+Now that you want to make a VNC server, that is, a server which speaks
+the RFB protocol, you can download this library from sourceforge.
+</longdescription>
+ <use>
+ <flag name="24bpp">enable 24bpp support</flag>
+ <flag name="gcrypt">enable support for gcrypt</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">LibVNC/libvncserver</remote-id>
+ </upstream>
+</pkgmetadata>