DESCRIPTION="Subversion is an open source version control system" 
HOMEPAGE="http://subversion.apache.org" 
SRC_URI="http://apache.deathculture.net/subversion/subversion-1.7.0-rc2.tar.bz2"
CHECKSUM_MD5="f0242ae5a2abc14cc22e65c2a23b09c4"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/apr >= 1.4.4
	dev-libs/apr-util >= 1.3.12
	net-misc/neon >= 0.29.6
	dev-libs/libiconv >= 1.13.1
	dev-db/sqlite >= 3.7.7.1
	dev-libs/expat >= 2.0.1
	dev-libs/openssl >= 1.0.0d
	dev-libs/libxml2 >= 2.7.8"

BUILD()
{
	cd subversion-1.7.0-rc2
	libtoolize --force --copy --install
	aclocal -I build -I build/ac-macros
	autoconf
	COMMON_DIR=`finddir B_COMMON_DIRECTORY`
	./configure --prefix=$COMMON_DIR \
		--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
		--with-apr=`finddir B_COMMON_BIN_DIRECTORY`/apr-1-config \
		--with-apr-util=`finddir B_COMMON_BIN_DIRECTORY`/apu-1-config \
		--with-neon=$COMMON_DIR \
		--with-zlib=$COMMON_DIR \
		--with-editor=nano \
		--disable-nls
	make
}

INSTALL()
{
	cd subversion-1.7.0-rc2
	make install
	if type -p swig > /dev/null;then
		if type -p python > /dev/null;then
			PYTHON_PKGDIR=$(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
			make install-swig-py swig_pydir=${PYTHON_PKGDIR}/libsvn swig_pydir_extra=${PYTHON_PKGDIR}/svn
		fi
		#if type -p perl > /dev/null;then
		#	make install-swig-pl
		#fi
		#if type -p ruby > /dev/null;then
		#	make install-swig-rb
		#fi
	fi
}

TEST()
{
	cd subversion-1.7.0-rc2
	make check
}

LICENSE="Apache-Subversion"
COPYRIGHT="2011 The Apache Software Foundation"
