# $Id: Portfile 65230 2010-03-24 07:08:09Z toby@macports.org $

PortSystem 1.0

name             c-ares
version          1.7.1
categories       net
maintainers      toby
description      asynchronous DNS library
long_description \
    c-ares is a C library that performs DNS requests and \
    name resolves asynchronously. c-ares is a fork of the \
    library named 'ares', written by Greg Hudson at MIT.
homepage         http://c-ares.haxx.se/
platforms        darwin
license          MIT
master_sites     ${homepage}
checksums        md5 dc7e0f32e92613aed9aff233a6b69753 \
                 sha1 401b3e4987b2a40ca0cb7b50b7deacd4a92d0ada \
                 rmd160 7fe322ae022eff72ca488508882f29dd32475262
configure.args   --mandir=${prefix}/share/man \
                 --enable-shared

post-configure {
    system "ed - ${worksrcpath}/ares_build.h < ${filespath}/ares_build.h.ed"
    system "ed - ${worksrcpath}/ares_config.h < ${filespath}/ares_config.h.ed"
}

livecheck.type   regex
livecheck.regex  href=\"c-ares-(\[0-9\]+\\.\[0-9\]+\\.\[0-9\]+)\\.tar\\.gz\"
