Index: head/net/libvncserver/Makefile
===================================================================
--- head/net/libvncserver/Makefile	(revision 491455)
+++ head/net/libvncserver/Makefile	(revision 491456)
@@ -1,52 +1,45 @@
 # Created by: ijliao
 # $FreeBSD$
 
 PORTNAME=	libvncserver
-PORTVERSION=	0.9.11
-PORTREVISION=	2
+PORTVERSION=	0.9.12
 DISTVERSIONPREFIX=	LibVNCServer-
 CATEGORIES=	net devel
 
 MAINTAINER=	araujo@FreeBSD.org
 COMMENT=	Provide an easy API to a custom vnc server
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	libpng.so:graphics/png
+LIB_DEPENDS=	libpng.so:graphics/png \
+		liblzo2.so:archivers/lzo2
 
+USES=		cmake jpeg libtool pathfix pkgconfig
+USE_LDCONFIG=	yes
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	LibVNC
 
-USES=		autoreconf jpeg libtool pathfix pkgconfig
-USE_LDCONFIG=	yes
-GNU_CONFIGURE=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-INSTALL_TARGET=	install-strip
-
-OPTIONS_DEFINE=		GCRYPT IPV6 VAAPI
+OPTIONS_DEFINE=		GCRYPT IPV6
 OPTIONS_SINGLE=		SSL
 OPTIONS_SINGLE_SSL=	GNUTLS OPENSSL
 OPTIONS_DEFAULT=	OPENSSL
 GCRYPT_DESC=		libgcrypt support
 
 GNUTLS_IMPLIES=		GCRYPT
 GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
-GNUTLS_CONFIGURE_WITH=	gnutls
+GNUTLS_CMAKE_BOOL=	WITH_GNUTLS
 
-OPENSSL_CONFIGURE_WITH=	crypto ssl
+OPENSSL_CMAKE_BOOL=	WITH_OPENSSL
 OPENSSL_USES=		ssl
 
 GCRYPT_LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 			libgpg-error.so:security/libgpg-error
-GCRYPT_CONFIGURE_WITH=	gcrypt
+GCRYPT_CMAKE_BOOL=	WITH_GCRYPT
 
-IPV6_CONFIGURE_WITH=	ipv6
-
-VAAPI_LIB_DEPENDS=	libva.so:multimedia/libva
-VAAPI_CONFIGURE_WITH=	libva
+IPV6_CMAKE_BOOL=	WITH_IPv6
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/rfb/default8x16.h ${STAGEDIR}${PREFIX}/include/rfb
 
 .include <bsd.port.mk>
Index: head/net/libvncserver/distinfo
===================================================================
--- head/net/libvncserver/distinfo	(revision 491455)
+++ head/net/libvncserver/distinfo	(revision 491456)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1483637975
-SHA256 (LibVNC-libvncserver-LibVNCServer-0.9.11_GH0.tar.gz) = 193d630372722a532136fd25c5326b2ca1a636cbb8bf9bb115ef869c804d2894
-SIZE (LibVNC-libvncserver-LibVNCServer-0.9.11_GH0.tar.gz) = 1413739
+TIMESTAMP = 1546804739
+SHA256 (LibVNC-libvncserver-LibVNCServer-0.9.12_GH0.tar.gz) = 33cbbb4e15bb390f723c311b323cef4a43bcf781984f92d92adda3243a116136
+SIZE (LibVNC-libvncserver-LibVNCServer-0.9.12_GH0.tar.gz) = 2237447
Index: head/net/libvncserver/files/patch-common_md5.c
===================================================================
--- head/net/libvncserver/files/patch-common_md5.c	(revision 491455)
+++ head/net/libvncserver/files/patch-common_md5.c	(nonexistent)
@@ -1,11 +0,0 @@
---- common/md5.c.orig	2017-07-05 07:48:23 UTC
-+++ common/md5.c
-@@ -29,7 +29,7 @@
- #include "md5.h"
- 
- /* #ifdef _LIBC */
--# include <endian.h>
-+# include <sys/endian.h>
- # if __BYTE_ORDER == __BIG_ENDIAN
- #  define WORDS_BIGENDIAN 1
- # endif

