# $Id: Portfile 77629 2011-04-07 04:35:28Z l2g@macports.org $

PortSystem 1.0
PortGroup python26 1.0

name			py26-svn
version			1.7.0
categories		python devel
maintainers		nomaintainer
platforms		darwin
description		Python Subversion Extension (pysvn)
long_description	The pysvn module is a python interface to the \
			Subversion version control system. This API exposes \
			client interfaces for managing a working copy, \
			querying a repository, and synchronizing the two.

homepage		http://pysvn.tigris.org/

master_sites		http://pysvn.barrys-emacs.org/source_kits/
distname		pysvn-${version}
checksums		md5     77614676d24bca45749034ea6ec449d8 \
			sha1    96f5217e7d74dbb2eee52e490e79d97b3959b0f0 \
			rmd160  e343fd373559d138e7b8414034527a3721566594

depends_lib-append	port:subversion

patchfiles              patch-Source_setup_configure.py.diff

worksrcdir		${worksrcdir}/Source

use_configure		yes
configure.cmd		${python.bin} setup.py configure
configure.args		--svn-root-dir=${prefix}
pre-configure {
	system "cd ${worksrcpath} && ${python.bin} setup.py backport"
}

build.cmd		make
build.target

destroot {
	file mkdir ${destroot}${python.pkgd}
	file copy ${worksrcpath}/pysvn ${destroot}${python.pkgd}

	file mkdir ${destroot}${prefix}/share/examples/${name}
	eval file copy [glob ${worksrcpath}/../Examples/*] \
		${destroot}${prefix}/share/examples/${name}
	eval file copy [glob ${worksrcpath}/../Docs/*] \
		${destroot}${prefix}/share/doc/${name}
}

livecheck.type  regex
livecheck.url   http://pysvn.tigris.org/project_downloads.html
livecheck.regex >pysvn-(.*?)${extract.suffix}<
