--- /dev/null
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program 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. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME = libVNCServer
+PKG_VER = 0.9.7
+PKG_REL = 0
+
+PKG_MAINTAINER =
+PKG_GROUP = System/Libraries
+PKG_URL = http://libvncserver.sourceforge.net/
+PKG_LICENSE = GPLv2+
+PKG_SUMMARY = Library to make writing a vnc server easy.
+
+PKG_BUILD_DEPS+= libjpeg-devel zlib-devel
+
+PKG_PACKAGES += $(PKG_NAME)-devel
+
+define PKG_DESCRIPTION
+ LibVNCServer makes writing a VNC server (or more correctly, a program\
+ exporting a framebuffer via the Remote Frame Buffer protocol) easy.
+endef
+
+PKG_TARBALL = LibVNCServer-$(PKG_VER).tar.gz
+
+DIR_APP = $(DIR_SRC)/LibVNCServer-$(PKG_VER)
+
+CONFIGURE_OPTIONS += \
+ --disable-static \
+ --without-tightvnc-filetransfer
--- /dev/null
+diff -up LibVNCServer-0.9.1/libvncclient/vncviewer.c~ LibVNCServer-0.9.1/libvncclient/vncviewer.c
+--- LibVNCServer-0.9.1/libvncclient/vncviewer.c~ 2007-02-01 17:05:56.000000000 +0200
++++ LibVNCServer-0.9.1/libvncclient/vncviewer.c 2009-05-20 22:26:35.000000000 +0300
+@@ -316,6 +316,7 @@ void rfbClientCleanup(rfbClient* client)
+ #endif
+ #endif
+
++ if (client->sock > 0) close(client->sock);
+ free(client->desktopName);
+ free(client->serverHost);
+ free(client);
--- /dev/null
+diff -up LibVNCServer-0.9.1/libvncserver-config.in.multilib LibVNCServer-0.9.1/libvncserver-config.in
+--- LibVNCServer-0.9.1/libvncserver-config.in.multilib 2007-05-26 21:28:25.000000000 -0500
++++ LibVNCServer-0.9.1/libvncserver-config.in 2008-01-22 14:51:08.000000000 -0600
+@@ -4,7 +4,6 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ exec_prefix_set=no
+ includedir=@includedir@
+-libdir=@libdir@
+
+ # if this script is in the same directory as libvncserver-config.in, assume not installed
+ if [ -f "`dirname "$0"`/libvncserver-config.in" ]; then
+@@ -63,7 +62,7 @@ while test $# -gt 0; do
+ libs="$libs -R$dir"
+ fi
+ done
+- echo "$libs" -lvncserver -lvncclient @LIBS@ @WSOCKLIB@
++ echo "$libs" -lvncserver -lvncclient
+ ;;
+ --link)
+ echo @CC@
--- /dev/null
+Index: configure.ac
+===================================================================
+--- a/configure.ac.orig
++++ b/configure.ac
+@@ -636,9 +636,10 @@ fi
+ AC_CHECK_LIB(cygipc,shmget)
+ AM_CONDITIONAL(CYGIPC, test "$HAVE_CYGIPC" = "true")
+
+ # Check if /dev/vcsa1 exists, if so, define LINUX
+-AM_CONDITIONAL(LINUX, test -c /dev/vcsa1)
++dnl AM_CONDITIONAL(LINUX, test -c /dev/vcsa1)
++AM_CONDITIONAL(LINUX, test `uname` = Linux)
+
+ # Check for OS X specific header
+ AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, HAVE_OSX="true")
+ AM_CONDITIONAL(OSX, test "$HAVE_OSX" = "true")