Property changes on: head/net/libvncserver/files/patch-common_md5.c
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: head/net/libvncserver/files/patch-common_md5.h
===================================================================
--- head/net/libvncserver/files/patch-common_md5.h	(revision 491455)
+++ head/net/libvncserver/files/patch-common_md5.h	(nonexistent)
@@ -1,59 +0,0 @@
---- common/md5.h.orig	2017-07-05 07:48:49 UTC
-+++ common/md5.h
-@@ -98,21 +98,21 @@ struct md5_ctx
- 
- /* Initialize structure containing state of computation.
-    (RFC 1321, 3.3: Step 3)  */
--extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
-+extern void __md5_init_ctx (struct md5_ctx *ctx) ;
- 
- /* Starting with the result of former calls of this function (or the
-    initialization function update the context for the next LEN bytes
-    starting at BUFFER.
-    It is necessary that LEN is a multiple of 64!!! */
- extern void __md5_process_block (const void *buffer, size_t len,
--                 struct md5_ctx *ctx) __THROW;
-+                 struct md5_ctx *ctx) ;
- 
- /* Starting with the result of former calls of this function (or the
-    initialization function update the context for the next LEN bytes
-    starting at BUFFER.
-    It is NOT required that LEN is a multiple of 64.  */
- extern void __md5_process_bytes (const void *buffer, size_t len,
--                 struct md5_ctx *ctx) __THROW;
-+                 struct md5_ctx *ctx) ;
- 
- /* Process the remaining bytes in the buffer and put result from CTX
-    in first 16 bytes following RESBUF.  The result is always in little
-@@ -121,7 +121,7 @@ extern void __md5_process_bytes (const void *buffer, s
- 
-    IMPORTANT: On some systems it is required that RESBUF is correctly
-    aligned for a 32 bits value.  */
--extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
-+extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) ;
- 
- 
- /* Put result from CTX in first 16 bytes following RESBUF.  The result is
-@@ -130,19 +130,19 @@ extern void *__md5_finish_ctx (struct md5_ctx *ctx, vo
- 
-    IMPORTANT: On some systems it is required that RESBUF is correctly
-    aligned for a 32 bits value.  */
--extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
-+extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) ;
- 
- 
- /* Compute MD5 message digest for bytes read from STREAM.  The
-    resulting message digest number will be written into the 16 bytes
-    beginning at RESBLOCK.  */
--extern int __md5_stream (FILE *stream, void *resblock) __THROW;
-+extern int __md5_stream (FILE *stream, void *resblock) ;
- 
- /* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The
-    result is always in little endian byte order, so that a byte-wise
-    output yields to the wanted ASCII representation of the message
-    digest.  */
- extern void *__md5_buffer (const char *buffer, size_t len,
--               void *resblock) __THROW;
-+               void *resblock) ;
- 
- #endif /* md5.h */

Property changes on: head/net/libvncserver/files/patch-common_md5.h
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: head/net/libvncserver/files/patch-common_vncauth.c
===================================================================
--- head/net/libvncserver/files/patch-common_vncauth.c	(revision 491455)
+++ head/net/libvncserver/files/patch-common_vncauth.c	(revision 491456)
@@ -1,22 +1,22 @@
---- common/vncauth.c.orig	2017-07-05 07:43:58 UTC
+--- common/vncauth.c.orig	2019-01-06 19:09:30 UTC
 +++ common/vncauth.c
-@@ -42,6 +42,10 @@
+@@ -44,6 +44,10 @@
  #include <sys/stat.h>
  #endif
  
 +#ifdef __FreeBSD__
 +#include <fcntl.h>
 +#endif
 +
  #include <time.h>
  
  #ifdef WIN32
-@@ -196,6 +200,8 @@ rfbEncryptBytes(unsigned char *bytes, char *passwd)
+@@ -198,6 +202,8 @@ rfbEncryptBytes(unsigned char *bytes, char *passwd)
  	rfbDes(bytes+i, bytes+i);
      }
  }
 +
 +void rfbEncryptBytes2(unsigned char *, const int, unsigned char *);
  
  void
  rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) {
Index: head/net/libvncserver/files/patch-rfb_rfb.h
===================================================================
--- head/net/libvncserver/files/patch-rfb_rfb.h	(revision 491455)
+++ head/net/libvncserver/files/patch-rfb_rfb.h	(revision 491456)
@@ -1,20 +1,20 @@
---- rfb/rfb.h.orig	2017-07-05 07:45:47 UTC
+--- rfb/rfb.h.orig	2019-01-06 19:09:30 UTC
 +++ rfb/rfb.h
 @@ -43,7 +43,7 @@ extern "C"
  #include <string.h>
  #include <rfb/rfbproto.h>
  
 -#if defined(ANDROID) || defined(LIBVNCSERVER_HAVE_ANDROID)
 +#if defined(ANDROID) || defined(LIBVNCSERVER_HAVE_ANDROID) || defined(__FreeBSD__)
  #include <arpa/inet.h>
  #include <sys/select.h>
  #endif
-@@ -265,6 +265,8 @@ typedef struct _rfbScreenInfo
+@@ -266,6 +266,8 @@ typedef struct _rfbScreenInfo
      rfbBool autoPort;
      int port;
      SOCKET listenSock;
 +    SOCKET unixSock;
 +    const char *unixSockPath;
      int maxSock;
      int maxFd;
  #ifdef WIN32
Index: head/net/libvncserver/pkg-plist
===================================================================
--- head/net/libvncserver/pkg-plist	(revision 491455)
+++ head/net/libvncserver/pkg-plist	(revision 491456)
@@ -1,18 +1,15 @@
-bin/libvncserver-config
 include/rfb/default8x16.h
 include/rfb/keysym.h
 include/rfb/rfb.h
 include/rfb/rfbclient.h
 include/rfb/rfbconfig.h
 include/rfb/rfbproto.h
 include/rfb/rfbregion.h
-lib/libvncclient.a
 lib/libvncclient.so
 lib/libvncclient.so.1
-lib/libvncclient.so.1.0.0
-lib/libvncserver.a
+lib/libvncclient.so.0.9.12
 lib/libvncserver.so
 lib/libvncserver.so.1
-lib/libvncserver.so.1.0.0
+lib/libvncserver.so.0.9.12
 libdata/pkgconfig/libvncclient.pc
 libdata/pkgconfig/libvncserver.pc