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

PortSystem	1.0
name		apr0
version		0.9.17
categories	devel
maintainers	blair
platforms	darwin
description	The apache group's portability library

long_description	The Apache Portable Runtime is a library of C data \
			structures and routines, forming a system portability \
			layer that covers as many operating systems as \
			possible, including Unices, Win32, BeOS, and OS/2.  \
			This is the old version of APR, the newest version \
			is in the apr port.

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

distname	apr-${version}
use_bzip2	yes
checksums	md5 cbeb635755165c800f7be5e059027318

configure.args	--with-installbuilddir=${prefix}/share/apr-0/build

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

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

platform darwin 9 {
	post-configure {
		reinplace {s|\(#define APR_HAS_SENDFILE[[:space:]]*\)1|\1 0|} ${worksrcpath}/include/apr.h
	}
}

platform darwin 10 {
	post-configure {
		reinplace {s|\(#define APR_HAS_SENDFILE[[:space:]]*\)1|\1 0|} ${worksrcpath}/include/apr.h
	}
}

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