[105301] trunk/dports/x11/tigervnc
ryandesign at macports.org
ryandesign at macports.org
Tue Apr 16 19:46:51 PDT 2013
Revision: 105301
https://trac.macports.org/changeset/105301
Author: ryandesign at macports.org
Date: 2013-04-16 19:46:51 -0700 (Tue, 16 Apr 2013)
Log Message:
-----------
tigervnc: update to 1.2.0
Modified Paths:
--------------
trunk/dports/x11/tigervnc/Portfile
Added Paths:
-----------
trunk/dports/x11/tigervnc/files/patch-common-fltk-src-filename_list.cxx.diff
trunk/dports/x11/tigervnc/files/patch-gnutls-3.diff
Removed Paths:
-------------
trunk/dports/x11/tigervnc/files/patch-configure.diff
Modified: trunk/dports/x11/tigervnc/Portfile
===================================================================
--- trunk/dports/x11/tigervnc/Portfile 2013-04-17 00:52:12 UTC (rev 105300)
+++ trunk/dports/x11/tigervnc/Portfile 2013-04-17 02:46:51 UTC (rev 105301)
@@ -2,11 +2,12 @@
# $Id$
PortSystem 1.0
+PortGroup cmake 1.0
+PortGroup conflicts_build 1.0
name tigervnc
conflicts vnc tightvnc
-version 1.1.0
-revision 2
+version 1.2.0
categories x11 vnc
maintainers nomaintainer
platforms darwin
@@ -23,18 +24,36 @@
homepage http://www.tigervnc.com/
master_sites sourceforge:project/${name}/${name}/${version}
-checksums rmd160 692ce76f38c229485ae75acb87f39f8844575e35 \
- sha256 594b70825a2c24863afd7b8dd2a5bc1935807118c6726e1d98396dee44d060f4
+checksums rmd160 c8f498c6812407bb1383b94234dcae8053a7d4f1 \
+ sha256 6e0910f1ff1681bc8b52e7ea805e586b88b352c88f66e4c2cc31aa39c4a32f53
-depends_build port:gccmakedep
-
-depends_lib port:gnutls \
+depends_lib port:gettext \
+ port:gnutls \
port:jpeg \
- port:xorg-libXaw \
+ port:Xft2 \
port:xorg-libX11 \
+ port:xorg-libXcursor \
+ port:xorg-libXext \
+ port:xorg-libXfixes \
+ port:xorg-libXinerama \
port:zlib
-patchfiles patch-configure.diff
+patchfiles patch-common-fltk-src-filename_list.cxx.diff \
+ patch-gnutls-3.diff
-configure.args --mandir=${prefix}/share/man \
- --with-system-jpeg
+# tigervnc includes its own copy of fltk and gets confused when the MacPorts
+# version is installed. Future versions of the tigervnc port will need the
+# MacPorts version fltk since the custom version has already been removed from
+# the tigervnc sources:
+# http://tigervnc.svn.sourceforge.net/viewvc/tigervnc?view=revision&revision=4951
+conflicts_build fltk fltk-devel
+
+configure.args-append -DUSE_INCLUDED_FLTK=ON
+
+post-destroot {
+ xinstall -d ${destroot}${prefix}/share/doc
+ move ${destroot}${prefix}/doc ${destroot}${prefix}/share/doc/${name}
+
+ delete ${destroot}${prefix}/share/man
+ move ${destroot}${prefix}/man ${destroot}${prefix}/share
+}
Added: trunk/dports/x11/tigervnc/files/patch-common-fltk-src-filename_list.cxx.diff
===================================================================
--- trunk/dports/x11/tigervnc/files/patch-common-fltk-src-filename_list.cxx.diff (rev 0)
+++ trunk/dports/x11/tigervnc/files/patch-common-fltk-src-filename_list.cxx.diff 2013-04-17 02:46:51 UTC (rev 105301)
@@ -0,0 +1,28 @@
+OS X 10.8 support
+http://www.fltk.org/str.php?L2864
+--- common/fltk/src/filename_list.cxx.orig 2011-01-05 10:50:10.000000000 -0600
++++ common/fltk/src/filename_list.cxx 2012-08-14 04:23:22.000000000 -0500
+@@ -31,7 +22,9 @@
+ #include <FL/fl_utf8.h>
+ #include "flstring.h"
+ #include <stdlib.h>
+-
++#ifdef __APPLE__
++#include <FL/x.H>
++#endif
+
+ extern "C" {
+ #ifndef HAVE_SCANDIR
+@@ -115,6 +108,12 @@
+ int n = scandir(dirloc, list, 0, (int(*)(void*, void*))sort);
+ #elif defined(__sgi)
+ int n = scandir(dirloc, list, 0, sort);
++#elif defined(__APPLE__)
++# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
++ int n = scandir(dirloc, list, 0, (int(*)(const struct dirent**,const struct dirent**))sort);
++# else
++ int n = scandir(dirloc, list, 0, (int(*)(const void*,const void*))sort);
++# endif
+ #else
+ // The vast majority of UNIX systems want the sort function to have this
+ // prototype, most likely so that it can be passed to qsort without any
Deleted: trunk/dports/x11/tigervnc/files/patch-configure.diff
===================================================================
--- trunk/dports/x11/tigervnc/files/patch-configure.diff 2013-04-17 00:52:12 UTC (rev 105300)
+++ trunk/dports/x11/tigervnc/files/patch-configure.diff 2013-04-17 02:46:51 UTC (rev 105301)
@@ -1,18 +0,0 @@
---- configure.orig 2011-08-09 16:17:24.000000000 -0500
-+++ configure 2011-09-01 20:25:48.000000000 -0500
-@@ -427,7 +427,6 @@
- PACKAGE_STRING='tigervnc 1.1.0'
- PACKAGE_BUGREPORT='http://www.tigervnc.org'
-
--ac_subdirs_all="$ac_subdirs_all common/jpeg common/zlib"
- # Factoring default headers for most tests.
- ac_includes_default="\
- #include <stdio.h>
-@@ -1988,7 +1987,6 @@
-
-
-
--subdirs="$subdirs common/jpeg common/zlib"
-
-
- ac_config_headers="$ac_config_headers config.h"
Added: trunk/dports/x11/tigervnc/files/patch-gnutls-3.diff
===================================================================
--- trunk/dports/x11/tigervnc/files/patch-gnutls-3.diff (rev 0)
+++ trunk/dports/x11/tigervnc/files/patch-gnutls-3.diff 2013-04-17 02:46:51 UTC (rev 105301)
@@ -0,0 +1,334 @@
+gnutls 3 support
+http://tigervnc.svn.sourceforge.net/viewvc/tigervnc?view=revision&revision=4921
+http://tigervnc.svn.sourceforge.net/viewvc/tigervnc?view=revision&revision=4922
+Index: config.h.in
+===================================================================
+--- config.h.in (revision 4920)
++++ config.h.in (revision 4922)
+@@ -8,7 +8,8 @@
+ #cmakedefine HAVE_STRCASECMP
+ #cmakedefine HAVE_STRNCASECMP
+ #cmakedefine HAVE_VSNPRINTF
+-#cmakedefine HAVE_OLD_GNUTLS
++#cmakedefine HAVE_GNUTLS_SET_GLOBAL_ERRNO
++#cmakedefine HAVE_GNUTLS_SET_ERRNO
+ #cmakedefine HAVE_GNUTLS_X509_CRT_PRINT
+ #cmakedefine HAVE_GNUTLS_X509_CRT_T
+ #cmakedefine HAVE_GNUTLS_DATUM_T
+Index: common/rdr/TLSInStream.h
+===================================================================
+--- common/rdr/TLSInStream.h (revision 4920)
++++ common/rdr/TLSInStream.h (revision 4922)
+@@ -41,6 +41,7 @@
+ private:
+ int overrun(int itemSize, int nItems, bool wait);
+ int readTLS(U8* buf, int len, bool wait);
++ static ssize_t pull(gnutls_transport_ptr str, void* data, size_t size);
+
+ gnutls_session session;
+ InStream* in;
+@@ -48,9 +49,6 @@
+ int offset;
+ U8* start;
+ };
+-
+- ssize_t gnutls_InStream_pull(gnutls_transport_ptr,void*, size_t);
+-
+ };
+
+ #endif
+Index: common/rdr/TLSOutStream.cxx
+===================================================================
+--- common/rdr/TLSOutStream.cxx (revision 4920)
++++ common/rdr/TLSOutStream.cxx (revision 4922)
+@@ -25,27 +25,25 @@
+ #include <rdr/Exception.h>
+ #include <rdr/TLSException.h>
+ #include <rdr/TLSOutStream.h>
++#include <rdr/TLSErrno.h>
+ #include <errno.h>
+
+-#ifdef HAVE_OLD_GNUTLS
+-#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
+-#endif
+-
+ #ifdef HAVE_GNUTLS
+ using namespace rdr;
+
+ enum { DEFAULT_BUF_SIZE = 16384 };
+
+-ssize_t rdr::gnutls_OutStream_push(gnutls_transport_ptr str, const void* data,
++ssize_t TLSOutStream::push(gnutls_transport_ptr str, const void* data,
+ size_t size)
+ {
+- OutStream* out = (OutStream*) str;
++ TLSOutStream* self= (TLSOutStream*) str;
++ OutStream *out = self->out;
+
+ try {
+ out->writeBytes(data, size);
+ out->flush();
+ } catch (Exception& e) {
+- gnutls_transport_set_global_errno(EINVAL);
++ gnutls_errno_helper(self->session, EINVAL);
+ return -1;
+ }
+
+@@ -55,8 +53,14 @@
+ TLSOutStream::TLSOutStream(OutStream* _out, gnutls_session _session)
+ : session(_session), out(_out), bufSize(DEFAULT_BUF_SIZE), offset(0)
+ {
++ gnutls_transport_ptr recv, send;
++
+ ptr = start = new U8[bufSize];
+ end = start + bufSize;
++
++ gnutls_transport_set_push_function(session, push);
++ gnutls_transport_get_ptr2(session, &recv, &send);
++ gnutls_transport_set_ptr2(session, recv, this);
+ }
+
+ TLSOutStream::~TLSOutStream()
+@@ -67,6 +71,8 @@
+ } catch (Exception&) {
+ }
+ #endif
++ gnutls_transport_set_push_function(session, NULL);
++
+ delete [] start;
+ }
+
+Index: common/rdr/TLSOutStream.h
+===================================================================
+--- common/rdr/TLSOutStream.h (revision 4920)
++++ common/rdr/TLSOutStream.h (revision 4922)
+@@ -43,6 +43,7 @@
+
+ private:
+ int writeTLS(const U8* data, int length);
++ static ssize_t push(gnutls_transport_ptr str, const void* data, size_t size);
+
+ gnutls_session session;
+ OutStream* out;
+@@ -50,8 +51,6 @@
+ U8* start;
+ int offset;
+ };
+-
+- ssize_t gnutls_OutStream_push(gnutls_transport_ptr, const void*, size_t);
+ };
+
+ #endif
+Index: common/rdr/TLSErrno.h
+===================================================================
+--- common/rdr/TLSErrno.h (revision 0)
++++ common/rdr/TLSErrno.h (revision 4922)
+@@ -0,0 +1,46 @@
++/* Copyright (C) 2012 Pierre Ossman for Cendio AB
++ *
++ * This 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 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This software 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 software; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++ * USA.
++ */
++
++#ifndef __RDR_TLSERRNO_H__
++#define __RDR_TLSERRNO_H__
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#ifdef HAVE_GNUTLS
++
++#include <errno.h>
++
++namespace rdr {
++
++ static inline void gnutls_errno_helper(gnutls_session session, int _errno)
++ {
++#if defined(HAVE_GNUTLS_SET_ERRNO)
++ gnutls_transport_set_errno(session, _errno);
++#elif defined(HAVE_GNUTLS_SET_GLOBAL_ERRNO)
++ gnutls_transport_set_global_errno(_errno);
++#else
++ errno = _errno;
++#endif
++ }
++};
++
++#endif
++
++#endif
+Index: common/rdr/TLSInStream.cxx
+===================================================================
+--- common/rdr/TLSInStream.cxx (revision 4920)
++++ common/rdr/TLSInStream.cxx (revision 4922)
+@@ -25,25 +25,22 @@
+ #include <rdr/Exception.h>
+ #include <rdr/TLSException.h>
+ #include <rdr/TLSInStream.h>
++#include <rdr/TLSErrno.h>
+ #include <errno.h>
+
+-#ifdef HAVE_OLD_GNUTLS
+-#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0)
+-#endif
+-
+ #ifdef HAVE_GNUTLS
+ using namespace rdr;
+
+ enum { DEFAULT_BUF_SIZE = 16384 };
+
+-ssize_t rdr::gnutls_InStream_pull(gnutls_transport_ptr str, void* data,
+- size_t size)
++ssize_t TLSInStream::pull(gnutls_transport_ptr str, void* data, size_t size)
+ {
+- InStream* in= (InStream*) str;
++ TLSInStream* self= (TLSInStream*) str;
++ InStream *in = self->in;
+
+ try {
+ if (!in->check(1, 1, false)) {
+- gnutls_transport_set_global_errno(EAGAIN);
++ gnutls_errno_helper(self->session, EAGAIN);
+ return -1;
+ }
+
+@@ -53,7 +50,7 @@
+ in->readBytes(data, size);
+
+ } catch (Exception& e) {
+- gnutls_transport_set_global_errno(EINVAL);
++ gnutls_errno_helper(self->session, EINVAL);
+ return -1;
+ }
+
+@@ -63,11 +60,19 @@
+ TLSInStream::TLSInStream(InStream* _in, gnutls_session _session)
+ : session(_session), in(_in), bufSize(DEFAULT_BUF_SIZE), offset(0)
+ {
++ gnutls_transport_ptr recv, send;
++
+ ptr = end = start = new U8[bufSize];
++
++ gnutls_transport_set_pull_function(session, pull);
++ gnutls_transport_get_ptr2(session, &recv, &send);
++ gnutls_transport_set_ptr2(session, this, send);
+ }
+
+ TLSInStream::~TLSInStream()
+ {
++ gnutls_transport_set_pull_function(session, NULL);
++
+ delete[] start;
+ }
+
+Index: common/rfb/CSecurityTLS.cxx
+===================================================================
+--- common/rfb/CSecurityTLS.cxx (revision 4920)
++++ common/rfb/CSecurityTLS.cxx (revision 4922)
+@@ -188,20 +188,20 @@
+ throw AuthFailureException("gnutls_set_default_priority failed");
+
+ setParam();
+-
+- gnutls_transport_set_pull_function(session, rdr::gnutls_InStream_pull);
+- gnutls_transport_set_push_function(session, rdr::gnutls_OutStream_push);
+- gnutls_transport_set_ptr2(session,
+- (gnutls_transport_ptr) is,
+- (gnutls_transport_ptr) os);
+ }
+
++ rdr::TLSInStream *tlsis = new rdr::TLSInStream(is, session);
++ rdr::TLSOutStream *tlsos = new rdr::TLSOutStream(os, session);
++
+ int err;
+ err = gnutls_handshake(session);
+- if (err != GNUTLS_E_SUCCESS && !gnutls_error_is_fatal(err))
+- return false;
+-
+ if (err != GNUTLS_E_SUCCESS) {
++ delete tlsis;
++ delete tlsos;
++
++ if (!gnutls_error_is_fatal(err))
++ return false;
++
+ vlog.error("TLS Handshake failed: %s\n", gnutls_strerror (err));
+ shutdown(false);
+ throw AuthFailureException("TLS Handshake failed");
+@@ -209,8 +209,7 @@
+
+ checkSession();
+
+- cc->setStreams(fis = new rdr::TLSInStream(is, session),
+- fos = new rdr::TLSOutStream(os, session));
++ cc->setStreams(fis = tlsis, fos = tlsos);
+
+ return true;
+ }
+Index: common/rfb/SSecurityTLS.cxx
+===================================================================
+--- common/rfb/SSecurityTLS.cxx (revision 4920)
++++ common/rfb/SSecurityTLS.cxx (revision 4922)
+@@ -148,17 +148,19 @@
+ throw;
+ }
+
+- gnutls_transport_set_pull_function(session,rdr::gnutls_InStream_pull);
+- gnutls_transport_set_push_function(session,rdr::gnutls_OutStream_push);
+- gnutls_transport_set_ptr2(session,
+- (gnutls_transport_ptr)is,
+- (gnutls_transport_ptr)os);
+ os->writeU8(1);
+ os->flush();
+ }
+
++ rdr::TLSInStream *tlsis = new rdr::TLSInStream(is, session);
++ rdr::TLSOutStream *tlsos = new rdr::TLSOutStream(os, session);
++
+ int err;
+- if ((err = gnutls_handshake(session)) != GNUTLS_E_SUCCESS) {
++ err = gnutls_handshake(session);
++ if (err != GNUTLS_E_SUCCESS) {
++ delete tlsis;
++ delete tlsos;
++
+ if (!gnutls_error_is_fatal(err)) {
+ vlog.debug("Deferring completion of TLS handshake: %s", gnutls_strerror(err));
+ return false;
+@@ -170,8 +172,7 @@
+
+ vlog.debug("Handshake completed");
+
+- sc->setStreams(fis=new rdr::TLSInStream(is,session),
+- fos=new rdr::TLSOutStream(os,session));
++ sc->setStreams(fis = tlsis, fos = tlsos);
+
+ return true;
+ }
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt (revision 4920)
++++ CMakeLists.txt (revision 4922)
+@@ -356,7 +356,8 @@
+ # system's version (if available) to perform this test.
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};-lz)
+ endif()
+- check_function_exists(gnutls_transport_set_global_errno HAVE_OLD_GNUTLS)
++ check_function_exists(gnutls_transport_set_errno HAVE_GNUTLS_SET_ERRNO)
++ check_function_exists(gnutls_transport_set_global_errno HAVE_GNUTLS_SET_GLOBAL_ERRNO)
+ check_function_exists(gnutls_x509_crt_print HAVE_GNUTLS_X509_CRT_PRINT)
+ check_type_size(gnutls_x509_crt_t GNUTLS_X509_CRT_T)
+ check_type_size(gnutls_datum_t GNUTLS_DATUM_T)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130416/f738cec8/attachment.html>
More information about the macports-changes
mailing list