# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0
name		apr-util0
version		0.9.15
categories	devel
maintainers	blair
platforms	darwin
description	utilities built with the apache group's portability library

long_description	apr-util is a library of useful utilities built with \
			and intended to be used with the Apache Portable \
			Runtime version 0.9.x.  This is an old version of \
			the APRutil library, the latest version is in the \
			apr-util port.

homepage	http://apr.apache.org/
master_sites	apache:apr

distname	apr-util-${version}
use_bzip2	yes
checksums	md5 8e1427f63379d4ebd6de525e5b242dc3

depends_lib	port:apr0 port:expat port:libiconv port:db44

configure.args	--with-apr=${prefix}/bin/apr-config --with-expat=${prefix} \
		--with-iconv=${prefix} \
		--with-berkeley-db=${prefix}/include:${prefix}/lib/db44 \
		--without-mysql --without-pgsql

test.run	yes
test.target	check
test.env	DYLD_LIBRARY_PATH=${worksrcpath}/.libs

post-destroot {
	delete ${destroot}${prefix}/lib/aprutil.exp
}

variant no_bdb	{
			depends_lib-delete	port:db44
			configure.args-delete	--with-berkeley-db=${prefix}/include:${prefix}/lib/db44
			configure.args-append	--without-berkeley-db
		}

variant openldap	{
				depends_lib-append port:openldap
				configure.args-append --with-ldap \
					--with-ldap-include=${prefix}/include \
					--with-ldap-lib=${prefix}/lib
			}

#pre-configure	{
#			reinplace "s|^Libs: |Libs: -L${prefix}/lib/db44 |" $worksrcpath/apr-util.pc.in
#		}

livecheck.type	regex
livecheck.url	http://www.apache.org/dist/apr/
livecheck.regex	APR-util (0\\.\[0-9.\]+)
