# $Id$

PortSystem 1.0

name			rsync-lart
version			2.6.6
categories		net
maintainers		css
description		rsync with LART extended attributes support patches
platforms		darwin freebsd
long_description	rsync is a file transfer program for Unix systems. \
		rsync uses the 'rsync algorithm' which provides a very fast \
		method for bringing remote files into sync. It does this by \
		sending just the differences in the files across the link, \
		without requiring that both sets of files are present at one \
		of the ends of the link beforehand. NOTE This version of \
		rsync adds extended attribute support from Apple as well as \
		third party fixes from http://www.lartmaker.nl/rsync/

# Related pages:
# http://www.lartmaker.nl/rsync/
# http://www.opensource.apple.com/darwinsource/10.4.3/rsync-20/
# http://www.opensource.apple.com/darwinsource/10.4.3/rsync-20/patches/

homepage		http://www.lartmaker.nl/rsync/
master_sites		http://samba.org/ftp/rsync/old-versions/ \
			ftp://samba.anu.edu.au/pub/rsync/old-versions/  \
			ftp://sunsite.auc.dk/pub/unix/rsync/old-versions/  \
			ftp://ftp.sunet.se/pub/unix/admin/rsync/old-versions/  \
			ftp://ftp.fu-berlin.de/pub/unix/network/rsync/old-versions/
distname		rsync-${version}
checksums		md5 30c4e2849cbeae93f55548453865c2f2
platforms		darwin freebsd sunos

depends_lib		port:popt

# These patches include Apple's EA and PR-3945747-endian patches as well
# as Tiger rsync fixes from http://www.lartmaker.nl/rsync/
patchfiles		patch-config.h.in.diff \
			patch-configure.diff \
			patch-configure.in.diff \
			patch-flist.c.diff \
			patch-generator.c.diff \
			patch-main.c.diff \
			patch-options.c.diff \
			patch-proto.h.diff \
			patch-receiver.c.diff \
			patch-rsync.1.diff \
			patch-rsync.c.diff \
			patch-rsync.h.diff \
			patch-rsync.yo.diff \
			patch-sender.c.diff \
			patch-syscall.c.diff \
			patch-t_unsafe.c.diff \
			patch-tls.c.diff \
			patch-trimslash.c.diff

configure.args		--mandir=${prefix}/share/man \
			--with-rsyncd-conf=${prefix}/etc/rsyncd.conf \
			--enable-ea-support

build.type		gnu

# Activate Apple's copyfile.h header by copying it into the
# worksrcpath, then modify the configure command to locate it.
platform darwin 8 {
	# Copy Apple's copyfile.h for use on Mac OS X 10.4 and higher.
	# See APPLE_LICENSE.txt for license and copying information.
	post-patch {
		file copy ${portpath}/${filesdir}/copyfile.h ${worksrcpath}
	}
	configure.cppflags-append	"-I${worksrcpath}"
}

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} COPYING INSTALL NEWS OLDNEWS TODO \
		README doc/README-SGML doc/profile.txt doc/rsync.sgml \
		${destroot}${prefix}/share/doc/${name}
}