# $Id: Portfile 57331 2009-09-09 20:05:22Z ryandesign@macports.org $

PortSystem 1.0

name		librsync
version		0.9.7
revision	1
categories	net devel
platforms	darwin
maintainers	nomaintainer
description	library that implements the rsync remote-delta algorithm
long_description	librsync is a free software library that implements \
		the rsync remote-delta algorithm. This algorithm allows \
		efficient remote updates of a file, without requiring the old \
		and new versions to both be present at the sending end. The \
		library uses a streaming design similar to that of zlib with \
		the aim of allowing it to be embedded into many different \
		applications. librsync is not wire-compatible with rsync 2.x, \
		and is not likely to be in the future.
homepage	http://librsync.sourceforge.net/
master_sites	sourceforge
checksums	md5 24cdb6b78f45e0e83766903fd4f6bc84
# These patches have been downloaded into the MacPorts repository since it saves
# having to fetch them from CVS.  Respectively, they can be viewed at:
# 
# http://librsync.cvs.sourceforge.net/librsync/librsync/doc/rdiff.1?r1=1.1&r2=1.2&view=patch
# http://librsync.cvs.sourceforge.net/librsync/librsync/mdfour.h?r1=1.7&r2=1.8&view=patch
# http://librsync.cvs.sourceforge.net/librsync/librsync/patch.c?r1=1.30&r2=1.31&view=patch
patchfiles	patch-librsync__doc__rdiff.1 \
		patch-librsync__mdfour.h \
		patch-librsync__patch.c
configure.args	--mandir=${prefix}/share/man \
		--enable-shared

post-configure {
	if {[variant_isset universal]} {
		set archflags [portconfigure::configure_get_universal_archflags]
		reinplace -E "s|compiler_flags=$|compiler_flags=' ${archflags}'|" \
			${worksrcpath}/libtool
		reinplace -E "s|linker_flags=$|linker_flags=' ${archflags}'|" \
			${worksrcpath}/libtool
	}
}

test.run	yes
test.target	check
