# $Id: Portfile 36984 2008-05-22 03:01:31Z dluke@macports.org $

PortSystem	1.0

name		apr-rast
version		1.2.12
revision	0
categories	devel
maintainers	kimuraw
platforms	darwin
description	apr for Rast (version 1.2.x)
long_description	apr for Rast (version 1.2.x)

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

distfiles       apr-${version}.tar.bz2
worksrcdir       apr-${version}
use_bzip2	yes
checksums	md5 c5da94517e3918f0f2b2e0a05f56aa21 \
		sha1 f6b41162440a1275b3d61dfd3ce784f35d6b7a40 \
		rmd160 d07de708c3019eec54eb4c354b1ef7680a2b7975

use_parallel_build	yes
configure.env   ac_cv_prog_AWK=awk
configure.args	--with-installbuilddir=${prefix}/share/${name}-1/build
configure.args-append  --prefix=${prefix}/lib/${name} \
                --bindir=${prefix}/lib/${name}/bin \
                --libdir=${prefix}/lib/${name} \
                --includedir=${prefix}/include/${name}

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

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

livecheck.check regex
livecheck.url   http://apache.org/dist/apr/
livecheck.regex {<a href="#apr">APR (\d+(?:\.\d+)*) is the latest available version</a>}
