# $Id: Portfile 67391 2010-05-07 07:19:38Z ryandesign@macports.org $

PortSystem 1.0

name			vnc
conflicts		tightvnc
version			4.1.3
categories		x11 vnc
maintainers		nomaintainer
license         GPLv2
description		Remote display system for X11 applications
long_description	Creates a virtual X11 windowing environment that can \
					be viewed not only on the machine where it is \
					running, but from anywhere on the Internet and from \
					a wide variety of machine architectures.
homepage		http://www.realvnc.com/
master_sites	freebsd:xc
distname		${name}-[string map {. _} ${version}]-unixsrc
checksums		md5 a119f3c75ad2767c0588260e2abe39be \
				sha1 fd4ebf2bf8945b5a419ab69059a98fe3bc6698ef \
				rmd160 9ef5a3b6f13d1227e5b9399c4d56884639cf9686
platforms		darwin

depends_lib		port:xorg-libXaw \
				port:xorg-libXtst \
				port:zlib

worksrcdir      ${worksrcdir}/unix

configure.args	--with-x --with-installed-zlib

destroot.cmd	./vncinstall
destroot.target
destroot.destdir ${destroot}${prefix}/bin ${destroot}${prefix}/share/man

post-destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/classes
	foreach f [glob -directory ${worksrcpath}/../common/javabin *] {
		xinstall -m 0644 $f ${destroot}${prefix}/share/${name}/classes
	}
	# server binary requires building XFree86, so delete the wrapper script
	delete ${destroot}${prefix}/bin/vncserver
	delete ${destroot}${prefix}/share/man/man1/vncserver.1
}
